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
a6cba482
Commit
a6cba482
authored
Nov 30, 2021
by
皮倩雯
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改事件权限交互
parent
aec5ad02
Pipeline
#39087
skipped with stages
Changes
19
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
1730 additions
and
1381 deletions
+1730
-1381
maintenance.jsx
...ages/platformCenter/bsmanager/maintenance/maintenance.jsx
+68
-71
AddFlowsModal.jsx
...ages/platformCenter/bsmanager/workOrder/AddFlowsModal.jsx
+219
-188
AddModal.jsx
src/pages/platformCenter/bsmanager/workOrder/AddModal.jsx
+0
-0
ChangeAddFlows.jsx
...ges/platformCenter/bsmanager/workOrder/ChangeAddFlows.jsx
+157
-93
changeAdd.jsx
src/pages/platformCenter/bsmanager/workOrder/changeAdd.jsx
+290
-149
incident.jsx
src/pages/platformCenter/bsmanager/workOrder/incident.jsx
+185
-175
incident.less
src/pages/platformCenter/bsmanager/workOrder/incident.less
+94
-65
incidentFlow.jsx
...pages/platformCenter/bsmanager/workOrder/incidentFlow.jsx
+83
-67
ProjectManage.jsx
...tformCenter/messageManage/projectManage/ProjectManage.jsx
+204
-158
TemplateManage.jsx
...ormCenter/messageManage/templateManage/TemplateManage.jsx
+147
-126
standingBook.less
src/pages/platformCenter/standingBook/standingBook.less
+100
-102
index.js
src/pages/platformCenter/videoManager/index.js
+4
-1
siteManage.less
src/pages/userCenter/siteManageV2/siteManage.less
+30
-34
EditOrgModal.jsx
src/pages/userCenter/userManage/EditOrgModal.jsx
+2
-2
UserManage.js
src/pages/userCenter/userManage/UserManage.js
+51
-57
UserManage.less
src/pages/userCenter/userManage/UserManage.less
+89
-91
webMenu.jsx
src/pages/webConfig/menuconfig/webMenu.jsx
+4
-0
config.js
src/routes/config.js
+1
-0
api.js
src/services/userCenter/userManage/api.js
+2
-2
No files found.
src/pages/platformCenter/bsmanager/maintenance/maintenance.jsx
View file @
a6cba482
/* eslint-disable react-hooks/rules-of-hooks */
/* eslint-disable camelcase */
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
styles
from
'./maintenance.less'
import
{
Space
,
Table
,
Popconfirm
,
Tooltip
,
Button
,
notification
}
from
'antd'
;
import
{
Space
,
Table
,
Popconfirm
,
Tooltip
,
Button
,
notification
}
from
'antd'
;
import
{
CM_XWBPlan_DataList
,
CM_XWBPlan_RemovePlan
}
from
'@/services/maintenance/api'
;
import
{
EditTwoTone
,
DeleteOutlined
,
PlusOutlined
}
from
'@ant-design/icons'
;
import
AddModal
from
'./AddModal'
CM_XWBPlan_DataList
,
CM_XWBPlan_RemovePlan
,
}
from
'@/services/maintenance/api'
;
import
{
EditTwoTone
,
DeleteOutlined
,
PlusOutlined
}
from
'@ant-design/icons'
;
import
styles
from
'./maintenance.less'
;
import
AddModal
from
'./AddModal'
;
const
maintenance
=
()
=>
{
const
[
addVisible
,
setAddVisible
]
=
useState
(
false
)
const
[
type
,
setType
]
=
useState
(
''
)
const
[
formObj
,
setFormObj
]
=
useState
(
''
)
const
[
addVisible
,
setAddVisible
]
=
useState
(
false
);
const
[
type
,
setType
]
=
useState
(
''
);
const
[
formObj
,
setFormObj
]
=
useState
(
''
);
const
[
treeLoading
,
setTreeLoading
]
=
useState
(
false
);
const
[
flag
,
setFlag
]
=
useState
(
0
);
const
[
tableData
,
setTableData
]
=
useState
([])
const
[
tableData
,
setTableData
]
=
useState
([]);
const
columns
=
[
{
...
...
@@ -30,7 +24,7 @@ const maintenance = () => {
dataIndex
:
'businessName'
,
key
:
'businessName'
,
width
:
100
,
align
:
'center'
,
align
:
'center'
,
},
{
title
:
'业务类型'
,
...
...
@@ -38,14 +32,14 @@ const maintenance = () => {
key
:
'businessType'
,
width
:
100
,
ellipsis
:
true
,
align
:
'center'
,
align
:
'center'
,
},
{
title
:
'执行周期'
,
dataIndex
:
'docycle'
,
key
:
'docycle'
,
width
:
100
,
align
:
'center'
,
align
:
'center'
,
},
{
title
:
'台账名称'
,
...
...
@@ -53,14 +47,14 @@ const maintenance = () => {
key
:
'accountName'
,
width
:
200
,
ellipsis
:
true
,
align
:
'center'
,
align
:
'center'
,
},
{
title
:
'反馈名称'
,
dataIndex
:
'feedbackName'
,
key
:
'feedbackName'
,
width
:
200
,
align
:
'center'
,
align
:
'center'
,
},
{
title
:
'台账过滤条件'
,
...
...
@@ -68,14 +62,14 @@ const maintenance = () => {
key
:
'filterCondition'
,
width
:
200
,
ellipsis
:
true
,
align
:
'center'
,
align
:
'center'
,
},
{
title
:
'是否送审'
,
dataIndex
:
'isSubmit'
,
key
:
'isSubmit'
,
width
:
100
,
align
:
'center'
,
align
:
'center'
,
},
{
title
:
'执行角色'
,
...
...
@@ -83,14 +77,14 @@ const maintenance = () => {
key
:
'doRole'
,
width
:
200
,
ellipsis
:
true
,
align
:
'center'
,
align
:
'center'
,
},
{
title
:
'预生成天数'
,
dataIndex
:
'produceDays'
,
key
:
'produceDays'
,
width
:
100
,
align
:
'center'
,
align
:
'center'
,
},
{
title
:
'在线任务量'
,
...
...
@@ -98,14 +92,14 @@ const maintenance = () => {
key
:
'onLines'
,
width
:
100
,
ellipsis
:
true
,
align
:
'center'
,
align
:
'center'
,
},
{
title
:
'启停'
,
dataIndex
:
'doNot'
,
key
:
'doNot'
,
width
:
100
,
align
:
'center'
,
align
:
'center'
,
},
{
title
:
'操作'
,
...
...
@@ -123,11 +117,7 @@ const maintenance = () => {
<
Tooltip
title=
"删除"
>
<
Popconfirm
placement=
"bottomRight"
title=
{
<
p
>
是否确认删除?
</
p
>
}
title=
{
<
p
>
是否确认删除?
</
p
>
}
okText=
"确认"
cancelText=
"取消"
onConfirm=
{
()
=>
deleteEventType
(
record
)
}
...
...
@@ -138,37 +128,36 @@ const maintenance = () => {
</
Space
>
),
},
];
]
useEffect
(()
=>
{
useEffect
(()
=>
{
setTreeLoading
(
true
);
CM_XWBPlan_DataList
().
then
(
res
=>
{
CM_XWBPlan_DataList
().
then
(
res
=>
{
setTreeLoading
(
false
);
if
(
res
.
msg
==
'Ok'
)
{
setTableData
(
res
.
data
)
if
(
res
.
msg
===
'Ok'
)
{
setTableData
(
res
.
data
);
}
})
},[
flag
])
});
},
[
flag
]);
const
add
=
()
=>
{
setAddVisible
(
true
)
setType
(
'add'
)
}
const
editEventType
=
record
=>
{
setAddVisible
(
true
)
setType
(
'edit'
)
const
add
=
()
=>
{
setAddVisible
(
true
);
setType
(
'add'
);
};
const
editEventType
=
record
=>
{
setAddVisible
(
true
);
setType
(
'edit'
);
setFormObj
(
record
);
}
const
deleteEventType
=
record
=>
{
CM_XWBPlan_RemovePlan
({
planId
:
record
.
id
}).
then
(
res
=>
{
};
const
deleteEventType
=
record
=>
{
CM_XWBPlan_RemovePlan
({
planId
:
record
.
id
}).
then
(
res
=>
{
if
(
res
.
msg
===
''
)
{
notification
.
success
({
message
:
'提示'
,
duration
:
3
,
description
:
'删除成功'
,
});
setFlag
(
flag
+
1
)
setFlag
(
flag
+
1
);
}
else
{
notification
.
error
({
message
:
'提示'
,
...
...
@@ -176,19 +165,27 @@ const maintenance = () => {
description
:
res
.
msg
,
});
}
})
}
const
onSubmit
=
()
=>
{
setAddVisible
(
false
)
setFlag
(
flag
+
1
)
}
});
};
const
onSubmit
=
()
=>
{
setAddVisible
(
false
);
setFlag
(
flag
+
1
);
};
return
(
<
div
className=
{
styles
.
maintenanceContainer
}
>
<
div
className=
{
styles
.
contentContainers
}
>
<
div
style=
{
{
height
:
'50px'
,
backgroundColor
:
'white'
}
}
>
<
span
style=
{
{
float
:
'right'
,
marginRight
:
'10px'
}
}
>
<
Button
icon=
{
<
PlusOutlined
className=
{
styles
.
icon
}
/>
}
onClick=
{
add
}
style=
{
{
marginLeft
:
'30px'
,
verticalAlign
:
'middle'
,
marginTop
:
'10px'
}
}
>
<
Button
icon=
{
<
PlusOutlined
className=
{
styles
.
icon
}
/>
}
onClick=
{
add
}
style=
{
{
marginLeft
:
'30px'
,
verticalAlign
:
'middle'
,
marginTop
:
'10px'
,
}
}
>
添加
</
Button
>
</
span
>
...
...
@@ -196,17 +193,18 @@ const maintenance = () => {
<
Table
// rowClassName={setRowClassName}
size=
"small"
rowKey=
'ID'
rowKey=
"ID"
bordered
loading=
{
treeLoading
}
onRow=
{
record
=>
{
return
{
onDoubleClick
:
event
=>
{
event
.
stopPropagation
();
editEventType
(
record
)
},
//双击
};
}
}
onRow=
{
record
=>
({
onDoubleClick
:
event
=>
{
event
.
stopPropagation
();
editEventType
(
record
);
},
// 双击
})
}
columns=
{
columns
}
dataSource=
{
tableData
}
scroll=
{
{
y
:
'calc(100vh - 215px)
'
}
}
scroll=
{
{
y
:
'calc(100vh - 215px)'
,
x
:
'max-content
'
}
}
pagination=
{
{
showTotal
:
(
total
,
range
)
=>
`第${range[0]}-${range[1]} 条/共 ${total} 条`
,
...
...
@@ -227,7 +225,7 @@ const maintenance = () => {
/>
</
div
>
</
div
>
)
);
};
export
default
maintenance
\ No newline at end of file
export
default
maintenance
;
src/pages/platformCenter/bsmanager/workOrder/AddFlowsModal.jsx
View file @
a6cba482
/* eslint-disable indent */
/* eslint-disable react/jsx-no-duplicate-props */
/* eslint-disable no-shadow */
/* eslint-disable no-undef */
/* eslint-disable eqeqeq */
/* eslint-disable array-callback-return */
/* eslint-disable guard-for-in */
/* eslint-disable no-restricted-syntax */
/* eslint-disable camelcase */
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
{
Modal
,
Form
,
Input
,
notification
,
message
,
Row
,
Col
,
Select
,
Drawer
,
Space
,
Button
}
from
'antd'
;
import
{
Modal
,
Form
,
Input
,
notification
,
message
,
Row
,
Col
,
Select
,
Drawer
,
Space
,
Button
,
}
from
'antd'
;
import
{
PlusOutlined
}
from
'@ant-design/icons'
;
import
ChangeAddFlows
from
'./ChangeAddFlows'
import
{
CM_Event_ReloadFlows
,
CM_Event_LoadDepartmentAndRoles
,
CM_Event_AddEvenFlow
,
CM_Event_EditEvenFlow
}
from
'@/services/standingBook/api'
;
import
ChangeAddFlows
from
'./ChangeAddFlows'
;
import
{
CM_Event_ReloadFlows
,
CM_Event_LoadDepartmentAndRoles
,
CM_Event_AddEvenFlow
,
CM_Event_EditEvenFlow
,
}
from
'@/services/standingBook/api'
;
import
styles
from
'./incident.less'
;
const
{
Option
}
=
Select
;
const
AddFlowsModal
=
props
=>
{
const
{
callBackSubmit
=
()
=>
{
},
type
,
visible
,
onClose
,
formObj
,
obj
,
maxLength
,
record
}
=
props
;
const
{
callBackSubmit
=
()
=>
{},
type
,
visible
,
onClose
,
formObj
,
obj
,
maxLength
,
record
,
}
=
props
;
const
[
form
]
=
Form
.
useForm
();
const
{
Item
}
=
Form
;
const
[
filed1
,
setFiled1
]
=
useState
({});
// 传给子组件列表数据
const
[
standingTable
,
setStandingTable
]
=
useState
([]);
const
[
visible1
,
setVisible1
]
=
useState
(
false
)
const
[
pickItem
,
setPickItem
]
=
useState
(
''
)
const
[
checkedList1
,
setCheckedList1
]
=
useState
([])
const
[
nu1
,
setNu1
]
=
useState
([])
const
[
visible1
,
setVisible1
]
=
useState
(
false
);
const
[
pickItem
,
setPickItem
]
=
useState
(
''
);
const
[
checkedList1
,
setCheckedList1
]
=
useState
([]);
const
[
nu1
,
setNu1
]
=
useState
([]);
const
[
inputValue
,
setInputValue
]
=
useState
({
Roles
:
''
});
const
[
selectValue
,
setSelectValue
]
=
useState
(
''
)
const
[
characterValue
,
setCharacterValue
]
=
useState
(
''
)
const
[
selectValue
,
setSelectValue
]
=
useState
(
''
);
const
[
characterValue
,
setCharacterValue
]
=
useState
(
''
);
const
[
Order
,
setOrder
]
=
useState
(
''
);
// 弹窗类型
const
[
strr
,
setStrr
]
=
useState
(
''
)
const
[
strr
,
setStrr
]
=
useState
(
''
);
useEffect
(()
=>
{
console
.
log
(
formObj
)
getRole
()
console
.
log
(
obj
)
console
.
log
(
formObj
);
getRole
();
console
.
log
(
obj
);
CM_Event_ReloadFlows
({
eventTypeId
:
obj
}).
then
(
res
=>
{
if
(
res
.
msg
===
'Ok'
)
{
console
.
log
(
res
.
data
)
let
arr
=
formateArrDataA
(
res
.
data
,
'System'
)
let
newArr
=
[]
console
.
log
(
res
.
data
);
let
arr
=
formateArrDataA
(
res
.
data
,
'System'
);
let
newArr
=
[];
Object
.
keys
(
arr
).
map
((
item
,
index
)
=>
{
newArr
.
push
(
item
)
})
console
.
log
(
newArr
)
newArr
.
push
(
item
);
});
console
.
log
(
newArr
);
setStandingTable
(
newArr
);
}
})
});
if
(
type
===
'add'
)
{
setInputValue
({
Roles
:
''
})
setFiled1
({})
setInputValue
({
Roles
:
''
});
setFiled1
({});
form
.
resetFields
();
}
else
if
(
type
===
'edit'
)
{
setStrr
(
record
.
FlowRoles
)
console
.
log
(
record
)
setStrr
(
record
.
FlowRoles
);
console
.
log
(
record
);
setInputValue
({
Roles
:
record
.
FlowRoles
})
setSelectValue
(
record
.
FlowName
)
console
.
log
(
selectValue
)
Roles
:
record
.
FlowRoles
,
});
setSelectValue
(
record
.
FlowName
);
console
.
log
(
selectValue
);
}
},
[
visible
])
},
[
visible
]);
const
formateArrDataA
=
(
initialArr
,
name
)
=>
{
// 判定传参是否符合规则
if
(
!
(
initialArr
instanceof
Array
))
{
return
'请传入正确格式的数组'
return
'请传入正确格式的数组'
;
}
if
(
!
name
)
{
return
'请传入对象属性'
return
'请传入对象属性'
;
}
//
先获取一下这个数组中有多少个"name"
let
nameArr
=
[]
//
先获取一下这个数组中有多少个"name"
let
nameArr
=
[];
for
(
let
i
in
initialArr
)
{
if
(
nameArr
.
indexOf
(
initialArr
[
i
][
`
${
name
}
`
])
===
-
1
)
{
nameArr
.
push
(
initialArr
[
i
][
`
${
name
}
`
])
nameArr
.
push
(
initialArr
[
i
][
`
${
name
}
`
]);
}
}
//
新建一个包含多个list的结果对象
let
tempObj
=
{}
//
新建一个包含多个list的结果对象
let
tempObj
=
{};
// 根据不同的"name"生成多个数组
for
(
let
k
in
nameArr
)
{
for
(
let
j
in
initialArr
)
{
if
(
initialArr
[
j
][
`
${
name
}
`
]
==
nameArr
[
k
])
{
// 每次外循环时新建一个对应"name"的数组, 内循环时当前数组不变
tempObj
[
nameArr
[
k
]]
=
tempObj
[
nameArr
[
k
]]
||
[]
tempObj
[
nameArr
[
k
]].
push
(
initialArr
[
j
])
tempObj
[
nameArr
[
k
]]
=
tempObj
[
nameArr
[
k
]]
||
[];
tempObj
[
nameArr
[
k
]].
push
(
initialArr
[
j
]);
}
}
}
for
(
let
keys
in
tempObj
)
{
let
arr
=
[]
let
arr
=
[];
tempObj
[
keys
].
map
((
item
,
index
)
=>
{
tempObj
[
keys
]
=
arr
;
item
.
key
=
index
arr
.
push
(
item
)
})
}
return
tempObj
item
.
key
=
index
;
arr
.
push
(
item
);
});
}
return
tempObj
;
};
const
formateArrDataA1
=
(
initialArr
,
name
)
=>
{
let
aa
=
[]
let
a1
=
[]
let
a2
let
a3
=
[]
let
aa
=
[];
let
a1
=
[];
let
a2
;
let
a3
=
[];
initialArr
.
map
(
i
=>
{
// console.log(i.groupType)
a2
=
i
.
groupType
a2
=
i
.
groupType
;
// console.log(a2)
// console.log(i.root)
a1
=
i
.
root
a1
=
i
.
root
;
a1
.
map
(
j
=>
{
j
.
group
=
a2
j
.
group
=
a2
;
// console.log(j)
})
aa
.
push
(
i
.
root
)
})
});
aa
.
push
(
i
.
root
);
});
// console.log(aa)
aa
.
map
(
p
=>
{
// console.log(p)
p
.
map
(
o
=>
{
// console.log(o)
a3
.
push
(
o
)
})
})
console
.
log
(
a3
)
a3
.
push
(
o
);
});
});
console
.
log
(
a3
);
// 判定传参是否符合规则
if
(
!
(
a3
instanceof
Array
))
{
return
'请传入正确格式的数组'
return
'请传入正确格式的数组'
;
}
if
(
!
name
)
{
return
'请传入对象属性'
return
'请传入对象属性'
;
}
//
先获取一下这个数组中有多少个"name"
let
nameArr
=
[]
//
先获取一下这个数组中有多少个"name"
let
nameArr
=
[];
a3
.
map
(
i
=>
{
if
(
nameArr
.
indexOf
(
i
.
group
)
===
-
1
)
{
nameArr
.
push
(
i
.
group
)
nameArr
.
push
(
i
.
group
);
}
})
console
.
log
(
nameArr
)
//
新建一个包含多个list的结果对象
let
tempObj
=
{}
});
console
.
log
(
nameArr
);
//
新建一个包含多个list的结果对象
let
tempObj
=
{};
// 根据不同的"name"生成多个数组
for
(
let
k
in
nameArr
)
{
for
(
let
j
in
a3
)
{
if
(
a3
[
j
].
group
==
nameArr
[
k
])
{
// 每次外循环时新建一个对应"name"的数组, 内循环时当前数组不变
tempObj
[
nameArr
[
k
]]
=
tempObj
[
nameArr
[
k
]]
||
[]
tempObj
[
nameArr
[
k
]].
push
(
a3
[
j
])
tempObj
[
nameArr
[
k
]]
=
tempObj
[
nameArr
[
k
]]
||
[];
tempObj
[
nameArr
[
k
]].
push
(
a3
[
j
]);
}
}
}
console
.
log
(
tempObj
);
for
(
let
key
in
tempObj
)
{
let
arr
=
[]
let
arr
=
[];
tempObj
[
key
].
map
(
item
=>
{
tempObj
[
key
]
=
arr
;
arr
.
push
(
item
.
Name
)
})
}
return
tempObj
arr
.
push
(
item
.
Name
);
});
}
return
tempObj
;
};
const
onSumbit
=
()
=>
{
callBackSubmit
();
// setLoading(true);
let
aa
=
form
.
getFieldsValue
().
FlowName
console
.
log
(
aa
)
console
.
log
(
inputValue
)
console
.
log
(
strr
)
let
aa
=
form
.
getFieldsValue
().
FlowName
;
console
.
log
(
aa
);
console
.
log
(
inputValue
);
console
.
log
(
strr
);
if
(
type
==
'add'
)
{
let
index
=
aa
.
lastIndexOf
(
"
\
\"
);
let
index
=
aa
.
lastIndexOf
(
'
\
\'
);
aa = aa.substring(index + 1, aa.length);
CM_Event_AddEvenFlow({
eventTypeId: formObj.ID,
...
...
@@ -206,7 +236,7 @@ const AddFlowsModal = props => {
CM_Event_EditEvenFlow({
eventTypeId: formObj.ID,
eventFlowId: record.ID,
roles: inputValue.Roles
roles: inputValue.Roles,
})
.then(res => {
// setLoading(false);
...
...
@@ -235,107 +265,101 @@ const AddFlowsModal = props => {
setLoading(false);
});
}
};
const getRole = () => {
CM_Event_LoadDepartmentAndRoles().then(res => {
if (res.msg === '
Ok
') {
setNu1(res.data)
setFiled1(formateArrDataA1(res.data, 'groupType'))
console.log(res.data)
}
})
setNu1(res.data);
setFiled1(formateArrDataA1(res.data, '
groupType
'));
console.log(res.data);
}
});
};
const changeText = (e, type) => {
let inputText = { ...inputValue }
inputText[type] = e.target.value
setInputValue(inputText)
}
const pickFiled1 = (fileds)
=> {
let inputText = { ...inputValue };
inputText[type] = e.target.value;
setInputValue(inputText);
};
const pickFiled1 = fileds
=> {
// setTypes('
app
')
let pp = formateArrDataA1(nu1, 'group')
let ab = inputValue[fileds].split(',')
console.log(pp)
let arr = Object.keys(pp)
let b = []
let a = []
let pp = formateArrDataA1(nu1, '
group
');
let ab = inputValue[fileds].split('
,
');
console.log(pp);
let arr = Object.keys(pp);
let b = [];
let a = [];
arr.map((item, index) => {
pp[item].map((i, j) => {
b.push(i)
})
})
console.log(ab)
b.push(i);
});
});
console.log(ab);
ab.map((item, index) => {
if (b.includes(item) == false) {
if(item == ''){
a=[]
}else{
a.push(item)
}
}
})
if(a.length >0){
pp.外部字段 = a
console.log(pp)
arr.push('外部字段')
if (item == '') {
a = [];
} else {
a.push(item);
}
console.log(a)
console.log(pp)
setFiled1(pp)
console.log(fileds)
setCharacterValue(inputValue[fileds])
setCheckedList1(inputValue[fileds].split(','))
setPickItem(fileds)
setVisible1(true)
}
});
if (a.length > 0) {
pp.外部字段 = a;
console.log(pp);
arr.push('
外部字段
');
}
console.log(a);
console.log(pp);
setFiled1(pp);
console.log(fileds);
setCharacterValue(inputValue[fileds]);
setCheckedList1(inputValue[fileds].split('
,
'));
setPickItem(fileds);
setVisible1(true);
};
const onOKk = prop => {
let title = prop.title
let selectData = prop.stt
let ff = prop.filed22
let aa = []
let bb = 0
let { title } = prop;
let selectData = prop.stt;
let ff = prop.filed22;
let aa = [];
let bb = 0;
title.map((item, index) => {
console.log(ff[item])
aa=[]
console.log(ff[item]);
aa = [];
selectData.map((item1, index1) => {
console.log(item1)
console.log(item1);
if (ff[item].indexOf(item1) != -1) {
aa.push(item1)
aa.push(item1);
}
})
console.log(aa)
if(aa.length == 0)
{
bb = 1
});
console.log(aa);
if (aa.length == 0)
{
bb = 1;
}
})
console.log(aa)
});
console.log(aa);
if (bb == 1) {
notification.error({
message: '
提示
',
description: '
权限角色部门必须都选至少一项
',
});
} else {
setVisible1(false)
let inputText = { ...inputValue }
inputText[prop.pickItem] = prop.str
console.log(prop.str)
console.log(inputText)
setStrr(prop.str)
setCheckedList1(prop.checkedList)
setInputValue(inputText)
}
setVisible1(false);
let inputText = { ...inputValue };
inputText[prop.pickItem] = prop.str;
console.log(prop.str);
console.log(inputText);
setStrr(prop.str);
setCheckedList1(prop.checkedList);
setInputValue(inputText);
}
};
return (
<Drawer
title={type === '
add
' ? '
添加受理流程
' : '
编辑受理流程
'}
visible={visible}
width='600px'
width="600px"
onClose={onClose}
destroyOnClose
footer={
...
...
@@ -349,48 +373,56 @@ const AddFlowsModal = props => {
<Form form={form} labelCol={{ span: 7 }} style={{ overflowY: '
scroll
' }}>
<Row>
<Col span={23}>
{type === 'edit' ?
{type === '
edit
' ? (
<>
<Item
label="
受理流程
"
name="
FlowName
"
labelCol={{ span: 4 }}
>
<Item label="受理流程" name="FlowName" labelCol={{ span: 4 }}>
<Select
placeholder="选择受理流程"
placeholder={selectValue}
disabled
>
{standingTable ? standingTable.map((item, index) => { return <Option key={index} value={item}>{item}</Option> }) : ''}
{standingTable
? standingTable.map((item, index) => (
<Option key={index} value={item}>
{item}
</Option>
))
: ''}
</Select>
</Item>
</>
: <>
<Item
label="
受理流程
"
name="
FlowName
"
labelCol={{ span: 4 }}
>
<Select
placeholder="
选择受理流程
"
>
{standingTable ? standingTable.map((item, index) => { return <Option key={index} value={item}>{item}</Option> })
: ''}
) : (
<>
<Item label="受理流程" name="FlowName" labelCol={{ span: 4 }}>
<Select placeholder="选择受理流程">
{standingTable
? standingTable.map((item, index) => (
<Option key={index} value={item}>
{item}
</Option>
))
: ''}
</Select>
</Item>
</>
}
)
}
</Col>
<Col span={23}>
<Item
label="
受理权限
"
name="
Roles
"
labelCol={{ span: 4 }}
>
<div className={styles.filed_listItem} >
<Input style={{width:'83%'}}placeholder="
请选择受理权限
" onChange={(e) => changeText(e, 'Roles')} value={inputValue.Roles} allowClear />
<Button type="
dashed
" onClick={() => pickFiled1('Roles')} icon={<PlusOutlined style={{marginTop:'5px'}}/>} style={{ marginLeft: '0.5rem', width: '4rem' }} />
<Item label="受理权限" name="Roles" labelCol={{ span: 4 }}>
<div className={styles.filed_listItem}>
<Input
style={{ width: '
83
%
' }}
placeholder="请选择受理权限"
onChange={e => changeText(e, '
Roles
')}
value={inputValue.Roles}
allowClear
/>
<Button
type="dashed"
onClick={() => pickFiled1('
Roles
')}
icon={<PlusOutlined style={{ marginTop: '
5
px
' }} />}
style={{ marginLeft: '
0.5
rem
', width: '
4
rem
' }}
/>
</div>
</Item>
</Col>
...
...
@@ -407,6 +439,6 @@ const AddFlowsModal = props => {
formObj={formObj}
/>
</Drawer>
)
}
export default AddFlowsModal
\ No newline at end of file
);
};
export default AddFlowsModal;
src/pages/platformCenter/bsmanager/workOrder/AddModal.jsx
View file @
a6cba482
This source diff could not be displayed because it is too large. You can
view the blob
instead.
src/pages/platformCenter/bsmanager/workOrder/ChangeAddFlows.jsx
View file @
a6cba482
/* eslint-disable no-plusplus */
/* eslint-disable array-callback-return */
/* eslint-disable no-unused-expressions */
/* eslint-disable no-shadow */
import
React
,
{
useState
,
useEffect
,
useCallback
,
useRef
}
from
'react'
;
import
{
Form
,
Modal
,
Space
,
Divider
,
Radio
,
Checkbox
,
Button
}
from
'antd'
;
import
styles
from
'./incident.less'
;
import
Sortable
from
'sortablejs'
;
import
styles
from
'./incident.less'
;
const
CheckboxGroup
=
Checkbox
.
Group
;
const
ChangeAddFlows
=
props
=>
{
const
{
callBackSubmit
=
()
=>
{
},
pickItem
,
visible
,
filed1
,
characterValue
,
newCheckedList
}
=
props
;
const
{
callBackSubmit
=
()
=>
{},
pickItem
,
visible
,
filed1
,
characterValue
,
newCheckedList
,
}
=
props
;
const
[
loading
,
setLoading
]
=
useState
(
false
);
const
[
value
,
setValue
]
=
useState
(
''
);
const
[
checkValue
,
setCheckValue
]
=
useState
([]);
const
[
form
]
=
Form
.
useForm
();
const
[
title
,
setTitle
]
=
useState
([])
const
[
title
,
setTitle
]
=
useState
([]);
const
{
Item
}
=
Form
;
const
[
checkedList
,
setCheckedList
]
=
useState
([]);
//
选中的复选框内容
const
[
checkedList
,
setCheckedList
]
=
useState
([]);
//
选中的复选框内容
const
[
indeterminate
,
setIndeterminate
]
=
useState
([]);
const
[
checkAll
,
setCheckAll
]
=
useState
([]);
const
[
selectData
,
setSelectData
]
=
useState
([])
let
objArr
=
[]
const
[
selectData
,
setSelectData
]
=
useState
([]);
let
objArr
=
[];
const
onChangeList1
=
(
list
,
index
,
title
)
=>
{
const
checkedListArr
=
[...
checkedList
]
checkedListArr
[
index
]
=
list
const
checkedListArr
=
[...
checkedList
];
checkedListArr
[
index
]
=
list
;
setCheckedList
(
checkedListArr
);
const
indeterminateArr
=
[...
indeterminate
]
const
checkAllArr
=
[...
checkAll
]
indeterminateArr
[
index
]
=
!!
list
.
length
&&
list
.
length
<
filed1
[
title
].
length
checkAllArr
[
index
]
=
list
.
length
===
filed1
[
title
].
length
setIndeterminate
(
indeterminateArr
)
const
indeterminateArr
=
[...
indeterminate
];
const
checkAllArr
=
[...
checkAll
];
indeterminateArr
[
index
]
=
!!
list
.
length
&&
list
.
length
<
filed1
[
title
].
length
;
checkAllArr
[
index
]
=
list
.
length
===
filed1
[
title
].
length
;
setIndeterminate
(
indeterminateArr
);
setCheckAll
(
checkAllArr
);
};
const
onSubmit
=
()
=>
{
console
.
log
(
selectData
.
join
(
","
))
console
.
log
(
pickItem
)
console
.
log
(
checkedList
)
callBackSubmit
({
checkedList
,
str
:
selectData
.
join
(
","
),
pickItem
,
stt
:
selectData
,
title
:
title
,
filed22
:
filed1
});
}
console
.
log
(
selectData
.
join
(
','
));
console
.
log
(
pickItem
);
console
.
log
(
checkedList
);
callBackSubmit
({
checkedList
,
str
:
selectData
.
join
(
','
),
pickItem
,
stt
:
selectData
,
title
,
filed22
:
filed1
,
});
};
const
onCheckAllChange
=
e
=>
{
const
indeterminateArr
=
[...
indeterminate
]
const
checkAllArr
=
[...
checkAll
]
const
checkedListArr
=
[...
checkedList
]
checkAllArr
[
e
.
target
.
index
]
=
e
.
target
.
checked
indeterminateArr
[
e
.
target
.
index
]
=
false
e
.
target
.
checked
?
checkedListArr
[
e
.
target
.
index
]
=
e
.
target
.
checkvalue
:
checkedListArr
[
e
.
target
.
index
]
=
[]
const
indeterminateArr
=
[...
indeterminate
];
const
checkAllArr
=
[...
checkAll
];
const
checkedListArr
=
[...
checkedList
];
checkAllArr
[
e
.
target
.
index
]
=
e
.
target
.
checked
;
indeterminateArr
[
e
.
target
.
index
]
=
false
;
e
.
target
.
checked
?
(
checkedListArr
[
e
.
target
.
index
]
=
e
.
target
.
checkvalue
)
:
(
checkedListArr
[
e
.
target
.
index
]
=
[]);
setCheckedList
(
checkedListArr
);
setIndeterminate
(
indeterminateArr
);
setCheckAll
(
checkAllArr
);
};
useEffect
(()
=>
{
selectAll
()
selectAll
();
},
[
checkedList
]);
const
selectAll
=
()
=>
{
objArr
=
[]
objArr
=
[];
checkedList
.
map
(
item
=>
{
objArr
=
objArr
.
concat
(
item
)
})
setSelectData
(
objArr
)
}
objArr
=
objArr
.
concat
(
item
);
});
setSelectData
(
objArr
);
};
useEffect
(()
=>
{
console
.
log
(
characterValue
)
console
.
log
(
pickItem
)
console
.
log
(
filed1
)
let
arr
=
Object
.
keys
(
filed1
)
console
.
log
(
arr
,
'arr'
)
setTitle
(
arr
)
let
checkArr
=
[]
let
indeterminateArr
=
[]
let
checkAllArr
=
[]
console
.
log
(
characterValue
);
console
.
log
(
pickItem
);
console
.
log
(
filed1
);
let
arr
=
Object
.
keys
(
filed1
);
console
.
log
(
arr
,
'arr'
);
setTitle
(
arr
);
let
checkArr
=
[];
let
indeterminateArr
=
[];
let
checkAllArr
=
[];
console
.
log
(
newCheckedList
);
// let b = []
// let a = []
...
...
@@ -76,15 +97,18 @@ const ChangeAddFlows = props => {
// filed1[item].map((i, j) => {
// b.push(i)
// })
checkArr
[
index
]
=
[]
checkArr
[
index
]
=
[];
newCheckedList
.
map
(
checkItem
=>
{
if
(
filed1
[
item
].
includes
(
checkItem
))
{
checkArr
[
index
].
push
(
checkItem
)
checkArr
[
index
].
push
(
checkItem
);
}
})
indeterminateArr
.
push
(
!!
checkArr
[
index
].
length
&&
checkArr
[
index
].
length
<
filed1
[
item
].
length
)
checkAllArr
.
push
(
checkArr
[
index
].
length
===
filed1
[
item
].
length
)
})
});
indeterminateArr
.
push
(
!!
checkArr
[
index
].
length
&&
checkArr
[
index
].
length
<
filed1
[
item
].
length
,
);
checkAllArr
.
push
(
checkArr
[
index
].
length
===
filed1
[
item
].
length
);
});
// newCheckedList.map((item, index) => {
// if (b.includes(item) == false) {
// if(item == ''){
...
...
@@ -102,65 +126,98 @@ const ChangeAddFlows = props => {
// }
// setTitle(arr)
// checkArr.push(a)
console
.
log
(
checkArr
)
setCheckedList
(
checkArr
)
setIndeterminate
(
indeterminateArr
)
setCheckAll
(
checkAllArr
)
let
newArr
=
characterValue
.
length
?
characterValue
.
split
(
","
)
:
[]
setSelectData
(
newArr
)
draftSort
()
console
.
log
(
checkArr
);
setCheckedList
(
checkArr
);
setIndeterminate
(
indeterminateArr
);
setCheckAll
(
checkAllArr
);
let
newArr
=
characterValue
.
length
?
characterValue
.
split
(
','
)
:
[];
setSelectData
(
newArr
);
draftSort
();
},
[
visible
]);
//
拖拽初始化及逻辑
//
拖拽初始化及逻辑
const
draftSort
=
()
=>
{
let
el
=
document
.
getElementById
(
'doctor-drag-items'
);
if
(
el
)
{
let
sortable
=
Sortable
.
create
(
el
,
{
animation
:
100
,
//动画参数
onEnd
:
function
(
evt
)
{
//拖拽完毕之后发生,只需关注该事件
animation
:
100
,
// 动画参数
onEnd
(
evt
)
{
// 拖拽完毕之后发生,只需关注该事件
let
arr
=
[];
let
len
=
evt
.
from
.
children
.
length
;
for
(
let
i
=
0
;
i
<
len
;
i
++
)
{
arr
.
push
(
evt
.
from
.
children
[
i
].
getAttribute
(
'drag-id'
))
}
setSelectData
(
arr
)
arr
.
push
(
evt
.
from
.
children
[
i
].
getAttribute
(
'drag-id'
));
}
setSelectData
(
arr
);
},
});
}
}
};
return
(
<
Modal
title=
'部门或角色'
title=
"部门或角色"
bodyStyle=
{
{
width
:
'100%'
,
minHeight
:
'100px'
}
}
width=
"7
00px"
width=
"14
00px"
destroyOnClose
centered=
{
true
}
centered
cancelText=
"取消"
okText=
"确认"
{
...
props
}
onOk=
{
()
=>
onSubmit
()
}
forceRender=
{
true
}
forceRender
getContainer=
{
false
}
>
{
visible
&&
(
<
div
className=
{
styles
.
listCard
}
>
<
div
className=
{
styles
.
cardItem
}
style=
{
{
borderRight
:
'1px solid #99bbe8'
}
}
>
<
Divider
orientation=
"left"
style=
{
{
margin
:
'0 0 10px 0'
,
backgroundColor
:
'#dfe8f6'
}
}
>
待选部门角色站点
</
Divider
>
<
div
className=
{
styles
.
cardContent
}
>
{
title
.
map
((
item
,
index
)
=>
{
return
<
div
className=
{
styles
.
cardItemData
}
key=
{
index
}
>
<
Divider
orientation=
"left"
style=
{
{
margin
:
'0 0 10px 0'
,
color
:
'#15428b'
,
borderTopColor
:
'#99bbe8'
}
}
>
{
item
}
<
Checkbox
indeterminate=
{
indeterminate
[
index
]
}
onChange=
{
onCheckAllChange
}
index=
{
index
}
checkvalue=
{
filed1
[
item
]
}
checked=
{
checkAll
[
index
]
}
>
</
Checkbox
></
Divider
>
<
CheckboxGroup
options=
{
filed1
[
item
]
}
value=
{
checkedList
[
index
]
}
onChange=
{
(
e
)
=>
onChangeList1
(
e
,
index
,
item
)
}
/></
div
>
})
}
<
div
className=
{
styles
.
listCard1
}
>
<
div
className=
{
styles
.
cardItem1
}
style=
{
{
borderRight
:
'1px solid #99bbe8'
}
}
>
<
Divider
orientation=
"left"
style=
{
{
margin
:
'0 0 10px 0'
,
backgroundColor
:
'#dfe8f6'
}
}
>
待选部门站点角色
</
Divider
>
<
div
className=
{
styles
.
cardContent1
}
>
{
title
.
map
((
item
,
index
)
=>
(
<
div
className=
{
styles
.
cardItemData1
}
key=
{
index
}
>
<
Divider
orientation=
"left"
style=
{
{
margin
:
'0 0 10px 0'
,
color
:
'#15428b'
,
borderTopColor
:
'#99bbe8'
,
}
}
>
{
item
}{
' '
}
<
Checkbox
indeterminate=
{
indeterminate
[
index
]
}
onChange=
{
onCheckAllChange
}
index=
{
index
}
checkvalue=
{
filed1
[
item
]
}
checked=
{
checkAll
[
index
]
}
>
{
' '
}
</
Checkbox
>
</
Divider
>
<
CheckboxGroup
options=
{
filed1
[
item
]
}
value=
{
checkedList
[
index
]
}
onChange=
{
e
=>
onChangeList1
(
e
,
index
,
item
)
}
/>
</
div
>
))
}
</
div
>
<
div
className=
{
styles
.
cardItem
}
>
<
Divider
orientation=
"left"
style=
{
{
margin
:
'0 0 10px 0'
,
backgroundColor
:
'#dfe8f6'
}
}
>
已选列表
</
Divider
>
</
div
>
{
/* <div className={styles.cardItem}>
<Divider
orientation="left"
style={{ margin: '0 0 10px 0', backgroundColor: '#dfe8f6' }}
>
已选列表
</Divider>
<div className={styles.cardContent}>
<div className={styles.doctorTable}>
<table>
...
...
@@ -169,27 +226,34 @@ const ChangeAddFlows = props => {
<td>字段名</td>
</tr>
</thead>
<
tbody
id=
'doctor-drag-items'
>
{
selectData
&&
selectData
.
length
>
0
?
selectData
.
map
((
item
,
index
)
=>
{
return
<
tr
drag
-
id=
{
item
}
key=
{
index
}
style=
{
{
cursor
:
'move'
}
}
>
<
td
><
span
title=
{
item
}
>
{
item
}
</
span
></
td
>
<tbody id="doctor-drag-items">
{selectData && selectData.length > 0 ? (
selectData.map((item, index) => (
<tr
drag-id={item}
key={index}
style={{ cursor: 'move' }}
>
<td>
<span title={item}>{item}</span>
</td>
</tr>
})
:
<
tr
><
td
colSpan=
'10'
style=
{
{
textAlign
:
'center'
}
}
>
暂无数据
</
td
></
tr
>
}
))
) : (
<tr>
<td colSpan="10" style={{ textAlign: 'center' }}>
暂无数据
</td>
</tr>
)}
</tbody>
</table>
</div>
</div>
</div> */
}
</
div
>
</
div
>
)
}
)
}
</
Modal
>
)
);
};
export
default
ChangeAddFlows
;
src/pages/platformCenter/bsmanager/workOrder/changeAdd.jsx
View file @
a6cba482
/* eslint-disable consistent-return */
/* eslint-disable no-shadow */
/* eslint-disable indent */
/* eslint-disable no-unused-expressions */
/* eslint-disable array-callback-return */
/* eslint-disable eqeqeq */
/* eslint-disable no-plusplus */
import
React
,
{
useState
,
useEffect
,
useCallback
,
useRef
}
from
'react'
;
import
{
Form
,
Modal
,
Divider
,
Checkbox
}
from
'antd'
;
import
styles
from
'./incident.less'
;
import
Sortable
from
'sortablejs'
;
import
styles
from
'./incident.less'
;
const
CheckboxGroup
=
Checkbox
.
Group
;
const
AddModal
=
props
=>
{
const
{
callBackSubmit
=
()
=>
{
},
isType
,
pickItem
,
visible
,
filed
,
filed1
,
characterValue
,
newCheckedList
,
flag
}
=
props
;
const
{
callBackSubmit
=
()
=>
{},
isType
,
pickItem
,
visible
,
filed
,
filed1
,
characterValue
,
newCheckedList
,
flag
,
}
=
props
;
const
[
loading
,
setLoading
]
=
useState
(
false
);
const
[
value
,
setValue
]
=
useState
(
''
);
const
[
checkValue
,
setCheckValue
]
=
useState
([]);
const
[
form
]
=
Form
.
useForm
();
const
[
title
,
setTitle
]
=
useState
([])
const
[
title
,
setTitle
]
=
useState
([]);
const
{
Item
}
=
Form
;
const
[
checkedList
,
setCheckedList
]
=
useState
([]);
//
选中的复选框内容
const
[
checkedList
,
setCheckedList
]
=
useState
([]);
//
选中的复选框内容
const
[
indeterminate
,
setIndeterminate
]
=
useState
([]);
const
[
checkAll
,
setCheckAll
]
=
useState
([]);
const
[
selectData
,
setSelectData
]
=
useState
([])
let
objArr
=
[]
const
[
selectData
,
setSelectData
]
=
useState
([]);
let
objArr
=
[];
const
onChangeList
=
(
list
,
index
,
title
)
=>
{
const
checkedListArr
=
[...
checkedList
]
checkedListArr
[
index
]
=
list
const
checkedListArr
=
[...
checkedList
];
checkedListArr
[
index
]
=
list
;
setCheckedList
(
checkedListArr
);
const
indeterminateArr
=
[...
indeterminate
]
const
checkAllArr
=
[...
checkAll
]
indeterminateArr
[
index
]
=
!!
list
.
length
&&
list
.
length
<
filed
[
title
].
length
checkAllArr
[
index
]
=
list
.
length
===
filed
[
title
].
length
setIndeterminate
(
indeterminateArr
)
const
indeterminateArr
=
[...
indeterminate
];
const
checkAllArr
=
[...
checkAll
];
indeterminateArr
[
index
]
=
!!
list
.
length
&&
list
.
length
<
filed
[
title
].
length
;
checkAllArr
[
index
]
=
list
.
length
===
filed
[
title
].
length
;
setIndeterminate
(
indeterminateArr
);
setCheckAll
(
checkAllArr
);
};
const
onChangeList1
=
(
list
,
index
,
title
)
=>
{
const
checkedListArr
=
[...
checkedList
]
checkedListArr
[
index
]
=
list
const
checkedListArr
=
[...
checkedList
];
checkedListArr
[
index
]
=
list
;
setCheckedList
(
checkedListArr
);
const
indeterminateArr
=
[...
indeterminate
]
const
checkAllArr
=
[...
checkAll
]
indeterminateArr
[
index
]
=
!!
list
.
length
&&
list
.
length
<
filed1
[
title
].
length
checkAllArr
[
index
]
=
list
.
length
===
filed1
[
title
].
length
setIndeterminate
(
indeterminateArr
)
const
indeterminateArr
=
[...
indeterminate
];
const
checkAllArr
=
[...
checkAll
];
indeterminateArr
[
index
]
=
!!
list
.
length
&&
list
.
length
<
filed1
[
title
].
length
;
checkAllArr
[
index
]
=
list
.
length
===
filed1
[
title
].
length
;
setIndeterminate
(
indeterminateArr
);
setCheckAll
(
checkAllArr
);
};
const
onSubmit
=
()
=>
{
isType
===
'rule'
?
callBackSubmit
(
`
${
value
===
'无'
||
value
===
''
?
''
:
value
+
','
}${
checkValue
.
join
(
','
)}
`
)
:
callBackSubmit
({
checkedList
,
str
:
selectData
.
join
(
","
),
pickItem
,
stt
:
selectData
,
title
:
title
,
filed22
:
filed1
,
isType
:
isType
});
}
isType
===
'rule'
?
callBackSubmit
(
`
${
value
===
'无'
||
value
===
''
?
''
:
`
${
value
}
,`
}${
checkValue
.
join
(
','
)}
`
,
)
:
callBackSubmit
({
checkedList
,
str
:
selectData
.
join
(
','
),
pickItem
,
stt
:
selectData
,
title
,
filed22
:
filed1
,
isType
,
});
};
const
onCheckAllChange
=
e
=>
{
const
indeterminateArr
=
[...
indeterminate
]
const
checkAllArr
=
[...
checkAll
]
const
checkedListArr
=
[...
checkedList
]
checkAllArr
[
e
.
target
.
index
]
=
e
.
target
.
checked
indeterminateArr
[
e
.
target
.
index
]
=
false
e
.
target
.
checked
?
checkedListArr
[
e
.
target
.
index
]
=
e
.
target
.
checkvalue
:
checkedListArr
[
e
.
target
.
index
]
=
[]
const
indeterminateArr
=
[...
indeterminate
];
const
checkAllArr
=
[...
checkAll
];
const
checkedListArr
=
[...
checkedList
];
checkAllArr
[
e
.
target
.
index
]
=
e
.
target
.
checked
;
indeterminateArr
[
e
.
target
.
index
]
=
false
;
e
.
target
.
checked
?
(
checkedListArr
[
e
.
target
.
index
]
=
e
.
target
.
checkvalue
)
:
(
checkedListArr
[
e
.
target
.
index
]
=
[]);
setCheckedList
(
checkedListArr
);
setIndeterminate
(
indeterminateArr
);
setCheckAll
(
checkAllArr
);
};
useEffect
(()
=>
{
console
.
log
(
filed1
)
selectAll
()
console
.
log
(
filed1
);
selectAll
();
},
[
checkedList
]);
const
selectAll
=
()
=>
{
objArr
=
[]
objArr
=
[];
checkedList
.
map
(
item
=>
{
objArr
=
objArr
.
concat
(
item
)
})
setSelectData
(
objArr
)
}
objArr
=
objArr
.
concat
(
item
);
});
setSelectData
(
objArr
);
};
useEffect
(()
=>
{
if
(
isType
!=
''
&&
isType
===
'add'
)
{
console
.
log
(
filed
)
let
arr
=
Object
.
keys
(
filed
)
console
.
log
(
arr
,
'arr'
)
setTitle
(
arr
)
let
checkArr
=
[]
let
indeterminateArr
=
[]
let
checkAllArr
=
[]
console
.
log
(
filed
);
let
arr
=
Object
.
keys
(
filed
);
console
.
log
(
arr
,
'arr'
);
setTitle
(
arr
);
let
checkArr
=
[];
let
indeterminateArr
=
[];
let
checkAllArr
=
[];
console
.
log
(
newCheckedList
);
// let b = []
// let a = []
...
...
@@ -84,15 +119,18 @@ const AddModal = props => {
// filed[item].map((i, j) => {
// b.push(i)
// })
checkArr
[
index
]
=
[]
checkArr
[
index
]
=
[];
newCheckedList
.
map
(
checkItem
=>
{
if
(
filed
[
item
].
includes
(
checkItem
))
{
checkArr
[
index
].
push
(
checkItem
)
checkArr
[
index
].
push
(
checkItem
);
}
})
indeterminateArr
.
push
(
!!
checkArr
[
index
].
length
&&
checkArr
[
index
].
length
<
filed
[
item
].
length
)
checkAllArr
.
push
(
checkArr
[
index
].
length
===
filed
[
item
].
length
)
})
});
indeterminateArr
.
push
(
!!
checkArr
[
index
].
length
&&
checkArr
[
index
].
length
<
filed
[
item
].
length
,
);
checkAllArr
.
push
(
checkArr
[
index
].
length
===
filed
[
item
].
length
);
});
// newCheckedList.map((item, index) => {
// if (b.includes(item) == false) {
// if(item == ''){
...
...
@@ -110,22 +148,22 @@ const AddModal = props => {
// }
// setTitle(arr)
// checkArr.push(a)
setCheckedList
(
checkArr
)
setIndeterminate
(
indeterminateArr
)
setCheckAll
(
checkAllArr
)
console
.
log
(
characterValue
)
let
newArr
=
characterValue
.
length
?
characterValue
.
split
(
","
)
:
[]
console
.
log
(
newArr
)
setSelectData
(
newArr
)
draftSort
()
setCheckedList
(
checkArr
);
setIndeterminate
(
indeterminateArr
);
setCheckAll
(
checkAllArr
);
console
.
log
(
characterValue
);
let
newArr
=
characterValue
.
length
?
characterValue
.
split
(
','
)
:
[];
console
.
log
(
newArr
);
setSelectData
(
newArr
);
draftSort
();
}
else
if
(
isType
===
'app'
)
{
console
.
log
(
filed1
)
let
arr
=
Object
.
keys
(
filed1
)
console
.
log
(
arr
,
'arr'
)
setTitle
(
arr
)
let
checkArr
=
[]
let
indeterminateArr
=
[]
let
checkAllArr
=
[]
console
.
log
(
filed1
);
let
arr
=
Object
.
keys
(
filed1
);
console
.
log
(
arr
,
'arr'
);
setTitle
(
arr
);
let
checkArr
=
[];
let
indeterminateArr
=
[];
let
checkAllArr
=
[];
console
.
log
(
newCheckedList
);
// let b = []
// let a = []
...
...
@@ -133,15 +171,18 @@ const AddModal = props => {
// filed1[item].map((i, j) => {
// b.push(i)
// })
checkArr
[
index
]
=
[]
checkArr
[
index
]
=
[];
newCheckedList
.
map
(
checkItem
=>
{
if
(
filed1
[
item
].
includes
(
checkItem
))
{
checkArr
[
index
].
push
(
checkItem
)
checkArr
[
index
].
push
(
checkItem
);
}
})
indeterminateArr
.
push
(
!!
checkArr
[
index
].
length
&&
checkArr
[
index
].
length
<
filed1
[
item
].
length
)
checkAllArr
.
push
(
checkArr
[
index
].
length
===
filed1
[
item
].
length
)
})
});
indeterminateArr
.
push
(
!!
checkArr
[
index
].
length
&&
checkArr
[
index
].
length
<
filed1
[
item
].
length
,
);
checkAllArr
.
push
(
checkArr
[
index
].
length
===
filed1
[
item
].
length
);
});
// newCheckedList.map((item, index) => {
// if (b.includes(item) == false) {
// if(item == ''){
...
...
@@ -159,90 +200,138 @@ const AddModal = props => {
// }
// setTitle(arr)
// checkArr.push(a)
setCheckedList
(
checkArr
)
setIndeterminate
(
indeterminateArr
)
setCheckAll
(
checkAllArr
)
console
.
log
(
characterValue
)
let
newArr
=
characterValue
.
length
?
characterValue
.
split
(
","
)
:
[]
console
.
log
(
newArr
)
setSelectData
(
newArr
)
draftSort
()
setCheckedList
(
checkArr
);
setIndeterminate
(
indeterminateArr
);
setCheckAll
(
checkAllArr
);
console
.
log
(
characterValue
);
let
newArr
=
characterValue
.
length
?
characterValue
.
split
(
','
)
:
[];
console
.
log
(
newArr
);
setSelectData
(
newArr
);
draftSort
();
}
},
[
visible
]);
// eslint-disable-next-line spaced-comment
//拖拽初始化及逻辑
const
draftSort
=
()
=>
{
let
el
=
document
.
getElementById
(
'doctor-drag-items'
);
if
(
el
)
{
let
sortable
=
Sortable
.
create
(
el
,
{
animation
:
100
,
//动画参数
onEnd
:
function
(
evt
)
{
//拖拽完毕之后发生,只需关注该事件
animation
:
100
,
// 动画参数
onEnd
(
evt
)
{
// 拖拽完毕之后发生,只需关注该事件
let
arr
=
[];
let
len
=
evt
.
from
.
children
.
length
;
for
(
let
i
=
0
;
i
<
len
;
i
++
)
{
arr
.
push
(
evt
.
from
.
children
[
i
].
getAttribute
(
'drag-id'
))
}
console
.
log
(
arr
)
setSelectData
(
arr
)
arr
.
push
(
evt
.
from
.
children
[
i
].
getAttribute
(
'drag-id'
));
}
console
.
log
(
arr
);
setSelectData
(
arr
);
},
});
}
}
};
if
(
isType
!=
'app'
)
{
return
(
<
Modal
title=
'字段集选择'
title=
"字段集选择"
bodyStyle=
{
{
width
:
'100%'
,
minHeight
:
'100px'
}
}
width=
"700px"
destroyOnClose
centered=
{
true
}
centered
cancelText=
"取消"
okText=
"确认"
{
...
props
}
onOk=
{
()
=>
onSubmit
()
}
forceRender=
{
true
}
forceRender
getContainer=
{
false
}
>
{
visible
&&
(
<
div
className=
{
styles
.
listCard
}
>
<
div
className=
{
styles
.
cardItem
}
style=
{
{
borderRight
:
'1px solid #99bbe8'
}
}
>
<
Divider
orientation=
"left"
style=
{
{
margin
:
'0 0 10px 0'
,
backgroundColor
:
'#dfe8f6'
}
}
>
待选字段列表
</
Divider
>
<
div
className=
{
styles
.
cardItem
}
style=
{
{
borderRight
:
'1px solid #99bbe8'
}
}
>
<
Divider
orientation=
"left"
style=
{
{
margin
:
'0 0 10px 0'
,
backgroundColor
:
'#dfe8f6'
}
}
>
待选字段列表
</
Divider
>
{
flag
===
0
?
{
flag
===
0
?
(
<>
<
div
className=
{
styles
.
cardContent
}
>
<
span
style=
{
{
color
:
'red'
,
fontSize
:
'1rem'
,
marginLeft
:
'25px'
}
}
>
请先选择事件主表
</
span
>
<
span
style=
{
{
color
:
'red'
,
fontSize
:
'1rem'
,
marginLeft
:
'25px'
,
}
}
>
请先选择事件主表
</
span
>
</
div
>
</>
:
</>
)
:
(
<>
{
JSON
.
stringify
(
filed
)
==
"{}"
?
{
JSON
.
stringify
(
filed
)
==
'{}'
?
(
<>
<
div
className=
{
styles
.
cardContent
}
>
<
span
style=
{
{
color
:
'red'
,
fontSize
:
'1rem'
,
marginLeft
:
'25px'
}
}
>
表字段缺失请先配置表/字段
</
span
>
<
span
style=
{
{
color
:
'red'
,
fontSize
:
'1rem'
,
marginLeft
:
'25px'
,
}
}
>
表字段缺失请先配置表/字段
</
span
>
</
div
>
</>
:
)
:
(
<>
<
div
className=
{
styles
.
cardContent
}
>
{
title
.
map
((
item
,
index
)
=>
{
return
<
div
className=
{
styles
.
cardItemData
}
key=
{
index
}
>
<
Divider
orientation=
"left"
style=
{
{
margin
:
'0 0 10px 0'
,
color
:
'#15428b'
,
borderTopColor
:
'#99bbe8'
}
}
><
Checkbox
indeterminate=
{
indeterminate
[
index
]
}
onChange=
{
onCheckAllChange
}
index=
{
index
}
checkvalue=
{
filed
[
item
]
}
checked=
{
checkAll
[
index
]
}
style=
{
{
marginRight
:
'7px'
}
}
></
Checkbox
>
{
item
}
</
Divider
>
<
CheckboxGroup
options=
{
filed
[
item
]
}
value=
{
checkedList
[
index
]
}
onChange=
{
(
e
)
=>
onChangeList
(
e
,
index
,
item
)
}
/>
{
title
.
map
((
item
,
index
)
=>
(
<
div
className=
{
styles
.
cardItemData
}
key=
{
index
}
>
<
Divider
orientation=
"left"
style=
{
{
margin
:
'0 0 10px 0'
,
color
:
'#15428b'
,
borderTopColor
:
'#99bbe8'
,
}
}
>
<
Checkbox
indeterminate=
{
indeterminate
[
index
]
}
onChange=
{
onCheckAllChange
}
index=
{
index
}
checkvalue=
{
filed
[
item
]
}
checked=
{
checkAll
[
index
]
}
style=
{
{
marginRight
:
'7px'
}
}
/>
{
item
}
</
Divider
>
<
CheckboxGroup
options=
{
filed
[
item
]
}
value=
{
checkedList
[
index
]
}
onChange=
{
e
=>
onChangeList
(
e
,
index
,
item
)
}
/>
</
div
>
}
)
}
)
)
}
</
div
>
</>
}
)
}
</>
}
)
}
</
div
>
<
div
className=
{
styles
.
cardItem
}
>
<
Divider
orientation=
"left"
style=
{
{
margin
:
'0 0 10px 0'
,
backgroundColor
:
'#dfe8f6'
}
}
>
已选字段列表
</
Divider
>
<
Divider
orientation=
"left"
style=
{
{
margin
:
'0 0 10px 0'
,
backgroundColor
:
'#dfe8f6'
}
}
>
已选字段列表
</
Divider
>
<
div
className=
{
styles
.
cardContent
}
>
<
div
className=
{
styles
.
doctorTable
}
>
<
table
>
...
...
@@ -251,57 +340,101 @@ const AddModal = props => {
<
td
>
字段名
</
td
>
</
tr
>
</
thead
>
<
tbody
id=
'doctor-drag-items'
>
{
selectData
&&
selectData
.
length
>
0
?
selectData
.
map
((
item
,
index
)
=>
{
return
<
tr
drag
-
id=
{
item
}
key=
{
index
}
style=
{
{
cursor
:
'move'
}
}
>
<
td
><
span
title=
{
item
}
>
{
item
}
</
span
></
td
>
<
tbody
id=
"doctor-drag-items"
>
{
selectData
&&
selectData
.
length
>
0
?
(
selectData
.
map
((
item
,
index
)
=>
(
<
tr
drag
-
id=
{
item
}
key=
{
index
}
style=
{
{
cursor
:
'move'
}
}
>
<
td
>
<
span
title=
{
item
}
>
{
item
}
</
span
>
</
td
>
</
tr
>
})
:
<
tr
><
td
colSpan=
'10'
style=
{
{
textAlign
:
'center'
}
}
>
暂无数据
</
td
></
tr
>
}
))
)
:
(
<
tr
>
<
td
colSpan=
"10"
style=
{
{
textAlign
:
'center'
}
}
>
暂无数据
</
td
>
</
tr
>
)
}
</
tbody
>
</
table
>
</
div
>
</
div
>
</
div
>
</
div
>
)
}
)
}
</
Modal
>
);
}
else
if
(
isType
===
'app'
)
{
}
if
(
isType
===
'app'
)
{
return
(
<
Modal
title=
'部门或角色'
title=
"部门或角色"
bodyStyle=
{
{
width
:
'100%'
,
minHeight
:
'100px'
}
}
width=
"7
00px"
width=
"14
00px"
style=
{
{
top
:
'10px'
}
}
destroyOnClose
centered=
{
true
}
centered
cancelText=
"取消"
okText=
"确认"
{
...
props
}
onOk=
{
()
=>
onSubmit
()
}
forceRender=
{
true
}
forceRender
getContainer=
{
false
}
>
{
visible
&&
(
<
div
className=
{
styles
.
listCard
}
>
<
div
className=
{
styles
.
cardItem
}
style=
{
{
borderRight
:
'1px solid #99bbe8'
}
}
>
<
Divider
orientation=
"left"
style=
{
{
margin
:
'0 0 10px 0'
,
backgroundColor
:
'#dfe8f6'
}
}
>
待选部门角色站点
</
Divider
>
<
div
className=
{
styles
.
cardContent
}
>
{
title
.
map
((
item
,
index
)
=>
{
return
<
div
className=
{
styles
.
cardItemData
}
key=
{
index
}
>
<
Divider
orientation=
"left"
style=
{
{
margin
:
'0 0 10px 0'
,
color
:
'#15428b'
,
borderTopColor
:
'#99bbe8'
}
}
><
Checkbox
indeterminate=
{
indeterminate
[
index
]
}
onChange=
{
onCheckAllChange
}
index=
{
index
}
checkvalue=
{
filed1
[
item
]
}
checked=
{
checkAll
[
index
]
}
style=
{
{
marginRight
:
'7px'
}
}
></
Checkbox
>
{
item
}
</
Divider
>
<
CheckboxGroup
options=
{
filed1
[
item
]
}
value=
{
checkedList
[
index
]
}
onChange=
{
(
e
)
=>
onChangeList1
(
e
,
index
,
item
)
}
/></
div
>
})
}
<
div
className=
{
styles
.
listCard1
}
>
<
div
className=
{
styles
.
cardItem1
}
// style=
{{
borderRight
:
'1
px
solid
#99
bbe8
'
}}
>
<
Divider
orientation=
"left"
style=
{
{
margin
:
'0 0 10px 0'
,
backgroundColor
:
'#dfe8f6'
}
}
>
待选部门站点角色
</
Divider
>
<
div
className=
{
styles
.
cardContent1
}
>
{
title
.
map
((
item
,
index
)
=>
(
<
div
className=
{
styles
.
cardItemData1
}
key=
{
index
}
>
<
Divider
orientation=
"left"
style=
{
{
margin
:
'0 0 10px 0'
,
color
:
'#15428b'
,
borderTopColor
:
'#99bbe8'
,
}
}
>
<
Checkbox
indeterminate=
{
indeterminate
[
index
]
}
onChange=
{
onCheckAllChange
}
index=
{
index
}
checkvalue=
{
filed1
[
item
]
}
checked=
{
checkAll
[
index
]
}
style=
{
{
marginRight
:
'7px'
}
}
/>
{
item
}
</
Divider
>
<
CheckboxGroup
options=
{
filed1
[
item
]
}
value=
{
checkedList
[
index
]
}
onChange=
{
e
=>
onChangeList1
(
e
,
index
,
item
)
}
/>
</
div
>
))
}
</
div
>
<
div
className=
{
styles
.
cardItem
}
>
<
Divider
orientation=
"left"
style=
{
{
margin
:
'0 0 10px 0'
,
backgroundColor
:
'#dfe8f6'
}
}
>
已选列表
</
Divider
>
</
div
>
{
/* <div className={styles.cardItem}>
<Divider
orientation="left"
style={{ margin: '0 0 10px 0', backgroundColor: '#dfe8f6' }}
>
已选列表
</Divider>
<div className={styles.cardContent}>
<div className={styles.doctorTable}>
<table>
...
...
@@ -310,25 +443,33 @@ const AddModal = props => {
<td>字段名</td>
</tr>
</thead>
<
tbody
id=
'doctor-drag-items'
>
{
selectData
&&
selectData
.
length
>
0
?
selectData
.
map
((
item
,
index
)
=>
{
return
<
tr
drag
-
id=
{
item
}
key=
{
index
}
style=
{
{
cursor
:
'move'
}
}
>
<
td
><
span
title=
{
item
}
>
{
item
}
</
span
></
td
>
<tbody id="doctor-drag-items">
{selectData && selectData.length > 0 ? (
selectData.map((item, index) => (
<tr
drag-id={item}
key={index}
style={{ cursor: 'move' }}
>
<td>
<span title={item}>{item}</span>
</td>
</tr>
})
:
<
tr
><
td
colSpan=
'10'
style=
{
{
textAlign
:
'center'
}
}
>
暂无数据
</
td
></
tr
>
}
))
) : (
<tr>
<td colSpan="10" style={{ textAlign: 'center' }}>
暂无数据
</td>
</tr>
)}
</tbody>
</table>
</div>
</
div
>
</div>
</div> */
}
</
div
>
)
}
)
}
</
Modal
>
);
}
...
...
src/pages/platformCenter/bsmanager/workOrder/incident.jsx
View file @
a6cba482
/* eslint-disable prettier/prettier */
/* eslint-disable eqeqeq */
/* eslint-disable no-shadow */
/* eslint-disable no-unused-vars */
/* eslint-disable array-callback-return */
/* eslint-disable react-hooks/rules-of-hooks */
/* eslint-disable camelcase */
/* eslint-disable guard-for-in */
/* eslint-disable no-restricted-syntax */
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
{
useHistory
}
from
'react-router-dom'
;
import
styles
from
'./incident.less'
;
import
{
Form
,
Card
,
...
...
@@ -23,15 +31,20 @@ import {
DeleteOutlined
,
OrderedListOutlined
,
ApartmentOutlined
,
DesktopOutlined
DesktopOutlined
,
}
from
'@ant-design/icons'
;
import
{
GetCM_Event_LoadEventTable
,
CM_Event_RemoveEventTable
,
CM_Event_ReOrder
,
GetCM_Event_LoadEventTypeTable
}
from
'@/services/standingBook/api'
;
import
{
GetCM_Event_LoadEventTable
,
CM_Event_RemoveEventTable
,
CM_Event_ReOrder
,
GetCM_Event_LoadEventTypeTable
,
}
from
'@/services/standingBook/api'
;
import
classnames
from
'classnames'
;
import
AddModal
from
'./AddModal'
import
ProcessModal
from
'./ProcessModal'
import
SortModal
from
'./SortModal'
import
ViewModal
from
'./ViewModal'
import
styles
from
'./incident.less'
;
import
AddModal
from
'./AddModal'
;
import
ProcessModal
from
'./ProcessModal'
;
import
SortModal
from
'./SortModal'
;
import
ViewModal
from
'./ViewModal'
;
const
incident
=
()
=>
{
const
history
=
useHistory
();
...
...
@@ -42,19 +55,17 @@ const incident = () => {
const
[
addVisible
,
setAddvisible
]
=
useState
(
false
);
const
[
processVisible
,
setProcessVisible
]
=
useState
(
false
);
const
[
sortVisible
,
setSortVisible
]
=
useState
(
false
);
const
[
viewVisible
,
setViewVisible
]
=
useState
(
false
)
const
[
viewVisible
,
setViewVisible
]
=
useState
(
false
);
const
[
isType
,
setIsType
]
=
useState
(
''
);
// 弹窗类型
const
[
formObj
,
setFormObj
]
=
useState
(
''
);
const
[
flag
,
setFlag
]
=
useState
(
0
);
const
[
title1
,
setTitle1
]
=
useState
(
''
)
const
[
title2
,
setTitle2
]
=
useState
(
''
)
const
[
select
,
setSelect
]
=
useState
(
''
)
const
[
title1
,
setTitle1
]
=
useState
(
''
);
const
[
title2
,
setTitle2
]
=
useState
(
''
);
const
[
select
,
setSelect
]
=
useState
(
''
);
const
[
sortData
,
setSortData
]
=
useState
([])
const
[
rember
,
setRember
]
=
useState
(
0
)
const
[
rember1
,
setRember1
]
=
useState
()
const
[
sortData
,
setSortData
]
=
useState
([]);
const
[
rember
,
setRember
]
=
useState
(
0
);
const
[
rember1
,
setRember1
]
=
useState
();
const
[
maxLength
,
setMaxLength
]
=
useState
(
0
);
const
[
pickItem
,
setPickItem
]
=
useState
(
''
);
...
...
@@ -72,44 +83,38 @@ const incident = () => {
key
:
'tableName'
,
width
:
200
,
ellipsis
:
true
,
}
,
},
{
title
:
'编码'
,
dataIndex
:
'code'
,
key
:
'code'
,
width
:
50
,
}
,
},
{
title
:
'摘要字段'
,
dataIndex
:
'summaryFields'
,
key
:
'summaryFields'
,
width
:
200
,
ellipsis
:
true
}
,
ellipsis
:
true
,
},
{
title
:
'权限'
,
dataIndex
:
'roles'
,
key
:
'roles'
,
width
:
50
,
}
,
},
{
title
:
'流程'
,
dataIndex
:
'flowCount'
,
key
:
'flowCount'
,
width
:
50
,
}
,
},
{
title
:
'上报'
,
dataIndex
:
'reportable'
,
key
:
'reportable'
,
width
:
50
,
}
,
},
{
title
:
'上报字段'
,
dataIndex
:
'reportFields'
,
...
...
@@ -120,8 +125,7 @@ const incident = () => {
{
item
}
</
span
>
),
}
,
},
{
title
:
'显示字段'
,
dataIndex
:
'displayFields'
,
...
...
@@ -132,9 +136,8 @@ const incident = () => {
{
item
}
</
span
>
),
}
},
,
{
title
:
'编辑'
,
dataIndex
:
'editable'
,
...
...
@@ -145,8 +148,7 @@ const incident = () => {
{
item
}
</
span
>
),
}
,
},
{
title
:
'编辑字段'
,
dataIndex
:
'editableFields'
,
...
...
@@ -160,16 +162,14 @@ const incident = () => {
}
}
}
/>
)
}
,
),
},
{
title
:
'上报方式'
,
dataIndex
:
'createMode'
,
key
:
'createMode'
,
width
:
100
,
}
,
},
// {
// title: '置顶条件',
// dataIndex: 'topWhere',
...
...
@@ -207,7 +207,6 @@ const incident = () => {
align
:
'center'
,
render
:
record
=>
(
<
Space
size=
"middle"
>
<
Tooltip
title=
"编辑事件类型"
>
<
EditTwoTone
onClick=
{
()
=>
editEventType
(
record
)
}
...
...
@@ -217,11 +216,7 @@ const incident = () => {
<
Tooltip
title=
"删除事件类型"
>
<
Popconfirm
placement=
"bottomRight"
title=
{
<
p
>
即将删除事件类型表,是否确认删除?
</
p
>
}
title=
{
<
p
>
即将删除事件类型表,是否确认删除?
</
p
>
}
okText=
"确认"
cancelText=
"取消"
onConfirm=
{
()
=>
deleteEventType
(
record
)
}
...
...
@@ -242,137 +237,136 @@ const incident = () => {
/>
</
Tooltip
>
</
Space
>
)
}
]
),
},
];
useEffect
(()
=>
{
setTreeLoading
(
true
);
GetCM_Event_LoadEventTable
().
then
(
res
=>
{
setTreeLoading
(
false
);
if
(
res
.
msg
===
'Ok'
)
{
console
.
log
(
res
.
data
)
console
.
log
(
res
.
data
);
// setMaxLength(res.data.root.length + 1)
let
arr
=
formateArrDataA
(
res
.
data
,
'businessType'
)
console
.
log
(
arr
)
let
newArr
=
[]
let
newapp
=
[]
let
newabb
=
[]
let
aa
=
[]
let
zz
=
[]
let
arr
=
formateArrDataA
(
res
.
data
,
'businessType'
);
console
.
log
(
arr
);
let
newArr
=
[];
let
newapp
=
[];
let
newabb
=
[];
let
aa
=
[];
let
zz
=
[];
Object
.
keys
(
arr
).
map
((
item
,
index
)
=>
{
newArr
.
push
(
item
)
})
console
.
log
(
arr
)
newArr
.
push
(
item
);
});
console
.
log
(
arr
);
Object
.
values
(
arr
).
map
((
item
,
index
)
=>
{
newapp
.
push
(
item
)
})
console
.
log
(
newapp
)
newapp
.
push
(
item
);
});
console
.
log
(
newapp
);
newapp
.
map
((
item
,
index
)
=>
{
console
.
log
(
item
)
console
.
log
(
item
);
item
.
map
((
item1
,
index
)
=>
{
newabb
.
push
(
item1
.
root
)
console
.
log
(
item1
.
root
)
})
})
console
.
log
(
newabb
)
newabb
.
push
(
item1
.
root
);
console
.
log
(
item1
.
root
);
});
});
console
.
log
(
newabb
);
newabb
.
map
((
item
,
index
)
=>
{
console
.
log
(
item
)
aa
.
push
(
item
)
})
console
.
log
(
aa
)
console
.
log
(
item
);
aa
.
push
(
item
);
});
console
.
log
(
aa
);
aa
.
map
((
item
,
index
)
=>
{
console
.
log
(
item
)
console
.
log
(
item
);
item
.
map
((
item1
,
index
)
=>
{
console
.
log
(
item1
)
zz
.
push
({
...
item1
})
})
})
console
.
log
(
zz
)
let
arrr
=
formateArrDataA
(
zz
,
'businessType'
)
console
.
log
(
arrr
)
setTableData
(
arrr
)
console
.
log
(
history
.
location
.
state
)
if
(
history
.
location
.
state
)
{
console
.
log
(
history
)
console
.
log
(
history
.
location
.
state
.
rember
)
setPickItem
(
newArr
[
history
.
location
.
state
.
rember
])
setRember
(
history
.
location
.
state
.
rember
)
setRember1
(
newArr
[
history
.
location
.
state
.
rember
])
}
else
{
setPickItem
(
newArr
[
rember
])
setRember1
(
newArr
[
0
])
console
.
log
(
item1
);
zz
.
push
({
...
item1
});
});
});
console
.
log
(
zz
);
let
arrr
=
formateArrDataA
(
zz
,
'businessType'
);
console
.
log
(
arrr
);
setTableData
(
arrr
);
console
.
log
(
history
.
location
.
state
);
if
(
history
.
location
.
state
)
{
console
.
log
(
history
);
console
.
log
(
history
.
location
.
state
.
rember
);
setPickItem
(
newArr
[
history
.
location
.
state
.
rember
]);
setRember
(
history
.
location
.
state
.
rember
);
setRember1
(
newArr
[
history
.
location
.
state
.
rember
]);
}
else
{
setPickItem
(
newArr
[
rember
]);
setRember1
(
newArr
[
0
]);
}
console
.
log
(
rember
)
console
.
log
(
newArr
[
rember
])
console
.
log
(
rember
);
console
.
log
(
newArr
[
rember
]);
console
.
log
(
newArr
,
'newArr'
);
setTreeData
(
newArr
)
setTreeData
(
newArr
);
}
})
},
[
flag
])
});
},
[
flag
]);
useEffect
(()
=>
{
GetCM_Event_LoadEventTypeTable
().
then
(
res
=>
{
if
(
res
.
msg
===
'Ok'
)
{
let
arr
=
[]
let
arr
=
[];
res
.
data
.
map
((
item
,
index
)
=>
{
arr
.
push
(
item
.
text
)
})
setSelect
(
arr
)
arr
.
push
(
item
.
text
);
});
setSelect
(
arr
);
}
})
},
[])
});
},
[]);
const
formateArrDataA
=
(
initialArr
,
name
)
=>
{
console
.
log
(
initialArr
)
console
.
log
(
name
)
console
.
log
(
initialArr
);
console
.
log
(
name
);
// 判定传参是否符合规则
if
(
!
(
initialArr
instanceof
Array
))
{
return
'请传入正确格式的数组'
return
'请传入正确格式的数组'
;
}
if
(
!
name
)
{
return
'请传入对象属性'
return
'请传入对象属性'
;
}
//
先获取一下这个数组中有多少个"name"
let
nameArr
=
[]
//
先获取一下这个数组中有多少个"name"
let
nameArr
=
[];
for
(
let
i
in
initialArr
)
{
if
(
nameArr
.
indexOf
(
initialArr
[
i
][
`
${
name
}
`
])
===
-
1
)
{
nameArr
.
push
(
initialArr
[
i
][
`
${
name
}
`
])
nameArr
.
push
(
initialArr
[
i
][
`
${
name
}
`
]);
}
}
//
新建一个包含多个list的结果对象
let
tempObj
=
{}
//
新建一个包含多个list的结果对象
let
tempObj
=
{};
// 根据不同的"name"生成多个数组
for
(
let
k
in
nameArr
)
{
for
(
let
j
in
initialArr
)
{
if
(
initialArr
[
j
][
`
${
name
}
`
]
==
nameArr
[
k
])
{
// 每次外循环时新建一个对应"name"的数组, 内循环时当前数组不变
tempObj
[
nameArr
[
k
]]
=
tempObj
[
nameArr
[
k
]]
||
[]
tempObj
[
nameArr
[
k
]].
push
(
initialArr
[
j
])
tempObj
[
nameArr
[
k
]]
=
tempObj
[
nameArr
[
k
]]
||
[];
tempObj
[
nameArr
[
k
]].
push
(
initialArr
[
j
]);
}
}
}
for
(
let
keys
in
tempObj
)
{
let
arr
=
[]
let
arr
=
[];
tempObj
[
keys
].
map
((
item
,
index
)
=>
{
tempObj
[
keys
]
=
arr
;
item
.
key
=
index
arr
.
push
(
item
)
})
}
return
tempObj
item
.
key
=
index
;
arr
.
push
(
item
);
});
}
//添加事件
return
tempObj
;
};
// 添加事件
const
addIncident
=
()
=>
{
setAddvisible
(
true
)
setIsType
(
'add'
)
}
//
修改事件类型
setAddvisible
(
true
);
setIsType
(
'add'
);
};
//
修改事件类型
const
editEventType
=
record
=>
{
setFormObj
(
record
);
setIsType
(
'edit'
);
setAddvisible
(
true
);
}
//
删除事件类型
};
//
删除事件类型
const
deleteEventType
=
record
=>
{
CM_Event_RemoveEventTable
(
record
.
ID
).
then
(
res
=>
{
if
(
res
.
msg
===
''
)
{
...
...
@@ -389,27 +383,27 @@ const incident = () => {
description
:
res
.
msg
,
});
}
})
}
});
};
const
sort
=
()
=>
{
setSortVisible
(
true
);
console
.
log
(
tableData
)
console
.
log
(
pickItem
)
console
.
log
(
tableData
[
pickItem
])
setSortData
(
tableData
[
pickItem
])
}
console
.
log
(
tableData
);
console
.
log
(
pickItem
);
console
.
log
(
tableData
[
pickItem
]);
setSortData
(
tableData
[
pickItem
]);
};
// const process = record => {
// setProcessVisible(true);
// setFormObj(record);
// setTitle1(record.name)
// }
const
process1
=
record
=>
{
const
process1
=
record
=>
{
history
.
push
({
pathname
:
'/platformCenter/bsmanger/incidentFlow'
,
state
:
{
formObj
:
record
,
title1
:
record
.
name
,
rember
},
state
:
{
formObj
:
record
,
title1
:
record
.
name
,
rember
},
});
}
};
// const auxiliaryView = record => {
// setFormObj(record);
// setViewVisible(true)
...
...
@@ -418,17 +412,17 @@ const incident = () => {
const
auxiliaryView1
=
record
=>
{
history
.
push
({
pathname
:
'/platformCenter/bsmanger/incidentView'
,
state
:
{
formObj
:
record
,
title2
:
record
.
name
,
rember
},
state
:
{
formObj
:
record
,
title2
:
record
.
name
,
rember
},
});
}
};
const
onSubmit
=
()
=>
{
setAddvisible
(
false
)
setFlag
(
flag
+
1
)
}
setAddvisible
(
false
);
setFlag
(
flag
+
1
);
};
const
onOK
=
prop
=>
{
setSortVisible
(
false
)
let
aa
=
(
prop
.
str
).
toString
()
console
.
log
(
aa
)
setSortVisible
(
false
);
let
aa
=
prop
.
str
.
toString
();
console
.
log
(
aa
);
CM_Event_ReOrder
(
aa
).
then
(
res
=>
{
if
(
res
.
msg
===
'Ok'
)
{
notification
.
success
({
...
...
@@ -444,19 +438,19 @@ const incident = () => {
description
:
res
.
msg
,
});
}
})
}
});
};
const
onOK1
=
()
=>
{
setProcessVisible
(
false
)
setFlag
(
flag
+
1
)
}
setProcessVisible
(
false
);
setFlag
(
flag
+
1
);
};
const
onOK11
=
()
=>
{
setViewVisible
(
false
)
}
setViewVisible
(
false
);
};
return
(
<
div
className=
{
styles
.
incidentContainer
}
>
<
div
className=
{
styles
.
contentContainers
}
>
{
/*
左侧事件树 */
}
{
/*
左侧事件树 */
}
<
Spin
spinning=
{
treeLoading
}
tip=
"loading..."
>
<
Card
className=
{
classnames
({
...
...
@@ -469,7 +463,6 @@ const incident = () => {
style=
{
{
fontSize
:
'15px '
,
fontWeight
:
'bold'
,
}
}
>
事件列表
...
...
@@ -481,19 +474,29 @@ const incident = () => {
color
:
'#1890FF'
,
fontSize
:
'25px'
,
verticalAlign
:
'middle'
,
marginLeft
:
'58%'
marginLeft
:
'58%'
,
}
}
/>
</
Tooltip
>
<
hr
style=
{
{
width
:
'100%'
,
color
:
'#eeecec'
}
}
/>
{
treeData
.
length
>
0
&&
(
treeData
.
map
((
item
,
index
)
=>
{
return
<
div
className=
{
classnames
({
{
treeData
.
length
>
0
&&
treeData
.
map
((
item
,
index
)
=>
(
<
div
className=
{
classnames
({
[
styles
.
listItem
]:
true
,
[
styles
.
pickItem
]:
item
===
pickItem
,
})
}
onClick=
{
e
=>
{
setPickItem
(
item
);
setRember
(
index
);
setRember1
(
item
)
}
}
key=
{
index
}
>
{
item
}
(
{
tableData
[
item
]
?
tableData
[
item
].
length
:
''
}
)
{
item
===
pickItem
?
<
RightOutlined
/>
:
''
}
</
div
>
})
)
}
})
}
onClick=
{
e
=>
{
setPickItem
(
item
);
setRember
(
index
);
setRember1
(
item
);
}
}
key=
{
index
}
>
{
item
}
(
{
tableData
[
item
]
?
tableData
[
item
].
length
:
''
}
)
{
' '
}
{
item
===
pickItem
?
<
RightOutlined
/>
:
''
}{
' '
}
</
div
>
))
}
</
div
>
<
div
className=
{
styles
.
switcher
}
>
{
treeVisible
&&
(
...
...
@@ -509,7 +512,7 @@ const incident = () => {
</
div
>
</
Card
>
</
Spin
>
{
/*
右侧 */
}
{
/*
右侧 */
}
<
div
className=
{
classnames
({
[
styles
.
userContainer
]:
true
,
...
...
@@ -518,7 +521,15 @@ const incident = () => {
>
<
div
style=
{
{
height
:
'50px'
}
}
>
<
span
style=
{
{
float
:
'right'
,
marginRight
:
'10px'
}
}
>
<
Button
icon=
{
<
OrderedListOutlined
className=
{
styles
.
icon
}
/>
}
onClick=
{
sort
}
style=
{
{
marginLeft
:
'30px'
,
verticalAlign
:
'middle'
,
marginTop
:
'10px'
}
}
>
<
Button
icon=
{
<
OrderedListOutlined
className=
{
styles
.
icon
}
/>
}
onClick=
{
sort
}
style=
{
{
marginLeft
:
'30px'
,
verticalAlign
:
'middle'
,
marginTop
:
'10px'
,
}
}
>
调序
</
Button
>
</
span
>
...
...
@@ -526,16 +537,17 @@ const incident = () => {
<
Table
size=
"small"
rowKey=
'ID'
rowKey=
"ID"
bordered
onRow=
{
record
=>
{
return
{
onDoubleClick
:
event
=>
{
event
.
stopPropagation
();
editEventType
(
record
)
},
//双击
};
}
}
onRow=
{
record
=>
({
onDoubleClick
:
event
=>
{
event
.
stopPropagation
();
editEventType
(
record
);
},
// 双击
})
}
columns=
{
columns
}
dataSource=
{
tableData
[
pickItem
]
}
scroll=
{
{
y
:
'calc(100vh - 155px)
'
}
}
scroll=
{
{
y
:
'calc(100vh - 155px)'
,
x
:
'max-content
'
}
}
pagination=
{
{
showTotal
:
(
total
,
range
)
=>
`第${range[0]}-${range[1]} 条/共 ${total} 条`
,
...
...
@@ -545,7 +557,6 @@ const incident = () => {
showSizeChanger
:
true
,
}
}
/>
</
div
>
{
/* Modal弹框 */
}
{
/* 添加事件 */
}
...
...
@@ -586,8 +597,7 @@ const incident = () => {
/> */
}
</
div
>
</
div
>
)
);
};
export
default
incident
;
src/pages/platformCenter/bsmanager/workOrder/incident.less
View file @
a6cba482
...
...
@@ -2,14 +2,14 @@
line-height: 35px;
}
.ant-btn .anticon.anticon-plus > svg {
margin-top:
-5px;
margin-top:
-5px;
}
.incidentContainer{
.incidentContainer
{
.ant-card-body {
padding: 12px 24px 24px 24px;
}
.linkDrowp
{
.linkDrowp
{
position: absolute;
left: 93.5%;
width: 1rem;
...
...
@@ -17,25 +17,25 @@
display: flex;
align-items: center;
}
.listItem
{
.listItem
{
display: flex;
justify-content: space-between;
font-size: 14px;
font-weight: 400;
color: #414E
65;
color: #414e
65;
cursor: pointer;
line-height: 28px;
align-items: center;
padding: 8px 14px;
}
.ant-btn .anticon.anticon-plus > svg, .ant-btn .anticon.anticon-minus > svg {
.ant-btn .anticon.anticon-plus > svg,
.ant-btn .anticon.anticon-minus > svg {
margin-top: -5px;
}
.pickItem
{
background-color: #F5F6F
9;
.pickItem
{
background-color: #f5f6f
9;
}
.contentContainers
{
.contentContainers
{
display: flex;
width: 100%;
position: relative;
...
...
@@ -45,7 +45,7 @@
overflow-x: hidden;
border: none;
}
.orgContainer
{
.orgContainer
{
height: calc(100vh - 74px);
width: 250px;
left: 0;
...
...
@@ -53,33 +53,33 @@
overflow-x: hidden;
margin-right: 10px;
position: relative;
transition-property:width,
left;
transition-property: width,
left;
transition-duration: 0.5s;
white-space: nowrap;
.ant-tree
{
.ant-tree
{
padding-top: 6px;
.ant-tree-switcher
{
.ant-tree-switcher
{
line-height: 1;
margin-right: 0px !important;
color:#1890FF
;
.ant-tree-switcher-line-icon
{
color: #1890ff
;
.ant-tree-switcher-line-icon
{
margin-left: 5px;
}
}
}
.switcher
{
.switcher
{
display: block;
position: absolute;
font-size: 18px;
color: #1890FF
!important;
color: #1890ff
!important;
top: 50%;
right: 2px;
transform: translate(0%,
-50%);
transform: translate(0%,
-50%);
z-index: 1;
}
}
.orgContainerHide
{
.orgContainerHide
{
// transform: translateX(-230px);
left: 0px;
top: 0;
...
...
@@ -88,7 +88,7 @@
.ant-popover-message-title {
padding-left: 20px;
}
.userContainer
{
.userContainer
{
height: calc(100vh - 74px) !important;
z-index: 999;
min-width: 800px;
...
...
@@ -96,72 +96,73 @@
width: 100%;
position: relative;
transition: width 0.5s;
.title
{
.title
{
margin: 16px 0 10px 16px;
display: inline-block;
width: 270px;
cursor: pointer;
overflow: hidden;
text-overflow:
ellipsis;
text-overflow:
ellipsis;
white-space: nowrap;
}
.ant-table-pagination
{
.ant-table-pagination
{
padding-right: 12px;
background: white;
margin: 1px 0;
padding: 8px;
padding-right: 20px;
}
.ant-btn
{
.ant-btn
{
margin: 0px 10px;
.ant-btn-primary
{
.ant-btn-primary
{
background: #50aefc;
}
}
.ant-input-search-button
{
.ant-input-search-button
{
margin-left: 0px !important;
}
.ant-table-thead tr th
{
.ant-table-thead tr th
{
font-weight: 600;
color:rgba(0,0,0,
0.85);
background-color:#F6F9FE
;
color: rgba(0, 0, 0,
0.85);
background-color: #f6f9fe
;
}
.ant-table-cell
{
text-align:
center;
.ant-table-cell
{
text-align:
center;
overflow: hidden;
// text-overflow:ellipsis;
white-space: nowrap;
}
.ant-table-body
{
height:
calc(100vh - 210px);
.ant-table-body
{
height:
calc(100vh - 210px);
border-right: white;
overflow: auto !important;
}
.clickRowStyle
{
.clickRowStyle
{
background: #cfe7fd;
}
.ant-pagination
{
.ant-pagination
{
z-index: 999;
border-top: 1px solid #f0eded;
}
}
}
.icon
{
.icon
{
margin-top: -5px !important;
vertical-align: text-bottom;
}
}
.formData{
.formData
{
height: 38rem;
overflow-y: scroll;
.ant-form-item-label > label.ant-form-item-required:not(.ant-form-item-required-mark-optional)::before{
.ant-form-item-label
> label.ant-form-item-required:not(.ant-form-item-required-mark-optional)::before {
display: none;
}
.formData_label
{
.formData_label
{
display: flex;
align-items: center;
}
.filed_listItem
{
.filed_listItem
{
display: flex;
height: 3.6rem;
.ant-btn-icon-only {
...
...
@@ -176,21 +177,48 @@
justify-content: center;
}
}
.ant-modal-root .ant-checkbox-group .ant-checkbox-group-item {
margin-right: 0px !important;
min-width: 200px !important;
}
}
.listCard{
.listCard
{
display: flex;
.cardItem{
justify-content: space-around;
width: 100%;
.cardItem {
padding: 0.5rem;
width: 50%;
}
.cardContent
{
.cardContent
{
height: 30rem;
overflow-y: scroll;
width: 19rem;
}
.cardItemData{
.cardItemData {
padding: 1rem;
border: 1px solid #b5b8c8;
margin-bottom: 1rem;
overflow-x: hidden;
}
}
.listCard1 {
display: flex;
.cardItem1 {
padding: 0.5rem;
}
.cardContent1 {
height: 33rem;
overflow-y: scroll;
width: 1350px;
display: flex;
justify-content: space-around;
}
.cardItemData1 {
padding: 1rem;
border: 1px solid #b5b8c8;
margin-bottom: 1rem;
width: 33.3%;
overflow-x: hidden;
}
}
...
...
@@ -205,39 +233,37 @@
thead {
tr {
font-weight: 600;
background: #FAFAFA
;
background: #fafafa
;
}
}
tbody
{
tr:hover
{
background-color:#ededed
;
tbody
{
tr:hover
{
background-color: #ededed
;
}
}
}
}
.ant-checkbox-group-item {
width: 260px;
}
.ant-drawer-footer {
display:
flex;
display:
flex;
justify-content: flex-end;
}
.config{
.config
{
display: flex;
padding: 1rem 0 0.5rem 0.5rem;
justify-content: space-between;
width: calc(100% - 10px);
.title
{
.title
{
font-size: 18px;
color: rgba(0, 114, 255, 1);
font-weight: bold;
}
.btn
{
.btn
{
display: flex;
justify-content: flex-end;
width: 20rem;
}
.ant-btn
{
.ant-btn
{
display: flex;
align-items: center;
margin-left: 20px;
...
...
@@ -245,22 +271,25 @@
}
.containerBox {
width: 100vm;
height: calc(100vh - 90px)
;
height: calc(100vh - 90px)
;
background: #ffffff;
.ant-table.ant-table-small .ant-table-tbody .ant-table-wrapper:only-child .ant-table{
.ant-table.ant-table-small
.ant-table-tbody
.ant-table-wrapper:only-child
.ant-table {
margin-left: 0;
}
.ant-table.ant-table-bordered > .ant-table-container
{
.ant-table.ant-table-bordered > .ant-table-container
{
border: none;
}
.clickRowStyle
{
.clickRowStyle
{
background: #cfe7fd;
}
.ant-table-thead tr th
{
.ant-table-thead tr th
{
font-weight: 600;
color:rgba(0,0,0,
0.85);
color: rgba(0, 0, 0,
0.85);
}
}
.panda-pro-pages-platform-center-bsmanager-work-order-incident-filed_listItem{
display:flex
.panda-pro-pages-platform-center-bsmanager-work-order-incident-filed_listItem
{
display: flex;
}
src/pages/platformCenter/bsmanager/workOrder/incidentFlow.jsx
View file @
a6cba482
/* eslint-disable react-hooks/rules-of-hooks */
/* eslint-disable camelcase */
import
React
,
{
useEffect
,
useState
}
from
'react'
;
import
{
Modal
,
Table
,
Tooltip
,
notification
,
Space
,
Popconfirm
,
Spin
,
Button
}
from
'antd'
;
import
{
Modal
,
Table
,
Tooltip
,
notification
,
Space
,
Popconfirm
,
Spin
,
Button
,
}
from
'antd'
;
import
{
PlusSquareFilled
,
EditTwoTone
,
DeleteOutlined
,
PlusSquareOutlined
,
RollbackOutlined
RollbackOutlined
,
}
from
'@ant-design/icons'
;
import
{
useHistory
}
from
'react-router-dom'
;
import
styles
from
'./incident.less'
;
import
{
GetCM_Event_LoadEvenFlows
,
CM_Event_RemoveEvenFlow
}
from
'@/services/standingBook/api'
;
import
AddFlowsModal
from
'./AddFlowsModal'
const
incidentFlow
=
(
props
)
=>
{
const
[
tableData
,
setTableData
]
=
useState
([])
import
{
GetCM_Event_LoadEvenFlows
,
CM_Event_RemoveEvenFlow
,
}
from
'@/services/standingBook/api'
;
import
AddFlowsModal
from
'./AddFlowsModal'
;
const
incidentFlow
=
props
=>
{
const
[
tableData
,
setTableData
]
=
useState
([]);
const
history
=
useHistory
();
const
[
addVisible
,
setAddVisible
]
=
useState
(
false
)
const
[
addVisible
,
setAddVisible
]
=
useState
(
false
);
const
[
treeLoading
,
setTreeLoading
]
=
useState
(
false
);
const
[
isType
,
setIsType
]
=
useState
(
''
);
// 弹窗类型
const
[
record1
,
setRecord1
]
=
useState
(
''
)
const
[
obj
,
setObj
]
=
useState
(
''
)
const
[
flag
,
setFlag
]
=
useState
(
0
)
const
[
record1
,
setRecord1
]
=
useState
(
''
);
const
[
obj
,
setObj
]
=
useState
(
''
);
const
[
flag
,
setFlag
]
=
useState
(
0
);
const
columns
=
[
{
title
:
()
=>
(<
span
style=
{
{
fontWeight
:
'bold'
}
}
>
流程名称
</
span
>)
,
title
:
()
=>
<
span
style=
{
{
fontWeight
:
'bold'
}
}
>
流程名称
</
span
>
,
dataIndex
:
'FlowName'
,
key
:
'FlowName'
,
width
:
250
,
ellipsis
:
true
,
}
,
},
{
title
:
()
=>
(<
span
style=
{
{
fontWeight
:
'bold'
}
}
>
受理权限
</
span
>)
,
title
:
()
=>
<
span
style=
{
{
fontWeight
:
'bold'
}
}
>
受理权限
</
span
>
,
dataIndex
:
'FlowRoles'
,
key
:
'FlowRoles'
,
ellipsis
:
true
,
},
{
title
:
()
=>
(<
span
style=
{
{
fontWeight
:
'bold'
}
}
>
操作
</
span
>)
,
title
:
()
=>
<
span
style=
{
{
fontWeight
:
'bold'
}
}
>
操作
</
span
>
,
key
:
'action'
,
width
:
150
,
aligin
:
'center'
,
...
...
@@ -53,11 +65,7 @@ const incidentFlow = (props) => {
<
Tooltip
title=
"删除"
>
<
Popconfirm
placement=
"bottomRight"
title=
{
<
p
>
即将删除事件流程,是否确认删除?
</
p
>
}
title=
{
<
p
>
即将删除事件流程,是否确认删除?
</
p
>
}
okText=
"确认"
cancelText=
"取消"
onConfirm=
{
()
=>
deleteEventType
(
record
)
}
...
...
@@ -66,53 +74,53 @@ const incidentFlow = (props) => {
</
Popconfirm
>
</
Tooltip
>
</
Space
>
)
}
]
),
},
];
useEffect
(()
=>
{
console
.
log
(
props
)
console
.
log
(
props
.
location
.
state
.
title1
)
console
.
log
(
props
);
console
.
log
(
props
.
location
.
state
.
title1
);
setTreeLoading
(
true
);
GetCM_Event_LoadEvenFlows
({
eventTypeId
:
props
.
location
.
state
.
formObj
.
ID
}).
then
(
res
=>
{
GetCM_Event_LoadEvenFlows
({
eventTypeId
:
props
.
location
.
state
.
formObj
.
ID
,
}).
then
(
res
=>
{
setTreeLoading
(
false
);
if
(
res
.
msg
===
'Ok'
)
{
console
.
log
(
res
.
data
)
setTableData
(
res
.
data
)
console
.
log
(
res
.
data
);
setTableData
(
res
.
data
);
}
})
},
[
flag
])
});
},
[
flag
]);
const
addIncident
=
()
=>
{
console
.
log
(
props
.
location
.
state
.
formObj
.
ID
)
setObj
(
props
.
location
.
state
.
formObj
.
ID
)
setAddVisible
(
true
)
setIsType
(
'add'
)
}
console
.
log
(
props
.
location
.
state
.
formObj
.
ID
);
setObj
(
props
.
location
.
state
.
formObj
.
ID
);
setAddVisible
(
true
);
setIsType
(
'add'
);
};
const
editEventType
=
record
=>
{
setObj
(
props
.
location
.
state
.
formObj
.
ID
)
setRecord1
(
record
)
setObj
(
props
.
location
.
state
.
formObj
.
ID
);
setRecord1
(
record
);
setIsType
(
'edit'
);
setAddVisible
(
true
)
}
setAddVisible
(
true
);
};
const
back
=
()
=>
{
let
rember
=
props
.
location
.
state
.
rember
;
let
{
rember
}
=
props
.
location
.
state
;
history
.
push
({
pathname
:
'/platformCenter/bsmanger/incident'
,
state
:
{
rember
},
});
};
const
deleteEventType
=
record
=>
{
console
.
log
(
record
)
console
.
log
(
record
);
CM_Event_RemoveEvenFlow
({
eventFlowIds
:
record
.
ID
}).
then
(
res
=>
{
if
(
res
.
msg
===
''
)
{
notification
.
success
({
message
:
'提示'
,
duration
:
3
,
description
:
'删除成功'
,
});
setFlag
(
flag
+
1
)
setFlag
(
flag
+
1
);
}
else
{
notification
.
error
({
message
:
'提示'
,
...
...
@@ -120,24 +128,28 @@ const incidentFlow = (props) => {
description
:
res
.
msg
,
});
}
})
}
});
};
const
onOK
=
()
=>
{
setAddVisible
(
false
)
GetCM_Event_LoadEvenFlows
({
eventTypeId
:
props
.
location
.
state
.
formObj
.
ID
}).
then
(
res
=>
{
setAddVisible
(
false
);
GetCM_Event_LoadEvenFlows
({
eventTypeId
:
props
.
location
.
state
.
formObj
.
ID
,
}).
then
(
res
=>
{
if
(
res
.
msg
===
'Ok'
)
{
console
.
log
(
res
.
data
)
setTableData
(
res
.
data
)
}
})
console
.
log
(
res
.
data
);
setTableData
(
res
.
data
);
}
});
};
return
(
<>
<
Spin
tip=
"loading..."
spinning=
{
treeLoading
}
>
<
div
className=
{
styles
.
containerBox
}
>
<
div
className=
{
styles
.
config
}
>
<
div
className=
{
styles
.
title
}
>
{
`${props.location.state.title1}受理流程和权限`
}
</
div
>
<
div
className=
{
styles
.
title
}
>
{
`${
props.location.state.title1
}受理流程和权限`
}
</
div
>
<
div
className=
{
styles
.
btn
}
>
<
Button
type=
"primary"
...
...
@@ -147,7 +159,11 @@ const incidentFlow = (props) => {
新增
</
Button
>
<
Button
type=
"primary"
icon=
{
<
RollbackOutlined
/>
}
onClick=
{
()
=>
back
()
}
>
<
Button
type=
"primary"
icon=
{
<
RollbackOutlined
/>
}
onClick=
{
()
=>
back
()
}
>
返回
</
Button
>
</
div
>
...
...
@@ -155,17 +171,19 @@ const incidentFlow = (props) => {
<
Table
size=
"small"
rowKey=
'ID'
rowKey=
"ID"
bordered
style=
{
{
overflowY
:
'scroll'
}
}
onRow=
{
record
=>
{
return
{
onDoubleClick
:
event
=>
{
event
.
stopPropagation
();
editEventType
(
record
);
},
//双击
};
}
}
style=
{
{
overflowY
:
'scroll'
}
}
onRow=
{
record
=>
({
onDoubleClick
:
event
=>
{
event
.
stopPropagation
();
editEventType
(
record
);
},
// 双击
})
}
columns=
{
columns
}
dataSource=
{
tableData
}
pagination=
{
false
}
/>
pagination=
{
false
}
/>
</
div
>
</
Spin
>
<
AddFlowsModal
...
...
@@ -180,8 +198,6 @@ const incidentFlow = (props) => {
placement=
"right"
/>
</>
)
}
);
};
export
default
incidentFlow
;
src/pages/platformCenter/messageManage/projectManage/ProjectManage.jsx
View file @
a6cba482
import
React
,
{
useEffect
,
useState
}
from
'react'
/* eslint-disable array-callback-return */
/* eslint-disable no-shadow */
/* eslint-disable indent */
/* eslint-disable eqeqeq */
import
React
,
{
useEffect
,
useState
}
from
'react'
;
import
{
// Tree,
Table
,
...
...
@@ -9,16 +13,28 @@ import {
Popconfirm
,
message
,
Tooltip
,
Spin
Spin
,
}
from
'antd'
;
import
{
PlusCircleOutlined
,
EditTwoTone
,
DeleteOutlined
,
FundViewOutlined
,
FieldTimeOutlined
}
from
'@ant-design/icons'
;
import
{
PlusCircleOutlined
,
EditTwoTone
,
DeleteOutlined
,
FundViewOutlined
,
FieldTimeOutlined
,
}
from
'@ant-design/icons'
;
import
{
useHistory
}
from
'react-router-dom'
;
import
EditModal
from
'./components/EditModal'
;
import
VisibleRoleModal
from
'./components/RolseSelect/VisibleRoleModal'
;
import
{
GetMessageConfigList
,
TestPush
,
DeleteMessageConfig
,
GetMsgTypeList
,
DeleteIISAgentConfig
,
}
from
'@/services/platform/messagemanage'
;
import
styles
from
'./ProjectManage.less'
;
const
{
Search
}
=
Input
;
const
{
Option
}
=
Select
;
import
EditModal
from
'./components/EditModal'
import
VisibleRoleModal
from
'./components/RolseSelect/VisibleRoleModal'
import
{
GetMessageConfigList
,
TestPush
,
DeleteMessageConfig
,
GetMsgTypeList
,
DeleteIISAgentConfig
}
from
'@/services/platform/messagemanage'
import
styles
from
'./ProjectManage.less'
const
ProjectManage
=
()
=>
{
const
history
=
useHistory
();
const
[
visibleParams
,
setvisibleParams
]
=
useState
({
...
...
@@ -30,33 +46,41 @@ const ProjectManage = () => {
loading
:
false
,
checkBoxLoading
:
false
,
});
const
[
currentType
,
setCurrentType
]
=
useState
(
"全部"
)
const
[
currentName
,
setCurrentName
]
=
useState
(
"全部"
)
const
[
messageTypes
,
setMessageTypes
]
=
useState
([])
const
[
currentType
,
setCurrentType
]
=
useState
(
'全部'
);
const
[
currentName
,
setCurrentName
]
=
useState
(
'全部'
);
const
[
messageTypes
,
setMessageTypes
]
=
useState
([]);
const
[
currentTemplate
,
setCurrentTempalte
]
=
useState
({});
const
[
flag
,
setFlag
]
=
useState
(
0
)
const
[
pageIndex
,
setPageIndex
]
=
useState
(
0
)
const
[
pageSize
,
setPageSize
]
=
useState
(
10
)
const
[
dataList
,
setDataList
]
=
useState
([])
const
[
flag
,
setFlag
]
=
useState
(
0
);
const
[
pageIndex
,
setPageIndex
]
=
useState
(
0
);
const
[
pageSize
,
setPageSize
]
=
useState
(
10
);
const
[
dataList
,
setDataList
]
=
useState
([]);
const
[
treeLoading
,
setTreeLoading
]
=
useState
(
false
);
const
[
showSearchStyle
,
setShowSearchStyle
]
=
useState
(
false
);
// 是否显示模糊查询样式
const
[
value
,
setValue
]
=
useState
(
''
)
const
[
value
,
setValue
]
=
useState
(
''
);
const
columns
=
[
{
title
:
'方案名称'
,
dataIndex
:
'name'
,
key
:
'name'
,
render
:
(
text
,
record
)
=>
(
<
div
>
{
record
.
type
==
'定时推送'
?
searchStyle
(
text
)
:
<
div
style=
{
{
display
:
'flex'
,
alignItems
:
'center'
}
}
>
<
Tooltip
title=
{
text
}
>
<
div
>
{
record
.
type
===
'定时推送'
?
(
searchStyle
(
text
)
)
:
(
<
div
style=
{
{
display
:
'flex'
,
alignItems
:
'center'
}
}
>
<
Tooltip
title=
{
text
}
>
<
FieldTimeOutlined
style=
{
{
fontSize
:
'16px'
,
color
:
'#1890FF'
,
marginRight
:
'0.1rem'
}
}
style=
{
{
fontSize
:
'16px'
,
color
:
'#1890FF'
,
marginRight
:
'0.1rem'
,
}
}
/>
</
Tooltip
>
{
searchStyle
(
text
)
}
</
div
>
}
</
div
>
)
}
</
div
>
),
},
{
...
...
@@ -78,9 +102,7 @@ const ProjectManage = () => {
title
:
'是否启用'
,
dataIndex
:
'is_use'
,
key
:
'is_use'
,
render
:
(
text
,
record
)
=>
(
<
div
>
{
text
===
"0"
?
"否"
:
"是"
}
</
div
>
)
render
:
(
text
,
record
)
=>
<
div
>
{
text
===
'0'
?
'否'
:
'是'
}
</
div
>,
},
{
title
:
'操作'
,
...
...
@@ -89,44 +111,49 @@ const ProjectManage = () => {
render
:
(
text
,
record
)
=>
(
<
Space
>
<
Tooltip
title=
"测试"
>
<
FundViewOutlined
style=
{
{
fontSize
:
'16px'
,
color
:
'#1890FF'
}
}
onClick=
{
()
=>
{
<
FundViewOutlined
style=
{
{
fontSize
:
'16px'
,
color
:
'#1890FF'
}
}
onClick=
{
()
=>
{
TestDesc
(
record
);
}
}
/>
}
}
/>
</
Tooltip
>
<
Tooltip
title=
"编辑"
>
<
EditTwoTone
style=
{
{
fontSize
:
'16px'
,
color
:
'#e86060'
}
}
onClick=
{
()
=>
{
<
EditTwoTone
style=
{
{
fontSize
:
'16px'
,
color
:
'#e86060'
}
}
onClick=
{
()
=>
{
changeDesc
(
record
);
}
}
></
EditTwoTone
>
}
}
/>
</
Tooltip
>
{
record
.
name
!=
"通用报警"
&&
record
.
name
!=
"工单提醒"
&&
record
.
name
!=
"系统通知"
&&
(<
div
onClick=
{
e
=>
e
.
stopPropagation
()
}
>
{
record
.
name
!=
'通用报警'
&&
record
.
name
!=
'工单提醒'
&&
record
.
name
!=
'系统通知'
&&
(
<
div
onClick=
{
e
=>
e
.
stopPropagation
()
}
>
<
Popconfirm
title=
"是否删除方案?"
okText=
"确认"
cancelText=
"取消"
onConfirm=
{
()
=>
{
DeleteProject
(
record
)
DeleteProject
(
record
);
}
}
>
<
DeleteOutlined
style=
{
{
fontSize
:
'16px'
,
color
:
'#e86060'
}
}
></
DeleteOutlined
>
<
DeleteOutlined
style=
{
{
fontSize
:
'16px'
,
color
:
'#e86060'
}
}
/>
</
Popconfirm
>
</
div
>)
}
</
div
>
)
}
</
Space
>
),
},
];
// 模糊查询匹配的样式
const
searchStyle
=
val
=>
{
console
.
log
(
val
)
console
.
log
(
value
)
console
.
log
(
val
);
console
.
log
(
value
);
let
n
;
if
(
showSearchStyle
)
{
n
=
val
.
replace
(
...
...
@@ -136,144 +163,146 @@ const ProjectManage = () => {
}
else
{
n
=
val
;
}
console
.
log
(
val
)
console
.
log
(
val
);
return
<
div
dangerouslySetInnerHTML=
{
{
__html
:
n
}
}
/>;
};
const
placeholder
=
'请输入方案名称'
const
handleSearch
=
(
value
)
=>
{
GetMessageList
({
pageSize
:
10
,
pageIndex
:
0
,
search
:
value
})
const
placeholder
=
'请输入方案名称'
;
const
handleSearch
=
value
=>
{
GetMessageList
({
pageSize
:
10
,
pageIndex
:
0
,
search
:
value
});
setShowSearchStyle
(
true
);
}
const
changeDesc
=
(
record
)
=>
{
setCurrentTempalte
(
record
)
history
.
push
({
pathname
:
`/platformCenter/schemeDetail`
,
state
:
{
template
:
record
}
})
};
const
changeDesc
=
record
=>
{
setCurrentTempalte
(
record
);
history
.
push
({
pathname
:
`/platformCenter/schemeDetail`
,
state
:
{
template
:
record
},
});
// handleShowModal("editVisible", true)
}
const
TestDesc
=
(
record
)
=>
{
};
const
TestDesc
=
record
=>
{
if
(
record
.
ThemeName
)
TestPush
({
theme
:
record
.
ThemeName
,
msgType
:
record
.
MsgType
,
tousers
:
record
.
PushGroup
,
pushPath
:
record
.
item
.
AgentConfig
?
record
.
item
.
AgentConfig
.
Url
:
''
,
msgTypeId
:
record
.
ID
}).
then
(
res
=>
{
msgTypeId
:
record
.
ID
,
}).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
message
.
success
(
"测试推送成功"
)
message
.
success
(
'测试推送成功'
);
}
else
{
message
.
error
(
res
.
msg
)
}
}
)
message
.
error
(
res
.
msg
);
}
const
DeleteProject
=
(
record
)
=>
{
let
agen
=
record
.
item
.
AgentConfig
let
config
=
record
.
item
.
MessageConfig
});
};
const
DeleteProject
=
record
=>
{
let
agen
=
record
.
item
.
AgentConfig
;
let
config
=
record
.
item
.
MessageConfig
;
if
(
agen
)
{
DeleteIISAgentConfig
({
agentName
:
config
.
MsgType
}).
then
(
res
=>
{
agentName
:
config
.
MsgType
,
}).
then
(
res
=>
{
if
(
res
===
0
)
{
DeleteMessageConfig
({
id
:
config
.
ID
}).
then
(
res3
=>
{
id
:
config
.
ID
,
}).
then
(
res3
=>
{
if
(
res3
.
code
===
0
)
{
message
.
success
(
"删除方案成功"
)
setFlag
(
flag
+
1
)
}
}
)
}
else
{
message
.
error
(
res
.
msg
)
message
.
success
(
'删除方案成功'
);
setFlag
(
flag
+
1
);
}
});
}
else
{
message
.
error
(
res
.
msg
);
}
)
});
}
else
{
DeleteMessageConfig
({
id
:
config
.
ID
}).
then
(
res3
=>
{
id
:
config
.
ID
,
}).
then
(
res3
=>
{
if
(
res3
.
code
===
0
)
{
message
.
success
(
"删除方案成功"
)
setFlag
(
flag
+
1
)
}
message
.
success
(
'删除方案成功'
);
setFlag
(
flag
+
1
);
}
)
}
});
}
};
const
handleReset
=
()
=>
{
setCurrentType
(
"全部"
)
setCurrentName
(
"全部"
)
GetMessageList
({
pageSize
:
10
,
pageIndex
:
0
})
setCurrentType
(
'全部'
);
setCurrentName
(
'全部'
);
GetMessageList
({
pageSize
:
10
,
pageIndex
:
0
});
setShowSearchStyle
(
false
);
setValue
(
''
)
}
setValue
(
''
);
};
// 弹出模态框
const
handleShowModal
=
(
key
,
value
)
=>
{
setvisibleParams
({
...
visibleParams
,
[
key
]:
value
});
};
const
editModal
=
()
=>
{
handleShowModal
(
"editVisbile"
,
false
)
setFlag
(
flag
+
1
)
}
handleShowModal
(
'editVisbile'
,
false
);
setFlag
(
flag
+
1
);
};
const
bddModal
=
()
=>
{
handleShowModal
(
"addVisbile"
,
false
)
setFlag
(
flag
+
1
)
}
handleShowModal
(
'addVisbile'
,
false
);
setFlag
(
flag
+
1
);
};
const
onAddClick
=
()
=>
{
setCurrentTempalte
({})
setCurrentTempalte
({});
// handleShowModal("addVisible", true)
history
.
push
({
pathname
:
`/platformCenter/schemeDetail`
,
state
:
{
template
:
{}
}
})
}
const
onTypeChange
=
(
value
)
=>
{
if
(
value
==
"全部"
)
{
setCurrentType
(
""
)
GetMessageList
({
pageIndex
:
pageIndex
,
pageSize
:
10
})
history
.
push
({
pathname
:
`/platformCenter/schemeDetail`
,
state
:
{
template
:
{}
},
});
};
const
onTypeChange
=
value
=>
{
if
(
value
==
'全部'
)
{
setCurrentType
(
''
);
GetMessageList
({
pageIndex
,
pageSize
:
10
});
}
else
{
GetMessageList
({
pageIndex
:
pageIndex
,
pageSize
:
10
,
infoType
:
value
,
msgType
:
currentName
==
"全部"
?
""
:
currentName
})
setCurrentType
(
value
)
}
GetMessageList
({
pageIndex
,
pageSize
:
10
,
infoType
:
value
,
msgType
:
currentName
==
'全部'
?
''
:
currentName
,
});
setCurrentType
(
value
);
}
const
onNameChange
=
(
value
)
=>
{
if
(
value
==
"全部"
)
{
setCurrentName
(
""
)
GetMessageList
({
pageIndex
:
pageIndex
,
pageSize
:
10
})
};
const
onNameChange
=
value
=>
{
if
(
value
==
'全部'
)
{
setCurrentName
(
''
);
GetMessageList
({
pageIndex
,
pageSize
:
10
});
}
else
{
GetMessageList
({
pageIndex
:
pageIndex
,
pageSize
:
10
,
msgType
:
value
,
infoType
:
currentType
==
"全部"
?
""
:
currentType
})
setCurrentName
(
value
)
}
GetMessageList
({
pageIndex
,
pageSize
:
10
,
msgType
:
value
,
infoType
:
currentType
==
'全部'
?
''
:
currentType
,
});
setCurrentName
(
value
);
}
};
useEffect
(()
=>
{
setTreeLoading
(
true
)
GetMsgTypeList
().
then
(
res
=>
{
setTreeLoading
(
false
)
setTreeLoading
(
true
);
GetMsgTypeList
().
then
(
res
=>
{
setTreeLoading
(
false
);
if
(
res
.
code
===
0
)
{
setMessageTypes
(
res
.
data
)
setMessageTypes
(
res
.
data
);
}
}
)
},
[])
});
},
[]);
useEffect
(()
=>
{
GetMessageList
({
pageIndex
:
pageIndex
,
pageSize
:
10
})
},
[
flag
])
GetMessageList
({
pageIndex
,
pageSize
:
10
});
},
[
flag
]);
const
GetMessageList
=
(
params
)
=>
{
setTreeLoading
(
true
)
GetMessageConfigList
(
params
).
then
(
res
=>
{
setTreeLoading
(
false
)
let
mesList
=
[]
const
GetMessageList
=
params
=>
{
setTreeLoading
(
true
);
GetMessageConfigList
(
params
).
then
(
res
=>
{
setTreeLoading
(
false
);
let
mesList
=
[];
if
(
res
.
code
===
0
)
{
res
.
data
.
MessageConfigModels
.
map
((
item
)
=>
{
res
.
data
.
MessageConfigModels
.
map
(
item
=>
{
mesList
.
push
({
name
:
item
.
MessageConfig
.
MsgType
,
type
:
item
.
MessageConfig
.
ThemeName
,
...
...
@@ -281,19 +310,18 @@ const ProjectManage = () => {
receive_person
:
item
.
MessageConfig
.
PushGroup
,
is_use
:
item
.
MessageConfig
.
IsStarted
,
...
item
.
MessageConfig
,
item
:
item
})
})
item
,
});
});
setDataList
(
mesList
)
}
}
)
setDataList
(
mesList
);
}
});
};
const
handleChange
=
e
=>
{
setValue
(
e
.
target
.
value
)
}
const
handleChange
=
e
=>
{
setValue
(
e
.
target
.
value
);
};
const
pagenation
=
{
showTotal
:
(
total
,
range
)
=>
`第
${
range
[
0
]}
-
${
range
[
1
]}
条/共
${
total
}
条`
,
...
...
@@ -308,7 +336,12 @@ const ProjectManage = () => {
<
div
className=
{
styles
.
operate_bar
}
>
<
div
className=
{
styles
.
template_type
}
>
<
div
className=
{
styles
.
title
}
>
方案类型
</
div
>
<
Select
placeholder=
"请选择方案类型!"
defaultValue=
{
currentType
}
style=
{
{
width
:
"150px"
}
}
onChange=
{
onTypeChange
}
>
<
Select
placeholder=
"请选择方案类型!"
value=
{
currentType
}
style=
{
{
width
:
'150px'
}
}
onChange=
{
onTypeChange
}
>
<
Option
value=
"全部"
>
全部
</
Option
>
<
Option
value=
"监控报警"
>
监控报警
</
Option
>
<
Option
value=
"工单办理"
>
工单办理
</
Option
>
...
...
@@ -318,15 +351,18 @@ const ProjectManage = () => {
</
div
>
<
div
className=
{
styles
.
template_type
}
>
<
div
className=
{
styles
.
title
}
>
方案名称
</
div
>
<
Select
placeholder=
"请选择方案名称!"
defaultValue=
{
currentName
}
style=
{
{
width
:
"150px"
}
}
onChange=
{
onNameChange
}
>
<
Select
placeholder=
"请选择方案名称!"
value=
{
currentName
}
style=
{
{
width
:
'150px'
}
}
onChange=
{
onNameChange
}
>
<
Option
value=
"全部"
>
全部
</
Option
>
{
messageTypes
.
map
((
item
,
idx
)
=>
{
return
(
<
Option
key=
{
idx
}
value=
{
item
.
MsgType
}
>
{
item
.
MsgType
}
</
Option
>
)
})
}
{
messageTypes
.
map
((
item
,
idx
)
=>
(
<
Option
key=
{
idx
}
value=
{
item
.
MsgType
}
>
{
item
.
MsgType
}
</
Option
>
))
}
</
Select
>
</
div
>
<
div
className=
{
styles
.
fast_search
}
>
...
...
@@ -335,15 +371,25 @@ const ProjectManage = () => {
allowClear
placeholder=
{
placeholder
}
onSearch=
{
handleSearch
}
onChange=
{
e
=>
{
handleChange
(
e
)}
}
onChange=
{
e
=>
{
handleChange
(
e
);
}
}
enterButton
style=
{
{
width
:
"300px"
}
}
style=
{
{
width
:
'300px'
}
}
value=
{
value
}
/>
</
div
>
<
Button
type=
"primary"
onClick=
{
handleReset
}
>
重置
</
Button
>
<
Button
type=
"primary"
style=
{
{
marginLeft
:
"10px"
}
}
icon=
{
<
PlusCircleOutlined
/>
}
onClick=
{
onAddClick
}
><
span
style=
{
{
marginTop
:
"-3px"
}
}
>
新增
</
span
></
Button
>
<
Button
type=
"primary"
onClick=
{
handleReset
}
>
重置
</
Button
>
<
Button
type=
"primary"
style=
{
{
marginLeft
:
'10px'
}
}
icon=
{
<
PlusCircleOutlined
/>
}
onClick=
{
onAddClick
}
>
<
span
style=
{
{
marginTop
:
'-3px'
}
}
>
新增
</
span
>
</
Button
>
</
div
>
<
div
className=
{
styles
.
list_view
}
>
<
Table
...
...
@@ -351,7 +397,7 @@ const ProjectManage = () => {
columns=
{
columns
}
dataSource=
{
dataList
}
pagination=
{
pagenation
}
rowKey=
'ID'
rowKey=
"ID"
/>
</
div
>
<
EditModal
...
...
@@ -368,6 +414,6 @@ const ProjectManage = () => {
/>
</
Spin
>
</
div
>
)
}
);
}
;
export
default
ProjectManage
;
src/pages/platformCenter/messageManage/templateManage/TemplateManage.jsx
View file @
a6cba482
import
React
,
{
useEffect
,
useState
}
from
'react'
/* eslint-disable array-callback-return */
/* eslint-disable eqeqeq */
/* eslint-disable no-shadow */
/* eslint-disable spaced-comment */
/* eslint-disable import/first */
import
React
,
{
useEffect
,
useState
}
from
'react'
;
import
{
// Tree,
Table
,
...
...
@@ -10,21 +15,28 @@ import {
message
,
Tooltip
,
notification
,
Spin
Spin
,
}
from
'antd'
;
import
{
PlusCircleOutlined
,
EditTwoTone
,
DeleteOutlined
}
from
'@ant-design/icons'
;
import
{
PlusCircleOutlined
,
EditTwoTone
,
DeleteOutlined
,
}
from
'@ant-design/icons'
;
const
{
Search
}
=
Input
;
const
{
Option
}
=
Select
;
import
EditModal
from
'./components/EditModal'
import
AddModal
from
'./components/AddModal'
import
{
GetMessageTemplate
,
UpdateMessageTemplate
,
DeleteMessageTemplate
,
InsertMessageTemplate
,
GetThirdpartyTemplates
}
from
'@/services/platform/messagemanage'
import
styles
from
'./TemplateManage.less'
import
EditModal
from
'./components/EditModal'
;
import
AddModal
from
'./components/AddModal'
;
import
{
GetMessageTemplate
,
UpdateMessageTemplate
,
DeleteMessageTemplate
,
InsertMessageTemplate
,
GetThirdpartyTemplates
,
}
from
'@/services/platform/messagemanage'
;
import
styles
from
'./TemplateManage.less'
;
const
TemplateManage
=
()
=>
{
const
[
visibleParams
,
setvisibleParams
]
=
useState
({
addVisible
:
false
,
// 新增弹窗
delVisible
:
false
,
// 删除弹窗
...
...
@@ -35,24 +47,25 @@ const TemplateManage = () => {
checkBoxLoading
:
false
,
});
const
[
currentTemplate
,
setCurrentTempalte
]
=
useState
({});
const
[
data
,
setData
]
=
useState
([])
const
[
flag
,
setFlag
]
=
useState
(
0
)
const
[
data
,
setData
]
=
useState
([]);
const
[
flag
,
setFlag
]
=
useState
(
0
);
const
[
option
,
setOption
]
=
useState
([]);
// 下拉列表数据
const
[
treeLoading
,
setTreeLoading
]
=
useState
(
false
);
const
[
showSearchStyle
,
setShowSearchStyle
]
=
useState
(
false
);
// 是否显示模糊查询样式
const
[
value
,
setValue
]
=
useState
(
''
)
const
[
value
,
setValue
]
=
useState
(
''
);
const
[
currentType
,
setCurrentType
]
=
useState
(
'全部'
);
useEffect
(()
=>
{
getTemplateList
()
selectFocus
()
},
[
flag
])
getTemplateList
();
selectFocus
();
},
[
flag
]);
const
getTemplateList
=
(
obj
)
=>
{
setTreeLoading
(
true
)
GetMessageTemplate
(
obj
).
then
(
res
=>
{
setTreeLoading
(
false
)
let
list
=
[]
const
getTemplateList
=
obj
=>
{
setTreeLoading
(
true
);
GetMessageTemplate
(
obj
)
.
then
(
res
=>
{
setTreeLoading
(
false
);
let
list
=
[];
if
(
res
.
code
===
0
)
{
res
.
data
.
map
((
item
,
index
)
=>
{
list
.
push
({
...
...
@@ -62,25 +75,26 @@ const TemplateManage = () => {
type
:
item
.
Type
,
third_name
:
item
.
Name
,
third_id
:
item
.
No
,
template_params2
:
item
.
ParsingParams
,
//模板参数2.0
template_params1
:
item
.
TParameters
,
//模板参数1.0
analysis_params
:
item
.
ParsingRules
,
//模板解析
desc
:
item
.
ParsingDescription
,
//模板参数说明
weixin
:
item
.
WorkWeiXinId
//企业微信ID
})
})
setData
(
list
)
}
template_params2
:
item
.
ParsingParams
,
//模板参数2.0
template_params1
:
item
.
TParameters
,
//模板参数1.0
analysis_params
:
item
.
ParsingRules
,
//模板解析
desc
:
item
.
ParsingDescription
,
//模板参数说明
weixin
:
item
.
WorkWeiXinId
,
//企业微信ID
});
});
setData
(
list
);
}
).
catch
(
e
=>
{
setTreeLoading
(
false
)
})
}
.
catch
(
e
=>
{
setTreeLoading
(
false
);
});
};
const
selectFocus
=
(
obj
)
=>
{
GetThirdpartyTemplates
(
obj
).
then
(
res
=>
{
if
(
res
.
msg
===
"Ok"
)
{
console
.
log
(
res
.
data
)
const
selectFocus
=
obj
=>
{
GetThirdpartyTemplates
(
obj
)
.
then
(
res
=>
{
if
(
res
.
msg
===
'Ok'
)
{
console
.
log
(
res
.
data
);
setOption
(
res
.
data
);
}
else
{
notification
.
error
({
...
...
@@ -189,14 +203,15 @@ const TemplateManage = () => {
delTemplate
(
record
);
}
}
>
<
DeleteOutlined
style=
{
{
fontSize
:
'16px'
,
color
:
'#e86060'
}
}
/>
<
DeleteOutlined
style=
{
{
fontSize
:
'16px'
,
color
:
'#e86060'
}
}
/>
</
Popconfirm
>
</
div
>
</
Tooltip
>
</
Space
>
),
},
];
// 模糊查询匹配的样式
...
...
@@ -210,62 +225,63 @@ const TemplateManage = () => {
}
else
{
n
=
val
;
}
console
.
log
(
n
)
console
.
log
(
n
);
return
<
div
dangerouslySetInnerHTML=
{
{
__html
:
n
}
}
/>;
};
const
placeholder
=
'请输入模板名称'
const
handleSearch
=
(
value
)
=>
{
setValue
(
value
)
getTemplateList
({
queryInfo
:
value
})
const
placeholder
=
'请输入模板名称'
;
const
handleSearch
=
value
=>
{
setValue
(
value
);
getTemplateList
({
queryInfo
:
value
});
setShowSearchStyle
(
true
);
}
};
const
handleReset
=
()
=>
{
getTemplateList
()
setValue
(
''
)
setCurrentType
(
'全部'
);
getTemplateList
();
setValue
(
''
);
setShowSearchStyle
(
false
);
}
const
handleChange
=
e
=>
{
setValue
(
e
.
target
.
value
)
}
const
handleSelectType
=
(
value
)
=>
{
};
const
handleChange
=
e
=>
{
setValue
(
e
.
target
.
value
);
};
const
handleSelectType
=
value
=>
{
if
(
value
===
'全部'
)
{
getTemplateList
()
setCurrentType
(
''
);
getTemplateList
();
}
else
{
getTemplateList
({
tempType
:
value
})
}
}
const
changeDesc
=
(
record
)
=>
{
setCurrentTempalte
(
record
)
handleShowModal
(
"editVisible"
,
true
)
getTemplateList
({
tempType
:
value
});
setCurrentType
(
value
);
}
};
const
changeDesc
=
record
=>
{
setCurrentTempalte
(
record
);
handleShowModal
(
'editVisible'
,
true
);
};
const
AddTemplate
=
()
=>
{
handleShowModal
(
"addVisible"
,
true
)
}
const
delTemplate
=
(
record
)
=>
{
handleShowModal
(
'addVisible'
,
true
);
};
const
delTemplate
=
record
=>
{
DeleteMessageTemplate
({
id
:
record
.
Id
}).
then
(
res
=>
{
id
:
record
.
Id
,
}).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
message
.
success
(
"模板删除成功!"
)
setFlag
(
flag
+
1
)
message
.
success
(
'模板删除成功!'
);
setFlag
(
flag
+
1
);
}
else
{
message
.
warn
(
"模板删除失败!"
)
}
}
)
message
.
warn
(
'模板删除失败!'
);
}
});
};
// 弹出模态框
const
handleShowModal
=
(
key
,
value
)
=>
{
setvisibleParams
({
...
visibleParams
,
[
key
]:
value
});
};
//编辑
const
editModal
=
()
=>
{
handleShowModal
(
"editVisible"
,
false
)
}
const
onSubmit
=
(
result
)
=>
{
if
(
result
.
type
==
'企业微信'
)
{
handleShowModal
(
'editVisible'
,
false
);
};
const
onSubmit
=
result
=>
{
if
(
result
.
type
==
'企业微信'
)
{
UpdateMessageTemplate
({
Id
:
result
.
Id
,
Type
:
result
.
type
,
...
...
@@ -275,19 +291,17 @@ const TemplateManage = () => {
ParsingDescription
:
result
.
desc
,
TParameters
:
result
.
params
,
ParsingParams
:
result
.
param1
,
WorkWeiXinId
:
result
.
weixin
}).
then
(
res
=>
{
WorkWeiXinId
:
result
.
weixin
,
}).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
message
.
success
(
"模板保存成功!"
)
handleShowModal
(
"editVisible"
,
false
)
setFlag
(
flag
+
1
)
message
.
success
(
'模板保存成功!'
);
handleShowModal
(
'editVisible'
,
false
);
setFlag
(
flag
+
1
);
}
else
{
message
.
warn
(
"模板保存失败!"
)
}
message
.
warn
(
'模板保存失败!'
);
}
)
}
else
{
});
}
else
{
UpdateMessageTemplate
({
Id
:
result
.
Id
,
Type
:
result
.
type
,
...
...
@@ -298,25 +312,23 @@ const TemplateManage = () => {
ParsingDescription
:
result
.
desc
,
TParameters
:
result
.
params
,
ParsingParams
:
result
.
param1
,
}).
then
(
res
=>
{
}).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
message
.
success
(
"模板保存成功!"
)
handleShowModal
(
"editVisible"
,
false
)
setFlag
(
flag
+
1
)
message
.
success
(
'模板保存成功!'
);
handleShowModal
(
'editVisible'
,
false
);
setFlag
(
flag
+
1
);
}
else
{
message
.
warn
(
"模板保存失败!"
)
}
}
)
message
.
warn
(
'模板保存失败!'
);
}
});
}
};
//新增
const
addModal
=
()
=>
{
handleShowModal
(
"editVisible"
,
false
)
}
const
onAddSubmit
=
(
result
)
=>
{
if
(
result
.
type
==
'企业微信'
)
{
handleShowModal
(
'editVisible'
,
false
);
};
const
onAddSubmit
=
result
=>
{
if
(
result
.
type
==
'企业微信'
)
{
InsertMessageTemplate
({
Type
:
result
.
type
,
LikeName
:
result
.
name
,
...
...
@@ -325,19 +337,17 @@ const TemplateManage = () => {
ParsingDescription
:
result
.
desc
,
TParameters
:
result
.
params
,
ParsingParams
:
result
.
param1
,
WorkWeiXinId
:
result
.
weixin
}).
then
(
res
=>
{
WorkWeiXinId
:
result
.
weixin
,
}).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
message
.
success
(
"模板添加成功!"
)
handleShowModal
(
"addVisible"
,
false
)
setFlag
(
flag
+
1
)
message
.
success
(
'模板添加成功!'
);
handleShowModal
(
'addVisible'
,
false
);
setFlag
(
flag
+
1
);
}
else
{
message
.
warn
(
"模板添加失败!"
)
message
.
warn
(
'模板添加失败!'
);
}
}
)
}
else
{
});
}
else
{
InsertMessageTemplate
({
Type
:
result
.
type
,
LikeName
:
result
.
name
,
...
...
@@ -347,20 +357,17 @@ const TemplateManage = () => {
ParsingDescription
:
result
.
desc
,
TParameters
:
result
.
params
,
ParsingParams
:
result
.
param1
,
}).
then
(
res
=>
{
}).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
message
.
success
(
"模板添加成功!"
)
handleShowModal
(
"addVisible"
,
false
)
setFlag
(
flag
+
1
)
message
.
success
(
'模板添加成功!'
);
handleShowModal
(
'addVisible'
,
false
);
setFlag
(
flag
+
1
);
}
else
{
message
.
warn
(
"模板添加失败!"
)
}
message
.
warn
(
'模板添加失败!'
);
}
)
}
});
}
};
const
pagenation
=
{
showTotal
:
(
total
,
range
)
=>
`第
${
range
[
0
]}
-
${
range
[
1
]}
条/共
${
total
}
条`
,
...
...
@@ -375,7 +382,13 @@ const TemplateManage = () => {
<
div
className=
{
styles
.
operate_bar
}
>
<
div
className=
{
styles
.
template_type
}
>
<
div
className=
{
styles
.
title
}
>
模板类型
</
div
>
<
Select
placeholder=
"请选择是否!"
defaultValue=
"全部"
style=
{
{
width
:
"150px"
}
}
onChange=
{
handleSelectType
}
className=
{
styles
.
select
}
>
<
Select
placeholder=
"请选择是否!"
value=
{
currentType
}
style=
{
{
width
:
'150px'
}
}
onChange=
{
handleSelectType
}
className=
{
styles
.
select
}
>
<
Option
value=
"全部"
>
全部
</
Option
>
<
Option
value=
"公众号"
>
公众号
</
Option
>
<
Option
value=
"短信"
>
短信
</
Option
>
...
...
@@ -392,14 +405,22 @@ const TemplateManage = () => {
onSearch=
{
handleSearch
}
onChange=
{
e
=>
handleChange
(
e
)
}
enterButton
style=
{
{
width
:
"300px"
}
}
style=
{
{
width
:
'300px'
}
}
value=
{
value
}
/>
</
div
>
<
Button
type=
"primary"
onClick=
{
handleReset
}
>
重置
</
Button
>
<
Button
type=
"primary"
style=
{
{
marginLeft
:
"10px"
}
}
icon=
{
<
PlusCircleOutlined
style=
{
{
verticalAlign
:
"middle"
}
}
/>
}
onClick=
{
AddTemplate
}
><
span
style=
{
{
marginTop
:
"-3px"
}
}
>
新增
</
span
>
</
Button
>
<
Button
type=
"primary"
onClick=
{
handleReset
}
>
重置
</
Button
>
<
Button
type=
"primary"
style=
{
{
marginLeft
:
'10px'
}
}
icon=
{
<
PlusCircleOutlined
style=
{
{
verticalAlign
:
'middle'
}
}
/>
}
onClick=
{
AddTemplate
}
>
<
span
style=
{
{
marginTop
:
'-3px'
}
}
>
新增
</
span
>
</
Button
>
</
div
>
<
div
className=
{
styles
.
list_view
}
>
<
Table
...
...
@@ -428,6 +449,6 @@ const TemplateManage = () => {
/>
</
Spin
>
</
div
>
)
}
);
}
;
export
default
TemplateManage
;
src/pages/platformCenter/standingBook/standingBook.less
View file @
a6cba482
.redText{
.redText {
color: red;
cursor: pointer;
}
.ant-layout{
.ant-layout
{
overflow: auto;
.ant-layout-content
{
margin:
12px !important;
.ant-layout-content
{
margin:
12px !important;
}
}
.ant-btn > .anticon + span, .ant-btn > span + .anticon {
.ant-btn > .anticon + span,
.ant-btn > span + .anticon {
margin-left: 8px;
vertical-align: middle;
}
.siteTitle{
.siteTitle
{
font-size: 16px;
margin: 0 0 6px 0;
user-select: none;
padding: 3px;
border-bottom: 1px solid #ccc;
}
.userManageContainer{
.ant-card-body
{
.userManageContainer
{
.ant-card-body
{
padding-left: 0;
padding-right: 0;
}
.listItem
{
.listItem
{
display: flex;
justify-content: space-between;
font-size: 14px;
font-weight: 400;
color: #414E
65;
color: #414e
65;
cursor: pointer;
line-height: 28px;
align-items: center;
padding: 8px 14px;
}
.pickItem
{
background-color: #F5F6F
9;
.pickItem
{
background-color: #f5f6f
9;
}
.ant-form-item {
vertical-align: top;
}
.ant-form-item-label > label {
align-items:
middle;
align-items:
middle;
}
.ant-modal-body
{
padding-bottom:
0px;
padding-right:
40px;
padding-left:
40px;
.ant-form
{
.ant-modal-body
{
padding-bottom:
0px;
padding-right:
40px;
padding-left:
40px;
.ant-form
{
width: 90%;
}
}
...
...
@@ -63,22 +62,22 @@
color: rgba(0, 0, 0, 0.85);
font-size: 14px;
}
.ant-tree-treenode
{
.ant-tree-treenode
{
width: 100% !important;
.ant-tree-node-content-wrapper
{
.ant-tree-node-content-wrapper
{
display: inline-block;
width: 100%;
}
.iconWraper1
{
.iconWraper1
{
float: right;
span
{
span
{
display: none;
}
}
}
.ant-tree-treenode:hover
{
.iconWraper1>span
{
.ant-tree-treenode:hover
{
.iconWraper1 > span
{
margin-left: 12px;
font-size: 18px;
display: inline-block;
...
...
@@ -87,7 +86,7 @@
.ant-radio-group {
margin: 0px !important;
}
.contentContainers
{
.contentContainers
{
display: flex;
width: 100%;
position: relative;
...
...
@@ -97,7 +96,7 @@
overflow-x: hidden;
border: none;
}
.orgContainer
{
.orgContainer
{
height: calc(100vh - 74px);
width: 240px;
left: 0;
...
...
@@ -105,33 +104,33 @@
overflow-x: hidden;
margin-right: 10px;
position: relative;
transition-property:width,
left;
transition-property: width,
left;
transition-duration: 0.5s;
white-space: nowrap;
.ant-tree
{
.ant-tree
{
padding-top: 6px;
.ant-tree-switcher
{
.ant-tree-switcher
{
line-height: 1;
margin-right: 0px !important;
color:#1890FF
;
.ant-tree-switcher-line-icon
{
color: #1890ff
;
.ant-tree-switcher-line-icon
{
margin-left: 5px;
}
}
}
.switcher
{
.switcher
{
display: block;
position: absolute;
font-size: 18px;
color: #1890FF
!important;
color: #1890ff
!important;
top: 50%;
right: 2px;
transform: translate(0%,
-50%);
transform: translate(0%,
-50%);
z-index: 1;
}
}
.orgContainerHide
{
.orgContainerHide
{
// transform: translateX(-230px);
left: 0px;
top: 0;
...
...
@@ -140,7 +139,7 @@
.ant-popover-message-title {
padding-left: 20px;
}
.userContainer
{
.userContainer
{
height: calc(100vh - 74px) !important;
z-index: 999;
min-width: 800px;
...
...
@@ -148,90 +147,90 @@
width: 100%;
position: relative;
transition: width 0.5s;
.title
{
.title
{
margin: 16px 0 10px 16px;
display: inline-block;
width: 270px;
cursor: pointer;
overflow: hidden;
text-overflow:
ellipsis;
text-overflow:
ellipsis;
white-space: nowrap;
}
.ant-table-pagination
{
.ant-table-pagination
{
padding-right: 12px;
background: white;
margin: 1px 0;
padding: 8px;
padding-right: 20px;
}
.ant-btn
{
.ant-btn
{
margin: 0px 10px;
.ant-btn-primary
{
.ant-btn-primary
{
background: #50aefc;
}
}
.ant-input-search-button
{
.ant-input-search-button
{
margin-left: 0px !important;
}
.ant-table-thead tr th
{
.ant-table-thead tr th
{
font-weight: 600;
color:rgba(0,0,0,
0.85);
color: rgba(0, 0, 0,
0.85);
}
.ant-table-cell
{
text-align:
center;
.ant-table-cell
{
text-align:
center;
overflow: hidden;
// text-overflow:ellipsis;
white-space: nowrap;
}
.ant-table-body
{
height:
calc(100vh - 210px);
.ant-table-body
{
height:
calc(100vh - 210px);
border-right: white;
overflow: auto !important;
}
.clickRowStyle
{
.clickRowStyle
{
background: #cfe7fd;
}
.ant-pagination
{
.ant-pagination
{
z-index: 999;
border-top: 1px solid #f0eded;
}
}
}
}
.ant-modal-root{
.ant-tree-switcher
{
.ant-modal-root
{
.ant-tree-switcher
{
line-height: 1;
color:#1890FF
;
color: #1890ff
;
margin-right: 0px !important;
}
.ant-checkbox-group .ant-checkbox-group-item {
margin-right: 0px !important;
min-width: 27
0px !important;
min-width: 20
0px !important;
}
.ant-tree-list-holder
{
.ant-tree-list-holder
{
overflow: auto;
overflow-x:
hidden;
overflow-x:
hidden;
height: 40vh;
}
.ant-tabs-content-holder
{
.ant-tabs-content-holder
{
overflow: auto;
height: 50vh;
}
}
.ant-modal-content{
.ant-modal-content
{
border-radius: 5px;
}
.ant-modal-header{
.ant-modal-header
{
border-radius: 5px 5px 0 0;
padding: 28px 40px;
}
.ant-modal-close{
top:
14px;
right:
20px;
.ant-modal-close
{
top:
14px;
right:
20px;
}
.ant-modal-footer{
border:
none;
.ant-modal-footer
{
border:
none;
padding: 28px 40px;
}
.ant-modal-footer .ant-btn + .ant-btn:not(.ant-dropdown-trigger) {
...
...
@@ -241,7 +240,7 @@
// .ant-form-horizontal .ant-form-item-control {
// margin-left: 10px;
// }
.linkDrowp{
.linkDrowp
{
position: absolute;
top: 0;
left: 94.6%;
...
...
@@ -250,56 +249,54 @@
display: flex;
align-items: center;
}
.title{
.title
{
display: flex;
align-items: center;
width: 100%;
}
.tip
{
}
.tip
{
display: none;
}
.fs
{
}
.fs
{
font-size: 18px;
margin-left: 10px;
}
.title:hover
{
.tip
{
}
.title:hover
{
.tip
{
display: flex;
align-items: center;
justify-content: flex-end;
width: 100%;
}
}
.titleText
{
}
.titleText
{
width: 12rem;
overflow:
hidden;
white-space:
nowrap;
text-overflow:
ellipsis;
}
.ant-popover-inner {
overflow:
hidden;
white-space:
nowrap;
text-overflow:
ellipsis;
}
.ant-popover-inner {
border-radius: 10px;
background-color: rgba(255, 255, 255, 0.788);
}
.ant-popover-inner-content {
}
.ant-popover-inner-content {
padding: 10px 10px;
}
.ant-popover-message > .anticon {
top: 7.0005px
top: 7.0005px;
}
.listCard{
.listCard
{
display: flex;
.cardItem
{
.cardItem
{
padding: 0.5rem;
}
.cardContent
{
.cardContent
{
height: 30rem;
overflow-y: scroll;
width: 19.5rem;
}
.cardItemData
{
.cardItemData
{
padding: 1rem;
border: 1px solid #b5b8c8;
margin-bottom: 1rem;
...
...
@@ -307,9 +304,9 @@
}
.sortable-ghost {
border-bottom: 2px dashed #1890ff;
}
}
.doctorTable {
.doctorTable {
margin-bottom: 16px;
table {
width: 100%;
...
...
@@ -320,28 +317,29 @@
thead {
tr {
font-weight: 600;
background: #FAFAFA;
}
background: #fafafa;
}
tbody{
tr:hover{
background-color:#ededed ;
}
tbody {
tr:hover {
background-color: #ededed;
}
}
}
.formData{
}
.formData {
height: calc(100vh - 170px);
overflow-y: scroll;
padding-right: 20px;
.ant-form-item-label > label.ant-form-item-required:not(.ant-form-item-required-mark-optional)::before{
.ant-form-item-label
> label.ant-form-item-required:not(.ant-form-item-required-mark-optional)::before {
display: none;
}
.formData_label
{
.formData_label
{
display: flex;
align-items: center;
}
.filed_listItem
{
.filed_listItem
{
display: flex;
height: 3.6rem;
.ant-btn-icon-only {
...
...
src/pages/platformCenter/videoManager/index.js
View file @
a6cba482
/* eslint-disable react-hooks/rules-of-hooks */
/* eslint-disable default-case */
/* eslint-disable react/jsx-no-undef */
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
{
Row
,
...
...
@@ -404,7 +407,7 @@ const videoManager = () => {
rowKey
=
{
record
=>
record
.
Id
}
columns
=
{
columns
}
dataSource
=
{
tableData
}
scroll
=
{{
y
:
'calc(100vh - 210px)'
}}
scroll
=
{{
y
:
'calc(100vh - 210px)'
,
x
:
'max-content'
}}
onRow
=
{
record
=>
({
onDoubleClick
:
event
=>
{
event
.
stopPropagation
();
...
...
src/pages/userCenter/siteManageV2/siteManage.less
View file @
a6cba482
...
...
@@ -42,12 +42,12 @@
line-height: 1;
}
.ant-dropdown-menu-item
>
.anticon:first-child {
.ant-dropdown-menu-item
>
.anticon:first-child {
vertical-align: 0.15em !important;
}
.ant-table-tbody {
.ant-table-row:hover
>
td {
.ant-table-row:hover
>
td {
background: #aed8fa !important;
}
}
...
...
@@ -87,10 +87,10 @@
}
.siteManageContainer {
.ant-card-body{
.ant-card-body
{
padding: 15px;
}
.ant-spin-container{
.ant-spin-container
{
overflow-y: scroll;
height: calc(100vh - 410px);
}
...
...
@@ -112,7 +112,7 @@
}
.ant-tree-treenode:hover {
.iconWraper1
>
span {
.iconWraper1
>
span {
margin-left: 12px;
font-size: 18px;
display: inline-block;
...
...
@@ -142,7 +142,7 @@
.ant-tree-switcher {
line-height: 1;
margin-right: 0px !important;
color: #1890
FF
;
color: #1890
ff
;
.ant-tree-switcher-line-icon {
margin-left: 5px;
...
...
@@ -154,7 +154,7 @@
display: block;
position: absolute;
font-size: 18px;
color: #1890
FF
!important;
color: #1890
ff
!important;
top: 45%;
right: 2px;
transform: translate(0%, -50%);
...
...
@@ -238,7 +238,6 @@
}
}
//机构编辑面板
.boxR {
width: 100%;
...
...
@@ -250,11 +249,9 @@
min-height: calc(100vh - 210px);
max-height: calc(100vh - 210px);
min-width: 600px;
}
.siteCheckbox .ant-collapse-content>.ant-collapse-content-box {
.siteCheckbox .ant-collapse-content > .ant-collapse-content-box {
padding: 16px 16px 0;
}
...
...
@@ -301,8 +298,8 @@
overflow: auto;
}
.sitePanel .ant-checkbox-wrapper
+
.ant-checkbox-wrapper {
margin: 0
.sitePanel .ant-checkbox-wrapper
+
.ant-checkbox-wrapper {
margin: 0
;
}
.siteIcon {
...
...
@@ -315,7 +312,7 @@
}
.siteColor {
color: #f00
color: #f00
;
}
.siteCommit {
...
...
@@ -326,7 +323,7 @@
border: 1px solid #f5f5f5;
max-height: 120px;
overflow: auto;
margin-bottom:20px;
margin-bottom:
20px;
.siteSelectUl {
margin: 0;
...
...
@@ -338,9 +335,10 @@
li {
height: 35px;
line-height: 35px;
background: rgba(24, 144, 255, 0.16) url('../../../assets/images/icons/close.png') no-repeat 170px;
background: rgba(24, 144, 255, 0.16)
url('../../../assets/images/icons/close.png') no-repeat 170px;
background-size: 20px;
background-position:center right;
background-position:
center right;
margin: 0 10px 10px 0;
cursor: pointer;
overflow: hidden;
...
...
@@ -352,8 +350,6 @@
}
.siteline {
}
.siteBtn {
...
...
@@ -367,13 +363,13 @@
.ant-modal-root {
.ant-tree-switcher {
line-height: 1;
color: #1890
FF
;
color: #1890
ff
;
margin-right: 0px !important;
}
.ant-checkbox-group .ant-checkbox-group-item {
margin-right: 0px !important;
min-width: 2
7
0px !important;
min-width: 2
0
0px !important;
}
.ant-tree-list-holder {
...
...
@@ -387,35 +383,35 @@
height: 50vh;
}
}
.title{
.title
{
display: flex;
align-items: center;
width: 100%;
}
.tip{
.tip
{
display: none;
}
.title:hover{
.tip{
.title:hover
{
.tip
{
display: flex;
align-items: center;
justify-content: flex-end;
width: 100%;
}
}
.titleText{
.titleText
{
width: 12rem;
overflow:hidden;
white-space:nowrap;
text-overflow:ellipsis;
overflow:
hidden;
white-space:
nowrap;
text-overflow:
ellipsis;
}
.fs{
.fs
{
font-size: 18px;
margin-left: 10px;
}
.titleTop{
.titleTop
{
width: 12rem;
overflow:hidden;
white-space:nowrap;
text-overflow:ellipsis;
overflow:
hidden;
white-space:
nowrap;
text-overflow:
ellipsis;
}
src/pages/userCenter/userManage/EditOrgModal.jsx
View file @
a6cba482
...
...
@@ -31,7 +31,7 @@ const EditOrgModal = props => {
''
,
)
.
then
(
res
=>
{
if
(
res
.
msg
===
''
)
{
if
(
res
.
code
===
0
)
{
onCancel
();
notification
.
success
({
message
:
'提交成功'
,
...
...
@@ -44,7 +44,7 @@ const EditOrgModal = props => {
}
else
{
notification
.
error
({
message
:
'提交失败'
,
description
:
res
.
m
essage
,
description
:
res
.
m
sg
,
});
}
})
...
...
src/pages/userCenter/userManage/UserManage.js
View file @
a6cba482
/* eslint-disable eqeqeq */
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
{
// Tree,
...
...
@@ -47,6 +48,7 @@ import {
getOneOUUserListNew
,
getUserRelationList
,
getUserTree
,
// eslint-disable-next-line import/named
deleteUser
as
postDeleteUser
,
setUserState
as
postSetUserState
,
multiDeleteUsers
,
...
...
@@ -56,16 +58,10 @@ import {
GetOUTreeNew
,
GetUserRelationListNew
,
GetUserByKeyNew
,
AddUserNew
,
AddOUNew
,
EditOneOUInfoNew
,
EditUserNew
,
UserStateOUNew
,
DeleteOUNew
,
SetUserRelationListNew
,
JumpToAnotherOUNew
,
DeleteUserNew
,
loadAllUserRole
loadAllUserRole
,
}
from
'@/services/userCenter/userManage/api'
;
import
{
AddUserAuthSetting
,
GetUserAuthSet
}
from
'@/services/database/api'
;
import
Tree
from
'@/components/ExpendableTree'
;
...
...
@@ -134,9 +130,9 @@ const UserManage = () => {
const
[
newOrgID
,
setNewOrgID
]
=
useState
();
// 更改机构新选择的ID
const
[
currentUser
,
setCurrentUser
]
=
useState
({});
// 当前用户
const
[
mult
,
setMult
]
=
useState
(
''
)
//
判断是否是批量关联
const
[
multiRoleList
,
setMultiRoleList
]
=
useState
([])
const
[
multistationList
,
setMultiStationList
]
=
useState
([])
const
[
mult
,
setMult
]
=
useState
(
''
)
;
//
判断是否是批量关联
const
[
multiRoleList
,
setMultiRoleList
]
=
useState
([])
;
const
[
multistationList
,
setMultiStationList
]
=
useState
([])
;
const
[
userIDs
,
setUserIDs
]
=
useState
(
''
);
// 批量删除的用户
const
[
orgIDs
,
setOrgIDs
]
=
useState
(
''
);
// 批量操作的机构
const
[
multiDelete
,
setMultiDelete
]
=
useState
(
false
);
// 是否批量删除用户
...
...
@@ -391,7 +387,7 @@ const UserManage = () => {
selectedRowKeys
,
onChange
:
(
RowKeys
,
Rows
)
=>
{
setSelectedRowKeys
(
RowKeys
);
getCheckList
(
RowKeys
)
getCheckList
(
RowKeys
)
;
setUserIDs
(
RowKeys
.
toString
());
// 数组转字符串,逗号连接
setOrgIDs
(
Rows
.
map
(
item
=>
item
.
OUID
).
toString
());
// 选中行数大于0时设置批量操作可行
...
...
@@ -414,7 +410,7 @@ const UserManage = () => {
<
span
className
=
{
styles
.
titleText
}
>
{
org
.
text
}
<
/span
>
<
span
className
=
{
styles
.
tip1
}
>
<
Tooltip
title
=
""
className
=
{
styles
.
fs1
}
>
<
Dropdown
overlay
=
{
orgButtonMenu
}
>
<
Dropdown
overlay
=
{
orgButtonMenu
}
>
<
PlusOutlined
style
=
{{
marginLeft
:
20
}}
onClick
=
{
e
=>
e
.
stopPropagation
()}
...
...
@@ -427,7 +423,7 @@ const UserManage = () => {
<
/Dropdown
>
<
/Tooltip
>
<
Dropdown
overlay
=
{
orgButtonMenu1
}
>
<
Dropdown
overlay
=
{
orgButtonMenu1
}
>
<
EllipsisOutlined
style
=
{{
marginLeft
:
10
,
fontSize
:
'20px'
}}
onClick
=
{
e
=>
e
.
stopPropagation
()}
...
...
@@ -533,10 +529,10 @@ const UserManage = () => {
const
onSelect
=
(
props
,
e
)
=>
{
console
.
log
(
e
);
console
.
log
(
props
);
console
.
log
(
props
[
0
])
console
.
log
(
props
[
0
].
id
)
if
(
props
[
0
].
id
!=
undefined
)
{
props
[
0
]
=
props
[
0
].
id
console
.
log
(
props
[
0
])
;
console
.
log
(
props
[
0
].
id
)
;
if
(
props
[
0
].
id
!==
undefined
)
{
props
[
0
]
=
props
[
0
].
id
;
}
setKeep1
(
props
);
console
.
log
(
keep1
);
...
...
@@ -563,11 +559,10 @@ const UserManage = () => {
}).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
console
.
log
(
res
);
if
(
res
.
code
.
MapRange
!=
null
)
{
if
(
res
.
code
.
MapRange
!=
null
)
{
setCurrentOrgArea
(
res
.
data
.
MapRange
);
setCurrentOrgDistinct
(
res
.
data
.
AreeName
);
}
}
});
setOrgID
(
props
[
0
]
||
currentSelectOrg
);
...
...
@@ -689,7 +684,7 @@ const UserManage = () => {
/** ***用户批量操作****** */
// 关联角色
const
relateRoles
=
()
=>
{
setMult
(
'Yes'
)
setMult
(
'Yes'
)
;
getEmptyRoleList
();
// getCheckList()
setRoleVisible
(
true
);
...
...
@@ -710,9 +705,9 @@ const UserManage = () => {
// 关联角色
const
relateRole
=
record
=>
{
// getEmptyRoleList(record.userID);
setMult
(
'No'
)
console
.
log
(
record
)
getRoleList
(
record
)
setMult
(
'No'
)
;
console
.
log
(
record
)
;
getRoleList
(
record
)
;
setRoleVisible
(
true
);
setCurrentUser
(
record
);
setSelectColor
(
record
);
...
...
@@ -823,7 +818,7 @@ const UserManage = () => {
GetUserAuthSet
({
UserId
:
record
.
userID
,
}).
then
(
res
=>
{
if
(
res
.
code
==
0
)
{
if
(
res
.
code
==
=
0
)
{
setSelctValue
(
res
.
data
);
console
.
log
(
res
.
data
);
}
...
...
@@ -917,16 +912,16 @@ const UserManage = () => {
// });
GetUserRelationListNew
({
userID
:
e
.
userID
})
.
then
(
res
=>
{
console
.
log
(
111
)
console
.
log
(
111
)
;
if
(
res
.
code
===
0
)
{
const
{
roleList
,
stationList
}
=
res
.
data
;
console
.
log
(
roleList
)
console
.
log
(
roleList
)
;
setRolelist
(
roleList
);
setStationlist
(
stationList
);
setLoading
(
false
);
}
else
{
console
.
log
(
res
)
console
.
log
(
res
)
;
setLoading
(
false
);
}
})
...
...
@@ -958,16 +953,16 @@ const UserManage = () => {
// setTableLoading(false);
// message.error(err);
// });
GetUserRelationListNew
({
userID
:
0
})
GetUserRelationListNew
({
userID
:
0
})
.
then
(
res
=>
{
console
.
log
(
222
)
console
.
log
(
222
)
;
if
(
res
.
code
===
0
)
{
const
{
roleList
,
stationList
}
=
res
.
data
;
setRolelist
(
roleList
);
setStationlist
(
stationList
);
setLoading
(
false
);
}
else
{
console
.
log
(
res
.
msg
)
console
.
log
(
res
.
msg
)
;
setLoading
(
false
);
}
})
...
...
@@ -978,29 +973,30 @@ const UserManage = () => {
});
};
const
getCheckList
=
e
=>
{
let
aa
=
[]
let
bb
=
[]
loadAllUserRole
(
e
).
then
(
res
=>
{
if
(
res
.
code
===
0
){
if
(
res
.
data
.
roleList
!=
undefined
){
Object
.
keys
(
res
.
data
.
roleList
).
map
((
item
,
index
)
=>
{
aa
.
push
(
item
)
})
}
if
(
res
.
data
.
siteList
!=
undefined
){
Object
.
keys
(
res
.
data
.
siteList
).
map
((
item1
,
index1
)
=>
{
bb
.
push
(
item1
)
})
const
getCheckList
=
e
=>
{
let
aa
=
[];
let
bb
=
[];
loadAllUserRole
(
e
).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
if
(
res
.
data
.
roleList
!==
undefined
)
{
// eslint-disable-next-line array-callback-return
Object
.
keys
(
res
.
data
.
roleList
).
map
((
item
,
index
)
=>
{
aa
.
push
(
item
);
});
}
console
.
log
(
aa
)
console
.
log
(
bb
)
setMultiRoleList
(
aa
)
setMultiStationList
(
bb
)
if
(
res
.
data
.
siteList
!==
undefined
)
{
// eslint-disable-next-line array-callback-return
Object
.
keys
(
res
.
data
.
siteList
).
map
((
item1
,
index1
)
=>
{
bb
.
push
(
item1
);
});
}
})
console
.
log
(
aa
);
console
.
log
(
bb
);
setMultiRoleList
(
aa
);
setMultiStationList
(
bb
);
}
});
};
// 提交-更改机构
const
submitChangeOrg
=
()
=>
{
// addToOrg(currentUser.userID, currentUser.OUID, newOrgID)
...
...
@@ -1246,16 +1242,15 @@ const UserManage = () => {
setTreeLoading
(
true
);
console
.
log
(
extent
);
console
.
log
(
areaName
);
console
.
log
(
flag
)
console
.
log
(
flag
)
;
console
.
log
(
currentSelectOrg1
);
if
(
flag
==
0
)
{
if
(
flag
===
0
)
{
setTreeLoading
(
false
);
notification
.
warn
({
message
:
'提交失败'
,
description
:
'请框选范围'
,
});
}
else
{
if
(
extent
)
{
}
else
if
(
extent
)
{
setOrgArea
({
OUID
:
currentSelectOrg1
,
areaName
,
...
...
@@ -1273,7 +1268,6 @@ const UserManage = () => {
}
});
}
}
};
const
addChange
=
e
=>
{
...
...
@@ -1467,7 +1461,7 @@ const UserManage = () => {
visible
=
{
userVisible
}
orgID
=
{
orgID
}
onCancel
=
{
kee
}
onSelect
=
{()
=>
onSelect
([
orgID
])}
onSelect
=
{()
=>
onSelect
([
orgID
])}
/
>
{
/* 添加下级机构 */
}
<
AddSubOrgModal
...
...
@@ -1491,7 +1485,7 @@ const UserManage = () => {
/
>
{
/* 删除机构 */
}
<
DeleteOrgModal
title
=
'删除机构'
title
=
"删除机构"
visible
=
{
deleteOrgVisible
}
orgTitle
=
{
orgTitle1
}
orgID
=
{
orgID
}
...
...
src/pages/userCenter/userManage/UserManage.less
View file @
a6cba482
:global{
:global
{
::-webkit-scrollbar {
height: 6px;
//x轴滚动条粗细
width:6px;
//y轴滚动条粗细
height: 6px;
//x轴滚动条粗细
width: 6px;
//y轴滚动条粗细
border-bottom: 2px solid white;
}
...
...
@@ -16,14 +16,14 @@
::-webkit-scrollbar-track {
box-shadow: 0;
border-radius: 0;
background: white;
//滚动槽背景色
border-radius: 10px;
//滚动条边框半径设置
background: white;
//滚动槽背景色
border-radius: 10px;
//滚动条边框半径设置
}
.ant-tree-node-content-wrapper
{
width:
100%;
.ant-tree-node-content-wrapper
{
width:
100%;
overflow: hidden !important;
.ant-tree-title
{
.ant-tree-title
{
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
...
...
@@ -31,27 +31,28 @@
justify-content: space-between;
}
}
.ant-pagination-prev,.ant-pagination-next{
.ant-pagination-prev,
.ant-pagination-next {
line-height: 8px !important;
}
.ant-input-search-button
{
.ant-input-search-button
{
line-height: 1;
}
.ant-dropdown-menu-item > .anticon:first-child {
vertical-align: 0.15em !important;
}
.ant-table-tbody
{
.ant-table-row:hover>td
{
.ant-table-tbody
{
.ant-table-row:hover > td
{
background: #aed8fa !important;
}
}
.ant-modal-close-icon {
vertical-align: 0.3em;
}
.ant-notification-close-icon
{
.ant-notification-close-icon
{
vertical-align: 0.2em;
}
.ant-tree-switcher-icon svg
{
.ant-tree-switcher-icon svg
{
font-size: 14px;
color: #767777 !important;
}
...
...
@@ -59,43 +60,44 @@
padding: 12px 24px 24px 10px;
}
}
.redText{
.redText
{
color: red;
cursor: pointer;
}
.ant-layout{
.ant-layout
{
overflow: auto;
.ant-layout-content
{
margin:
12px !important;
.ant-layout-content
{
margin:
12px !important;
}
}
.ant-btn > .anticon + span, .ant-btn > span + .anticon {
.ant-btn > .anticon + span,
.ant-btn > span + .anticon {
margin-left: 8px;
vertical-align: middle;
}
.siteTitle{
.siteTitle
{
font-size: 16px;
margin: 0 0 6px 0;
user-select: none;
padding: 3px;
border-bottom: 1px solid #ccc;
}
.userManageContainer{
.ant-modal-footer
{
border:
none;
.userManageContainer
{
.ant-modal-footer
{
border:
none;
padding: 28px 40px;
}
.ant-form-item {
vertical-align: top;
}
.ant-form-item-label > label {
align-items:
middle;
align-items:
middle;
}
.ant-modal-body
{
padding-bottom:
0px;
padding-right:
40px;
padding-left:
40px;
.ant-form
{
.ant-modal-body
{
padding-bottom:
0px;
padding-right:
40px;
padding-left:
40px;
.ant-form
{
width: 90%;
}
}
...
...
@@ -108,22 +110,22 @@
color: rgba(0, 0, 0, 0.85);
font-size: 14px;
}
.ant-tree-treenode
{
.ant-tree-treenode
{
width: 100% !important;
.ant-tree-node-content-wrapper
{
.ant-tree-node-content-wrapper
{
display: inline-block;
width: 100%;
}
.iconWraper1
{
.iconWraper1
{
float: right;
span
{
span
{
display: none;
}
}
}
.ant-tree-treenode:hover
{
.iconWraper1>span
{
.ant-tree-treenode:hover
{
.iconWraper1 > span
{
margin-left: 12px;
font-size: 18px;
display: inline-block;
...
...
@@ -132,14 +134,14 @@
.ant-radio-group {
margin: 0px !important;
}
.contentContainer
{
.contentContainer
{
display: flex;
width: 100%;
position: relative;
.ant-table.ant-table-bordered > .ant-table-container {
min-width: calc(100vw - 582px);
}
.orgContainer
{
.orgContainer
{
height: calc(100vh - 74px);
width: 340px;
left: 0;
...
...
@@ -147,33 +149,33 @@
overflow-x: hidden;
margin-right: 10px;
position: relative;
transition-property:width,
left;
transition-property: width,
left;
transition-duration: 0.5s;
white-space: nowrap;
.ant-tree
{
.ant-tree
{
padding-top: 6px;
.ant-tree-switcher
{
.ant-tree-switcher
{
line-height: 1;
margin-right: 0px !important;
color:#1890FF
;
.ant-tree-switcher-line-icon
{
color: #1890ff
;
.ant-tree-switcher-line-icon
{
margin-left: 5px;
}
}
}
.switcher
{
.switcher
{
display: block;
position: absolute;
font-size: 18px;
color: #1890FF
!important;
color: #1890ff
!important;
top: 50%;
right: 2px;
transform: translate(0%,
-50%);
transform: translate(0%,
-50%);
z-index: 1;
}
}
.orgContainerHide
{
.orgContainerHide
{
// transform: translateX(-230px);
left: 0px;
top: 0;
...
...
@@ -182,33 +184,33 @@
.ant-popover-message-title {
padding-left: 20px;
}
.title1
{
.title1
{
display: flex;
align-items: center;
width: 100%;
}
.tip1
{
.tip1
{
display: none;
}
.fs1
{
.fs1
{
font-size: 18px;
margin-left: 10px;
}
.title1:hover
{
.tip1
{
.title1:hover
{
.tip1
{
display: flex;
align-items: center;
justify-content: flex-end;
width: 100%;
}
}
.titleText
{
.titleText
{
width: 12rem;
overflow:
hidden;
white-space:
nowrap;
text-overflow:
ellipsis;
overflow:
hidden;
white-space:
nowrap;
text-overflow:
ellipsis;
}
.userContainer
{
.userContainer
{
height: calc(100vh - 74px) !important;
z-index: 999;
min-width: 800px;
...
...
@@ -216,87 +218,87 @@
width: 100%;
position: relative;
transition: width 0.5s;
.title
{
.title
{
margin: 16px 0 10px 16px;
display: inline-block;
// width: 270px;
cursor: pointer;
overflow: hidden;
text-overflow:
ellipsis;
text-overflow:
ellipsis;
white-space: nowrap;
}
.ant-table-pagination
{
.ant-table-pagination
{
padding-right: 12px;
background: white;
margin: 1px 0;
padding: 8px;
padding-right: 20px;
}
.ant-btn
{
.ant-btn
{
margin: 0px 10px;
.ant-btn-primary
{
.ant-btn-primary
{
background: #50aefc;
}
}
.ant-input-search-button
{
.ant-input-search-button
{
margin-left: 0px !important;
}
.ant-table-thead tr th
{
.ant-table-thead tr th
{
font-weight: 600;
color:rgba(0,0,0,
0.85);
color: rgba(0, 0, 0,
0.85);
}
.ant-table-cell
{
text-align:
center;
.ant-table-cell
{
text-align:
center;
overflow: hidden;
// text-overflow:ellipsis;
white-space: nowrap;
}
.ant-table-body
{
height:
calc(100vh - 210px);
.ant-table-body
{
height:
calc(100vh - 210px);
border-right: white;
overflow: auto !important;
}
.clickRowStyle
{
.clickRowStyle
{
background: #cfe7fd;
}
.ant-pagination
{
.ant-pagination
{
z-index: 999;
border-top: 1px solid #f0eded;
}
}
}
}
.ant-modal-root{
.ant-tree-switcher{
.ant-modal-root {
.ant-tree-switcher {
line-height: 1;
color:#1890FF
;
color: #1890ff
;
margin-right: 0px !important;
}
.ant-checkbox-group .ant-checkbox-group-item {
margin-right: 0px !important;
min-width: 27
0px !important;
min-width: 20
0px !important;
}
.ant-tree-list-holder{
.ant-tree-list-holder
{
overflow: auto;
overflow-x:
hidden;
overflow-x:
hidden;
height: 40vh;
}
.ant-tabs-content-holder{
.ant-tabs-content-holder
{
overflow: auto;
height: 50vh;
}
}
}
.ant-modal-content{
.ant-modal-content
{
border-radius: 5px;
}
.ant-modal-header{
.ant-modal-header
{
border-radius: 5px 5px 0 0;
padding: 28px 40px;
}
.ant-modal-close{
top:
14px;
right:
20px;
.ant-modal-close
{
top:
14px;
right:
20px;
}
.ant-modal-footer .ant-btn + .ant-btn:not(.ant-dropdown-trigger) {
...
...
@@ -307,22 +309,18 @@
// margin-left: 10px;
// }
.ant-popover-inner {
.ant-popover-inner {
border-radius: 10px;
background-color: rgba(255, 255, 255, 0.788);
}
.ant-popover-inner-content {
}
.ant-popover-inner-content {
padding: 10px 10px;
}
.ant-popover-message > .anticon {
top: 7.0005px
top: 7.0005px;
}
// .ant-tree {
// overflow-y: scroll;
// height: calc(100vh - 150px);
// }
src/pages/webConfig/menuconfig/webMenu.jsx
View file @
a6cba482
/* eslint-disable array-callback-return */
/* eslint-disable no-plusplus */
/* eslint-disable consistent-return */
import
React
,
{
useEffect
,
useState
}
from
'react'
;
import
{
notification
,
Tooltip
,
Modal
,
Spin
,
Empty
}
from
'antd'
;
import
Tree
from
'@/components/ExpendableTree'
;
...
...
@@ -396,6 +399,7 @@ const MiniMenu = props => {
};
// 树的拖动
const
handleDrop
=
infos
=>
{
console
.
log
(
infos
);
const
dropKey
=
infos
.
node
.
key
;
const
dragKey
=
infos
.
dragNode
.
key
;
const
dropPos
=
infos
.
node
.
pos
.
split
(
'-'
);
...
...
src/routes/config.js
View file @
a6cba482
/* eslint-disable import/no-unresolved */
import
React
from
'react'
;
import
{
DatabaseOutlined
,
...
...
src/services/userCenter/userManage/api.js
View file @
a6cba482
...
...
@@ -100,7 +100,7 @@ export const addToOrgs = (userIDs, orgIDs, newOrgID) =>
export
const
updateUserPassword
=
params
=>
post
(
`
${
PUBLISH_SERVICE
}
/UserCenter/UpdateUserPassword`
,
params
);
//批量获取用户角色和机构
//
批量获取用户角色和机构
export
const
loadAllUserRole
=
params
=>
post
(
`
${
PUBLISH_SERVICE
}
/UserCenter/LoadAllUserRole`
,
params
);
...
...
@@ -143,7 +143,7 @@ export const setUserRelation = (userID, roleList = [], stationList) =>
},
);
export
const
SetUserRelationList
=
(
userID
,
roleList
=
[],
stationList
)
=>
post
(
`
${
PUBLISH_SERVICE
}
/UserCenter/SetUserRelationList`
,{
post
(
`
${
PUBLISH_SERVICE
}
/UserCenter/SetUserRelationList`
,
{
userID
,
roleList
:
roleList
.
length
?
`
${
roleList
.
join
(
','
)}
,`
:
''
,
stationList
:
stationList
.
length
?
`
${
stationList
.
join
(
','
)}
,`
:
''
,
...
...
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