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
2de65965
Commit
2de65965
authored
Dec 06, 2022
by
皮倩雯
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: '巡检反馈GIS图层修改为下拉选择树'
parent
17c15cc0
Pipeline
#65013
failed with stages
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
44 additions
and
21 deletions
+44
-21
AddModal.jsx
...s/bsmanager/patrolMaintenance/patrolFeedback/AddModal.jsx
+42
-21
api.js
src/services/PatrolFeedback/api.js
+2
-0
No files found.
src/pages/bsmanager/patrolMaintenance/patrolFeedback/AddModal.jsx
View file @
2de65965
...
...
@@ -28,6 +28,7 @@ import {
CM_Feedback_LoadFields
,
CM_Feedback_QueryPatrolFeedback
,
GetTaskSyncField
,
GetGisPatrolObject
,
}
from
'@/services/PatrolFeedback/api'
;
import
{
GetCM_Event_LoadEventTable
,
...
...
@@ -66,6 +67,8 @@ const AddModal = props => {
const
[
keepAllData
,
setKeepAllData
]
=
useState
([]);
// 保存所有关联事件类型数据
const
[
keepTree
,
setKeepTree
]
=
useState
([]);
const
[
keepAll
,
setKeepAll
]
=
useState
([]);
// 保存所选关联事件下完整的字段值
const
[
treeSelectValue
,
setTreeSelectValue
]
=
useState
([]);
const
[
menuWebList
,
setMenuWebList
]
=
useState
([]);
const
[
form
]
=
Form
.
useForm
();
const
[
formAdd
]
=
Form
.
useForm
();
...
...
@@ -74,6 +77,7 @@ const AddModal = props => {
useEffect
(()
=>
{
getEventData
();
// 获取所有关联事件数据
getGisPatrolObject
();
if
(
visible
)
{
if
(
type
===
'edit'
)
{
CM_Feedback_QueryPatrolFeedback
({
id
:
formObj
.
id
}).
then
(
res
=>
{
...
...
@@ -142,6 +146,21 @@ const AddModal = props => {
});
};
const
getGisPatrolObject
=
()
=>
{
GetGisPatrolObject
().
then
(
res
=>
{
if
(
res
.
code
===
'0'
)
{
setMenuWebList
(
res
.
data
);
}
else
{
notification
.
error
({
message
:
'提示'
,
duration
:
3
,
description
:
res
.
msg
,
});
}
console
.
log
(
res
);
});
};
const
getReloadTableField
=
(
e
,
i
)
=>
{
reloadTableFields
({
tableName
:
e
,
...
...
@@ -579,10 +598,10 @@ const AddModal = props => {
};
const
mapTree
=
org
=>
{
const
haveChildren
=
Array
.
isArray
(
org
.
children
)
&&
org
.
children
.
length
>
0
;
const
haveChildren
=
Array
.
isArray
(
org
.
items
)
&&
org
.
items
.
length
>
0
;
return
haveChildren
?
(
<
TreeNode
value=
{
`123${org.name}`
}
title=
{
org
.
n
ame
}
disabled
>
{
org
.
children
.
map
(
item
=>
mapTree
(
item
))
}
<
TreeNode
value=
{
org
.
serverName
}
title=
{
org
.
serverN
ame
}
disabled
>
{
org
.
items
.
map
(
item
=>
mapTree
(
item
))
}
</
TreeNode
>
)
:
(
<
TreeNode
value=
{
org
.
name
}
title=
{
org
.
name
}
/>
...
...
@@ -641,6 +660,10 @@ const AddModal = props => {
// setKeepTree(data);
};
const
treeSelectOnchange
=
e
=>
{
setTreeSelectValue
(
e
);
};
return
(
<
Drawer
title=
"反馈配置"
...
...
@@ -703,7 +726,22 @@ const AddModal = props => {
</
Col
>
<
Col
span=
{
23
}
>
<
Item
label=
"GIS图层"
name=
"gisLayer"
labelCol=
{
{
span
:
4
}
}
>
<
Input
placeholder=
"请输入GIS图层"
/>
<
TreeSelect
showSearch
value=
{
treeSelectValue
}
dropdownStyle=
{
{
maxHeight
:
400
,
overflow
:
'auto'
}
}
placeholder=
"请选择映射字段名 "
allowClear
treeDefaultExpandAll
showCheckedStrategy
onChange=
{
treeSelectOnchange
}
>
{
menuWebList
?
(
menuWebList
.
map
(
i
=>
mapTree
(
i
))
)
:
(
<
Empty
image=
{
Empty
.
PRESENTED_IMAGE_SIMPLE
}
/>
)
}
</
TreeSelect
>
</
Item
>
</
Col
>
<
Col
span=
{
23
}
>
...
...
@@ -858,23 +896,6 @@ const AddModal = props => {
))
:
''
}
</
Select
>
{
/* <TreeSelect
showSearch
style={{ width: '159px', marginLeft: '4px' }}
// value={treeSelectValue}
dropdownStyle={{ maxHeight: 400, overflow: 'auto' }}
placeholder="请选择映射字段名 "
allowClear
treeDefaultExpandAll
showCheckedStrategy
// onChange={treeSelectOnchange}
>
{keepTree ? (
keepTree.map(i => mapTree(i))
) : (
<Empty image={Empty.PRESENTED_IMAGE_SIMPLE} />
)}
</TreeSelect> */
}
</
Form
.
Item
>
<
MinusCircleOutlined
onClick=
{
()
=>
remove
(
name
)
}
...
...
src/services/PatrolFeedback/api.js
View file @
2de65965
...
...
@@ -47,3 +47,5 @@ export const CM_Feedback_ChangPatrolOrder = patrolOrder =>
// 任务同步事件字段
export
const
GetTaskSyncField
=
query
=>
get
(
`
${
PANDA_GIS
}
/PatrolInspection/GetTaskSyncField`
,
query
);
export
const
GetGisPatrolObject
=
query
=>
get
(
`
${
PANDA_GIS
}
/MapLayer/GetGisPatrolObject`
,
query
);
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