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
6567b4fa
Commit
6567b4fa
authored
Nov 28, 2022
by
邓超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修改规则函数选中写入
parent
d39f8ca4
Pipeline
#64616
passed with stages
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
3 deletions
+17
-3
index.jsx
src/components/RuleConfig/index.jsx
+3
-2
FlowChart.jsx
...r/workOrder/workflowEdit/workFlowComponents/FlowChart.jsx
+13
-0
FlowModal.jsx
...r/workOrder/workflowEdit/workFlowComponents/FlowModal.jsx
+1
-1
No files found.
src/components/RuleConfig/index.jsx
View file @
6567b4fa
...
...
@@ -46,13 +46,14 @@ const RuleConfig = props => {
console
.
log
(
prop
,
treeNode
);
if
(
!
treeNode
.
node
.
children
)
{
insert
(
treeNode
.
node
.
key
);
insert
(
`{
${
treeNode
.
node
.
key
}
}`
);
}
setCurrentSelectId
(
prop
[
0
]);
};
const
insert
=
text
=>
{
let
rangeIndex
=
document
.
getElementById
(
'ruleText'
).
selectionStart
;
setRule
(
`
${
rule
.
slice
(
0
,
rangeIndex
)}
{
${
text
}
}
${
rule
.
slice
(
rangeIndex
)}
`
);
// console.log(document.getElementById('ruleText').hasFocus());
setRule
(
`
${
rule
.
slice
(
0
,
rangeIndex
)}
${
text
}
${
rule
.
slice
(
rangeIndex
)}
`
);
rangeIndex
+=
text
.
toString
().
length
;
ruleText
.
current
.
focus
();
document
.
getElementById
(
'ruleText'
).
setSelectionRange
(
rangeIndex
,
rangeIndex
);
// 重新定位光标
...
...
src/pages/bsmanager/workOrder/workflowEdit/workFlowComponents/FlowChart.jsx
View file @
6567b4fa
...
...
@@ -133,6 +133,7 @@ const FlowChart = props => {
});
// 监听节点拖拽到画布事件
diagram
.
addDiagramListener
(
'externalobjectsdropped'
,
e
=>
{
afterNodes
.
current
=
new
Map
([]);
const
list
=
JSON
.
parse
(
diagram
.
model
.
toJson
()).
nodeDataArray
;
console
.
log
(
list
,
'list'
);
let
newNum
;
...
...
@@ -199,7 +200,13 @@ const FlowChart = props => {
let
linkDataArray
=
[];
// 处理老数据,让老数据可以正常展示
limitFinshNodes
.
current
=
new
Set
([]);
nodeDataArray
=
currentFlowData
.
Nodes
.
map
((
item
,
index
)
=>
{
if
(
item
.
FlowTimerList
.
length
>
0
)
{
item
.
FlowTimerList
.
forEach
(
ele
=>
{
limitFinshNodes
.
current
.
add
(
ele
.
EndNode
);
});
}
let
obj
;
obj
=
item
;
obj
.
key
=
item
.
NodeId
;
...
...
@@ -253,7 +260,13 @@ const FlowChart = props => {
// 修改复制后节点内容
diagram
.
model
.
copyNodeDataFunction
=
(
obj
,
model
)
=>
{
let
copyObj
=
lodash
.
cloneDeep
(
obj
);
console
.
log
(
copyObj
,
'copyObj'
);
copyObj
.
FlowTimerList
.
forEach
(
item
=>
{
item
.
key
=
item
.
ID
;
delete
item
.
ID
;
});
delete
copyObj
.
ActivityId
;
delete
copyObj
.
FlowNodeExtendId
;
return
copyObj
;
};
// 修改复制后线内容
...
...
src/pages/bsmanager/workOrder/workflowEdit/workFlowComponents/FlowModal.jsx
View file @
6567b4fa
...
...
@@ -41,7 +41,7 @@ const FlowModal = props => {
notification
.
success
({
message
:
'提示'
,
duration
:
3
,
description
:
'编辑成功'
,
description
:
modalType
===
'add'
?
'新增成功'
:
'编辑成功'
,
});
onSubumit
();
}
else
{
...
...
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