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
cab95532
authored
Jun 13, 2024
by
jason
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
仿钉钉流程设计器 -会签按通过比例
parent
632bcb99
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
8 deletions
+27
-8
src/components/SimpleProcessDesignerV2/src/consts.ts
+2
-2
src/components/SimpleProcessDesignerV2/src/nodes-config/UserTaskNodeConfig.vue
+25
-6
No files found.
src/components/SimpleProcessDesignerV2/src/consts.ts
View file @
cab95532
...
@@ -108,7 +108,7 @@ export enum ApproveMethodType {
...
@@ -108,7 +108,7 @@ export enum ApproveMethodType {
*/
*/
ALL_APPROVE
=
2
,
ALL_APPROVE
=
2
,
/**
/**
* 多人会签(按
比例投票
)
* 多人会签(按
通过比例
)
*/
*/
APPROVE_BY_RATIO
=
3
,
APPROVE_BY_RATIO
=
3
,
/**
/**
...
@@ -218,7 +218,7 @@ NODE_DEFAULT_NAME.set(NodeType.CONDITION_NODE, '条件')
...
@@ -218,7 +218,7 @@ NODE_DEFAULT_NAME.set(NodeType.CONDITION_NODE, '条件')
export
const
APPROVE_METHODS
:
DictDataVO
[]
=
[
export
const
APPROVE_METHODS
:
DictDataVO
[]
=
[
{
label
:
'单人审批'
,
value
:
ApproveMethodType
.
SINGLE_PERSON_APPROVE
},
{
label
:
'单人审批'
,
value
:
ApproveMethodType
.
SINGLE_PERSON_APPROVE
},
{
label
:
'多人会签(需所有审批人同意)'
,
value
:
ApproveMethodType
.
ALL_APPROVE
},
{
label
:
'多人会签(需所有审批人同意)'
,
value
:
ApproveMethodType
.
ALL_APPROVE
},
// { label: '多人会签(按比例投票
)', value: ApproveMethodType.APPROVE_BY_RATIO },
{
label
:
'多人会签(按通过比例%
)'
,
value
:
ApproveMethodType
.
APPROVE_BY_RATIO
},
{
label
:
'多人会签(通过只需一人,拒绝需要全员)'
,
value
:
ApproveMethodType
.
ANY_APPROVE_ALL_REJECT
},
{
label
:
'多人会签(通过只需一人,拒绝需要全员)'
,
value
:
ApproveMethodType
.
ANY_APPROVE_ALL_REJECT
},
{
label
:
'多人或签(一名审批人通过即可)'
,
value
:
ApproveMethodType
.
ANY_APPROVE
},
{
label
:
'多人或签(一名审批人通过即可)'
,
value
:
ApproveMethodType
.
ANY_APPROVE
},
{
label
:
'依次审批(按顺序依次审批)'
,
value
:
ApproveMethodType
.
SEQUENTIAL_APPROVE
}
{
label
:
'依次审批(按顺序依次审批)'
,
value
:
ApproveMethodType
.
SEQUENTIAL_APPROVE
}
...
...
src/components/SimpleProcessDesignerV2/src/nodes-config/UserTaskNodeConfig.vue
View file @
cab95532
...
@@ -149,7 +149,7 @@
...
@@ -149,7 +149,7 @@
@
change=
"approveMethodChanged"
@
change=
"approveMethodChanged"
>
>
<div
class=
"flex-col"
>
<div
class=
"flex-col"
>
<div
v-for=
"(item, index) in APPROVE_METHODS"
:key=
"index"
>
<div
v-for=
"(item, index) in APPROVE_METHODS"
:key=
"index"
class=
"flex items-center"
>
<el-radio
<el-radio
:value=
"item.value"
:value=
"item.value"
:label=
"item.value"
:label=
"item.value"
...
@@ -160,6 +160,14 @@
...
@@ -160,6 +160,14 @@
>
>
{{ item.label }}
{{ item.label }}
</el-radio>
</el-radio>
<el-input-number
v-model=
"currentNode.attributes.approveRatio"
:min=
"10"
:max=
"99"
:step=
"10"
size=
"small"
v-if=
"item.value === ApproveMethodType.APPROVE_BY_RATIO && currentNode.attributes.approveMethod === ApproveMethodType.APPROVE_BY_RATIO"
/>
</div>
</div>
</div>
</div>
</el-radio-group>
</el-radio-group>
...
@@ -175,6 +183,7 @@
...
@@ -175,6 +183,7 @@
:label=
"item.label"
:label=
"item.label"
:disabled=
"rejectHandlerOptionDisabled(item.value)"
:disabled=
"rejectHandlerOptionDisabled(item.value)"
/>
/>
</div>
</div>
</div>
</div>
</el-radio-group>
</el-radio-group>
...
@@ -512,6 +521,7 @@ const changedCandidateUsers = () => {
...
@@ -512,6 +521,7 @@ const changedCandidateUsers = () => {
currentNode
.
value
.
attributes
?.
candidateStrategy
===
CandidateStrategy
.
USER
currentNode
.
value
.
attributes
?.
candidateStrategy
===
CandidateStrategy
.
USER
)
{
)
{
currentNode
.
value
.
attributes
.
approveMethod
=
ApproveMethodType
.
SINGLE_PERSON_APPROVE
currentNode
.
value
.
attributes
.
approveMethod
=
ApproveMethodType
.
SINGLE_PERSON_APPROVE
currentNode
.
value
.
attributes
.
rejectHandler
.
type
=
RejectHandlerType
.
FINISH_PROCESS
notAllowedMultiApprovers
.
value
=
true
notAllowedMultiApprovers
.
value
=
true
}
else
{
}
else
{
notAllowedMultiApprovers
.
value
=
false
notAllowedMultiApprovers
.
value
=
false
...
@@ -531,20 +541,29 @@ const blurEvent = () => {
...
@@ -531,20 +541,29 @@ const blurEvent = () => {
}
}
const
approveMethodChanged
=
()
=>
{
const
approveMethodChanged
=
()
=>
{
const
approveMethod
=
currentNode
.
value
.
attributes
?.
approveMethod
const
approveMethod
=
currentNode
.
value
.
attributes
?.
approveMethod
if
(
approveMethod
===
ApproveMethodType
.
ANY_APPROVE_ALL_REJECT
||
approveMethod
===
ApproveMethodType
.
APPROVE_BY_RATIO
)
{
if
(
approveMethod
===
ApproveMethodType
.
ANY_APPROVE_ALL_REJECT
||
approveMethod
===
ApproveMethodType
.
APPROVE_BY_RATIO
)
{
currentNode
.
value
.
attributes
.
rejectHandler
.
type
=
RejectHandlerType
.
FINISH_PROCESS_BY_REJECT_RATIO
currentNode
.
value
.
attributes
.
rejectHandler
.
type
=
RejectHandlerType
.
FINISH_PROCESS_BY_REJECT_RATIO
}
else
{
}
else
{
currentNode
.
value
.
attributes
.
rejectHandler
.
type
=
RejectHandlerType
.
FINISH_PROCESS
currentNode
.
value
.
attributes
.
rejectHandler
.
type
=
RejectHandlerType
.
FINISH_PROCESS
}
}
if
(
approveMethod
===
ApproveMethodType
.
APPROVE_BY_RATIO
)
{
currentNode
.
value
.
attributes
.
approveRatio
=
50
;
}
}
}
const
rejectHandlerOptionDisabled
=
computed
(()
=>
{
const
rejectHandlerOptionDisabled
=
computed
(()
=>
{
return
(
val
:
number
)
=>
{
return
(
val
:
number
)
=>
{
const
approveMethod
=
currentNode
.
value
.
attributes
?.
approveMethod
const
approveMethod
=
currentNode
.
value
.
attributes
?.
approveMethod
if
(
val
===
RejectHandlerType
.
FINISH_PROCESS_BY_REJECT_RATIO
&&
approveMethod
!==
ApproveMethodType
.
APPROVE_BY_RATIO
if
(
&&
approveMethod
!==
ApproveMethodType
.
ANY_APPROVE_ALL_REJECT
)
{
val
===
RejectHandlerType
.
FINISH_PROCESS_BY_REJECT_RATIO
&&
approveMethod
!==
ApproveMethodType
.
APPROVE_BY_RATIO
&&
approveMethod
!==
ApproveMethodType
.
ANY_APPROVE_ALL_REJECT
)
{
return
true
return
true
}
}
if
(
approveMethod
===
ApproveMethodType
.
ANY_APPROVE_ALL_REJECT
&&
if
(
approveMethod
===
ApproveMethodType
.
ANY_APPROVE_ALL_REJECT
&&
val
===
RejectHandlerType
.
FINISH_PROCESS
val
===
RejectHandlerType
.
FINISH_PROCESS
)
{
)
{
return
true
return
true
...
...
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