Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
CivManage
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
ReactWeb5
CivManage
Commits
df1d248b
Commit
df1d248b
authored
Jan 19, 2022
by
皮倩雯
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 重构事件编辑代码
parent
dcd38827
Pipeline
#43041
skipped with stages
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
53 additions
and
57 deletions
+53
-57
AddModal.jsx
src/pages/bsmanager/workOrder/incident/AddModal.jsx
+53
-57
No files found.
src/pages/bsmanager/workOrder/incident/AddModal.jsx
View file @
df1d248b
...
...
@@ -447,7 +447,7 @@ const AddModal = props => {
const
[
editable
,
setEditable
]
=
useState
(
false
);
const
[
ReportFromMobile
,
setReportFromMobile
]
=
useState
(
false
);
const
[
ReportFromWeb
,
setReportFromWeb
]
=
useState
(
false
);
const
[
chee
,
setChee
]
=
useState
(
0
);
const
[
chee
,
setChee
]
=
useState
(
''
);
const
[
pickItem
,
setPickItem
]
=
useState
(
''
);
const
[
prefixName
,
setPrefixName
]
=
useState
(
''
);
const
[
selectValue
,
setSelectValue
]
=
useState
(
''
);
...
...
@@ -534,6 +534,7 @@ const AddModal = props => {
form
.
resetFields
();
setValue
(
''
);
callBackSubmit
();
setChee
(
''
);
notification
.
success
({
message
:
'提示'
,
duration
:
3
,
...
...
@@ -561,6 +562,7 @@ const AddModal = props => {
if
(
res
.
msg
===
'Ok'
)
{
form
.
resetFields
();
setValue
(
''
);
setChee
(
''
);
callBackSubmit
();
notification
.
success
({
message
:
'提示'
,
...
...
@@ -601,7 +603,7 @@ const AddModal = props => {
setEditable
(
false
);
setReportFromMobile
(
false
);
}
else
if
(
type
===
'edit'
)
{
setChee
(
''
);
setChee
();
getEventData1
();
GetCM_Event_QueryEventType
({
eventTypeId
:
formObj
.
ID
}).
then
(
res
=>
{
if
(
res
.
data
.
root
)
{
...
...
@@ -661,19 +663,13 @@ const AddModal = props => {
});
}
setFlag
(
0
);
}
else
if
(
type
==
'edit'
)
{
}
else
if
(
type
==
'edit'
||
type
==
'add'
)
{
setEditable
(
false
);
setReportFromMobile
(
false
);
setReportFromWeb
(
false
);
form
.
resetFields
();
setValue
(
''
);
setSummaryIsShow
(
'none'
);
setReportIsShow
(
'none'
);
setDisplayIsShow
(
'none'
);
setEditableIsShow
(
'none'
);
setTransitIsShow
(
'none'
);
setRelatedEventIsShow
(
'none'
);
}
else
if
(
type
==
'add'
)
{
setChee
(
''
);
setSummaryIsShow
(
'none'
);
setReportIsShow
(
'none'
);
setDisplayIsShow
(
'none'
);
...
...
@@ -1231,7 +1227,7 @@ const AddModal = props => {
return
(
<
Drawer
title=
{
type
===
'add'
?
'添加事件类型'
:
'编辑事件类型'
}
width=
"
6
00px"
width=
"
5
00px"
destroyOnClose
{
...
props
}
footer=
{
...
...
@@ -1243,12 +1239,12 @@ const AddModal = props => {
}
// confirmLoading={loading}
>
<
Form
form=
{
form
}
labelCol=
{
{
span
:
7
}
}
style=
{
{
overflowY
:
'scroll'
}
}
>
<
Form
form=
{
form
}
style=
{
{
overflowY
:
'scroll'
}
}
>
<
Row
>
<
Col
span=
{
1
4
}
>
<
Col
span=
{
1
5
}
>
<
Item
label=
"事件名称"
labelCol=
{
{
span
:
7
}
}
labelCol=
{
{
span
:
8
}
}
name=
"Name"
rules=
{
[
{
...
...
@@ -1257,10 +1253,14 @@ const AddModal = props => {
},
]
}
>
<
Input
onChange=
{
prefix
}
placeholder=
"请输入事件名称"
/>
<
Input
onChange=
{
prefix
}
placeholder=
"请输入事件名称"
style=
{
{
marginLeft
:
'-3px'
}
}
/>
</
Item
>
</
Col
>
<
Col
span=
{
10
}
>
<
Col
span=
{
9
}
>
<
Item
label=
"编码前缀"
labelCol=
{
{
span
:
14
}
}
...
...
@@ -1276,23 +1276,13 @@ const AddModal = props => {
</
Item
>
</
Col
>
<
Col
span=
{
24
}
>
<
span
style=
{
{
position
:
'absolute'
,
left
:
'2%'
,
top
:
'9%'
,
color
:
'red'
,
fontSize
:
'16px'
,
}
}
>
*
</
span
>
<
Item
label=
"业务类型"
name=
"BusinessType"
labelCol=
{
{
span
:
4
}
}
labelCol=
{
{
span
:
5
}
}
rules=
{
[
{
required
:
true
,
validator
:
(
rule
,
value
)
=>
{
if
(
form
.
getFieldsValue
().
BusinessType
==
''
)
{
return
Promise
.
reject
(
'业务类型必填'
);
...
...
@@ -1303,7 +1293,12 @@ const AddModal = props => {
]
}
>
<
div
>
<
Input
className=
"ue-editable-select-input"
onChange=
{
inputType
}
value=
{
Type1
}
/>
<
Input
className=
"ue-editable-select-input"
onChange=
{
inputType
}
value=
{
Type1
}
style=
{
{
marginLeft
:
'-3px'
}
}
/>
<
Dropdown
placement=
"bottomRight"
style=
{
{
width
:
'430px'
}
}
...
...
@@ -1346,7 +1341,7 @@ const AddModal = props => {
<
Item
label=
"事件主表"
name=
"TableName"
labelCol=
{
{
span
:
4
}
}
labelCol=
{
{
span
:
5
}
}
rules=
{
[
{
required
:
true
,
...
...
@@ -1354,7 +1349,11 @@ const AddModal = props => {
},
]
}
>
<
Select
placeholder=
"选择事件主表"
onChange=
{
changTable
}
>
<
Select
placeholder=
"选择事件主表"
onChange=
{
changTable
}
style=
{
{
marginLeft
:
'-3px'
}
}
>
{
standingTable
?
standingTable
.
map
((
item
,
index
)
=>
(
<
Option
key=
{
index
}
value=
{
item
.
text
}
>
...
...
@@ -1365,15 +1364,16 @@ const AddModal = props => {
</
Select
>
</
Item
>
</
Col
>
<
Col
span=
{
4
}
>
<
Col
span=
{
5
}
>
<
Item
/>
</
Col
>
<
Col
span=
{
20
}
>
<
Col
span=
{
19
}
>
<
Item
>
<
span
>
客户端上报和配单(需配置事件权限、受理流程)
</
span
>
</
Item
>
</
Col
>
<
Col
span=
{
4
}
>
<
Col
span=
{
5
}
>
<
Item
/>
</
Col
>
<
Col
span=
{
4
}
>
...
...
@@ -1383,7 +1383,7 @@ const AddModal = props => {
</
Checkbox
>
</
Item
>
</
Col
>
<
Col
span=
{
1
6
}
>
<
Col
span=
{
1
5
}
>
<
Item
name=
"ReportFromMobile"
>
<
Checkbox
onChange=
{
onChange4
}
checked=
{
ReportFromMobile
}
>
手持
...
...
@@ -1392,25 +1392,21 @@ const AddModal = props => {
{
/* </Item> */
}
</
Col
>
<
Col
span=
{
4
}
>
<
Col
span=
{
5
}
>
<
Item
/>
</
Col
>
<
Col
span=
{
20
}
>
<
Col
span=
{
19
}
>
<
Item
name=
"Editable"
>
<
Checkbox
onChange=
{
onChange1
}
checked=
{
editable
}
>
上报后可以编辑(需配置编辑字段)
</
Checkbox
>
</
Item
>
</
Col
>
<
Col
span=
{
2
3
}
>
<
Item
label=
"上报方式"
name=
"CreateMode"
labelCol=
{
{
span
:
4
}
}
>
<
Col
span=
{
2
4
}
>
<
Item
label=
"上报方式"
name=
"CreateMode"
labelCol=
{
{
span
:
5
}
}
>
<
Radio
.
Group
onChange=
{
onChange2
}
value=
{
value
}
defaultValue=
{
chee
}
>
<
Radio
value=
{
0
}
style=
{
{
marginLeft
:
'5px'
}
}
>
仅上报
</
Radio
>
<
Radio
value=
{
1
}
style=
{
{
marginLeft
:
'100px'
}
}
>
工单分派
</
Radio
>
<
Radio
value=
{
0
}
>
仅上报
</
Radio
>
<
Radio
value=
{
1
}
>
工单分派
</
Radio
>
</
Radio
.
Group
>
</
Item
>
</
Col
>
...
...
@@ -1441,7 +1437,7 @@ const AddModal = props => {
</
div
>
}
name=
"SummaryFields"
labelCol=
{
{
span
:
4
}
}
labelCol=
{
{
span
:
5
}
}
rules=
{
[
{
validator
:
(
rule
,
value
)
=>
{
...
...
@@ -1493,7 +1489,7 @@ const AddModal = props => {
</
div
>
}
name=
"ReportFields"
labelCol=
{
{
span
:
4
}
}
labelCol=
{
{
span
:
5
}
}
rules=
{
[
{
validator
:
(
rule
,
value
)
=>
{
...
...
@@ -1545,7 +1541,7 @@ const AddModal = props => {
</
div
>
}
name=
"DisplayFields"
labelCol=
{
{
span
:
4
}
}
labelCol=
{
{
span
:
5
}
}
rules=
{
[
{
validator
:
(
rule
,
value
)
=>
{
...
...
@@ -1597,7 +1593,7 @@ const AddModal = props => {
</
div
>
}
name=
"EditableFields"
labelCol=
{
{
span
:
4
}
}
labelCol=
{
{
span
:
5
}
}
rules=
{
[
{
validator
:
(
rule
,
value
)
=>
{
...
...
@@ -1639,7 +1635,7 @@ const AddModal = props => {
</
div
>
}
name=
"TransitFields"
labelCol=
{
{
span
:
4
}
}
labelCol=
{
{
span
:
5
}
}
>
<
div
style=
{
{
display
:
'flex'
}
}
>
<
Form
.
Item
name=
"TransitFields"
style=
{
{
marginBottom
:
0
,
width
:
'100%'
}
}
>
...
...
@@ -1655,7 +1651,7 @@ const AddModal = props => {
</
Item
>
</
Col
>
<
Col
span=
{
24
}
>
<
Item
label=
"事件权限"
name=
"Roles"
labelCol=
{
{
span
:
4
}
}
>
<
Item
label=
"事件权限"
name=
"Roles"
labelCol=
{
{
span
:
5
}
}
>
<
div
style=
{
{
display
:
'flex'
}
}
>
<
Form
.
Item
name=
"Roles"
style=
{
{
marginBottom
:
0
,
width
:
'100%'
}
}
>
<
Input
placeholder=
"请选择事件权限"
allowClear
/>
...
...
@@ -1670,22 +1666,22 @@ const AddModal = props => {
</
Item
>
</
Col
>
<
Col
span=
{
24
}
>
<
Item
label=
"置顶条件"
name=
"TopWhere"
labelCol=
{
{
span
:
4
}
}
>
<
Item
label=
"置顶条件"
name=
"TopWhere"
labelCol=
{
{
span
:
5
}
}
>
<
Input
placeholder=
"请输入置顶条件"
allowClear
/>
</
Item
>
</
Col
>
<
Col
span=
{
24
}
>
<
Item
label=
"上报视图"
name=
"ReportPage"
labelCol=
{
{
span
:
4
}
}
>
<
Item
label=
"上报视图"
name=
"ReportPage"
labelCol=
{
{
span
:
5
}
}
>
<
Input
placeholder=
"请输入上报视图"
allowClear
/>
</
Item
>
</
Col
>
<
Col
span=
{
24
}
>
<
Item
label=
"处理视图"
name=
"DealPage"
labelCol=
{
{
span
:
4
}
}
>
<
Item
label=
"处理视图"
name=
"DealPage"
labelCol=
{
{
span
:
5
}
}
>
<
Input
placeholder=
"请输入处理视图"
allowClear
/>
</
Item
>
</
Col
>
<
Col
span=
{
24
}
>
<
Item
label=
"关联事件"
name=
"RelatedEvents"
labelCol=
{
{
span
:
4
}
}
>
<
Item
label=
"关联事件"
name=
"RelatedEvents"
labelCol=
{
{
span
:
5
}
}
>
<
Input
placeholder=
"请输入关联事件"
allowClear
/>
</
Item
>
</
Col
>
...
...
@@ -1706,7 +1702,7 @@ const AddModal = props => {
</
div
>
}
name=
"RelatedEventFields"
labelCol=
{
{
span
:
4
}
}
labelCol=
{
{
span
:
5
}
}
>
<
div
style=
{
{
display
:
'flex'
}
}
>
<
Form
.
Item
name=
"RelatedEventFields"
style=
{
{
marginBottom
:
0
,
width
:
'100%'
}
}
>
...
...
@@ -1722,7 +1718,7 @@ const AddModal = props => {
</
Item
>
</
Col
>
<
Col
span=
{
24
}
>
<
Item
label=
"接口配置"
name=
"InterfaceConfig"
labelCol=
{
{
span
:
4
}
}
>
<
Item
label=
"接口配置"
name=
"InterfaceConfig"
labelCol=
{
{
span
:
5
}
}
>
<
Input
placeholder=
"请输入接口配置"
/>
</
Item
>
</
Col
>
...
...
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