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