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
fd10e934
Commit
fd10e934
authored
Nov 02, 2022
by
邓超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 规则组件
parent
2f66a49f
Pipeline
#62991
waiting for manual action with stages
Changes
5
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
49 additions
and
11 deletions
+49
-11
index.jsx
src/components/RuleConfig/index.jsx
+9
-1
index.less
src/components/RuleConfig/index.less
+0
-0
FlowChart.jsx
...r/workOrder/workflowEdit/workFlowComponents/FlowChart.jsx
+29
-3
NodeModal.jsx
...Edit/workFlowComponents/flowChartComponents/NodeModal.jsx
+7
-4
NodeModal.less
...dit/workFlowComponents/flowChartComponents/NodeModal.less
+4
-3
No files found.
src/
pages/bsmanager/workOrder/workflowEdit/workFlowComponents/flowChartComponents/nodeModalComponents/RuleConfig
.jsx
→
src/
components/RuleConfig/index
.jsx
View file @
fd10e934
/*
* @Author: dengchao 754083046@qq.com
* @Date: 2022-11-02 14:37:53
* @LastEditors: dengchao 754083046@qq.com
* @LastEditTime: 2022-11-02 14:40:57
* @FilePath: \maintenance\src\components\RuleConfig\index.jsx
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
import
React
,
{
useEffect
,
useState
,
useRef
}
from
'react'
;
import
{
Modal
,
Input
,
Form
}
from
'antd'
;
import
styles
from
'./
RuleConfig
.less'
;
import
styles
from
'./
index
.less'
;
import
Tree
from
'@/components/ExpendableTree'
;
const
{
TextArea
}
=
Input
;
const
RuleConfig
=
props
=>
{
...
...
src/
pages/bsmanager/workOrder/workflowEdit/workFlowComponents/flowChartComponents/nodeModalComponents/RuleConfig
.less
→
src/
components/RuleConfig/index
.less
View file @
fd10e934
File moved
src/pages/bsmanager/workOrder/workflowEdit/workFlowComponents/FlowChart.jsx
View file @
fd10e934
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
{
Button
,
Modal
,
notification
,
Spin
,
Tooltip
}
from
'antd'
;
import
lodash
from
'lodash'
;
import
{
SaveNodeChange
,
GetFlowNode
}
from
'@/services/workflow/workflow'
;
import
{
ExclamationCircleOutlined
}
from
'@ant-design/icons'
;
...
...
@@ -23,8 +24,8 @@ const nodeTypeList = [
{
nodeTypeName
:
'普通节点'
,
NodeType
:
'0'
,
src
:
imgGeneral
},
{
nodeTypeName
:
'结束节点'
,
NodeType
:
'2'
,
src
:
imgEnd
},
{
nodeTypeName
:
'条件网关'
,
NodeType
:
'20'
,
src
:
gatewayExclusive
},
{
nodeTypeName
:
'汇合网关'
,
NodeType
:
'21'
,
src
:
gatewayInclude
},
{
nodeTypeName
:
'并行网关'
,
NodeType
:
'22'
,
src
:
gatewayConfluence
},
{
nodeTypeName
:
'汇合网关'
,
NodeType
:
'21'
,
src
:
gatewayInclude
},
];
const
FlowChart
=
props
=>
{
const
{
flowData
,
flowID
,
chartLoading
,
leaveCallBack
}
=
props
;
...
...
@@ -88,6 +89,12 @@ const FlowChart = props => {
showDeleteConfirm
();
return
false
;
});
// diagram.addDiagramListener('SelectionDeleted', e => {
// });
console
.
log
(
diagram
.
model
,
'diagram.model'
);
// 监听复制事件并修改复制内容
// setTimeout(() => {}, 1200);
},
[]);
useEffect
(()
=>
{
if
(
flowData
)
{
...
...
@@ -137,6 +144,18 @@ const FlowChart = props => {
nodeDataArray
,
linkDataArray
:
currentFlowData
.
Lines
,
});
// 修改复制后节点内容
diagram
.
model
.
copyNodeDataFunction
=
(
obj
,
model
)
=>
{
let
copyObj
=
JSON
.
parse
(
JSON
.
stringify
(
obj
));
delete
copyObj
.
ActivityId
;
return
copyObj
;
};
// 修改复制后线内容
diagram
.
model
.
copyLinkDataFunction
=
(
obj
,
model
)
=>
{
let
copyObj
=
lodash
.
cloneDeep
(
obj
);
delete
copyObj
.
LineId
;
return
copyObj
;
};
// diagram.model.linkKeyProperty = 'LineId';
// diagram.model.makeUniqueLinkKeyFunction = (model, data) => {
// let i = model.linkDataArray.length * 2 + 2;
...
...
@@ -171,7 +190,7 @@ const FlowChart = props => {
'undoManager.isEnabled'
:
true
,
allowDragOut
:
false
,
'dragSelectingTool.isEnabled'
:
false
,
// 禁止多选
allowCopy
:
fals
e
,
// 禁止复制
allowCopy
:
tru
e
,
// 禁止复制
nodeSelectionAdornmentTemplate
:
objGo
(
go
.
Adornment
,
'Auto'
,
...
...
@@ -259,7 +278,7 @@ const FlowChart = props => {
{
maxSize
:
new
go
.
Size
(
130
,
NaN
),
wrap
:
go
.
TextBlock
.
WrapFit
,
font
:
'normal 12pt serif'
},
new
go
.
Binding
(
'text'
,
'nodeDetail'
,
v
=>
{
const
obj
=
JSON
.
parse
(
v
);
if
(
obj
.
NodeType
===
'20'
||
obj
.
NodeType
===
'21'
)
{
if
(
obj
.
NodeType
===
'20'
||
obj
.
NodeType
===
'21'
||
obj
.
NodeType
===
'22'
)
{
return
''
;
}
return
obj
.
NodeName
;
...
...
@@ -292,6 +311,13 @@ const FlowChart = props => {
makePort
(
'R'
,
go
.
Spot
.
Right
),
makePort
(
'B'
,
go
.
Spot
.
Bottom
),
{
linkValidation
(
fromnode
,
fromport
,
tonode
,
toport
,
thisLink
)
{
console
.
log
(
fromnode
.
data
,
tonode
.
data
,
'aaaaaa'
);
if
(
fromnode
.
data
.
NodeType
===
'20'
&&
tonode
.
data
.
NodeType
===
'20'
)
{
return
false
;
}
return
true
;
},
// 处理鼠标进入/离开事件以显示/隐藏端口
mouseEnter
(
e
,
node
)
{
showSmallPorts
(
node
,
true
);
...
...
src/pages/bsmanager/workOrder/workflowEdit/workFlowComponents/flowChartComponents/NodeModal.jsx
View file @
fd10e934
...
...
@@ -21,10 +21,11 @@ import {
}
from
'@ant-design/icons'
;
import
RoalChoose
from
'./nodeModalComponents/RoalChoose'
;
import
Undertaker
from
'./nodeModalComponents/Undertaker'
;
import
RuleConfig
from
'./nodeModalComponents/RuleConfig'
;
import
RuleConfig
from
'@/components/RuleConfig'
;
import
styles
from
'./NodeModal.less'
;
import
{
GetFormDataSource
}
from
'@/services/workflow/workflow'
;
import
{
node
}
from
'prop-types'
;
const
{
Option
}
=
Select
;
let
chnNumChar
=
[
'零'
,
'一'
,
'二'
,
'三'
,
'四'
,
'五'
,
'六'
,
'七'
,
'八'
,
'九'
];
...
...
@@ -294,7 +295,9 @@ const NodeModal = props => {
// 配置当前规则
const
editRule
=
(
msg
,
index
)
=>
{
console
.
log
(
msg
,
'masgasdg'
);
let
listfleld
=
msg
.
TableNames
.
split
(
','
);
// let listfleld = msg.TableNames.split(',');
let
listfleld
=
talbeList
.
current
;
let
list
=
[
{
TableFieldNames
:
[
...
...
@@ -310,7 +313,7 @@ const NodeModal = props => {
];
console
.
log
(
listfleld
,
allFieldList
.
current
,
'listfleld1111'
);
allFieldList
.
current
.
forEach
(
item
=>
{
if
(
listfleld
.
some
(
ele
=>
ele
=
==
item
.
TableName
))
{
if
(
listfleld
.
some
(
ele
=>
ele
!
==
item
.
TableName
))
{
if
(
item
.
TableName
&&
item
.
TableFieldNames
?.
length
>
0
)
{
list
.
push
({
TableFieldNames
:
item
.
TableFieldNames
,
...
...
src/pages/bsmanager/workOrder/workflowEdit/workFlowComponents/flowChartComponents/NodeModal.less
View file @
fd10e934
.titleBox {
color: #DCDCDC;
font-size: 14px;
padding-left: 20px;
}
.btnAddRule {
...
...
@@ -26,7 +27,7 @@
.ruleBox {
margin-top: 5px;
margin-bottom: 15px;
.ruleTitle {
display: flex;
justify-content: space-between;
...
...
@@ -34,8 +35,8 @@
align-items: center;
.textContet {
color: #
FFA144
;
font-size: 1
8
px;
color: #
1890ff
;
font-size: 1
6
px;
font-weight: 700;
}
...
...
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