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
c5f89b6a
Commit
c5f89b6a
authored
Jul 13, 2023
by
皮倩雯
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: '巡检反馈增加反馈联动'
parent
7e05b273
Pipeline
#75887
passed with stages
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
91 additions
and
9 deletions
+91
-9
AddModal.jsx
...s/bsmanager/patrolMaintenance/patrolFeedback/AddModal.jsx
+91
-9
No files found.
src/pages/bsmanager/patrolMaintenance/patrolFeedback/AddModal.jsx
View file @
c5f89b6a
...
...
@@ -19,6 +19,7 @@ import {
Space
,
TreeSelect
,
Empty
,
message
,
}
from
'antd'
;
import
{
PlusOutlined
,
SwapOutlined
,
MinusCircleOutlined
}
from
'@ant-design/icons'
;
import
styles
from
'./patrolFeedback.less'
;
...
...
@@ -43,6 +44,7 @@ import ChangeFields from './ChangeFields';
import
logo
from
'@/assets/images/icons/值映射.png'
;
import
{
reloadTableFields
}
from
'@/services/tablemanager/tablemanager'
;
import
RuleConfig
from
'@/components/RuleConfig'
;
const
{
Option
}
=
Select
;
const
AddModal
=
props
=>
{
...
...
@@ -70,6 +72,8 @@ const AddModal = props => {
const
[
keepAll
,
setKeepAll
]
=
useState
([]);
// 保存所选关联事件下完整的字段值
const
[
treeSelectValue
,
setTreeSelectValue
]
=
useState
([]);
const
[
menuWebList
,
setMenuWebList
]
=
useState
([]);
const
[
showRule
,
setShowRule
]
=
useState
(
false
);
const
[
fieldList
,
setFieldList
]
=
useState
([]);
const
[
form
]
=
Form
.
useForm
();
const
[
formAdd
]
=
Form
.
useForm
();
...
...
@@ -108,7 +112,7 @@ const AddModal = props => {
getFields
(
res
.
data
.
tableName
);
});
}
else
{
form
.
setFieldsValue
({
businessGroup
:
'区域巡检'
});
form
.
setFieldsValue
({
businessGroup
:
'区域巡检'
,
feedbackRule
:
''
});
getGetTaskSyncField
();
getFeedbackTable
();
getRoles
();
...
...
@@ -118,6 +122,8 @@ const AddModal = props => {
form
.
resetFields
();
setKeepTree
([]);
setKeepData
(
''
);
setkeep
([]);
setKeepAll
([]);
}
},
[
visible
]);
...
...
@@ -196,7 +202,6 @@ const AddModal = props => {
lastTo
.
push
(
b
);
}
});
console
.
log
(
lastTo
);
setKeepTree
(
lastTo
);
}
else
{
setKeepTree
(
res
.
data
.
root
);
...
...
@@ -307,6 +312,12 @@ const AddModal = props => {
CM_Feedback_LoadFields
(
e
).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
setNu
(
res
.
data
);
let
data
=
[];
res
.
data
.
forEach
(
i
=>
{
data
.
push
(
i
.
fieldName
);
});
let
list
=
[{
TableName
:
e
,
TableFieldNames
:
data
}];
setFieldList
(
list
);
setFiled
(
formateArrDataA
(
res
.
data
,
'groupName'
));
}
});
...
...
@@ -367,7 +378,6 @@ const AddModal = props => {
mappingFields
:
objaa
&&
JSON
.
stringify
(
objaa
),
}).
then
(
res
=>
{
if
(
res
.
msg
==
''
)
{
form
.
resetFields
();
callBackSubmit
();
notification
.
success
({
message
:
'提示'
,
...
...
@@ -390,7 +400,6 @@ const AddModal = props => {
mappingFields
:
objaa
&&
JSON
.
stringify
(
objaa
),
}).
then
(
res
=>
{
if
(
res
.
msg
==
''
)
{
form
.
resetFields
();
callBackSubmit
();
notification
.
success
({
message
:
'提示'
,
...
...
@@ -661,7 +670,6 @@ const AddModal = props => {
lastTo
.
push
(
j
);
}
});
console
.
log
(
lastTo
);
setKeepTree
(
lastTo
);
}
...
...
@@ -684,6 +692,15 @@ const AddModal = props => {
setTreeSelectValue
(
e
);
};
const
saveRule
=
e
=>
{
form
.
setFieldsValue
({
feedbackRule
:
e
});
setShowRule
(
false
);
};
const
editRule
=
()
=>
{
setShowRule
(
true
);
};
return
(
<
Drawer
title=
"反馈配置"
...
...
@@ -707,6 +724,10 @@ const AddModal = props => {
name=
"layerName"
labelCol=
{
{
span
:
4
}
}
rules=
{
[
{
required
:
true
,
message
:
'请输入巡检对象名称'
,
},
{
validator
:
(
rule
,
value
)
=>
{
let
aa
=
form
.
getFieldValue
().
layerName
;
...
...
@@ -728,7 +749,17 @@ const AddModal = props => {
</
Item
>
</
Col
>
<
Col
span=
{
23
}
>
<
Item
label=
"业务划分"
name=
"businessGroup"
labelCol=
{
{
span
:
4
}
}
>
<
Item
label=
"业务划分"
name=
"businessGroup"
labelCol=
{
{
span
:
4
}
}
rules=
{
[
{
required
:
true
,
message
:
'请选择业务划分'
,
},
]
}
>
<
Select
placeholder=
"请选择业务划分"
showSearch
mode=
"multiple"
allowClear
>
<
Option
key=
"区域巡检"
value=
"区域巡检"
>
区域巡检
...
...
@@ -745,12 +776,22 @@ const AddModal = props => {
</
Item
>
</
Col
>
<
Col
span=
{
23
}
>
<
Item
label=
"GIS图层"
name=
"gisLayer"
labelCol=
{
{
span
:
4
}
}
>
<
Item
label=
"GIS图层"
name=
"gisLayer"
labelCol=
{
{
span
:
4
}
}
rules=
{
[
{
required
:
true
,
message
:
'请选择GIS图层'
,
},
]
}
>
<
TreeSelect
showSearch
value=
{
treeSelectValue
}
dropdownStyle=
{
{
maxHeight
:
400
,
overflow
:
'auto'
}
}
placeholder=
"请选择
映射字段名
"
placeholder=
"请选择
GIS图层
"
allowClear
treeDefaultExpandAll
showCheckedStrategy
...
...
@@ -816,7 +857,17 @@ const AddModal = props => {
</Item>
</Col> */
}
<
Col
span=
{
23
}
>
<
Item
label=
"权限"
name=
"roles"
labelCol=
{
{
span
:
4
}
}
>
<
Item
label=
"权限"
name=
"roles"
labelCol=
{
{
span
:
4
}
}
rules=
{
[
{
required
:
true
,
message
:
'请选择权限'
,
},
]
}
>
<
div
style=
{
{
display
:
'flex'
}
}
>
<
Item
name=
"roles"
style=
{
{
marginBottom
:
0
,
width
:
'100%'
}
}
>
<
Input
placeholder=
"请选择字段集"
allowClear
/>
...
...
@@ -830,6 +881,28 @@ const AddModal = props => {
</
div
>
</
Item
>
</
Col
>
<
Col
span=
{
23
}
>
<
Item
label=
"反馈联动"
name=
"feedbackRule"
labelCol=
{
{
span
:
4
}
}
>
<
div
style=
{
{
border
:
'2px solid #6A98FA'
,
minHeight
:
'34px'
,
lineHeight
:
'34px'
,
textAlign
:
'center'
,
}
}
onClick=
{
()
=>
{
let
obj
=
form
.
getFieldsValue
().
tableName
;
if
(
!
obj
)
{
message
.
warning
(
'请先选择反馈表!'
);
}
else
{
editRule
();
}
}
}
>
<
span
>
{
form
.
getFieldsValue
().
feedbackRule
}
</
span
>
</
div
>
</
Item
>
</
Col
>
<
Col
span=
{
23
}
>
<
Item
label=
"关联事件"
name=
"relationEvent"
labelCol=
{
{
span
:
4
}
}
>
<
Select
...
...
@@ -981,6 +1054,15 @@ const AddModal = props => {
keepFiled=
{
keepFiled
}
dataType=
"name"
/>
<
RuleConfig
RuleContent=
{
form
.
getFieldsValue
().
feedbackRule
||
''
}
tableName=
{
form
.
getFieldsValue
().
feedbackName
}
fieldList=
{
fieldList
}
visible=
{
showRule
}
handleCancel=
{
()
=>
setShowRule
(
false
)
}
onSubumit=
{
e
=>
saveRule
(
e
)
}
flag=
{
2
}
/>
</
Drawer
>
);
};
...
...
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