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
d56bdc53
Commit
d56bdc53
authored
Mar 10, 2023
by
邓超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 优化人员选择器组件,替换地图人员选择器
parent
6be5aede
Pipeline
#68924
failed with stages
Changes
6
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
66 additions
and
29 deletions
+66
-29
index.jsx
src/components/RolePmSite/index.jsx
+34
-16
AddModal.jsx
...ages/bsmanager/patrolMaintenance/maintenance/AddModal.jsx
+1
-0
AddModal.jsx
...s/bsmanager/patrolMaintenance/patrolFeedback/AddModal.jsx
+1
-0
AddFlowsModal.jsx
src/pages/bsmanager/workOrder/incident/AddFlowsModal.jsx
+1
-0
AddModal.jsx
src/pages/bsmanager/workOrder/incident/AddModal.jsx
+2
-1
solutionConfig.jsx
...Center/gis/schemeConfig/solutionConfig/solutionConfig.jsx
+27
-12
No files found.
src/components/RolePmSite/index.jsx
View file @
d56bdc53
...
...
@@ -15,7 +15,7 @@
/* eslint-disable array-callback-return */
/* eslint-disable eqeqeq */
/* eslint-disable no-plusplus */
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
React
,
{
useState
,
useEffect
,
useRef
}
from
'react'
;
import
{
Modal
,
Checkbox
,
Tabs
,
Input
,
Button
,
Pagination
,
Empty
,
Tag
,
Divider
}
from
'antd'
;
import
{
CM_Event_LoadDepartmentAndRoles
}
from
'@/services/standingBook/api'
;
...
...
@@ -30,7 +30,7 @@ const RMSComponents = props => {
newCheckedList
,
groupName
,
chooseGroupName
,
keepFiled
,
dataType
,
}
=
props
;
const
[
checkedList
,
setCheckedList
]
=
useState
([]);
// 选中复选框内容
const
[
searchWord
,
setSearchWord
]
=
useState
(
''
);
// 关键字
...
...
@@ -53,16 +53,21 @@ const RMSComponents = props => {
const
[
checkAll1
,
setCheckAll1
]
=
useState
(
false
);
const
[
indeterminate2
,
setIndeterminate2
]
=
useState
(
false
);
const
[
checkAll2
,
setCheckAll2
]
=
useState
(
false
);
const
keepFiled
=
useRef
({});
const
onSubmit
=
()
=>
{
let
selectData
=
[];
let
ids
=
[];
selected
.
forEach
((
val
,
key
)
=>
{
selectData
.
push
(
val
.
value
);
ids
.
push
(
key
);
});
console
.
log
(
ids
,
'selected'
);
callBackSubmit
({
str
:
selectData
.
join
(
','
),
pickItem
,
stt
:
selectData
,
ids
,
});
setKeyValue
(
'0'
);
setSearchWord
(
''
);
...
...
@@ -70,6 +75,11 @@ const RMSComponents = props => {
useEffect
(()
=>
{
if
(
visible
)
{
CM_Event_LoadDepartmentAndRoles
().
then
(
res
=>
{
if
(
res
.
msg
===
'Ok'
)
{
// setFiled1(formateArrDataA1(res.data, 'groupType'));
keepFiled
.
current
=
groupArr
(
res
.
data
,
'groupType'
);
if
(
groupName
==
'角色'
)
{
setKeyValue
(
'0'
);
setKeepTabKey
(
0
);
...
...
@@ -86,8 +96,9 @@ const RMSComponents = props => {
let
listdata
=
[];
let
listId
=
[];
newCheckedList
.
map
(
checkItem
=>
{
keepFiled
[
'角色'
].
map
(
i
=>
{
if
(
i
.
label
==
checkItem
)
{
keepFiled
.
current
[
'角色'
].
map
(
i
=>
{
let
canSave
=
dataType
===
'name'
?
i
.
label
==
checkItem
:
i
.
value
==
checkItem
;
if
(
canSave
)
{
listdata
.
push
(
i
);
listId
.
push
(
i
.
value
.
toString
());
}
...
...
@@ -108,8 +119,9 @@ const RMSComponents = props => {
let
pmdata
=
[];
let
pmId
=
[];
newCheckedList
.
map
(
checkItem
=>
{
keepFiled
[
'部门'
].
map
(
i
=>
{
if
(
i
.
label
==
checkItem
)
{
keepFiled
.
current
[
'部门'
].
map
(
i
=>
{
let
canSave
=
dataType
===
'name'
?
i
.
label
==
checkItem
:
i
.
value
==
checkItem
;
if
(
canSave
)
{
pmdata
.
push
(
i
);
pmId
.
push
(
i
.
value
.
toString
());
}
...
...
@@ -130,8 +142,9 @@ const RMSComponents = props => {
let
sitedata
=
[];
let
siteId
=
[];
newCheckedList
.
map
(
checkItem
=>
{
keepFiled
[
'站点'
].
map
(
i
=>
{
if
(
i
.
label
==
checkItem
)
{
keepFiled
.
current
[
'站点'
].
map
(
i
=>
{
let
canSave
=
dataType
===
'name'
?
i
.
label
==
checkItem
:
i
.
value
==
checkItem
;
if
(
canSave
)
{
sitedata
.
push
(
i
);
siteId
.
push
(
i
.
value
.
toString
());
}
...
...
@@ -149,7 +162,10 @@ const RMSComponents = props => {
setCheckDataSite
(
datasiteId
);
checkArr
[
2
]
=
datasiteId
;
setSaveCheckValue
(
checkArr
);
console
.
log
(
checkArr
,
'checkArr'
);
setCheckedList
(
checkArr
);
}
});
}
else
{
setSelected
(
new
Map
());
setPageSize
(
45
);
...
...
@@ -277,6 +293,7 @@ const RMSComponents = props => {
}).
then
(
res
=>
{
if
(
res
.
msg
===
'Ok'
)
{
setTotal
(
res
.
data
.
count
);
console
.
log
(
groupArr
(
res
.
data
,
'groupType'
),
'groupType'
);
setOptionValue
(
groupArr
(
res
.
data
,
'groupType'
));
let
aa
=
groupArr
(
res
.
data
,
'groupType'
);
let
list
=
[];
...
...
@@ -292,8 +309,9 @@ const RMSComponents = props => {
if
(
flag
!=
undefined
)
{
let
listId
=
[];
newCheckedList
.
map
(
checkItem
=>
{
keepFiled
[
groupName
].
map
(
i
=>
{
if
(
i
.
label
==
checkItem
)
{
keepFiled
.
current
[
groupName
].
map
(
i
=>
{
let
canSave
=
dataType
===
'name'
?
i
.
label
==
checkItem
:
i
.
value
==
checkItem
;
if
(
canSave
)
{
listId
.
push
(
i
.
value
.
toString
());
}
});
...
...
@@ -416,8 +434,8 @@ const RMSComponents = props => {
}
});
let
arrList
=
[];
keepFiled
[
'角色'
]
&&
keepFiled
[
'角色'
].
map
(
k
=>
{
keepFiled
.
current
[
'角色'
]
&&
keepFiled
.
current
[
'角色'
].
map
(
k
=>
{
if
(
data
.
indexOf
(
k
.
value
)
!=
-
1
)
{
arrList
.
push
(
k
);
}
...
...
@@ -482,8 +500,8 @@ const RMSComponents = props => {
}
});
let
arrList
=
[];
keepFiled
[
'部门'
]
&&
keepFiled
[
'部门'
].
map
(
k
=>
{
keepFiled
.
current
[
'部门'
]
&&
keepFiled
.
current
[
'部门'
].
map
(
k
=>
{
if
(
data
.
indexOf
(
k
.
value
)
!=
-
1
)
{
arrList
.
push
(
k
);
}
...
...
@@ -548,8 +566,8 @@ const RMSComponents = props => {
}
});
let
arrList
=
[];
keepFiled
[
'站点'
]
&&
keepFiled
[
'站点'
].
map
(
k
=>
{
keepFiled
.
current
[
'站点'
]
&&
keepFiled
.
current
[
'站点'
].
map
(
k
=>
{
if
(
data
.
indexOf
(
k
.
value
)
!=
-
1
)
{
arrList
.
push
(
k
);
}
...
...
src/pages/bsmanager/patrolMaintenance/maintenance/AddModal.jsx
View file @
d56bdc53
...
...
@@ -766,6 +766,7 @@ const AddModal = props => {
groupName=
{
groupName
}
// 打开组件展示的分组名,用来首次获取数据
chooseGroupName=
{
chooseGroupName
}
// 可选分组名
keepFiled=
{
keepFiled
}
dataType=
"name"
/>
</
Drawer
>
);
...
...
src/pages/bsmanager/patrolMaintenance/patrolFeedback/AddModal.jsx
View file @
d56bdc53
...
...
@@ -974,6 +974,7 @@ const AddModal = props => {
groupName=
{
groupName
}
// 打开组件展示的分组名,用来首次获取数据
chooseGroupName=
{
chooseGroupName
}
// 可选分组名
keepFiled=
{
keepFiled
}
dataType=
"name"
/>
</
Drawer
>
);
...
...
src/pages/bsmanager/workOrder/incident/AddFlowsModal.jsx
View file @
d56bdc53
...
...
@@ -443,6 +443,7 @@ const AddFlowsModal = props => {
groupName={groupName} // 打开组件展示的分组名,用来首次获取数据
chooseGroupName={chooseGroupName} // 可选分组名
keepFiled={keepFiled}
dataType="name"
/>
</Drawer>
);
...
...
src/pages/bsmanager/workOrder/incident/AddModal.jsx
View file @
d56bdc53
...
...
@@ -1954,7 +1954,7 @@ const AddModal = props => {
label=
{
<
div
style=
{
{
display
:
'flex'
,
alignItems
:
'center'
}
}
>
<
Tooltip
title
=
{<
div
>
标准
用法:使用标准工单系统,可通过勾选 前端/手持,来控制是否展示事件的填报入口,勾选及展示;
<
br
/>
内置用法:
使用第三方完整功能,仅调用接口、表结构和流程,工单系统中无法使用
</
div
>
}
title
=
{<
div
>
标准
使用,使用标准工单系统,可通过勾选 前端/手持,来控制是否展示事件的填报入口,勾选及展示;
<
br
/>
内置使用,
使用第三方完整功能,仅调用接口、表结构和流程,工单系统中无法使用
</
div
>
}
// title="标准使用,使用标准工单系统,可通过勾选 前端/手持,来控制是否展示事件的填报入口,勾选及展示;
// 内置使用,使用第三方完整功能,仅调用接口、表结构和流程,工单系统中无法使用。"
>
...
...
@@ -2162,6 +2162,7 @@ const AddModal = props => {
groupName=
{
groupName
}
// 打开组件展示的分组名,用来首次获取数据
chooseGroupName=
{
chooseGroupName
}
// 可选分组名
keepFiled=
{
keepFiled
}
// 分组数据
dataType=
"name"
/>
<
ChangeEdit
visible=
{
isVisibleEdit
}
...
...
src/pages/platformCenter/gis/schemeConfig/solutionConfig/solutionConfig.jsx
View file @
d56bdc53
...
...
@@ -5,6 +5,7 @@ import VisibleRoleModal from '@/pages/platformCenter/messageManage/projectManage
import
{
PlusOutlined
,
UserAddOutlined
}
from
'@ant-design/icons'
;
import
RoleModal
from
'./RoleModal'
;
import
RMSComponents
from
'@/components/RolePmSite/index'
;
import
styles
from
'../SchemeConfig.less'
;
import
{
deleteConfig
,
...
...
@@ -155,6 +156,7 @@ const VectorData = props => {
];
// 获取选中的角色
const
onPushSubmit
=
value
=>
{
console
.
log
(
value
,
'value'
);
setAddVisible
(
false
);
if
(
value
.
length
)
{
let
query
=
{
...
...
@@ -181,16 +183,18 @@ const VectorData = props => {
};
const
rolCallBack
=
useCallback
(
list
=>
{
let
strList
=
[];
if
(
list
.
length
>
0
)
{
list
.
forEach
(
item
=>
{
console
.
log
(
item
,
'item'
);
Object
.
keys
(
item
.
last
).
forEach
(
i
=>
{
strList
.
push
(
i
);
});
});
console
.
log
(
strList
);
onPushSubmit
(
strList
);
}
console
.
log
(
list
,
'list'
);
onPushSubmit
(
list
.
ids
);
// if (list.length > 0) {
// list.forEach(item => {
// console.log(item, 'item');
// Object.keys(item.last).forEach(i => {
// strList.push(i);
// });
// });
// console.log(strList);
// onPushSubmit(strList);
// }
});
// 获取角色
...
...
@@ -716,14 +720,25 @@ const VectorData = props => {
tree={tree}
leafs={leafs}
/> */
}
<
RoleModal
<
RMSComponents
visible=
{
addVisible
}
onCancel=
{
()
=>
{
setAddVisible
(
false
);
}
}
callBackSubmit=
{
roleList
=>
rolCallBack
(
roleList
)
}
newCheckedList=
{
checkValue
.
toString
().
split
(
','
)
}
// 单选框中的值
groupName=
"角色"
// 打开组件展示的分组名,用来首次获取数据
chooseGroupName=
{
[
'角色'
,
'部门'
]
}
// 可选分组名
dataType=
"id"
/>
{
/* <RoleModal
selectValue={checkValue.toString()}
visible={addVisible}
rolCallBack={roleList => rolCallBack(roleList)}
onCancel={() => {
setAddVisible(false);
}}
/>
/>
*/
}
</
div
>
);
};
...
...
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