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
278df086
Commit
278df086
authored
Feb 08, 2023
by
邓超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 优化事件
parent
3334c5c6
Pipeline
#67167
canceled with stages
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
99 additions
and
83 deletions
+99
-83
AddFlowsModal.jsx
src/pages/bsmanager/workOrder/incident/AddFlowsModal.jsx
+47
-35
AddModal.jsx
src/pages/bsmanager/workOrder/incident/AddModal.jsx
+13
-11
incidentFlow.jsx
src/pages/bsmanager/workOrder/incident/incidentFlow.jsx
+9
-27
WorkflowHomePage.jsx
...ges/bsmanager/workOrder/workflowEdit/WorkflowHomePage.jsx
+27
-7
Order.jsx
...nager/workOrder/workflowEdit/workFlowComponents/Order.jsx
+3
-3
No files found.
src/pages/bsmanager/workOrder/incident/AddFlowsModal.jsx
View file @
278df086
...
...
@@ -20,8 +20,9 @@ import {
Drawer
,
Space
,
Button
,
Tooltip
,
}
from
'antd'
;
import
{
PlusOutlined
}
from
'@ant-design/icons'
;
import
{
PlusOutlined
,
InfoCircleOutlined
}
from
'@ant-design/icons'
;
import
ChangeAddFlows
from
'./ChangeAddFlows'
;
import
RMSComponents
from
'@/components/RolePmSite/index'
;
import
{
...
...
@@ -65,12 +66,30 @@ const AddFlowsModal = props => {
useEffect
(()
=>
{
getRole
();
CM_Event_ReloadFlows
({
eventTypeId
:
obj
}).
then
(
res
=>
{
if
(
res
.
msg
===
'Ok'
)
{
if
(
res
.
code
===
0
)
{
res
.
data
.
forEach
(
item
=>
{
item
.
System
=
item
.
System
.
split
(
'
\
\'
)[0];
});
console.log(res.data);
let arr = formateArrDataA(res.data, '
System
');
let
newArr
=
[];
Object
.
keys
(
arr
).
map
((
item
,
index
)
=>
{
newArr
.
push
(
item
);
console.log(arr, '
arr
');
let newArr = Object.keys(arr).map((item, index) => {
// newArr.push(item);
arr[item].sort((a, b) => b.IsOptional - a.IsOptional);
return {
label: item,
options: arr[item].map(ele => ({
label: ele.FlowName,
value: ele.FlowName,
disabled: !ele.IsOptional,
})),
};
});
// Object.keys(arr).map((item, index) => {
// newArr.push(arr[item]);
// });
console.log(newArr, '
newArr
');
setStandingTable(newArr);
}
});
...
...
@@ -363,38 +382,31 @@ const AddFlowsModal = props => {
<Form form={form} labelCol={{ span: 7 }} style={{ overflowY: '
scroll
' }}>
<Row>
<Col span={24}>
{type === '
edit
' ? (
<>
<Item label="受理流程" name="FlowName" labelCol={{ span: 4 }}>
<Select placeholder="选择受理流程" placeholder={selectValue} disabled>
{standingTable
? standingTable.map((item, index) => (
<Option key={index} value={item}>
{item}
</Option>
))
: ''}
</Select>
</Item>
</>
) : (
<>
<Item label="受理流程" name="FlowName" labelCol={{ span: 4 }}>
<Select placeholder="选择受理流程">
{standingTable
? standingTable.map((item, index) => (
<Option key={index} value={item}>
{item}
</Option>
))
: ''}
</Select>
</Item>
</>
)}
<Item
label={
<div style={{ display: '
flex
', alignItems: '
center
' }}>
<Tooltip title="若存在不可用流程,请检查流程配置">
<InfoCircleOutlined
style={{
color: '
#
1890
ff
',
}}
/>
</Tooltip>
<span>受理流程</span>
</div>
}
name="FlowName"
labelCol={{ span: 5 }}
>
<Select
options={standingTable}
placeholder="选择受理流程"
disabled={type === '
edit
'}
/>
</Item>
</Col>
<Col span={24}>
<Item label="受理权限" name="Roles" labelCol={{ span:
4
}}>
<Item label="受理权限" name="Roles" labelCol={{ span:
5
}}>
<div style={{ display: '
flex
', alignContent: '
flex
-
start
' }}>
<TextArea
style={{ width: '
83
%
' }}
...
...
src/pages/bsmanager/workOrder/incident/AddModal.jsx
View file @
278df086
...
...
@@ -495,6 +495,7 @@ const AddModal = props => {
const
[
previewModal
,
setPreviewModal
]
=
useState
(
false
);
const
[
show
,
setShow
]
=
useState
(
'hidden'
);
const
[
visibleChecked
,
setVisibleChecked
]
=
useState
(
false
);
const
[
initWay
,
setInitWay
]
=
useState
();
// 初始上报方式
const
onSubmit
=
()
=>
{
form
.
validateFields
().
then
(
validate
=>
{
if
(
validate
)
{
...
...
@@ -713,6 +714,7 @@ const AddModal = props => {
}
setFlag
(
0
);
}
else
if
(
type
==
'edit'
||
type
==
'add'
)
{
setInitWay
(
null
);
setEditable
(
false
);
setReportFromMobile
(
false
);
setReportFromWeb
(
false
);
...
...
@@ -1525,27 +1527,27 @@ const AddModal = props => {
</
Select
>
</
Item
>
</
Col
>
</
Row
>
<
Item
style=
{
{
marginBottom
:
'0px'
}
}
>
<
span
style=
{
{
marginLeft
:
'112px'
}
}
>
客户端上报(需配置事件权限、受理流程)
</
span
>
</
Item
>
<
div
style=
{
{
display
:
'inline-block'
,
marginLeft
:
'112px'
,
marginRight
:
'50px'
}
}
>
</
Row
>
<
Item
style=
{
{
marginBottom
:
'0px'
}
}
>
<
span
style=
{
{
marginLeft
:
'112px'
}
}
>
客户端上报(需配置事件权限、受理流程)
</
span
>
</
Item
>
<
div
style=
{
{
display
:
'inline-block'
,
marginLeft
:
'112px'
,
marginRight
:
'50px'
}
}
>
<
Item
name=
"ReportFromWeb"
>
<
Checkbox
onChange=
{
onChange3
}
checked=
{
ReportFromWeb
}
>
前端
</
Checkbox
>
</
Item
>
</
div
>
<
div
style=
{
{
display
:
'inline-block'
}
}
>
</
div
>
<
div
style=
{
{
display
:
'inline-block'
}
}
>
<
Item
name=
"ReportFromMobile"
>
<
Checkbox
onChange=
{
onChange4
}
checked=
{
ReportFromMobile
}
>
手持
</
Checkbox
>
</
Item
>
</
div
>
{
/* </Item> */
}
</
div
>
{
/* </Item> */
}
{
/* <Col span={5}>
{
/* <Col span={5}>
<Item />
</Col>
<Col span={19}>
...
...
@@ -1555,7 +1557,7 @@ const AddModal = props => {
</Checkbox>
</Item>
</Col> */
}
<
Row
>
<
Row
>
<
Col
span=
{
24
}
>
<
Item
label=
{
...
...
src/pages/bsmanager/workOrder/incident/incidentFlow.jsx
View file @
278df086
/* eslint-disable react-hooks/rules-of-hooks */
/* eslint-disable camelcase */
import
React
,
{
useEffect
,
useState
}
from
'react'
;
import
{
Modal
,
Table
,
Tooltip
,
notification
,
Space
,
Popconfirm
,
Spin
,
Button
,
}
from
'antd'
;
import
{
Modal
,
Table
,
Tooltip
,
notification
,
Space
,
Popconfirm
,
Spin
,
Button
}
from
'antd'
;
import
{
PlusSquareFilled
,
EditTwoTone
,
...
...
@@ -20,10 +11,7 @@ import {
}
from
'@ant-design/icons'
;
import
{
useHistory
}
from
'react-router-dom'
;
import
styles
from
'./incident.less'
;
import
{
GetCM_Event_LoadEvenFlows
,
CM_Event_RemoveEvenFlow
,
}
from
'@/services/standingBook/api'
;
import
{
GetCM_Event_LoadEvenFlows
,
CM_Event_RemoveEvenFlow
}
from
'@/services/standingBook/api'
;
import
AddFlowsModal
from
'./AddFlowsModal'
;
const
incidentFlow
=
props
=>
{
const
[
tableData
,
setTableData
]
=
useState
([]);
...
...
@@ -57,10 +45,7 @@ const incidentFlow = props => {
render
:
record
=>
(
<
Space
size=
"middle"
>
<
Tooltip
title=
"编辑用户"
>
<
EditTwoTone
onClick=
{
()
=>
editEventType
(
record
)
}
style=
{
{
fontSize
:
'16px'
}
}
/>
<
EditTwoTone
onClick=
{
()
=>
editEventType
(
record
)
}
style=
{
{
fontSize
:
'16px'
}
}
/>
</
Tooltip
>
<
Tooltip
title=
"删除"
>
<
Popconfirm
...
...
@@ -80,7 +65,7 @@ const incidentFlow = props => {
useEffect
(()
=>
{
console
.
log
(
props
);
console
.
log
(
props
.
location
.
state
.
title1
);
console
.
log
(
props
.
location
.
state
.
formObj
);
setTreeLoading
(
true
);
GetCM_Event_LoadEvenFlows
({
eventTypeId
:
props
.
location
.
state
.
formObj
.
ID
,
...
...
@@ -147,11 +132,12 @@ const incidentFlow = props => {
<
Spin
tip=
"loading..."
spinning=
{
treeLoading
}
>
<
div
className=
{
styles
.
containerBox
}
>
<
div
className=
{
styles
.
config
}
>
<
div
className=
{
styles
.
title
}
>
{
`${
props.location.state.title1
}受理流程和权限`
}
</
div
>
<
div
className=
{
styles
.
title
}
>
{
`${props.location.state.title1}受理流程和权限`
}
</
div
>
<
div
className=
{
styles
.
btn
}
>
<
Button
disabled=
{
props
.
location
.
state
.
formObj
.
createMode
===
'工单分派'
&&
tableData
.
length
>=
1
}
type=
"primary"
icon=
{
<
PlusSquareOutlined
/>
}
onClick=
{
()
=>
addIncident
()
}
...
...
@@ -159,11 +145,7 @@ const incidentFlow = props => {
新增
</
Button
>
<
Button
type=
"primary"
icon=
{
<
RollbackOutlined
/>
}
onClick=
{
()
=>
back
()
}
>
<
Button
type=
"primary"
icon=
{
<
RollbackOutlined
/>
}
onClick=
{
()
=>
back
()
}
>
返回
</
Button
>
</
div
>
...
...
src/pages/bsmanager/workOrder/workflowEdit/WorkflowHomePage.jsx
View file @
278df086
...
...
@@ -8,11 +8,13 @@ import {
DeleteOutlined
,
ExclamationCircleOutlined
,
HighlightOutlined
,
UnorderedListOutlined
,
}
from
'@ant-design/icons'
;
import
gsap
,
{
TweenMax
,
TimelineMax
,
ScrollToPlugin
}
from
'gsap/all'
;
import
FlowModal
from
'./workFlowComponents/FlowModal'
;
import
FlowGroupModal
from
'./workFlowComponents/FlowGroupModal'
;
import
Order
from
'./workFlowComponents/Order'
;
import
styles
from
'./WorkflowHomePage.less'
;
import
{
WFGetAllFlow
,
GetFlowNode
,
DeleteFlow
}
from
'@/services/workflow/workflow'
;
const
plugins
=
[
ScrollToPlugin
];
...
...
@@ -34,6 +36,7 @@ const WorkflowHomePage = () => {
const
[
visible
,
setVisible
]
=
useState
({
FlowModal
:
false
,
FlowGroupModal
:
false
,
order
:
false
,
});
// 弹窗显示
const
[
flag
,
setFlag
]
=
useState
(
0
);
const
activeKey
=
useRef
(
null
);
...
...
@@ -318,10 +321,16 @@ const WorkflowHomePage = () => {
</Tabs> */
}
</
div
>
</
div
>
{
/* <div className={styles.right} onClick={addFlowGroup}>
<div className={styles.icon} />
<div>新增分组</div>
</div> */
}
<
div
className=
{
styles
.
right
}
onClick=
{
()
=>
{
showModal
(
'order'
,
true
);
}
}
>
{
/* <div className={styles.icon} /> */
}
<
UnorderedListOutlined
style=
{
{
marginRight
:
'5px'
}
}
/>
<
div
>
流程排序
</
div
>
</
div
>
</
div
>
<
div
className=
{
styles
.
controlBox
}
>
<
div
className=
{
styles
.
left
}
>
...
...
@@ -414,9 +423,9 @@ const WorkflowHomePage = () => {
</
div
>
</
div
>
<
img
src=
{
`${
window.location.origin}/${
ele.PreviewImage
}
?v=${new Date().getTime()
}`
}
src=
{
`${
window.location.origin
}
/PandaOMS/OMS/FileCenter/DownLoadFiles?filePath=${ele.PreviewImage
}`
}
alt=
""
/>
</
div
>
...
...
@@ -454,6 +463,17 @@ const WorkflowHomePage = () => {
keep=
{
flowNames
}
onSubumit=
{
val
=>
groupCallBack
(
val
)
}
/>
{
/* 排序弹窗 */
}
<
Order
visible=
{
visible
.
order
}
processData=
{
flowList
}
handleCancel=
{
()
=>
showModal
(
'order'
,
false
)
}
submitCallBack=
{
()
=>
{
// activeKey.current = currentList[0];
showModal
(
'order'
,
false
);
getFlowList
();
}
}
/>
</
div
>
);
};
...
...
src/pages/bsmanager/workOrder/workflowEdit/workFlowComponents/Order.jsx
View file @
278df086
...
...
@@ -2,7 +2,7 @@
* @Description:
* @Author: leizhe
* @Date: 2022-01-13 17:26:13
* @LastEditTime: 2023-0
1-29 14:28:04
* @LastEditTime: 2023-0
2-08 15:43:35
* @LastEditors: dengchao 754083046@qq.com
*/
import
React
,
{
useState
,
useEffect
}
from
'react'
;
...
...
@@ -33,9 +33,9 @@ const Order = props => {
let
ids
=
''
;
orderTable
.
forEach
((
item
,
index
)
=>
{
if
(
index
===
orderTable
.
length
-
1
)
{
ids
+=
`
${
item
.
Flow
ID
}
`
;
ids
+=
`
${
item
.
Extend
ID
}
`
;
}
else
{
ids
+=
`
${
item
.
Flow
ID
}
,`
;
ids
+=
`
${
item
.
Extend
ID
}
,`
;
}
});
setFlowIDs
(
ids
);
...
...
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