Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
556cac81
authored
Apr 05, 2024
by
jason
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
仿钉钉设计流程:获取保存的模型
parent
f79c29d1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
50 additions
and
48 deletions
+50
-48
src/components/SimpleProcessDesigner/src/nodeWrap.vue
+3
-2
src/components/SimpleProcessDesigner/src/util.ts
+47
-46
No files found.
src/components/SimpleProcessDesigner/src/nodeWrap.vue
View file @
556cac81
...
...
@@ -86,9 +86,10 @@
@click="arrTransfer(index)"
>></div
> -->
<div
class=
"content"
@
click=
"setPerson(item.priorityLevel)"
>
{{
<
!-- <
div class="content" @click="setPerson(item.priorityLevel)">{{
conditionStr(nodeConfig, index)
}}
</div>
}}</div> -->
<div
class=
"content"
>
{{conditionStr(nodeConfig, index) }}
</div>
<div
class=
"error_tip"
v-if=
"isTried && item.error"
>
<i
class=
"anticon anticon-exclamation-circle"
></i>
</div>
...
...
src/components/SimpleProcessDesigner/src/util.ts
View file @
556cac81
...
...
@@ -101,8 +101,8 @@ export const copyerStr = ( candidateStrategy: number) => {
}
}
export
const
conditionStr
=
(
nodeConfig
,
index
)
=>
{
const
{
conditionList
,
nodeUserList
}
=
nodeConfig
.
conditionNodes
[
index
]
if
(
conditionList
.
length
==
0
)
{
//
const { conditionList, nodeUserList } = nodeConfig.conditionNodes[index]
//
if (conditionList.length == 0) {
// return index == nodeConfig.conditionNodes.length - 1 &&
// nodeConfig.conditionNodes[0].conditionList.length != 0
// ? '其他条件进入此流程'
...
...
@@ -111,56 +111,57 @@ export const conditionStr = (nodeConfig, index) => {
// nodeConfig.conditionNodes[0].conditionList.length != 0
// ? '其他条件进入此流程'
// : '请设置条件'
console
.
log
(
'index===>'
,
index
);
console
.
log
(
'nodeConfig.conditionNodes.length===>'
,
nodeConfig
.
conditionNodes
.
length
);
//
console.log('index===>', index);
//
console.log('nodeConfig.conditionNodes.length===>', nodeConfig.conditionNodes.length);
if
(
index
===
nodeConfig
.
conditionNodes
.
length
-
1
)
{
return
'其它情况将进入该分支'
}
else
{
return
'请设置条件'
}
}
else
{
let
str
=
''
for
(
let
i
=
0
;
i
<
conditionList
.
length
;
i
++
)
{
const
{
columnId
,
columnType
,
showType
,
showName
,
optType
,
zdy1
,
opt1
,
zdy2
,
opt2
,
fixedDownBoxValue
}
=
conditionList
[
i
]
if
(
columnId
==
0
)
{
if
(
nodeUserList
.
length
!=
0
)
{
str
+=
'发起人属于:'
str
+=
nodeUserList
.
map
((
item
)
=>
{
return
item
.
name
})
.
join
(
'或'
)
+
' 并且 '
}
}
if
(
columnType
==
'String'
&&
showType
==
'3'
)
{
if
(
zdy1
)
{
str
+=
showName
+
'属于:'
+
dealStr
(
zdy1
,
JSON
.
parse
(
fixedDownBoxValue
))
+
' 并且 '
}
}
if
(
columnType
==
'Double'
)
{
if
(
optType
!=
6
&&
zdy1
)
{
const
optTypeStr
=
[
''
,
'<'
,
'>'
,
'≤'
,
'='
,
'≥'
][
optType
]
str
+=
`
${
showName
}
${
optTypeStr
}
${
zdy1
}
并且 `
}
else
if
(
optType
==
6
&&
zdy1
&&
zdy2
)
{
str
+=
`
${
zdy1
}
${
opt1
}
${
showName
}
${
opt2
}
${
zdy2
}
并且 `
}
}
}
return
str
?
str
.
substring
(
0
,
str
.
length
-
4
)
:
'请设置条件'
}
// } else {
// let str = ''
// for (let i = 0; i < conditionList.length; i++) {
// const {
// columnId,
// columnType,
// showType,
// showName,
// optType,
// zdy1,
// opt1,
// zdy2,
// opt2,
// fixedDownBoxValue
// } = conditionList[i]
// if (columnId == 0) {
// if (nodeUserList.length != 0) {
// str += '发起人属于:'
// str +=
// nodeUserList
// .map((item) => {
// return item.name
// })
// .join('或') + ' 并且 '
// }
// }
// if (columnType == 'String' && showType == '3') {
// if (zdy1) {
// str += showName + '属于:' + dealStr(zdy1, JSON.parse(fixedDownBoxValue)) + ' 并且 '
// }
// }
// if (columnType == 'Double') {
// if (optType != 6 && zdy1) {
// const optTypeStr = ['', '<', '>', '≤', '=', '≥'][optType]
// str += `${showName} ${optTypeStr} ${zdy1} 并且 `
// } else if (optType == 6 && zdy1 && zdy2) {
// str += `${zdy1} ${opt1} ${showName} ${opt2} ${zdy2} 并且 `
// }
// }
// }
// str ? str.substring(0, str.length - 4) :
return
'请设置条件'
// }
}
export
const
dealStr
=
(
str
:
string
,
obj
)
=>
{
...
...
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