Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jinfa-platform
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
黄庭坚
jinfa-platform
Commits
7316534b
Commit
7316534b
authored
Oct 19, 2021
by
前端-李俊鑫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 内容管理字符及必填想问题
parent
1436f214
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
33 additions
and
24 deletions
+33
-24
contentRoute.ts
config/routes/contentRoute.ts
+8
-8
schema.tsx
src/pages/content/category/schema.tsx
+2
-3
infomationInfo.tsx
src/pages/content/infomation/infomationInfo.tsx
+18
-3
infomationInfoSchema.tsx
src/pages/content/infomation/schema/infomationInfoSchema.tsx
+0
-4
index.tsx
src/pages/content/tagsManagement/schema/index.tsx
+5
-6
No files found.
config/routes/contentRoute.ts
View file @
7316534b
...
...
@@ -13,7 +13,7 @@
{
path
:
'/memberCenter/contentAbility/category'
,
name
:
'分类管理'
,
component
:
'@/pages/
memberCenter/contentAbility
/category'
component
:
'@/pages/
content
/category'
},
// 栏目管理
...
...
@@ -41,19 +41,19 @@
{
path
:
'/memberCenter/contentAbility/tagsManagement'
,
name
:
'tagsManagement'
,
component
:
'@/pages/
memberCenter/contentAbility
/tagsManagement'
component
:
'@/pages/
content
/tagsManagement'
},
{
path
:
'/memberCenter/contentAbility/tagsManagement/add'
,
name
:
'tagsAdd'
,
component
:
'@/pages/
memberCenter/contentAbility
/tagsManagement/tagsInfo'
,
component
:
'@/pages/
content
/tagsManagement/tagsInfo'
,
hideInMenu
:
true
,
hidePageHeader
:
true
,
},
{
path
:
'/memberCenter/contentAbility/tagsManagement/detail'
,
name
:
'tagsInfo'
,
component
:
'@/pages/
memberCenter/contentAbility
/tagsManagement/tagsInfo'
,
component
:
'@/pages/
content
/tagsManagement/tagsInfo'
,
hideInMenu
:
true
,
hidePageHeader
:
true
,
},
...
...
@@ -78,24 +78,24 @@
hideInMenu
:
true
,
hidePageHeader
:
true
,
},
// 公告管理
{
path
:
'/memberCenter/contentAbility/announcements'
,
name
:
'announcements'
,
component
:
'@/pages/
memberCenter/contentAbility
/announcements'
component
:
'@/pages/
content
/announcements'
},
{
path
:
'/memberCenter/contentAbility/announcements/add'
,
name
:
'announceAdd'
,
component
:
'@/pages/
memberCenter/contentAbility
/announcements/announceInfo'
,
component
:
'@/pages/
content
/announcements/announceInfo'
,
hideInMenu
:
true
,
hidePageHeader
:
true
,
},
{
path
:
'/memberCenter/contentAbility/announcements/detail'
,
name
:
'announceInfo'
,
component
:
'@/pages/
memberCenter/contentAbility
/announcements/announceInfo'
,
component
:
'@/pages/
content
/announcements/announceInfo'
,
hideInMenu
:
true
,
hidePageHeader
:
true
,
},
...
...
src/pages/content/category/schema.tsx
View file @
7316534b
...
...
@@ -28,19 +28,18 @@ export const classSchema: ISchema = {
title
:
'分类名称'
,
required
:
true
,
"x-component-props"
:
{
placeholder
:
'请输入
品
类名称'
placeholder
:
'请输入
分
类名称'
},
"x-rules"
:
[
{
limitByte
:
true
,
maxByte
:
16
maxByte
:
20
}
]
},
describe
:
{
type
:
'textarea'
,
title
:
'类型'
,
required
:
true
,
"x-component-props"
:
{
placeholder
:
'最多100个字符,50个汉字'
},
...
...
src/pages/content/infomation/infomationInfo.tsx
View file @
7316534b
...
...
@@ -44,6 +44,8 @@ const InfomationInfo = () => {
const
initialValues
=
useInitialValues
({
id
:
id
},
PublicApi
.
getManageMemberInformationGet
);
const
[
category
,
setCategory
]
=
useState
<
any
>
([]);
const
[
column
,
setColumn
]
=
useState
<
ColumnListType
[]
>
([])
const
[
recommendLabelValue
,
setRecommendLabelValue
]
=
useState
<
number
>
();
const
isEdit
=
id
&&
!
preview
;
const
isAdd
=
!
id
&&
!
preview
;
const
isView
=
id
&&
preview
;
...
...
@@ -142,13 +144,17 @@ const InfomationInfo = () => {
: PublicApi.postManageMemberInformationUpdate
const postData = isAdd ? tempPostData : {...tempPostData, id: id};
console.log(`
postData
`, postData)
setSubmitLoading(true)
setUnsaved(false)
serviceActions(postData).then((data) => {
setSubmitLoading(false);
if(data.code === 1000) {
history.push('/memberCenter/contentAbility/infomations')
} else {
setSubmitLoading(false)
}
}).catch(() => {
setSubmitLoading(false)
})
}
...
...
@@ -199,7 +205,16 @@ const InfomationInfo = () => {
state.props['x-component-props']!["options"] = list;
})
})
onFieldValueChange$('recommendLabel').subscribe(({ value }) => {
console.log(`
recommendLabel
value
`, value)
setRecommendLabelValue(value)
actions.setFieldState('imageUrl', state => {
state.props["x-rules"] = [1, 2, 3, 4, 6].includes(value) ? {
"required": true,
"message": "请上传图片"
} : {}
})
})
}}
expressionScope={{
tagOnChange: (value) => {
...
...
@@ -208,7 +223,7 @@ const InfomationInfo = () => {
label: (
<div>
{
isAdd || isEdit
(isAdd || isEdit) && [1, 2, 3, 4, 6].includes(recommendLabelValue)
? <span style={{color: '#ff4d4f'}}>* </span>
: null
}
...
...
src/pages/content/infomation/schema/infomationInfoSchema.tsx
View file @
7316534b
...
...
@@ -219,10 +219,6 @@ const schema = {
// onChange: "{{uploadImage}}",
fileMaxSize
:
300
},
"x-rules"
:
{
"required"
:
true
,
"message"
:
"请上传图片"
},
},
digest
:
{
type
:
'string'
,
...
...
src/pages/content/tagsManagement/schema/index.tsx
View file @
7316534b
...
...
@@ -3,7 +3,7 @@ import EyePreview from '@/components/EyePreview';
const
columns
=
[
{
title
:
'ID'
,
dataIndex
:
'id'
},
{
title
:
'标签名称'
,
dataIndex
:
'name'
,
title
:
'标签名称'
,
dataIndex
:
'name'
,
render
:
(
text
:
string
,
record
:
any
)
=>
(
<
EyePreview
url=
{
`/memberCenter/contentAbility/tagsManagement/detail?id=${record.id}&preview=1`
}
...
...
@@ -51,9 +51,9 @@ const schema = {
name
:
'search'
,
'x-component'
:
'CustomSearch'
,
'x-component-props'
:
{
placeholder
:
"请填写
栏目
名称"
,
placeholder
:
"请填写
标签
名称"
,
"onSearch"
:
"{{search}}"
,
}
},
searchBtn
:
{
...
...
@@ -70,7 +70,7 @@ const schema = {
},
}
}
}
},
"table"
:
{
...
...
@@ -102,4 +102,4 @@ const schema = {
}
}
export
default
schema
;
\ No newline at end of file
export
default
schema
;
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment