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
ef24a54b
Commit
ef24a54b
authored
Nov 18, 2022
by
邓超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修改节点配置为常驻,并实时保存
parent
95691697
Pipeline
#64146
passed with stages
Changes
5
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
122 additions
and
47 deletions
+122
-47
FlowChart.jsx
...r/workOrder/workflowEdit/workFlowComponents/FlowChart.jsx
+47
-9
NodeModal.jsx
...Edit/workFlowComponents/flowChartComponents/NodeModal.jsx
+50
-24
NodeModal.less
...dit/workFlowComponents/flowChartComponents/NodeModal.less
+8
-3
ConfigSubprocess.jsx
...wChartComponents/nodeModalComponents/ConfigSubprocess.jsx
+13
-7
workflow.less
src/pages/bsmanager/workOrder/workflowEdit/workflow.less
+4
-4
No files found.
src/pages/bsmanager/workOrder/workflowEdit/workFlowComponents/FlowChart.jsx
View file @
ef24a54b
/* eslint-disable global-require */
/* eslint-disable global-require */
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
React
,
{
useState
,
useEffect
,
useRef
}
from
'react'
;
import
{
Button
,
Modal
,
notification
,
Spin
,
Tooltip
}
from
'antd'
;
import
{
Button
,
Modal
,
notification
,
Spin
,
Tooltip
}
from
'antd'
;
import
lodash
from
'lodash'
;
import
lodash
from
'lodash'
;
import
{
SaveNodeChange
,
GetFlowNode
}
from
'@/services/workflow/workflow'
;
import
{
SaveNodeChange
,
GetFlowNode
}
from
'@/services/workflow/workflow'
;
...
@@ -45,6 +45,7 @@ const FlowChart = props => {
...
@@ -45,6 +45,7 @@ const FlowChart = props => {
});
// 组件内得流程图数据
});
// 组件内得流程图数据
const
[
showLeaveTip
,
setShowLeaveTip
]
=
useState
(
false
);
// 离开路由是否又提醒
const
[
showLeaveTip
,
setShowLeaveTip
]
=
useState
(
false
);
// 离开路由是否又提醒
const
[
buttonLoading
,
setButtonLoading
]
=
useState
();
// 发布按钮保存loading
const
[
buttonLoading
,
setButtonLoading
]
=
useState
();
// 发布按钮保存loading
const
currentNode
=
useRef
();
const
objGo
=
go
.
GraphObject
.
make
;
const
objGo
=
go
.
GraphObject
.
make
;
useEffect
(()
=>
{
useEffect
(()
=>
{
if
(
treeVisible
)
{
if
(
treeVisible
)
{
...
@@ -129,8 +130,15 @@ const FlowChart = props => {
...
@@ -129,8 +130,15 @@ const FlowChart = props => {
console
.
log
(
nodeData
);
console
.
log
(
nodeData
);
diagram
.
model
.
updateTargetBindings
(
nodeData
);
diagram
.
model
.
updateTargetBindings
(
nodeData
);
diagram
.
model
.
setDataProperty
(
nodeData
,
'key'
,
newKey
);
diagram
.
model
.
setDataProperty
(
nodeData
,
'key'
,
newKey
);
currentNode
.
current
=
nodeData
;
setNodeKey
(
nodeData
.
key
);
setEditMsg
(
nodeData
);
setModalType
(
'edit'
);
setVisible
(
true
);
});
});
setAddNodes
([...
AddNodes
,
newKey
]);
setAddNodes
([...
AddNodes
,
newKey
]);
leaveTip
();
leaveTip
();
});
});
// diagram.addDiagramListener('SelectionDeleted', e => {
// diagram.addDiagramListener('SelectionDeleted', e => {
...
@@ -203,6 +211,15 @@ const FlowChart = props => {
...
@@ -203,6 +211,15 @@ const FlowChart = props => {
nodeDataArray
,
nodeDataArray
,
linkDataArray
,
linkDataArray
,
});
});
// 初次选中
if
(
nodeDataArray
?.
length
>
0
)
{
currentNode
.
current
=
diagram
.
model
.
findNodeDataForKey
(
nodeDataArray
[
0
].
NodeId
);
setNodeKey
(
currentNode
.
current
.
key
);
setEditMsg
(
currentNode
.
current
);
setModalType
(
'edit'
);
setVisible
(
true
);
}
// 修改复制后节点内容
// 修改复制后节点内容
diagram
.
model
.
copyNodeDataFunction
=
(
obj
,
model
)
=>
{
diagram
.
model
.
copyNodeDataFunction
=
(
obj
,
model
)
=>
{
let
copyObj
=
lodash
.
cloneDeep
(
obj
);
let
copyObj
=
lodash
.
cloneDeep
(
obj
);
...
@@ -531,7 +548,7 @@ const FlowChart = props => {
...
@@ -531,7 +548,7 @@ const FlowChart = props => {
maxSize
:
new
go
.
Size
(
120
,
NaN
),
maxSize
:
new
go
.
Size
(
120
,
NaN
),
maxLines
:
1
,
maxLines
:
1
,
alignment
:
go
.
Spot
.
Center
,
alignment
:
go
.
Spot
.
Center
,
margin
:
new
go
.
Margin
(
0
,
1
0
,
0
,
10
),
margin
:
new
go
.
Margin
(
0
,
1
5
,
0
,
15
),
overflow
:
go
.
TextBlock
.
OverflowEllipsis
,
overflow
:
go
.
TextBlock
.
OverflowEllipsis
,
font
:
'normal 12pt Microsoft YaHei'
,
font
:
'normal 12pt Microsoft YaHei'
,
},
},
...
@@ -604,10 +621,16 @@ const FlowChart = props => {
...
@@ -604,10 +621,16 @@ const FlowChart = props => {
mouseLeave
(
e
,
node
)
{
mouseLeave
(
e
,
node
)
{
showSmallPorts
(
node
,
false
);
showSmallPorts
(
node
,
false
);
},
},
click
(
e
,
node
)
{
handlerDC
(
e
,
node
);
},
// 处理双击
// 处理双击
doubleClick
(
e
,
node
)
{
doubleClick
(
e
,
node
)
{
// 双击事件
// 双击事件
handlerDC
(
e
,
node
);
// 双击执行的方法
// handlerDC(e, node); // 双击执行的方法
},
selectionChanged
:
node
=>
{
// console.log(node.data, 'nodenodenode');
},
},
toolTip
:
objGo
(
toolTip
:
objGo
(
'ToolTip'
,
'ToolTip'
,
...
@@ -726,12 +749,9 @@ const FlowChart = props => {
...
@@ -726,12 +749,9 @@ const FlowChart = props => {
let
obj
=
JSON
.
parse
(
v
);
let
obj
=
JSON
.
parse
(
v
);
let
nodeData
=
diagram
.
model
.
findNodeDataForKey
(
obj
.
from
);
let
nodeData
=
diagram
.
model
.
findNodeDataForKey
(
obj
.
from
);
if
(
nodeData
.
NodeType
===
'20'
||
nodeData
.
NodeType
===
'21'
)
{
if
(
nodeData
.
NodeType
===
'20'
||
nodeData
.
NodeType
===
'21'
)
{
if
(
nodeData
.
RuleList
.
some
(
ele
=>
ele
.
NextNodeId
===
obj
.
to
))
{
return
nodeData
.
RuleList
.
find
(
ele
=>
ele
.
NextNodeId
===
obj
.
to
).
RuleName
;
return
nodeData
.
RuleList
.
find
(
ele
=>
ele
.
NextNodeId
===
obj
.
to
).
RuleName
;
}
}
return
''
;
return
''
;
}
return
''
;
};
};
// 是否显示端口
// 是否显示端口
const
showSmallPorts
=
(
node
,
show
)
=>
{
const
showSmallPorts
=
(
node
,
show
)
=>
{
...
@@ -832,8 +852,12 @@ const FlowChart = props => {
...
@@ -832,8 +852,12 @@ const FlowChart = props => {
};
};
// 双击节点
// 双击节点
const
handlerDC
=
(
e
,
node
)
=>
{
const
handlerDC
=
(
e
,
node
)
=>
{
console
.
log
(
node
.
data
,
'nondojfadsoijgsd'
);
setNodeKey
(
node
.
part
.
data
.
key
);
setNodeKey
(
node
.
part
.
data
.
key
);
setEditMsg
(
node
.
part
.
data
);
setEditMsg
(
node
.
part
.
data
);
// diagram.model.setDataProperty(node.data, 'NodeName', 'fdasjkljfkldsajf');
currentNode
.
current
=
node
.
data
;
setModalType
(
'edit'
);
setModalType
(
'edit'
);
setVisible
(
true
);
setVisible
(
true
);
};
};
...
@@ -899,7 +923,7 @@ const FlowChart = props => {
...
@@ -899,7 +923,7 @@ const FlowChart = props => {
// 给线上添加文字
// 给线上添加文字
let
diagramObj
=
JSON
.
parse
(
diagram
.
model
.
toJson
());
let
diagramObj
=
JSON
.
parse
(
diagram
.
model
.
toJson
());
console
.
log
(
diagramObj
.
linkDataArray
,
'diagramObj.linkDataArray'
);
diagramObj
.
linkDataArray
.
forEach
(
item
=>
{
diagramObj
.
linkDataArray
.
forEach
(
item
=>
{
let
node
=
diagram
.
model
.
findLinkDataForKey
(
item
.
LineKey
);
let
node
=
diagram
.
model
.
findLinkDataForKey
(
item
.
LineKey
);
node
.
text
=
item
.
RuleName
;
node
.
text
=
item
.
RuleName
;
...
@@ -962,7 +986,20 @@ const FlowChart = props => {
...
@@ -962,7 +986,20 @@ const FlowChart = props => {
}
}
return
obj
;
return
obj
;
};
};
// 节点数据改边
const
nodeChage
=
(
key
,
value
)
=>
{
console
.
log
(
key
,
value
);
let
obj
=
JSON
.
parse
(
JSON
.
stringify
(
currentNode
.
current
));
obj
[
key
]
=
value
;
const
nodeDetail
=
JSON
.
stringify
(
obj
);
diagram
.
model
.
setDataProperty
(
currentNode
.
current
,
key
,
value
);
if
(
key
===
'roleList'
)
{
diagram
.
model
.
setDataProperty
(
currentNode
.
current
,
'nodeDetail'
,
nodeDetail
);
}
diagram
.
rebuildParts
();
};
// 保存流程
// 保存流程
const
saveFlow
=
()
=>
{
const
saveFlow
=
()
=>
{
setButtonLoading
(
true
);
setButtonLoading
(
true
);
...
@@ -1051,18 +1088,19 @@ const FlowChart = props => {
...
@@ -1051,18 +1088,19 @@ const FlowChart = props => {
<
div
className=
{
styles
.
chartBox
}
>
<
div
className=
{
styles
.
chartBox
}
>
<
div
id=
"myOverviewDiv"
className=
{
styles
.
myOverviewDiv
}
/>
<
div
id=
"myOverviewDiv"
className=
{
styles
.
myOverviewDiv
}
/>
<
div
className=
{
styles
.
flowName
}
>
{
flowData
.
flowName
}
</
div
>
<
div
className=
{
styles
.
flowName
}
>
{
flowData
.
flowName
}
</
div
>
{
/* <Spin spinning={chartLoading}> */
}
<
Spin
spinning=
{
chartLoading
}
>
<
div
<
div
id=
"myDiagramDiv"
id=
"myDiagramDiv"
className=
{
styles
.
myDiagramDiv
}
className=
{
styles
.
myDiagramDiv
}
style=
{
{
backgroundColor
:
'#EFF8FA'
}
}
style=
{
{
backgroundColor
:
'#EFF8FA'
}
}
/>
/>
{
/* </Spin> */
}
</
Spin
>
<
NodeModal
<
NodeModal
flowID=
{
flowID
}
flowID=
{
flowID
}
visible=
{
visible
}
visible=
{
visible
}
editMsg=
{
editMsg
}
editMsg=
{
editMsg
}
modalType=
{
modalType
}
modalType=
{
modalType
}
nodeChage=
{
nodeChage
}
handleCancel=
{
()
=>
setVisible
(
false
)
}
handleCancel=
{
()
=>
setVisible
(
false
)
}
onSubumit=
{
(
obj
,
nextlinkNodes
)
=>
nodeCallBack
(
obj
,
nextlinkNodes
)
}
onSubumit=
{
(
obj
,
nextlinkNodes
)
=>
nodeCallBack
(
obj
,
nextlinkNodes
)
}
flowData=
{
diagram
?
JSON
.
parse
(
diagram
.
model
.
toJson
())
:
{}
}
flowData=
{
diagram
?
JSON
.
parse
(
diagram
.
model
.
toJson
())
:
{}
}
...
...
src/pages/bsmanager/workOrder/workflowEdit/workFlowComponents/flowChartComponents/NodeModal.jsx
View file @
ef24a54b
...
@@ -35,7 +35,7 @@ let chnNumChar = ['零', '一', '二', '三', '四', '五', '六', '七', '八',
...
@@ -35,7 +35,7 @@ let chnNumChar = ['零', '一', '二', '三', '四', '五', '六', '七', '八',
let
chnUnitSection
=
[
''
,
'万'
,
'亿'
,
'万亿'
,
'亿亿'
];
let
chnUnitSection
=
[
''
,
'万'
,
'亿'
,
'万亿'
,
'亿亿'
];
let
chnUnitChar
=
[
''
,
'十'
,
'百'
,
'千'
];
let
chnUnitChar
=
[
''
,
'十'
,
'百'
,
'千'
];
const
NodeModal
=
props
=>
{
const
NodeModal
=
props
=>
{
const
{
flowData
,
onSubumit
,
handleCancel
,
visible
,
editMsg
,
flowID
}
=
props
;
const
{
flowData
,
onSubumit
,
handleCancel
,
visible
,
editMsg
,
flowID
,
nodeChage
}
=
props
;
const
[
form
]
=
Form
.
useForm
();
const
[
form
]
=
Form
.
useForm
();
const
[
showRoal
,
setShowRoal
]
=
useState
(
false
);
// 是否显示选择角色用户弹窗
const
[
showRoal
,
setShowRoal
]
=
useState
(
false
);
// 是否显示选择角色用户弹窗
const
[
showRule
,
setShowRule
]
=
useState
(
false
);
// 是否显示节点扭转规则弹窗
const
[
showRule
,
setShowRule
]
=
useState
(
false
);
// 是否显示节点扭转规则弹窗
...
@@ -53,7 +53,7 @@ const NodeModal = props => {
...
@@ -53,7 +53,7 @@ const NodeModal = props => {
roleList
:
[],
roleList
:
[],
nodeDetail
:
{},
nodeDetail
:
{},
RuleList
:
{},
RuleList
:
{},
CarbonCopyPeopleList
:
{}
,
CarbonCopyPeopleList
:
[]
,
});
});
// const [CarbonCopyPeopleList, setCarbonCopyPeopleList] = useState([]); // 抄送人列表
// const [CarbonCopyPeopleList, setCarbonCopyPeopleList] = useState([]); // 抄送人列表
// const [RuleList, setRuleList] = useState([]); // 规则配置列表
// const [RuleList, setRuleList] = useState([]); // 规则配置列表
...
@@ -74,8 +74,12 @@ const NodeModal = props => {
...
@@ -74,8 +74,12 @@ const NodeModal = props => {
RuleList
.
current
=
[];
RuleList
.
current
=
[];
CarbonCopyPeopleList
.
current
=
[];
CarbonCopyPeopleList
.
current
=
[];
if
(
visible
)
{
if
(
JSON
.
stringify
(
editMsg
)
===
'{}'
)
{
return
;
}
// if (visible) {
console
.
log
(
editMsg
,
'editMsg'
);
console
.
log
(
editMsg
,
'editMsg'
);
// 获取网关连接的节点
// 获取网关连接的节点
if
(
editMsg
.
NodeType
===
'21'
||
editMsg
.
NodeType
===
'20'
)
{
if
(
editMsg
.
NodeType
===
'21'
||
editMsg
.
NodeType
===
'20'
)
{
getNextLinkNodes
(
editMsg
.
key
);
getNextLinkNodes
(
editMsg
.
key
);
...
@@ -112,16 +116,16 @@ const NodeModal = props => {
...
@@ -112,16 +116,16 @@ const NodeModal = props => {
getFormData
();
getFormData
();
console
.
log
(
form
.
getFieldValue
(),
'getFieldValue'
);
console
.
log
(
form
.
getFieldValue
(),
'getFieldValue'
);
}
else
{
//
} else {
nextlinkNodes
.
current
=
[];
//
nextlinkNodes.current = [];
previousLinkNodes
.
current
=
[];
//
previousLinkNodes.current = [];
talbeList
.
current
=
[];
//
talbeList.current = [];
RuleList
.
current
=
[];
//
RuleList.current = [];
CarbonCopyPeopleList
.
current
=
[];
//
CarbonCopyPeopleList.current = [];
setFlag
(
flag
+
1
);
//
setFlag(flag + 1);
}
//
}
},
[
visible
,
editMsg
]);
},
[
visible
,
editMsg
]);
const
SectionToChinese
=
section
=>
{
const
SectionToChinese
=
section
=>
{
let
strIns
=
''
;
let
strIns
=
''
;
...
@@ -286,6 +290,7 @@ const NodeModal = props => {
...
@@ -286,6 +290,7 @@ const NodeModal = props => {
RuleList
:
RuleList
.
current
,
RuleList
:
RuleList
.
current
,
CarbonCopyPeopleList
:
CarbonCopyPeopleList
.
current
,
CarbonCopyPeopleList
:
CarbonCopyPeopleList
.
current
,
});
});
nodeChage
(
'roleList'
,
roleList
);
};
};
// 添加角色或机构
// 添加角色或机构
const
addUser
=
selectList
=>
{
const
addUser
=
selectList
=>
{
...
@@ -303,6 +308,7 @@ const NodeModal = props => {
...
@@ -303,6 +308,7 @@ const NodeModal = props => {
RuleList
:
RuleList
.
current
,
RuleList
:
RuleList
.
current
,
CarbonCopyPeopleList
:
CarbonCopyPeopleList
.
current
,
CarbonCopyPeopleList
:
CarbonCopyPeopleList
.
current
,
});
});
nodeChage
(
'roleList'
,
selectList
);
setShowRoal
(
false
);
setShowRoal
(
false
);
};
};
// 添加默认承办人
// 添加默认承办人
...
@@ -314,6 +320,7 @@ const NodeModal = props => {
...
@@ -314,6 +320,7 @@ const NodeModal = props => {
list
[
editIndex
].
defaultUserId
=
userId
;
list
[
editIndex
].
defaultUserId
=
userId
;
let
nodeDetail
=
JSON
.
stringify
({
...
nodeMsg
,
roleList
:
list
});
let
nodeDetail
=
JSON
.
stringify
({
...
nodeMsg
,
roleList
:
list
});
setNodeMsg
({
...
nodeMsg
,
roleList
:
list
,
nodeDetail
});
setNodeMsg
({
...
nodeMsg
,
roleList
:
list
,
nodeDetail
});
nodeChage
(
'roleList'
,
list
);
setShowUnderTaker
(
false
);
setShowUnderTaker
(
false
);
};
};
// 编辑默认承办人
// 编辑默认承办人
...
@@ -338,6 +345,7 @@ const NodeModal = props => {
...
@@ -338,6 +345,7 @@ const NodeModal = props => {
list
.
push
({
RuleContent
:
''
,
NextNodeId
:
''
,
TableNames
:
''
,
RuleName
:
''
});
list
.
push
({
RuleContent
:
''
,
NextNodeId
:
''
,
TableNames
:
''
,
RuleName
:
''
});
// setRuleList(list);
// setRuleList(list);
RuleList
.
current
=
list
;
RuleList
.
current
=
list
;
nodeChage
(
'RuleList'
,
list
);
setFlag
(
flag
+
1
);
setFlag
(
flag
+
1
);
};
};
// 删除规则
// 删除规则
...
@@ -346,6 +354,7 @@ const NodeModal = props => {
...
@@ -346,6 +354,7 @@ const NodeModal = props => {
list
.
splice
(
index
,
1
);
list
.
splice
(
index
,
1
);
// setRuleList(list);
// setRuleList(list);
RuleList
.
current
=
list
;
RuleList
.
current
=
list
;
nodeChage
(
'RuleList'
,
list
);
setFlag
(
flag
+
1
);
setFlag
(
flag
+
1
);
};
};
// 规则回填
// 规则回填
...
@@ -356,6 +365,7 @@ const NodeModal = props => {
...
@@ -356,6 +365,7 @@ const NodeModal = props => {
console
.
log
(
list
,
'listlist'
);
console
.
log
(
list
,
'listlist'
);
// setRuleList(list);
// setRuleList(list);
RuleList
.
current
=
list
;
RuleList
.
current
=
list
;
nodeChage
(
'RuleList'
,
list
);
setShowRule
(
false
);
setShowRule
(
false
);
};
};
// 选择人员回填
// 选择人员回填
...
@@ -363,6 +373,7 @@ const NodeModal = props => {
...
@@ -363,6 +373,7 @@ const NodeModal = props => {
console
.
log
(
e
);
console
.
log
(
e
);
// setCarbonCopyPeopleList(e);
// setCarbonCopyPeopleList(e);
CarbonCopyPeopleList
.
current
=
e
;
CarbonCopyPeopleList
.
current
=
e
;
nodeChage
(
'CarbonCopyPeopleList'
,
CarbonCopyPeopleList
.
current
);
setShowPersonSelect
(
false
);
setShowPersonSelect
(
false
);
};
};
// 网关表单配置监听
// 网关表单配置监听
...
@@ -380,8 +391,15 @@ const NodeModal = props => {
...
@@ -380,8 +391,15 @@ const NodeModal = props => {
// setRuleList(list);
// setRuleList(list);
RuleList
.
current
=
list
;
RuleList
.
current
=
list
;
nodeChage
(
'RuleList'
,
list
);
setFlag
(
flag
+
1
);
setFlag
(
flag
+
1
);
};
};
// 节点配置表单监听
const
changeValue
=
(
changedFields
,
allFields
)
=>
{
console
.
log
(
changedFields
,
allFields
);
nodeChage
(
changedFields
[
0
].
name
[
0
],
changedFields
[
0
].
value
);
};
// 配置当前规则
// 配置当前规则
const
editRule
=
(
msg
,
index
)
=>
{
const
editRule
=
(
msg
,
index
)
=>
{
console
.
log
(
msg
,
'masgasdg'
);
console
.
log
(
msg
,
'masgasdg'
);
...
@@ -424,6 +442,7 @@ const NodeModal = props => {
...
@@ -424,6 +442,7 @@ const NodeModal = props => {
const
getSubNodeMsg
=
msg
=>
{
const
getSubNodeMsg
=
msg
=>
{
console
.
log
(
msg
,
'asdgfasdg'
);
console
.
log
(
msg
,
'asdgfasdg'
);
subNodeMsg
.
current
=
msg
;
subNodeMsg
.
current
=
msg
;
nodeChage
(
'SubFlowInfo'
,
msg
);
};
};
// 定义表格
// 定义表格
const
columns
=
[
const
columns
=
[
...
@@ -512,12 +531,12 @@ const NodeModal = props => {
...
@@ -512,12 +531,12 @@ const NodeModal = props => {
return
(
return
(
<>
<>
{
/* <div style={{ height: 200, width: 425, position: 'relative' }}> */
}
{
/* <div style={{ height: 200, width: 425, position: 'relative' }}> */
}
<
Drawer
{
/*
<Drawer
title={null}
title={null}
closable={false}
closable={false}
width="25%"
width="25%"
onClose={handleCancel}
onClose={handleCancel}
visible
=
{
visible
}
visible
mask={false}
mask={false}
bodyStyle={{ paddingBottom: 20 }}
bodyStyle={{ paddingBottom: 20 }}
getContainer={false}
getContainer={false}
...
@@ -534,8 +553,8 @@ const NodeModal = props => {
...
@@ -534,8 +553,8 @@ const NodeModal = props => {
</Button>
</Button>
</Space>
</Space>
}
}
>
>
*/
}
{
/* <div className={styles.nodeConfig}> */
}
<
div
className=
{
styles
.
nodeConfig
}
>
<
Divider
<
Divider
orientation=
"left"
orientation=
"left"
style=
{
{
style=
{
{
...
@@ -563,7 +582,13 @@ const NodeModal = props => {
...
@@ -563,7 +582,13 @@ const NodeModal = props => {
并行网关:根据网关的连接情况,强制所有出口分支流程必须流转。
并行网关:根据网关的连接情况,强制所有出口分支流程必须流转。
</
p
>
</
p
>
</
div
>
</
div
>
<
Form
form=
{
form
}
labelCol=
{
{
span
:
6
}
}
wrapperCol=
{
{
span
:
18
}
}
labelAlign=
"left"
>
<
Form
form=
{
form
}
labelCol=
{
{
span
:
6
}
}
wrapperCol=
{
{
span
:
18
}
}
onFieldsChange=
{
changeValue
}
labelAlign=
"left"
>
<
Form
.
Item
<
Form
.
Item
label=
"排序"
label=
"排序"
name=
"SerialNo"
name=
"SerialNo"
...
@@ -625,7 +650,8 @@ const NodeModal = props => {
...
@@ -625,7 +650,8 @@ const NodeModal = props => {
display
:
display
:
form
?.
getFieldValue
(
'NodeType'
)
===
'20'
||
form
?.
getFieldValue
(
'NodeType'
)
===
'20'
||
form
?.
getFieldValue
(
'NodeType'
)
===
'21'
||
form
?.
getFieldValue
(
'NodeType'
)
===
'21'
||
form
?.
getFieldValue
(
'NodeType'
)
===
'22'
form
?.
getFieldValue
(
'NodeType'
)
===
'22'
||
form
?.
getFieldValue
(
'NodeType'
)
===
'30'
?
'none'
?
'none'
:
'block'
,
:
'block'
,
}
}
}
}
...
@@ -685,12 +711,12 @@ const NodeModal = props => {
...
@@ -685,12 +711,12 @@ const NodeModal = props => {
<
div
className=
{
styles
.
buttonBox
}
onClick=
{
()
=>
editCC
()
}
>
<
div
className=
{
styles
.
buttonBox
}
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'
}
}
>
>
<
Tooltip
title=
{
CarbonCopyPeopleList
.
current
.
map
(
item
=>
item
.
label
).
join
(
','
)
}
>
<
Tooltip
title=
{
CarbonCopyPeopleList
?
.
current
.
map
(
item
=>
item
.
label
).
join
(
','
)
}
>
<
span
>
<
span
>
{
CarbonCopyPeopleList
.
current
.
length
>
0
{
CarbonCopyPeopleList
?
.
current
.
length
>
0
?
CarbonCopyPeopleList
.
current
.
map
(
item
=>
item
.
label
).
join
(
','
)
?
CarbonCopyPeopleList
?
.
current
.
map
(
item
=>
item
.
label
).
join
(
','
)
:
'选择抄送人'
}
:
'选择抄送人'
}
</
span
>
</
span
>
</
Tooltip
>
</
Tooltip
>
...
@@ -699,10 +725,10 @@ const NodeModal = props => {
...
@@ -699,10 +725,10 @@ const NodeModal = props => {
<
PlusOutlined
/>
<
PlusOutlined
/>
</
div
>
</
div
>
</
div
>
</
div
>
</
div
>
{
form
?.
getFieldValue
(
'NodeType'
)
===
'30'
&&
(
{
form
?.
getFieldValue
(
'NodeType'
)
===
'30'
&&
(
<
ConfigSubprocess
nodeMsg=
{
nodeMsg
}
flowID=
{
flowID
}
getSubNodeMsg=
{
getSubNodeMsg
}
/>
<
ConfigSubprocess
nodeMsg=
{
nodeMsg
}
flowID=
{
flowID
}
getSubNodeMsg=
{
getSubNodeMsg
}
/>
)
}
)
}
</
div
>
<
div
<
div
style=
{
{
style=
{
{
display
:
display
:
...
@@ -808,8 +834,8 @@ const NodeModal = props => {
...
@@ -808,8 +834,8 @@ const NodeModal = props => {
))
}
))
}
</
div
>
</
div
>
</
div
>
</
div
>
{
/* </div> */
}
</
div
>
</
Drawer
>
{
/* </Drawer> */
}
{
/* </div> */
}
{
/* </div> */
}
<
RoalChoose
<
RoalChoose
roleList=
{
nodeMsg
.
roleList
}
roleList=
{
nodeMsg
.
roleList
}
...
...
src/pages/bsmanager/workOrder/workflowEdit/workFlowComponents/flowChartComponents/NodeModal.less
View file @
ef24a54b
.nodeConfig {
.nodeConfig {
position: absolute;
height: 100%;
height: 100%;
min-width: 425px;
// min-width: 425px;
right: 0;
top: 0;
background-color: #fff;
width: 25%;
width: 25%;
padding: 20px;
padding: 20px;
overflow-y: scroll;
overflow-y: scroll;
margin-left: 15px;
margin-left: 15px;
z-index: 10;
.titleBox {
.titleBox {
color: #BCBCBC;
color: #BCBCBC;
...
@@ -31,7 +36,7 @@
...
@@ -31,7 +36,7 @@
}
}
.buttonBox {
.buttonBox {
padding-left: 15px;
//
padding-left: 15px;
width: 100%;
width: 100%;
height: 34px;
height: 34px;
display: flex;
display: flex;
...
@@ -160,7 +165,7 @@
...
@@ -160,7 +165,7 @@
}
}
.buttonBox {
.buttonBox {
padding-left: 15px;
//
padding-left: 15px;
width: 100%;
width: 100%;
height: 34px;
height: 34px;
display: flex;
display: flex;
...
...
src/pages/bsmanager/workOrder/workflowEdit/workFlowComponents/flowChartComponents/nodeModalComponents/ConfigSubprocess.jsx
View file @
ef24a54b
...
@@ -74,25 +74,31 @@ const ConfigSubprocess = props => {
...
@@ -74,25 +74,31 @@ const ConfigSubprocess = props => {
}, [nodeMsg]);
}, [nodeMsg]);
const changeValue = (changedFields, allFields) => {
const changeValue = (changedFields, allFields) => {
console.log(allFields);
console.log(changedFields, 'changedFields');
const msg = {
let MapFields = [];
SubFlowEventConfigID: Number(allFields[0]?.value?.split('-')[0]),
if (changedFields[0].name[0] === 'MapFields') {
SubFlowID: Number(allFields[0]?.value?.split('-')[1]),
MapFields = allFields[1]?.value?.map(item => ({
MapFields: allFields[1]?.value?.map(item => ({
ParentFlowMapTableName: item?.nodeField?.split('-')[0],
ParentFlowMapTableName: item?.nodeField?.split('-')[0],
ParentFlowMapFieldName: item?.nodeField?.split('-')[1],
ParentFlowMapFieldName: item?.nodeField?.split('-')[1],
ParentFlowMapTableType: item?.nodeField?.split('-')[2],
ParentFlowMapTableType: item?.nodeField?.split('-')[2],
SubFlowMapTableName: item?.subNodeField?.split('-')[0],
SubFlowMapTableName: item?.subNodeField?.split('-')[0],
SubFlowMapFieldName: item?.subNodeField?.split('-')[1],
SubFlowMapFieldName: item?.subNodeField?.split('-')[1],
})),
}));
}
const msg = {
SubFlowEventConfigID: Number(allFields[0]?.value?.split('-')[0]),
SubFlowID: Number(allFields[0]?.value?.split('-')[1]),
MapFields: MapFields,
};
};
getSubNodeMsg(msg);
getSubNodeMsg(msg);
// if (changedFields[0].name[0] === 'password') {
// if (changedFields[0].name[0] === 'password') {
// }
// }
};
};
// 选择流程
// 选择流程
const flowChage = e => {
const flowChage = e => {
console.log(e);
console.log(e);
form.setFieldsValue({ MapFields: [] });
const subFlowID = e.split('-')[1];
const subFlowID = e.split('-')[1];
console.log(subFlowID, 'afsdfsda');
console.log(subFlowID, 'afsdfsda');
GetFlowMapFields({ flowID, subFlowID }).then(res => {
GetFlowMapFields({ flowID, subFlowID }).then(res => {
...
@@ -110,7 +116,7 @@ const ConfigSubprocess = props => {
...
@@ -110,7 +116,7 @@ const ConfigSubprocess = props => {
}),
}),
);
);
console.log(res.data.ParentFlowMapList, 'res.data.ParentFlowMapList');
console.log(res.data.ParentFlowMapList, 'res.data.ParentFlowMapList');
form.setFieldsValue({ MapFields: [] });
setCurrentNodeField(res.data.ParentFlowMapList);
setCurrentNodeField(res.data.ParentFlowMapList);
setChildNodeField(res.data.SubFlowMapInfo.TableFieldNames);
setChildNodeField(res.data.SubFlowMapInfo.TableFieldNames);
} else {
} else {
...
...
src/pages/bsmanager/workOrder/workflowEdit/workflow.less
View file @
ef24a54b
...
@@ -104,7 +104,7 @@
...
@@ -104,7 +104,7 @@
.chartBox {
.chartBox {
position: relative;
position: relative;
display: flex;
//
display: flex;
height: calc(100% - 52px);
height: calc(100% - 52px);
.flowName {
.flowName {
...
@@ -112,7 +112,7 @@
...
@@ -112,7 +112,7 @@
top: 10px;
top: 10px;
left: 50%;
left: 50%;
transform: translateX(-
5
0%);
transform: translateX(-
20
0%);
font-size: 24px;
font-size: 24px;
font-weight: 700;
font-weight: 700;
color: #1585FF;
color: #1585FF;
...
@@ -214,8 +214,8 @@
...
@@ -214,8 +214,8 @@
}
}
.myDiagramDiv {
.myDiagramDiv {
// width: 100
%;
width: 75
%;
flex: 1;
//
flex: 1;
height: 100%;
height: 100%;
}
}
}
}
...
...
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