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
9ea0f24d
Commit
9ea0f24d
authored
Oct 27, 2022
by
邓超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 工作流编辑器网关配置
parent
c2247cca
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
189 additions
and
3 deletions
+189
-3
FlowChart.jsx
...r/workOrder/workflowEdit/workFlowComponents/FlowChart.jsx
+13
-3
NodeModal.jsx
...Edit/workFlowComponents/flowChartComponents/NodeModal.jsx
+0
-0
NodeModal.less
...dit/workFlowComponents/flowChartComponents/NodeModal.less
+85
-0
RuleConfig.jsx
...ts/flowChartComponents/nodeModalComponents/RuleConfig.jsx
+78
-0
RuleConfig.less
...s/flowChartComponents/nodeModalComponents/RuleConfig.less
+10
-0
workflow.js
src/services/workflow/workflow.js
+3
-0
No files found.
src/pages/bsmanager/workOrder/workflowEdit/workFlowComponents/FlowChart.jsx
View file @
9ea0f24d
...
...
@@ -370,7 +370,6 @@ const FlowChart = props => {
);
// 双击节点
const
handlerDC
=
(
e
,
node
)
=>
{
console
.
log
(
node
.
part
,
'afdasdf'
);
setNodeKey
(
node
.
part
.
data
.
key
);
setEditMsg
(
node
.
part
.
data
);
setModalType
(
'edit'
);
...
...
@@ -378,7 +377,6 @@ const FlowChart = props => {
};
// 双击线
const
addLineMsg
=
(
e
,
node
)
=>
{
console
.
log
(
node
.
part
.
data
,
'afdasdf'
);
// setLineId(node.part.data.__gohashid);
setLineMsg
(
node
.
part
.
data
);
setLineVisible
(
true
);
...
...
@@ -444,7 +442,16 @@ const FlowChart = props => {
if
(
modalType
===
'edit'
)
{
// 编辑节点
let
nodeData
=
diagram
.
model
.
findNodeDataForKey
(
nodeKey
);
const
{
NodeName
,
NodeType
,
roleList
,
SerialNo
,
aheadHandle
,
NodeHandling
,
nodeDetail
}
=
obj
;
const
{
NodeName
,
NodeType
,
roleList
,
SerialNo
,
aheadHandle
,
NodeHandling
,
nodeDetail
,
RuleList
,
}
=
obj
;
nodeData
.
NodeName
=
NodeName
;
nodeData
.
NodeType
=
NodeType
;
nodeData
.
NodeId
=
nodeKey
;
...
...
@@ -453,6 +460,7 @@ const FlowChart = props => {
nodeData
.
aheadHandle
=
aheadHandle
;
nodeData
.
NodeHandling
=
NodeHandling
;
nodeData
.
nodeDetail
=
nodeDetail
;
nodeData
.
RuleList
=
RuleList
;
diagram
.
model
.
updateTargetBindings
(
nodeData
);
}
// 关闭时进行数据比对看数据是否改变
...
...
@@ -591,6 +599,7 @@ const FlowChart = props => {
</
Spin
>
</
div
>
<
NodeModal
flowID=
{
flowID
}
visible=
{
visible
}
editMsg=
{
editMsg
}
newSerialNo=
{
newSerialNo
}
...
...
@@ -598,6 +607,7 @@ const FlowChart = props => {
modalType=
{
modalType
}
handleCancel=
{
()
=>
setVisible
(
false
)
}
onSubumit=
{
obj
=>
nodeCallBack
(
obj
)
}
flowData=
{
diagram
?
JSON
.
parse
(
diagram
.
model
.
toJson
())
:
{}
}
/>
{
/* <LineModal
visible={lineVisible}
...
...
src/pages/bsmanager/workOrder/workflowEdit/workFlowComponents/flowChartComponents/NodeModal.jsx
View file @
9ea0f24d
This diff is collapsed.
Click to expand it.
src/pages/bsmanager/workOrder/workflowEdit/workFlowComponents/flowChartComponents/NodeModal.less
0 → 100644
View file @
9ea0f24d
.titleBox {
color: #DCDCDC;
font-size: 14px;
}
.btnAddRule {
display: flex;
align-items: center;
justify-content: center;
width: 100%;
height: 31px;
margin: auto;
margin-top: 15px;
margin-bottom: 15px;
border: 1px dashed #188FFD;
border-radius: 3px;
color: #188FFD;
line-height: 31px;
text-align: center;
cursor: pointer;
}
.ruleContent {
width: 100%;
.ruleBox {
.ruleTitle {
display: flex;
justify-content: space-between;
margin-bottom: 15px;
align-items: center;
.textContet {
color: #FFA144;
font-size: 18px;
font-weight: 700;
}
.btnClose {}
}
.formBox {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 15px;
padding-left: 15px;
.label {
white-space: nowrap;
}
.item {
width: 100%;
}
}
.buttonBox {
padding-left: 15px;
width: 100%;
height: 34px;
display: flex;
justify-content: space-between;
align-items: center;
cursor: pointer;
.setButton {
width: 90%;
height: 100%;
line-height: 34px;
border: 2px solid #6A98FA;
text-align: center;
}
.addIcon {
height: 100%;
flex: 1;
border: 2px solid #6A98FA;
border-left: 0px;
text-align: center;
}
}
}
}
\ No newline at end of file
src/pages/bsmanager/workOrder/workflowEdit/workFlowComponents/flowChartComponents/nodeModalComponents/RuleConfig.jsx
0 → 100644
View file @
9ea0f24d
import
React
,
{
useEffect
,
useState
}
from
'react'
;
import
{
Modal
,
Input
,
Form
}
from
'antd'
;
import
styles
from
'./RuleConfig.less'
;
import
Tree
from
'@/components/ExpendableTree'
;
const
{
TextArea
}
=
Input
;
const
RuleConfig
=
props
=>
{
const
{
visible
,
handleCancel
,
fieldList
,
onSubumit
,
RuleContent
}
=
props
;
const
[
rule
,
setRule
]
=
useState
([]);
const
[
treeData
,
setTreeData
]
=
useState
([]);
const
[
form
]
=
Form
.
useForm
();
useEffect
(()
=>
{
if
(
visible
)
{
console
.
log
(
RuleContent
,
'fieldList'
);
setRule
(
RuleContent
);
}
else
{
}
},
[
visible
]);
// 保存线配置
const
onSave
=
()
=>
{
onSubumit
(
rule
);
};
// 处理树数据
const
mapTree
=
(
val
,
index
)
=>
{
return
{
title
:
val
.
TableName
,
key
:
val
.
TableName
,
children
:
val
.
TableFieldNames
.
map
(
item
=>
({
title
:
item
,
key
:
item
})),
};
};
const
onSelect
=
e
=>
{
console
.
log
(
e
);
};
return
(
<
div
>
<
Modal
title=
"节点扭转规则配置"
visible=
{
visible
}
onOk=
{
onSave
}
width=
"860px"
onCancel=
{
handleCancel
}
maskClosable=
{
false
}
destroyOnClose
getContainer=
{
false
}
>
<
div
className=
{
styles
.
configContent
}
>
<
div
className=
{
styles
.
leftTree
}
>
<
Tree
blockNode
// onSelect={onSelect}
treeData=
{
fieldList
.
map
((
item
,
index
)
=>
mapTree
(
item
,
index
))
}
/>
</
div
>
<
div
className=
{
styles
.
rightContent
}
>
<
div
className=
{
styles
.
title
}
>
符合以下条件时工单扭转到对应的节点
</
div
>
<
div
className=
{
styles
.
textAreaBox
}
>
<
TextArea
autoSize=
{
{
minRows
:
19
,
maxRows
:
19
}
}
value=
{
rule
}
rows=
{
4
}
onChange=
{
e
=>
setRule
(
e
.
target
.
value
)
}
/>
</
div
>
<
div
className=
{
styles
.
tipBox
}
>
<
p
>
请从左侧面板选择字段或选项
</
p
>
<
p
>
{
'支持英文模式下运算符(+、-、*、/、>、<、==、!=、<=、>=)及函数'
}
</
p
>
<
p
>
参考场景:
</
p
>
<
p
>
当报销金额大于10000时,才能进入所选节点,则可将流转条件设置为:
</
p
>
<
p
>
{
'报销金额>10000'
}
</
p
>
</
div
>
</
div
>
</
div
>
</
Modal
>
</
div
>
);
};
export
default
RuleConfig
;
src/pages/bsmanager/workOrder/workflowEdit/workFlowComponents/flowChartComponents/nodeModalComponents/RuleConfig.less
0 → 100644
View file @
9ea0f24d
.configContent {
height: 600px;
display: flex;
.leftTree {
width: 250px;
height: 100%;
overflow-y: scroll;
}
}
\ No newline at end of file
src/services/workflow/workflow.js
View file @
9ea0f24d
...
...
@@ -18,3 +18,6 @@ export const CreateOrUpdateNode = param =>
export
const
SaveNodeChange
=
param
=>
post
(
`
${
PUBLISH_SERVICE
}
/WorkFlow/SaveNodeChange`
,
param
);
// 删除流程
export
const
DeleteFlow
=
param
=>
get
(
`
${
PUBLISH_SERVICE
}
/WorkFlow/DeleteFlow`
,
param
);
// 获取流程节点级字段
export
const
GetFormDataSource
=
param
=>
get
(
`
${
PUBLISH_SERVICE
}
/WorkFlow/GetFormDataSource`
,
param
);
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