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
cd11ca18
Commit
cd11ca18
authored
Nov 25, 2022
by
邓超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 优化工作流编辑器交互,添加时限配置
parent
3bae5d7f
Pipeline
#64517
passed with stages
Changes
12
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
652 additions
and
93 deletions
+652
-93
Workflow.jsx
src/pages/bsmanager/workOrder/workflowEdit/Workflow.jsx
+6
-6
FlowChart.jsx
...r/workOrder/workflowEdit/workFlowComponents/FlowChart.jsx
+29
-7
FlowModal.jsx
...r/workOrder/workflowEdit/workFlowComponents/FlowModal.jsx
+14
-5
NodeModal.jsx
...Edit/workFlowComponents/flowChartComponents/NodeModal.jsx
+23
-15
AddLimit.jsx
...ents/flowChartComponents/nodeModalComponents/AddLimit.jsx
+230
-0
ConfigCopyPerson.jsx
...wChartComponents/nodeModalComponents/ConfigCopyPerson.jsx
+30
-2
ConfigNodeMsg.jsx
...flowChartComponents/nodeModalComponents/ConfigNodeMsg.jsx
+3
-3
ConfigOperate.jsx
...flowChartComponents/nodeModalComponents/ConfigOperate.jsx
+62
-36
ConfigSubprocess.jsx
...wChartComponents/nodeModalComponents/ConfigSubprocess.jsx
+9
-7
ConfigTimeLimit.jsx
...owChartComponents/nodeModalComponents/ConfigTimeLimit.jsx
+145
-0
CongfigHeightMsg.jsx
...wChartComponents/nodeModalComponents/CongfigHeightMsg.jsx
+97
-0
siteConfigDrawer.js
...es/productCenter/webConfig/components/siteConfigDrawer.js
+4
-12
No files found.
src/pages/bsmanager/workOrder/workflowEdit/Workflow.jsx
View file @
cd11ca18
...
@@ -274,14 +274,14 @@ const Workflow = () => {
...
@@ -274,14 +274,14 @@ const Workflow = () => {
{
obj
.
FlowName
}
{
obj
.
FlowName
}
</
span
>
</
span
>
<
div
className=
{
styles
.
nodeTip
}
>
<
div
className=
{
styles
.
nodeTip
}
>
<
Tooltip
title=
"时限配置"
>
{
/*
<Tooltip title="时限配置">
<ControlOutlined
<ControlOutlined
onClick={e => {
onClick={e => {
timeConfig(obj, e);
timeConfig(obj, e);
}}
}}
style={{ fontSize: '16px', color: '#1890FF' }}
style={{ fontSize: '16px', color: '#1890FF' }}
/>
/>
</
Tooltip
>
</Tooltip>
*/
}
<
Tooltip
title=
"编辑流程"
className=
{
styles
.
fs
}
>
<
Tooltip
title=
"编辑流程"
className=
{
styles
.
fs
}
>
<
FormOutlined
onClick=
{
e
=>
editFlow
(
obj
,
e
)
}
/>
<
FormOutlined
onClick=
{
e
=>
editFlow
(
obj
,
e
)
}
/>
</
Tooltip
>
</
Tooltip
>
...
@@ -328,8 +328,8 @@ const Workflow = () => {
...
@@ -328,8 +328,8 @@ const Workflow = () => {
>
>
<
div
style=
{
{
display
:
`${treeVisible ? 'block' : 'none'}`
,
height
:
'100%'
}
}
>
<
div
style=
{
{
display
:
`${treeVisible ? 'block' : 'none'}`
,
height
:
'100%'
}
}
>
<
span
className=
{
styles
.
processTitle
}
>
流程树
</
span
>
<
span
className=
{
styles
.
processTitle
}
>
流程树
</
span
>
<
Tooltip
title=
"添加流程
组
"
>
<
Tooltip
title=
"添加流程"
>
<
PlusSquareFilled
onClick=
{
e
=>
addFlow
Group
(
e
)
}
className=
{
styles
.
treeHeadIcon
}
/>
<
PlusSquareFilled
onClick=
{
e
=>
addFlow
({},
e
)
}
className=
{
styles
.
treeHeadIcon
}
/>
</
Tooltip
>
</
Tooltip
>
<
hr
className=
{
styles
.
splitLine
}
/>
<
hr
className=
{
styles
.
splitLine
}
/>
<
div
className=
{
styles
.
treeContent
}
>
<
div
className=
{
styles
.
treeContent
}
>
...
@@ -396,11 +396,11 @@ const Workflow = () => {
...
@@ -396,11 +396,11 @@ const Workflow = () => {
onSubumit=
{
val
=>
groupCallBack
(
val
)
}
onSubumit=
{
val
=>
groupCallBack
(
val
)
}
/>
/>
{
/* 流程时限配置 */
}
{
/* 流程时限配置 */
}
<
Timelimit
{
/*
<Timelimit
visible={visible.auxiliaryView}
visible={visible.auxiliaryView}
msg={editMsg}
msg={editMsg}
handleCancel={() => showModal('auxiliaryView', false)}
handleCancel={() => showModal('auxiliaryView', false)}
/>
/>
*/
}
</
PageContainer
>
</
PageContainer
>
);
);
};
};
...
...
src/pages/bsmanager/workOrder/workflowEdit/workFlowComponents/FlowChart.jsx
View file @
cd11ca18
...
@@ -51,7 +51,9 @@ const FlowChart = props => {
...
@@ -51,7 +51,9 @@ const FlowChart = props => {
});
// 组件内得流程图数据
});
// 组件内得流程图数据
const
[
showLeaveTip
,
setShowLeaveTip
]
=
useState
(
false
);
// 离开路由是否又提醒
const
[
showLeaveTip
,
setShowLeaveTip
]
=
useState
(
false
);
// 离开路由是否又提醒
const
[
buttonLoading
,
setButtonLoading
]
=
useState
();
// 发布按钮保存loading
const
[
buttonLoading
,
setButtonLoading
]
=
useState
();
// 发布按钮保存loading
const
[
flag
,
setFlag
]
=
useState
(
0
);
const
currentNode
=
useRef
();
const
currentNode
=
useRef
();
const
afterNodes
=
useRef
(
new
Map
([]));
const
objGo
=
go
.
GraphObject
.
make
;
const
objGo
=
go
.
GraphObject
.
make
;
useEffect
(()
=>
{
useEffect
(()
=>
{
if
(
treeVisible
)
{
if
(
treeVisible
)
{
...
@@ -126,6 +128,7 @@ const FlowChart = props => {
...
@@ -126,6 +128,7 @@ const FlowChart = props => {
e
.
subject
.
data
.
lineDetail
=
JSON
.
stringify
(
e
.
subject
.
data
);
e
.
subject
.
data
.
lineDetail
=
JSON
.
stringify
(
e
.
subject
.
data
);
console
.
log
(
e
,
e
.
subject
.
data
,
'fasdfasdgds'
);
console
.
log
(
e
,
e
.
subject
.
data
,
'fasdfasdgds'
);
diagram
.
model
.
updateTargetBindings
(
e
.
subject
.
data
);
diagram
.
model
.
updateTargetBindings
(
e
.
subject
.
data
);
leaveCallBack
(
true
);
});
});
// 监听节点拖拽到画布事件
// 监听节点拖拽到画布事件
diagram
.
addDiagramListener
(
'externalobjectsdropped'
,
e
=>
{
diagram
.
addDiagramListener
(
'externalobjectsdropped'
,
e
=>
{
...
@@ -322,13 +325,14 @@ const FlowChart = props => {
...
@@ -322,13 +325,14 @@ const FlowChart = props => {
roleList
:
[],
roleList
:
[],
CarbonCopyPeopleList
:
[],
CarbonCopyPeopleList
:
[],
ExtendPageList
:
[],
ExtendPageList
:
[],
FlowTimerList
:
[],
TurnOnCc
:
0
,
NodeAliasName
:
''
,
NodeAliasName
:
''
,
Handover
:
'移交选择人'
,
Handover
:
'移交选择人'
,
TableName
:
''
,
TableName
:
''
,
Fields
:
''
,
Fields
:
''
,
WebPage
:
''
,
WebPage
:
''
,
FeedbackName
:
''
,
FeedbackName
:
''
,
SubFlowInfo
:
{},
Transferable
:
0
,
Transferable
:
0
,
EventsInformation
:
1
,
EventsInformation
:
1
,
IsSendMessage
:
1
,
IsSendMessage
:
1
,
...
@@ -884,16 +888,29 @@ const FlowChart = props => {
...
@@ -884,16 +888,29 @@ const FlowChart = props => {
return
null
;
return
null
;
}
}
};
};
const
findAfterNode
=
startNode
=>
{
// let nodeList = new Map([]);
startNode
.
findNodesOutOf
().
each
(
node
=>
{
if
(
!
afterNodes
.
current
.
has
(
node
.
data
.
NodeName
))
{
if
([
'1'
,
'0'
,
'2'
].
includes
(
node
.
data
.
NodeType
))
{
afterNodes
.
current
.
set
(
node
.
data
.
NodeName
,
node
.
data
.
TableName
);
}
findAfterNode
(
node
);
}
});
};
// 双击节点
// 双击节点
const
handlerDC
=
(
e
,
node
)
=>
{
const
handlerDC
=
(
e
,
node
)
=>
{
console
.
log
(
node
.
data
,
'nondojfadsoijgsd'
);
setNodeKey
(
node
.
part
.
data
.
key
);
setEditMsg
(
node
.
part
.
data
);
// diagram.model.setDataProperty(node.data, 'NodeName', 'fdasjkljfkldsajf');
currentNode
.
current
=
node
.
data
;
currentNode
.
current
=
node
.
data
;
// 找到节点后得除去网关跟子流程的所有节点
afterNodes
.
current
=
new
Map
([]);
findAfterNode
(
node
);
console
.
log
(
Object
.
fromEntries
(
afterNodes
.
current
));
setModalType
(
'edit'
);
setModalType
(
'edit'
);
setVisible
(
true
);
setVisible
(
true
);
setNodeKey
(
node
.
part
.
data
.
key
);
setEditMsg
(
node
.
part
.
data
);
};
};
// 双击线
// 双击线
const
addLineMsg
=
(
e
,
node
)
=>
{
const
addLineMsg
=
(
e
,
node
)
=>
{
...
@@ -976,6 +993,7 @@ const FlowChart = props => {
...
@@ -976,6 +993,7 @@ const FlowChart = props => {
),
),
}).
then
(
res
=>
{
}).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
if
(
res
.
code
===
0
)
{
diagram
.
model
.
setDataProperty
(
currentNode
.
current
,
'FlowTimerList'
,
res
.
data
.
FlowTimerList
);
diagram
.
model
.
setDataProperty
(
currentNode
.
current
,
'ActivityId'
,
res
.
data
.
ActivityId
);
diagram
.
model
.
setDataProperty
(
currentNode
.
current
,
'ActivityId'
,
res
.
data
.
ActivityId
);
diagram
.
model
.
setDataProperty
(
diagram
.
model
.
setDataProperty
(
currentNode
.
current
,
currentNode
.
current
,
...
@@ -1052,8 +1070,11 @@ const FlowChart = props => {
...
@@ -1052,8 +1070,11 @@ const FlowChart = props => {
if
(
key
===
'roleList'
)
{
if
(
key
===
'roleList'
)
{
diagram
.
model
.
setDataProperty
(
currentNode
.
current
,
'nodeDetail'
,
nodeDetail
);
diagram
.
model
.
setDataProperty
(
currentNode
.
current
,
'nodeDetail'
,
nodeDetail
);
}
}
if
(
key
===
'TableName'
)
{
setFlag
(
flag
+
1
);
}
diagram
.
rebuildParts
();
diagram
.
rebuildParts
();
leaveCallBack
(
true
);
};
};
// 保存流程
// 保存流程
const
saveFlow
=
()
=>
{
const
saveFlow
=
()
=>
{
...
@@ -1188,6 +1209,7 @@ const FlowChart = props => {
...
@@ -1188,6 +1209,7 @@ const FlowChart = props => {
modalType=
{
modalType
}
modalType=
{
modalType
}
nodeChage=
{
nodeChage
}
nodeChage=
{
nodeChage
}
currentNode=
{
currentNode
.
current
}
currentNode=
{
currentNode
.
current
}
afterNodes=
{
Object
.
fromEntries
(
afterNodes
.
current
)
}
handleCancel=
{
()
=>
setVisible
(
false
)
}
handleCancel=
{
()
=>
setVisible
(
false
)
}
onSubumit=
{
obj
=>
nodeCallBack
(
obj
)
}
onSubumit=
{
obj
=>
nodeCallBack
(
obj
)
}
flowData=
{
diagram
?
JSON
.
parse
(
diagram
.
model
.
toJson
())
:
{}
}
flowData=
{
diagram
?
JSON
.
parse
(
diagram
.
model
.
toJson
())
:
{}
}
...
...
src/pages/bsmanager/workOrder/workflowEdit/workFlowComponents/FlowModal.jsx
View file @
cd11ca18
...
@@ -107,7 +107,16 @@ const FlowModal = props => {
...
@@ -107,7 +107,16 @@ const FlowModal = props => {
<
Input
placeholder=
"请输入流程名称"
/>
<
Input
placeholder=
"请输入流程名称"
/>
</
Form
.
Item
>
</
Form
.
Item
>
<
Form
.
Item
label=
"分组信息"
name=
"Type"
>
<
Form
.
Item
label=
"分组信息"
name=
"Type"
>
<
Select
>
<
Select
showSearch
filterOption=
{
false
}
allowClear
onSearch=
{
value
=>
{
if
(
value
)
{
form
.
setFieldsValue
({
Type
:
value
});
}
}
}
>
{
treeData
.
map
(
item
=>
(
{
treeData
.
map
(
item
=>
(
<
Option
value=
{
item
.
name
}
key=
{
item
.
name
}
>
<
Option
value=
{
item
.
name
}
key=
{
item
.
name
}
>
{
item
.
name
}
{
item
.
name
}
...
@@ -151,14 +160,14 @@ const FlowModal = props => {
...
@@ -151,14 +160,14 @@ const FlowModal = props => {
{
/* <Option value="分派节点显示">分派节点显示</Option> */
}
{
/* <Option value="分派节点显示">分派节点显示</Option> */
}
</
Select
>
</
Select
>
</
Form
.
Item
>
</
Form
.
Item
>
<
Form
.
Item
label=
"编码样式"
name=
"UseFixedCodingRule"
>
<
Form
.
Item
label=
"编码样式"
name=
"UseFixedCodingRule"
initialValue
>
<
Radio
.
Group
>
<
Radio
.
Group
>
<
Radio
value=
{
false
}
>
<
Radio
value=
{
false
}
>
{
form
.
getFieldValue
(
'Prefix'
)
}
{
form
.
getFieldValue
(
'Prefix'
)
}
-
{
new
Date
().
getFullYear
()
}
-0000001 (前缀长度 + 13 位)
{
'000000000001'
.
slice
(
form
.
getFieldValue
(
'Prefix'
)?.
length
)
}
(始终12位)
</
Radio
>
</
Radio
>
<
Radio
value
>
<
Radio
value
>
{
form
.
getFieldValue
(
'Prefix'
)
}
-
{
new
Date
().
getFullYear
()
}
-0000001 (前缀长度 + 13 位)
{
form
.
getFieldValue
(
'Prefix'
)
}
{
'000000000001'
.
slice
(
form
.
getFieldValue
(
'Prefix'
)?.
length
)
}
(始终12位)
</
Radio
>
</
Radio
>
</
Radio
.
Group
>
</
Radio
.
Group
>
</
Form
.
Item
>
</
Form
.
Item
>
...
...
src/pages/bsmanager/workOrder/workflowEdit/workFlowComponents/flowChartComponents/NodeModal.jsx
View file @
cd11ca18
import
React
,
{
useEffect
,
useState
,
useRef
}
from
'react'
;
import
React
,
{
useEffect
,
useState
,
useRef
}
from
'react'
;
import
{
Button
,
Divider
,
Tooltip
,
message
}
from
'antd'
;
import
{
Button
,
Divider
,
Tooltip
,
message
}
from
'antd'
;
import
lodash
from
'lodash'
;
import
{
PlusOutlined
}
from
'@ant-design/icons'
;
import
{
FlowNodeSave
}
from
'@/services/workflow/workflow'
;
import
classNames
from
'classnames'
;
import
classNames
from
'classnames'
;
import
ConfigSubprocess
from
'./nodeModalComponents/ConfigSubprocess'
;
import
ConfigSubprocess
from
'./nodeModalComponents/ConfigSubprocess'
;
import
ConfgGateway
from
'./nodeModalComponents/ConfgGateway'
;
import
ConfgGateway
from
'./nodeModalComponents/ConfgGateway'
;
...
@@ -11,22 +9,14 @@ import ConfgUndertake from './nodeModalComponents/ConfgUndertake';
...
@@ -11,22 +9,14 @@ import ConfgUndertake from './nodeModalComponents/ConfgUndertake';
import
ConfigCopyPerson
from
'./nodeModalComponents/ConfigCopyPerson'
;
import
ConfigCopyPerson
from
'./nodeModalComponents/ConfigCopyPerson'
;
import
ConfigOperate
from
'./nodeModalComponents/ConfigOperate'
;
import
ConfigOperate
from
'./nodeModalComponents/ConfigOperate'
;
import
ConfigView
from
'./nodeModalComponents/ConfigView'
;
import
ConfigView
from
'./nodeModalComponents/ConfigView'
;
import
ConfigTimeLimit
from
'./nodeModalComponents/ConfigTimeLimit'
;
import
CongfigHeightMsg
from
'./nodeModalComponents/CongfigHeightMsg'
;
import
styles
from
'./NodeModal.less'
;
import
styles
from
'./NodeModal.less'
;
const
tabList
=
[
'常用配置'
,
'高级配置'
,
'移交配置'
];
const
tabList
=
[
'常用配置'
,
'高级配置'
,
'移交配置'
];
const
NodeModal
=
props
=>
{
const
NodeModal
=
props
=>
{
const
{
const
{
flowData
,
onSubumit
,
editMsg
,
flowID
,
nodeChage
,
currentNode
,
afterNodes
}
=
props
;
flowData
,
onSubumit
,
handleCancel
,
visible
,
editMsg
,
flowID
,
nodeChage
,
currentNode
,
}
=
props
;
const
[
activeConfig
,
setActiveConfig
]
=
useState
(
'常用配置'
);
const
[
activeConfig
,
setActiveConfig
]
=
useState
(
'常用配置'
);
const
RuleList
=
useRef
([]);
// 规则配置列表
const
refConfigSubprocess
=
useRef
();
const
refConfigSubprocess
=
useRef
();
const
refConfgGateway
=
useRef
();
const
refConfgGateway
=
useRef
();
...
@@ -35,9 +25,11 @@ const NodeModal = props => {
...
@@ -35,9 +25,11 @@ const NodeModal = props => {
const
refConfigCopyPerson
=
useRef
();
const
refConfigCopyPerson
=
useRef
();
const
refConfigOperate
=
useRef
();
const
refConfigOperate
=
useRef
();
const
refConfigView
=
useRef
();
const
refConfigView
=
useRef
();
const
refConfigTimeLimit
=
useRef
();
const
refCongfigHeightMsg
=
useRef
();
useEffect
(()
=>
{
useEffect
(()
=>
{
console
.
log
(
editMsg
,
'editMsgeditMsgeditMsg'
);
console
.
log
(
editMsg
,
afterNodes
,
'editMsgeditMsgeditMsg'
);
setActiveConfig
(
'常用配置'
);
setActiveConfig
(
'常用配置'
);
},
[
editMsg
]);
},
[
editMsg
]);
...
@@ -52,6 +44,7 @@ const NodeModal = props => {
...
@@ -52,6 +44,7 @@ const NodeModal = props => {
...
refConfigOperate
.
current
?.
getParmar
(),
...
refConfigOperate
.
current
?.
getParmar
(),
...
refConfigSubprocess
.
current
?.
getParmar
(),
...
refConfigSubprocess
.
current
?.
getParmar
(),
...
refConfigView
.
current
?.
getParmar
(),
...
refConfigView
.
current
?.
getParmar
(),
...
refConfigTimeLimit
.
current
?.
getParmar
(),
};
};
console
.
log
(
obj
);
console
.
log
(
obj
);
...
@@ -158,12 +151,27 @@ const NodeModal = props => {
...
@@ -158,12 +151,27 @@ const NodeModal = props => {
:
'block'
,
:
'block'
,
}
}
}
}
>
>
{
/* 时限配置 */
}
<
ConfigTimeLimit
ref=
{
refConfigTimeLimit
}
nodeChage=
{
nodeChage
}
editMsg=
{
currentNode
}
afterNodes=
{
afterNodes
}
flowID=
{
flowID
}
/>
{
/* 辅助视图 */
}
<
ConfigView
<
ConfigView
ref=
{
refConfigView
}
ref=
{
refConfigView
}
nodeChage=
{
nodeChage
}
nodeChage=
{
nodeChage
}
editMsg=
{
editMsg
}
editMsg=
{
editMsg
}
flowID=
{
flowID
}
flowID=
{
flowID
}
/>
/>
<
CongfigHeightMsg
ref=
{
refCongfigHeightMsg
}
nodeChage=
{
nodeChage
}
editMsg=
{
editMsg
}
flowID=
{
flowID
}
/>
</
div
>
</
div
>
<
div
<
div
...
...
src/pages/bsmanager/workOrder/workflowEdit/workFlowComponents/flowChartComponents/nodeModalComponents/AddLimit.jsx
0 → 100644
View file @
cd11ca18
import
React
,
{
useEffect
,
useState
}
from
'react'
;
import
{
reloadTimeLimitadFlowNodes
}
from
'@/services/flow/flow'
;
import
{
Form
,
Modal
,
Input
,
notification
,
Select
,
message
}
from
'antd'
;
const
{
Option
}
=
Select
;
const
AddModal
=
props
=>
{
const
{
onSubumit
,
handleCancel
,
visible
,
msg
,
modalType
,
title
,
afterNodes
,
nodeMsg
,
configList
,
}
=
props
;
const
[
timeLimitFlowNodes
,
setTimeLimitFlowNodes
]
=
useState
([]);
const
[
timeLimitFlowNodesEnd
,
setTimeLimitFlowNodesEnd
]
=
useState
([]);
const
[
form
]
=
Form
.
useForm
();
useEffect
(()
=>
{
form
.
resetFields
();
if
(
visible
)
{
console
.
log
(
configList
,
'nodeMsg.EndNode'
);
if
(
nodeMsg
.
TableName
)
{
getLimitadFlowNodes
(
nodeMsg
.
TableName
);
}
else
{
message
.
error
(
'请配置该节点工单主表'
);
}
if
(
modalType
===
'edit'
)
{
if
(
msg
.
EndNode
)
{
getLimitadFlowNodesEnd
(
afterNodes
[
msg
.
EndNode
]);
}
getFormData
();
}
else
{
form
.
setFieldsValue
({
TimeLimit
:
0
,
TimeUnit
:
'小时'
,
TimeLimitField
:
'(未配置)'
,
TimeoutField
:
'(未配置)'
,
});
}
}
else
{
setTimeLimitFlowNodes
([]);
setTimeLimitFlowNodesEnd
([]);
}
},
[
visible
]);
// 根据下拉框选择的流程节点关联的表名加载指派字段
const
getLimitadFlowNodes
=
e
=>
{
reloadTimeLimitadFlowNodes
({
flowNodeTableName
:
e
}).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
setTimeLimitFlowNodes
(
res
.
data
);
}
});
};
const
getLimitadFlowNodesEnd
=
e
=>
{
reloadTimeLimitadFlowNodes
({
flowNodeTableName
:
e
}).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
setTimeLimitFlowNodesEnd
(
res
.
data
);
}
});
};
// 获取表单回显
const
getFormData
=
()
=>
{
form
.
setFieldsValue
({
...
msg
,
TimeLimitField
:
msg
.
TimeLimitField
||
'(未配置)'
,
TimeoutField
:
msg
.
TimeoutField
||
'(未配置)'
,
FlowName
:
title
,
});
};
// 表单监听
const
onValuesChange
=
val
=>
{
if
(
Object
.
keys
(
val
)[
0
]
===
'EndNode'
)
{
console
.
log
(
afterNodes
[
val
.
EndNode
]);
if
(
!
afterNodes
[
val
.
EndNode
])
{
message
.
error
(
'请检查该节点是否选择工单主表'
);
return
;
}
getLimitadFlowNodesEnd
(
afterNodes
[
val
.
EndNode
]);
}
};
// 提交表单
const
onFinish
=
()
=>
{
form
.
validateFields
().
then
(
validate
=>
{
if
(
validate
)
{
validate
.
TimeLimitField
=
validate
.
TimeLimitField
===
'(未配置)'
?
''
:
validate
.
TimeLimitField
;
validate
.
TimeoutField
=
validate
.
TimeoutField
===
'(未配置)'
?
''
:
validate
.
TimeoutField
;
let
obj
=
{};
if
(
modalType
===
'add'
)
{
obj
=
{
...
validate
,
ID
:
0
};
}
else
{
obj
=
{
...
validate
,
key
:
msg
.
ID
};
}
onSubumit
(
obj
,
modalType
);
}
});
};
return
(
<
Modal
title=
"流程时限规则配置"
visible=
{
visible
}
onOk=
{
onFinish
}
onCancel=
{
handleCancel
}
maskClosable=
{
false
}
destroyOnClose
width=
{
550
}
>
<
Form
form=
{
form
}
labelCol=
{
{
span
:
5
}
}
wrapperCol=
{
{
span
:
19
}
}
initialValues=
{
{
remember
:
true
}
}
onValuesChange=
{
onValuesChange
}
>
{
/* <Form.Item label="流程名称" name="FlowName">
<Input disabled />
</Form.Item> */
}
<
Form
.
Item
label=
"规则名称"
name=
"Name"
rules=
{
[{
required
:
true
}]
}
>
<
Input
placeholder=
"请输入规则名称"
/>
</
Form
.
Item
>
<
Form
.
Item
label=
"起止节点"
style=
{
{
marginBottom
:
0
,
message
:
'请选择节点'
}
}
required
>
<
div
style=
{
{
display
:
'flex'
}
}
>
<
Form
.
Item
name=
"StartNode"
style=
{
{
width
:
'100%'
}
}
rules=
{
[{
required
:
true
,
message
:
'请选择节点'
}]
}
initialValue=
{
nodeMsg
?.
NodeName
}
>
<
Select
disabled
>
{
[
nodeMsg
?.
NodeName
].
map
((
item
,
index
)
=>
(
<
Option
value=
{
item
}
key=
{
index
}
>
{
item
}
</
Option
>
))
}
</
Select
>
</
Form
.
Item
>
<
span
style=
{
{
width
:
'40px'
,
textAlign
:
'center'
}
}
>
--
</
span
>
<
Form
.
Item
name=
"EndNode"
style=
{
{
width
:
'100%'
}
}
rules=
{
[{
required
:
true
,
message
:
'请选择节点'
}]
}
>
<
Select
>
{
Object
.
keys
(
afterNodes
).
map
((
item
,
index
)
=>
(
<
Option
value=
{
item
}
key=
{
index
}
disabled=
{
configList
?.
some
(
ele
=>
ele
.
EndNode
===
item
)
}
>
{
item
}
</
Option
>
))
}
</
Select
>
</
Form
.
Item
>
</
div
>
</
Form
.
Item
>
<
Form
.
Item
label=
"默认时限"
style=
{
{
marginBottom
:
0
}
}
required
>
<
div
style=
{
{
display
:
'flex'
}
}
>
<
Form
.
Item
name=
"TimeLimit"
style=
{
{
marginRight
:
'18px'
,
width
:
'100%'
}
}
rules=
{
[
{
required
:
true
,
message
:
'请选填写时限'
},
{
validator
:
(
_
,
value
)
=>
value
<
0
?
Promise
.
reject
(
new
Error
(
'默认时限需要大于零'
))
:
Promise
.
resolve
(),
},
]
}
>
<
Input
placeholder=
"请输入默认时限"
/>
</
Form
.
Item
>
<
Form
.
Item
name=
"TimeUnit"
style=
{
{
width
:
'100%'
}
}
rules=
{
[{
required
:
true
,
message
:
'请选择时限单位'
}]
}
>
<
Select
>
<
Option
value=
"小时"
>
小时
</
Option
>
<
Option
value=
"自然日"
>
自然日
</
Option
>
<
Option
value=
"工作日"
>
工作日
</
Option
>
</
Select
>
</
Form
.
Item
>
</
div
>
</
Form
.
Item
>
<
Form
.
Item
label=
"时限指派字段"
required
>
<
Form
.
Item
name=
"TimeLimitField"
rules=
{
[{
required
:
true
,
message
:
'请选择时限指派字段'
}]
}
>
<
Select
>
{
timeLimitFlowNodes
.
map
(
item
=>
(
<
Option
value=
{
item
.
Name
}
key=
{
item
.
ID
}
>
<
span
>
{
item
.
Name
}
</
span
>
</
Option
>
))
}
</
Select
>
</
Form
.
Item
>
<
div
style=
{
{
marginTop
:
'-15px'
}
}
>
● 来自起始节点工单表,可以为选择器,配置读取字典表;可以为日期/时间控件,用户自行选择。
</
div
>
</
Form
.
Item
>
<
Form
.
Item
label=
"超时记录字段"
required
>
<
Form
.
Item
name=
"TimeoutField"
rules=
{
[{
required
:
true
,
message
:
'请选择超时记录字段'
}]
}
>
<
Select
>
{
timeLimitFlowNodesEnd
.
map
(
item
=>
(
<
Option
value=
{
item
.
Name
}
key=
{
item
.
ID
}
>
<
span
>
{
item
.
Name
}
</
span
>
</
Option
>
))
}
</
Select
>
</
Form
.
Item
>
<
div
style=
{
{
marginTop
:
'-15px'
}
}
>
● 来自终止节点工单表,由系统自动填写该工单是否超时。
</
div
>
</
Form
.
Item
>
</
Form
>
</
Modal
>
);
};
export
default
AddModal
;
src/pages/bsmanager/workOrder/workflowEdit/workFlowComponents/flowChartComponents/nodeModalComponents/ConfigCopyPerson.jsx
View file @
cd11ca18
import
React
,
{
useState
,
useEffect
,
useRef
,
forwardRef
,
useImperativeHandle
}
from
'react'
;
import
React
,
{
useState
,
useEffect
,
useRef
,
forwardRef
,
useImperativeHandle
}
from
'react'
;
import
{
Divider
,
Tooltip
}
from
'antd'
;
import
{
Divider
,
Tooltip
,
Switch
}
from
'antd'
;
import
{
PlusOutlined
}
from
'@ant-design/icons'
;
import
{
PlusOutlined
}
from
'@ant-design/icons'
;
import
PeopleSelector
from
'@/components/PeopleSelector'
;
import
PeopleSelector
from
'@/components/PeopleSelector'
;
import
styles
from
'../NodeModal.less'
;
import
styles
from
'../NodeModal.less'
;
...
@@ -8,6 +8,7 @@ const ConfigCopyPerson = (props, ref) => {
...
@@ -8,6 +8,7 @@ const ConfigCopyPerson = (props, ref) => {
const
{
nodeChage
,
editMsg
}
=
props
;
const
{
nodeChage
,
editMsg
}
=
props
;
const
[
showPersonSelect
,
setShowPersonSelect
]
=
useState
(
false
);
// 是否显示人员选择器
const
[
showPersonSelect
,
setShowPersonSelect
]
=
useState
(
false
);
// 是否显示人员选择器
const
CarbonCopyPeopleList
=
useRef
([]);
// 抄送人列表
const
CarbonCopyPeopleList
=
useRef
([]);
// 抄送人列表
const
TurnOnCc
=
useRef
(
0
);
const
[
flag
,
setFlag
]
=
useState
(
0
);
// 用于刷新界面
const
[
flag
,
setFlag
]
=
useState
(
0
);
// 用于刷新界面
useImperativeHandle
(
ref
,
()
=>
({
useImperativeHandle
(
ref
,
()
=>
({
getParmar
,
getParmar
,
...
@@ -18,7 +19,9 @@ const ConfigCopyPerson = (props, ref) => {
...
@@ -18,7 +19,9 @@ const ConfigCopyPerson = (props, ref) => {
return
;
return
;
}
}
CarbonCopyPeopleList
.
current
=
[];
CarbonCopyPeopleList
.
current
=
[];
TurnOnCc
.
current
=
0
;
CarbonCopyPeopleList
.
current
=
editMsg
.
CarbonCopyPeopleList
;
CarbonCopyPeopleList
.
current
=
editMsg
.
CarbonCopyPeopleList
;
TurnOnCc
.
current
=
editMsg
.
TurnOnCc
;
setFlag
(
flag
+
1
);
setFlag
(
flag
+
1
);
},
[
editMsg
]);
},
[
editMsg
]);
const
getParmar
=
()
=>
({
CarbonCopyPeopleList
:
CarbonCopyPeopleList
.
current
});
const
getParmar
=
()
=>
({
CarbonCopyPeopleList
:
CarbonCopyPeopleList
.
current
});
...
@@ -34,6 +37,19 @@ const ConfigCopyPerson = (props, ref) => {
...
@@ -34,6 +37,19 @@ const ConfigCopyPerson = (props, ref) => {
const
editCC
=
()
=>
{
const
editCC
=
()
=>
{
setShowPersonSelect
(
true
);
setShowPersonSelect
(
true
);
};
};
const
onChange
=
e
=>
{
console
.
log
(
e
,
'e'
);
if
(
e
)
{
TurnOnCc
.
current
=
1
;
}
else
{
TurnOnCc
.
current
=
0
;
// CarbonCopyPeopleList.current = [];
// nodeChage('CarbonCopyPeopleList', CarbonCopyPeopleList.current);
}
console
.
log
(
TurnOnCc
.
current
);
nodeChage
(
'TurnOnCc'
,
TurnOnCc
.
current
);
setFlag
(
flag
+
1
);
};
return
(
return
(
<
div
>
<
div
>
<
Divider
<
Divider
...
@@ -46,7 +62,19 @@ const ConfigCopyPerson = (props, ref) => {
...
@@ -46,7 +62,19 @@ const ConfigCopyPerson = (props, ref) => {
>
>
节点抄送人
节点抄送人
</
Divider
>
</
Divider
>
<
div
className=
{
styles
.
buttonBox
}
onClick=
{
()
=>
editCC
()
}
>
<
div
style=
{
{
display
:
'flex'
,
justifyContent
:
'right'
,
marginBottom
:
'12px'
}
}
>
开启抄送
<
Switch
style=
{
{
marginLeft
:
'5px'
}
}
checked=
{
TurnOnCc
.
current
!==
0
}
onChange=
{
onChange
}
/>
</
div
>
<
div
className=
{
styles
.
buttonBox
}
style=
{
{
display
:
TurnOnCc
.
current
===
1
?
'flex'
:
'none'
}
}
onClick=
{
()
=>
editCC
()
}
>
<
div
<
div
className=
{
styles
.
setButton
}
className=
{
styles
.
setButton
}
style=
{
{
textAlign
:
CarbonCopyPeopleList
?.
current
.
length
>
0
?
'left'
:
'center'
}
}
style=
{
{
textAlign
:
CarbonCopyPeopleList
?.
current
.
length
>
0
?
'left'
:
'center'
}
}
...
...
src/pages/bsmanager/workOrder/workflowEdit/workFlowComponents/flowChartComponents/nodeModalComponents/ConfigNodeMsg.jsx
View file @
cd11ca18
...
@@ -35,7 +35,7 @@ const ConfigNodeMsg = (props, ref) => {
...
@@ -35,7 +35,7 @@ const ConfigNodeMsg = (props, ref) => {
form
.
resetFields
();
form
.
resetFields
();
getTableName
();
getTableName
();
// 获取反馈类型
// 获取反馈类型
getFeedbackName
();
//
getFeedbackName();
getFormData
();
getFormData
();
},
[
editMsg
]);
},
[
editMsg
]);
const
getParmar
=
()
=>
form
.
getFieldsValue
();
const
getParmar
=
()
=>
form
.
getFieldsValue
();
...
@@ -341,7 +341,7 @@ const ConfigNodeMsg = (props, ref) => {
...
@@ -341,7 +341,7 @@ const ConfigNodeMsg = (props, ref) => {
/>
/>
</
div
>
</
div
>
</
Form
.
Item
>
</
Form
.
Item
>
<
Form
.
Item
label=
"前端视图"
name=
"WebPage"
>
{
/*
<Form.Item label="前端视图" name="WebPage">
<Input placeholder="请配置前端视图" />
<Input placeholder="请配置前端视图" />
</Form.Item>
</Form.Item>
<Form.Item label="反馈类型" name="FeedbackName">
<Form.Item label="反馈类型" name="FeedbackName">
...
@@ -352,7 +352,7 @@ const ConfigNodeMsg = (props, ref) => {
...
@@ -352,7 +352,7 @@ const ConfigNodeMsg = (props, ref) => {
</Option>
</Option>
))}
))}
</Select>
</Select>
</
Form
.
Item
>
</Form.Item>
*/
}
</
div
>
</
div
>
<
div
<
div
style=
{
{
style=
{
{
...
...
src/pages/bsmanager/workOrder/workflowEdit/workFlowComponents/flowChartComponents/nodeModalComponents/ConfigOperate.jsx
View file @
cd11ca18
...
@@ -99,39 +99,23 @@ const ConfigOperate = (props, ref) => {
...
@@ -99,39 +99,23 @@ const ConfigOperate = (props, ref) => {
labelCol=
{
{
span
:
20
}
}
labelCol=
{
{
span
:
20
}
}
wrapperCol=
{
{
span
:
4
}
}
wrapperCol=
{
{
span
:
4
}
}
onFieldsChange=
{
changeValue
}
onFieldsChange=
{
changeValue
}
colon=
{
false
}
labelAlign=
"left"
labelAlign=
"left"
>
>
<
div
style=
{
{
display
:
'flex'
,
alignItems
:
'center'
,
marginBottom
:
'12px'
}
}
>
<
div
<
div
style=
{
{
flex
:
`0 0 ${(20 / 24) * 100}%`
,
display
:
'flex'
,
alignItems
:
'center'
}
}
>
style=
{
{
回退至
height
:
'40px'
,
<
Form
.
Item
lineHeight
:
'40px'
,
name=
"RollbackNode"
paddingLeft
:
'5px'
,
wrapperCol=
{
{
span
:
24
}
}
background
:
'#EFEFEF'
,
style=
{
{
marginLeft
:
'5px'
,
width
:
'100px'
,
marginBottom
:
0
}
}
fontWeight
:
700
,
>
}
}
<
Select
placeholder=
"请选择回退节点"
>
>
{
backNodes
.
map
(
item
=>
(
功能按钮配置
<
Option
value=
{
item
.
Name
}
key=
{
item
.
ID
}
>
{
item
.
Name
}
</
Option
>
))
}
</
Select
>
</
Form
.
Item
>
:
</
div
>
<
Form
.
Item
valuePropName=
"checked"
name=
"Rollbackable"
style=
{
{
flex
:
`0 0 ${(4 / 24) * 100}%`
,
marginBottom
:
0
}
}
>
<
Switch
checkedChildren=
"是"
unCheckedChildren=
"否"
/>
</
Form
.
Item
>
</
div
>
</
div
>
<
Form
.
Item
<
Form
.
Item
valuePropName=
"checked"
valuePropName=
"checked"
style=
{
{
marginBottom
:
'
12px
'
}
}
style=
{
{
marginBottom
:
'
0'
,
padding
:
'2px'
,
borderBottom
:
'1px solid #ccc
'
}
}
label=
{
label=
{
<
div
style=
{
{
display
:
'flex'
,
alignItems
:
'center'
}
}
>
<
div
style=
{
{
display
:
'flex'
,
alignItems
:
'center'
}
}
>
<
Tooltip
title=
"开始节点不允许转单"
>
<
Tooltip
title=
"开始节点不允许转单"
>
...
@@ -142,18 +126,18 @@ const ConfigOperate = (props, ref) => {
...
@@ -142,18 +126,18 @@ const ConfigOperate = (props, ref) => {
}
}
name=
"Transferable"
name=
"Transferable"
>
>
<
Switch
checkedChildren=
"是"
unCheckedChildren=
"否"
/>
<
Switch
disabled=
{
editMsg
.
NodeType
===
'1'
}
checkedChildren=
"是"
unCheckedChildren=
"否"
/>
</
Form
.
Item
>
</
Form
.
Item
>
<
Form
.
Item
<
Form
.
Item
valuePropName=
"checked"
valuePropName=
"checked"
style=
{
{
marginBottom
:
'
12px
'
}
}
style=
{
{
marginBottom
:
'
0'
,
padding
:
'2px'
,
borderBottom
:
'1px solid #ccc
'
}
}
label=
"暂存"
label=
"暂存"
name=
"IsSave"
name=
"IsSave"
>
>
<
Switch
checkedChildren=
"是"
unCheckedChildren=
"否"
/>
<
Switch
checkedChildren=
"是"
unCheckedChildren=
"否"
/>
</
Form
.
Item
>
</
Form
.
Item
>
<
Form
.
Item
<
Form
.
Item
style=
{
{
marginBottom
:
'
12px
'
}
}
style=
{
{
marginBottom
:
'
0'
,
padding
:
'2px'
,
borderBottom
:
'1px solid #ccc
'
}
}
valuePropName=
"checked"
valuePropName=
"checked"
label=
{
label=
{
<
div
style=
{
{
display
:
'flex'
,
alignItems
:
'center'
}
}
>
<
div
style=
{
{
display
:
'flex'
,
alignItems
:
'center'
}
}
>
...
@@ -165,10 +149,14 @@ const ConfigOperate = (props, ref) => {
...
@@ -165,10 +149,14 @@ const ConfigOperate = (props, ref) => {
}
}
name=
"HalfwayClose"
name=
"HalfwayClose"
>
>
<
Switch
checkedChildren=
"是"
unCheckedChildren=
"否"
/>
<
Switch
disabled=
{
editMsg
.
NodeType
===
'1'
||
editMsg
.
NodeType
===
'2'
}
checkedChildren=
"是"
unCheckedChildren=
"否"
/>
</
Form
.
Item
>
</
Form
.
Item
>
<
Form
.
Item
<
Form
.
Item
style=
{
{
marginBottom
:
'
12px
'
}
}
style=
{
{
marginBottom
:
'
0'
,
padding
:
'2px'
,
borderBottom
:
'1px solid #ccc
'
}
}
valuePropName=
"checked"
valuePropName=
"checked"
label=
{
label=
{
<
div
style=
{
{
display
:
'flex'
,
alignItems
:
'center'
}
}
>
<
div
style=
{
{
display
:
'flex'
,
alignItems
:
'center'
}
}
>
...
@@ -180,11 +168,49 @@ const ConfigOperate = (props, ref) => {
...
@@ -180,11 +168,49 @@ const ConfigOperate = (props, ref) => {
}
}
name=
"AutoClose"
name=
"AutoClose"
>
>
<
Switch
checkedChildren=
"是"
unCheckedChildren=
"否"
/>
<
Switch
disabled=
{
editMsg
.
NodeType
===
'1'
}
checkedChildren=
"是"
unCheckedChildren=
"否"
/>
</
Form
.
Item
>
</
Form
.
Item
>
<
div
style=
{
{
display
:
'flex'
,
alignItems
:
'center'
,
marginBottom
:
'0'
,
padding
:
'2px'
,
borderBottom
:
'1px solid #ccc'
,
}
}
>
<
div
style=
{
{
flex
:
`0 0 ${(20 / 24) * 100}%`
,
display
:
'flex'
,
alignItems
:
'center'
}
}
>
回退至
<
Form
.
Item
name=
"RollbackNode"
wrapperCol=
{
{
span
:
24
}
}
style=
{
{
marginLeft
:
'5px'
,
width
:
'140px'
,
marginBottom
:
0
}
}
>
<
Select
placeholder=
"请选择回退节点"
>
{
backNodes
.
map
(
item
=>
(
<
Option
value=
{
item
.
Name
}
key=
{
item
.
ID
}
>
{
item
.
Name
}
</
Option
>
))
}
</
Select
>
</
Form
.
Item
>
</
div
>
<
Form
.
Item
valuePropName=
"checked"
name=
"Rollbackable"
style=
{
{
flex
:
`0 0 ${(4 / 24) * 100}%`
,
marginBottom
:
0
}
}
>
<
Switch
checkedChildren=
"是"
unCheckedChildren=
"否"
disabled=
{
editMsg
.
NodeType
===
'1'
}
/>
</
Form
.
Item
>
</
div
>
<
Form
.
Item
<
Form
.
Item
valuePropName=
"checked"
valuePropName=
"checked"
style=
{
{
marginBottom
:
'
12px
'
}
}
style=
{
{
marginBottom
:
'
0'
,
padding
:
'2px'
,
borderBottom
:
'1px solid #ccc
'
}
}
label=
"显示事件信息"
label=
"显示事件信息"
name=
"EventsInformation"
name=
"EventsInformation"
>
>
...
@@ -192,7 +218,7 @@ const ConfigOperate = (props, ref) => {
...
@@ -192,7 +218,7 @@ const ConfigOperate = (props, ref) => {
</
Form
.
Item
>
</
Form
.
Item
>
<
Form
.
Item
<
Form
.
Item
valuePropName=
"checked"
valuePropName=
"checked"
style=
{
{
marginBottom
:
'
12px
'
}
}
style=
{
{
marginBottom
:
'
0'
,
padding
:
'2px'
,
borderBottom
:
'1px solid #ccc
'
}
}
label=
"是否发送短信"
label=
"是否发送短信"
name=
"IsSendMessage"
name=
"IsSendMessage"
>
>
...
...
src/pages/bsmanager/workOrder/workflowEdit/workFlowComponents/flowChartComponents/nodeModalComponents/ConfigSubprocess.jsx
View file @
cd11ca18
...
@@ -30,7 +30,7 @@ const ConfigSubprocess = (props, ref) => {
...
@@ -30,7 +30,7 @@ const ConfigSubprocess = (props, ref) => {
// });
// });
setFlowList
(
setFlowList
(
res
.
data
.
map
(
item
=>
({
res
.
data
.
map
(
item
=>
({
label
:
`
${
item
.
EventName
}
/
${
item
.
FlowName
}
`
,
label
:
`
${
item
.
FlowName
}
(
${
item
.
EventName
}
)
`
,
key
:
`
${
item
.
SubFlowEventConfigID
}
-
${
item
.
SubFlowId
}
`
,
key
:
`
${
item
.
SubFlowEventConfigID
}
-
${
item
.
SubFlowId
}
`
,
})),
})),
);
);
...
@@ -68,9 +68,11 @@ const ConfigSubprocess = (props, ref) => {
...
@@ -68,9 +68,11 @@ const ConfigSubprocess = (props, ref) => {
?
`
${
editMsg
.
SubFlowInfo
?.
SubFlowEventConfigID
}
-
$
{
editMsg
.
SubFlowInfo
?.
SubFlowID
}
`
?
`
${
editMsg
.
SubFlowInfo
?.
SubFlowEventConfigID
}
-
$
{
editMsg
.
SubFlowInfo
?.
SubFlowID
}
`
: null,
: null,
MapFields: editMsg.SubFlowInfo?.MapFields?.map(item => ({
MapFields: editMsg.SubFlowInfo?.MapFields?.map(item => ({
nodeField: `
$
{
item
.
ParentFlowMapTableName
}
-
$
{
item
.
ParentFlowMapFieldName
}
-
$
{
nodeField: item.ParentFlowMapTableName
item
.
ParentFlowMapTableType
? `
$
{
item
.
ParentFlowMapTableName
}
-
$
{
item
.
ParentFlowMapFieldName
}
-
$
{
}
`,
item
.
ParentFlowMapTableType
}
`
: '',
subNodeField: `
$
{
item
.
SubFlowMapTableName
}
-
$
{
item
.
SubFlowMapFieldName
}
`,
subNodeField: `
$
{
item
.
SubFlowMapTableName
}
-
$
{
item
.
SubFlowMapFieldName
}
`,
})),
})),
});
});
...
@@ -168,7 +170,7 @@ const ConfigSubprocess = (props, ref) => {
...
@@ -168,7 +170,7 @@ const ConfigSubprocess = (props, ref) => {
))}
))}
</Select>
</Select>
</Form.Item>
</Form.Item>
<Form.Item
label="映射字段" rules={[{ required: true, message: '请输入排序' }]
}>
<Form.Item
wrapperCol={{ span: 24 }
}>
<Form.List name="MapFields">
<Form.List name="MapFields">
{(fields, { add, remove }) => (
{(fields, { add, remove }) => (
<>
<>
...
@@ -197,7 +199,7 @@ const ConfigSubprocess = (props, ref) => {
...
@@ -197,7 +199,7 @@ const ConfigSubprocess = (props, ref) => {
<OptGroup key={index} label={item.TableName}>
<OptGroup key={index} label={item.TableName}>
{item.TableFieldNames.map(ele => (
{item.TableFieldNames.map(ele => (
<Option value={ele.value} key={ele.value}>
<Option value={ele.value} key={ele.value}>
{ele.label}
{ele
?
.label}
</Option>
</Option>
))}
))}
</OptGroup>
</OptGroup>
...
@@ -234,7 +236,7 @@ const ConfigSubprocess = (props, ref) => {
...
@@ -234,7 +236,7 @@ const ConfigSubprocess = (props, ref) => {
))}
))}
<Form.Item>
<Form.Item>
<Button type="dashed" onClick={() => addMap(add)} block icon={<PlusOutlined />}>
<Button type="dashed" onClick={() => addMap(add)} block icon={<PlusOutlined />}>
添加映射
添加映射
字段
</Button>
</Button>
</Form.Item>
</Form.Item>
</>
</>
...
...
src/pages/bsmanager/workOrder/workflowEdit/workFlowComponents/flowChartComponents/nodeModalComponents/ConfigTimeLimit.jsx
0 → 100644
View file @
cd11ca18
import
React
,
{
useState
,
useEffect
,
useRef
,
forwardRef
,
useImperativeHandle
}
from
'react'
;
import
{
Space
,
Button
,
Divider
,
Table
,
Tooltip
,
message
}
from
'antd'
;
import
{
DeleteOutlined
,
EditTwoTone
,
PlusOutlined
}
from
'@ant-design/icons'
;
import
AddLimit
from
'./AddLimit'
;
const
ConfigTimeLimit
=
(
props
,
ref
)
=>
{
const
{
editMsg
,
nodeChage
,
afterNodes
}
=
props
;
const
[
viewModal
,
setViewModal
]
=
useState
(
false
);
// 编辑模态框
const
[
modalType
,
setModalType
]
=
useState
(
''
);
// 模态框是编辑还是修改的状态
const
[
viewMsg
,
setviewMsg
]
=
useState
({});
// 保存编辑的信息
const
[
title
,
setTitle
]
=
useState
(
''
);
const
[
finishNodes
,
setFinishNodes
]
=
useState
([]);
const
[
flowId
,
setFlowId
]
=
useState
(
''
);
const
[
flag
,
setFlag
]
=
useState
(
0
);
const
tableData
=
useRef
([]);
// 辅助视图对应的回显的表格
useImperativeHandle
(
ref
,
()
=>
({
getParmar
}));
useEffect
(()
=>
{
tableData
.
current
=
[];
console
.
log
(
editMsg
,
'editMsg'
);
tableData
.
current
=
editMsg
?.
FlowTimerList
?.
map
(
item
=>
({
...
item
,
key
:
item
.
ID
}));
setFlag
(
flag
+
1
);
},
[
editMsg
]);
const
getParmar
=
()
=>
{};
const
toEdit
=
val
=>
{
setViewModal
(
true
);
setModalType
(
'edit'
);
setviewMsg
(
val
);
};
const
delRow
=
record
=>
{
let
list
=
JSON
.
parse
(
JSON
.
stringify
(
tableData
.
current
));
list
=
list
.
filter
(
item
=>
item
.
key
!==
record
.
key
);
tableData
.
current
=
list
;
nodeChage
(
'FlowTimerList'
,
tableData
.
current
);
setFlag
(
flag
+
1
);
};
// 辅助视图确定回调
const
saveView
=
(
val
,
type
)
=>
{
let
list
=
JSON
.
parse
(
JSON
.
stringify
(
tableData
.
current
));
// eslint-disable-next-line prefer-spread
let
newKey
=
list
.
length
>
0
?
Math
.
max
.
apply
(
Math
,
list
.
map
(
item
=>
item
.
key
))
+
1
:
0
;
if
(
type
===
'add'
)
{
list
.
push
({
...
val
,
key
:
newKey
});
}
else
{
let
edtiIndex
=
list
.
findIndex
(
item
=>
item
.
key
===
val
.
key
);
list
[
edtiIndex
]
=
val
;
}
tableData
.
current
=
list
;
nodeChage
(
'FlowTimerList'
,
tableData
.
current
);
setViewModal
(
false
);
};
// 定义表格
const
columns
=
[
{
title
:
'规则名称'
,
dataIndex
:
'Name'
,
align
:
'center'
,
},
{
title
:
'操作'
,
align
:
'center'
,
ellipsis
:
true
,
render
:
record
=>
(
<>
<
Space
>
<
Tooltip
title=
"修改流程时限配置"
>
<
EditTwoTone
onClick=
{
()
=>
toEdit
(
record
)
}
style=
{
{
fontSize
:
'16px'
,
color
:
'#1890FF'
}
}
/>
</
Tooltip
>
<
Tooltip
title=
"删除流程时限配置"
>
<
DeleteOutlined
onClick=
{
()
=>
delRow
(
record
)
}
style=
{
{
fontSize
:
'16px'
,
color
:
'#e86060'
}
}
/>
</
Tooltip
>
</
Space
>
</>
),
},
];
return
(
<
div
>
<
Divider
orientation=
"left"
style=
{
{
borderTopColor
:
'#99bbe8'
,
color
:
'#15428b'
,
fontWeight
:
700
,
}
}
>
时限配置
</
Divider
>
<
div
style=
{
{
widnt
:
'100%'
,
marginBottom
:
'10px'
,
display
:
'flex'
,
justifyContent
:
'right'
,
}
}
>
<
Button
type=
"primary"
onClick=
{
()
=>
{
setViewModal
(
true
);
setModalType
(
'add'
);
}
}
icon=
{
<
PlusOutlined
/>
}
>
新增时限配置
</
Button
>
</
div
>
<
Table
dataSource=
{
tableData
.
current
}
columns=
{
columns
}
rowKey=
{
record
=>
record
.
ID
}
bordered
size=
"small"
onRow=
{
record
=>
({
onDoubleClick
:
()
=>
{
toEdit
(
record
);
},
})
}
pagination=
{
false
}
/>
<
AddLimit
visible=
{
viewModal
}
msg=
{
viewMsg
}
title=
{
title
}
flowId=
{
flowId
}
nodeMsg=
{
editMsg
}
modalType=
{
modalType
}
handleCancel=
{
()
=>
setViewModal
(
false
)
}
afterNodes=
{
afterNodes
}
configList=
{
tableData
.
current
}
onSubumit=
{
saveView
}
/>
</
div
>
);
};
export
default
forwardRef
(
ConfigTimeLimit
);
src/pages/bsmanager/workOrder/workflowEdit/workFlowComponents/flowChartComponents/nodeModalComponents/CongfigHeightMsg.jsx
0 → 100644
View file @
cd11ca18
import
React
,
{
useEffect
,
useState
,
useRef
,
forwardRef
,
useImperativeHandle
}
from
'react'
;
import
{
Input
,
Select
,
Divider
,
Tooltip
,
message
,
Form
,
Button
,
Radio
}
from
'antd'
;
import
{
loadFeedbackType
}
from
'@/services/flow/flow'
;
import
styles
from
'../NodeModal.less'
;
const
{
Option
}
=
Select
;
const
CongfigHeightMsg
=
(
props
,
ref
)
=>
{
const
{
nodeChage
,
editMsg
,
flowID
}
=
props
;
const
[
form
]
=
Form
.
useForm
();
const
[
backType
,
setBackType
]
=
useState
([]);
// 反馈类型
useImperativeHandle
(
ref
,
()
=>
({
getParmar
,
}));
useEffect
(()
=>
{
form
.
resetFields
();
// 获取反馈类型
getFeedbackName
();
getFormData
();
},
[
editMsg
]);
const
getParmar
=
()
=>
form
.
getFieldsValue
();
// 获取表单回显
const
getFormData
=
()
=>
{
const
{
aheadHandle
,
NodeHandling
}
=
editMsg
;
form
.
setFieldsValue
({
...
editMsg
,
});
};
// 获取反馈类型
const
getFeedbackName
=
()
=>
{
loadFeedbackType
().
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
setBackType
(
res
.
data
);
}
});
};
// 节点配置表单监听
const
changeValue
=
(
changedFields
,
allFields
)
=>
{
nodeChage
(
changedFields
[
0
].
name
[
0
],
changedFields
[
0
].
value
);
};
return
(
<
div
>
<
Divider
orientation=
"left"
style=
{
{
borderTopColor
:
'#99bbe8'
,
color
:
'#15428b'
,
fontWeight
:
700
,
}
}
>
前端视图、反馈类型配置
</
Divider
>
<
Form
form=
{
form
}
labelCol=
{
{
span
:
6
}
}
wrapperCol=
{
{
span
:
18
}
}
onFieldsChange=
{
changeValue
}
labelAlign=
"left"
>
<
div
style=
{
{
display
:
editMsg
.
NodeType
===
'20'
||
editMsg
.
NodeType
===
'21'
||
editMsg
.
NodeType
===
'22'
||
editMsg
.
NodeType
===
'30'
?
'none'
:
'block'
,
}
}
>
<
Form
.
Item
label=
"前端视图"
name=
"WebPage"
>
<
Input
placeholder=
"请配置前端视图"
/>
</
Form
.
Item
>
<
Form
.
Item
label=
"反馈类型"
name=
"FeedbackName"
>
<
Select
placeholder=
"请选择反馈类型"
allowClear
>
{
backType
.
map
(
item
=>
(
<
Option
value=
{
item
.
value
}
key=
{
item
.
value
}
>
{
item
.
value
}
</
Option
>
))
}
</
Select
>
</
Form
.
Item
>
</
div
>
</
Form
>
</
div
>
);
};
export
default
forwardRef
(
CongfigHeightMsg
);
src/pages/productCenter/webConfig/components/siteConfigDrawer.js
View file @
cd11ca18
...
@@ -571,18 +571,14 @@ export default props => {
...
@@ -571,18 +571,14 @@ export default props => {
<
Form
.
Item
label
=
"二维码地址"
name
=
"qrcode"
>
<
Form
.
Item
label
=
"二维码地址"
name
=
"qrcode"
>
<
Input
placeholder
=
"请输入二维码地址"
autoComplete
=
"off"
/>
<
Input
placeholder
=
"请输入二维码地址"
autoComplete
=
"off"
/>
<
/Form.Item
>
<
/Form.Item
>
<
Form
.
Item
label
=
"Web4地图"
name
=
"hideMap"
>
{
/* <Form.Item label="Web4地图" name="hideMap">
{
/* <Radio.Group>
<Radio value={false}>开启</Radio>
<Radio value>关闭</Radio>
</Radio.Group> */
}
<Switch
<Switch
checkedChildren="开启"
checkedChildren="开启"
unCheckedChildren="关闭"
unCheckedChildren="关闭"
checked={visibleChecked2}
checked={visibleChecked2}
onChange={change2}
onChange={change2}
/>
/>
<
/Form.Item
>
</Form.Item>
*/
}
<
Form
.
Item
label
=
"地图遮罩"
name
=
"useCoverMap"
>
<
Form
.
Item
label
=
"地图遮罩"
name
=
"useCoverMap"
>
<
Switch
<
Switch
checkedChildren
=
"开启"
checkedChildren
=
"开启"
...
@@ -634,18 +630,14 @@ export default props => {
...
@@ -634,18 +630,14 @@ export default props => {
onChange
=
{
change4
}
onChange
=
{
change4
}
/
>
/
>
<
/Form.Item
>
<
/Form.Item
>
<
Form
.
Item
label
=
"菜单样式"
name
=
"menuState"
>
{
/* <Form.Item label="菜单样式" name="menuState">
{
/* <Radio.Group>
<Radio value="open">展开</Radio>
<Radio value="close">折叠</Radio>
</Radio.Group> */
}
<Switch
<Switch
checkedChildren="展开"
checkedChildren="展开"
unCheckedChildren="折叠"
unCheckedChildren="折叠"
checked={visibleChecked5}
checked={visibleChecked5}
onChange={change5}
onChange={change5}
/>
/>
<
/Form.Item
>
</Form.Item>
*/
}
<
/div
>
<
/div
>
<
/Form
>
<
/Form
>
<
ColorLinear
<
ColorLinear
...
...
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