Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
szse
Overview
Overview
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
zhaochengxiang
szse
Commits
1cd2b826
Commit
1cd2b826
authored
Jul 15, 2022
by
zhaochengxiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
资产模版更新
parent
3a8b1679
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
35 additions
and
74 deletions
+35
-74
AssetThemeModel.xlsx
public/docs/AssetThemeModel.xlsx
+0
-0
UpdateBasicInfo.jsx
src/view/Manage/DataMaster/Component/UpdateBasicInfo.jsx
+33
-0
UpdateField.jsx
src/view/Manage/DataMaster/Component/UpdateField.jsx
+0
-0
UpdateTemplateModal.jsx
src/view/Manage/DataMaster/Component/UpdateTemplateModal.jsx
+2
-74
No files found.
public/docs/AssetThemeModel.xlsx
View file @
1cd2b826
No preview for this file type
src/view/Manage/DataMaster/Component/UpdateBasicInfo.jsx
0 → 100644
View file @
1cd2b826
import
{
Form
,
Input
}
from
"antd"
;
const
UpdateBasicInfo
=
(
props
)
=>
{
const
[
form
]
=
Form
.
useForm
();
const
formItemLayout
=
{
labelCol
:
{
xs
:
{
span
:
24
},
sm
:
{
span
:
6
},
},
wrapperCol
:
{
xs
:
{
span
:
24
},
sm
:
{
span
:
18
},
},
};
return
(
<
Form
form=
{
form
}
{
...
formItemLayout
}
>
<
Form
.
Item
label=
'模版名称'
name=
'name'
rules=
{
[{
required
:
true
,
message
:
'请填写模版名称'
}]
}
>
<
Input
style=
{
{
width
:
'87%'
}
}
/>
</
Form
.
Item
>
<
Form
.
Item
label=
'模版中文名称'
name=
'cnName'
rules=
{
[{
required
:
true
,
message
:
'请填写模版中文名称'
}]
}
>
<
Input
style=
{
{
width
:
'87%'
}
}
/>
</
Form
.
Item
>
</
Form
>
);
}
export
default
UpdateBasicInfo
;
\ No newline at end of file
src/view/Manage/DataMaster/Component/UpdateField.jsx
0 → 100644
View file @
1cd2b826
src/view/Manage/DataMaster/Component/UpdateTemplateModal.jsx
View file @
1cd2b826
import
{
Modal
,
Form
,
Input
,
Button
}
from
"antd"
;
import
{
MinusCircleOutlined
,
PlusOutlined
}
from
'@ant-design/icons'
;
import
UpdateBasicInfo
from
"./UpdateBasicInfo"
;
import
'./UpdateTemplateModal.less'
;
const
UpdateTemplateModal
=
(
props
)
=>
{
...
...
@@ -49,80 +50,7 @@ const UpdateTemplateModal = (props) => {
onCancel=
{
onCancel
}
onOk=
{
onFormFinish
}
>
<
Form
form=
{
form
}
{
...
formItemLayout
}
>
<
Form
.
Item
label=
'模版名称'
name=
'name'
rules=
{
[{
required
:
true
,
message
:
'请填写模版名称'
}]
}
>
<
Input
style=
{
{
width
:
'87%'
}
}
/>
</
Form
.
Item
>
<
Form
.
Item
label=
'模版中文名称'
name=
'cnName'
rules=
{
[{
required
:
true
,
message
:
'请填写模版中文名称'
}]
}
>
<
Input
style=
{
{
width
:
'87%'
}
}
/>
</
Form
.
Item
>
<
Form
.
List
name=
"names"
rules=
{
[
{
validator
:
async
(
_
,
names
)
=>
{
if
(
!
names
||
names
.
length
<
1
)
{
return
Promise
.
reject
(
new
Error
(
'至少需要一个属性'
));
}
},
},
]
}
>
{
(
fields
,
{
add
,
remove
},
{
errors
})
=>
(
<>
{
fields
.
map
((
field
,
index
)
=>
(
<
Form
.
Item
label=
{
`属性${index+1}`
}
required=
{
false
}
key=
{
field
.
key
}
>
<
Form
.
Item
{
...
field
}
validateTrigger=
{
[
'onChange'
,
'onBlur'
]
}
rules=
{
[
{
required
:
true
,
whitespace
:
true
,
message
:
"请输入属性名称"
,
},
]
}
noStyle
>
<
Input
placeholder=
"属性名称"
style=
{
{
width
:
'87%'
,
}
}
/>
</
Form
.
Item
>
{
fields
.
length
>
1
?
(
<
MinusCircleOutlined
className=
"dynamic-delete-button"
onClick=
{
()
=>
remove
(
field
.
name
)
}
/>
)
:
null
}
</
Form
.
Item
>
))
}
<
Form
.
Item
{
...
formItemLayoutWithOutLabel
}
>
<
Button
type=
"dashed"
onClick=
{
()
=>
add
()
}
style=
{
{
width
:
'87%'
,
}
}
icon=
{
<
PlusOutlined
/>
}
>
添加属性
</
Button
>
<
Form
.
ErrorList
errors=
{
errors
}
/>
</
Form
.
Item
>
</>
)
}
</
Form
.
List
>
</
Form
>
<
UpdateBasicInfo
/>
</
Modal
>
);
}
...
...
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