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
5ee0a7b9
authored
Jun 18, 2024
by
jason
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
仿钉钉流程设计器- 简化审批拒绝逻辑
parent
d5a7ae18
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
11 additions
and
49 deletions
+11
-49
src/api/bpm/simple/index.ts
+2
-2
src/components/SimpleProcessDesignerV2/src/SimpleProcessDesigner.vue
+1
-1
src/components/SimpleProcessDesignerV2/src/consts.ts
+2
-11
src/components/SimpleProcessDesignerV2/src/nodes-config/UserTaskNodeConfig.vue
+2
-26
src/views/bpm/simpleWorkflow/index.vue
+0
-1
src/views/bpm/simpleWorkflow/index1.vue
+4
-8
No files found.
src/api/bpm/simple/index.ts
View file @
5ee0a7b9
...
...
@@ -8,8 +8,8 @@ export const updateBpmSimpleModel = async (data) => {
})
}
export
const
getBpmSimpleModel
=
async
(
modelI
d
)
=>
{
export
const
getBpmSimpleModel
=
async
(
i
d
)
=>
{
return
await
request
.
get
({
url
:
'/bpm/model/simple/get?
modelId='
+
modelI
d
url
:
'/bpm/model/simple/get?
id='
+
i
d
})
}
src/components/SimpleProcessDesignerV2/src/SimpleProcessDesigner.vue
View file @
5ee0a7b9
...
...
@@ -82,7 +82,7 @@ const saveSimpleFlowModel = async () => {
return
;
}
const
data
=
{
modelI
d
:
props
.
modelId
,
i
d
:
props
.
modelId
,
simpleModel
:
processNodeTree
.
value
}
...
...
src/components/SimpleProcessDesignerV2/src/consts.ts
View file @
5ee0a7b9
...
...
@@ -70,15 +70,7 @@ export enum RejectHandlerType {
/**
* 驳回到指定节点
*/
RETURN_PRE_USER_TASK
=
2
,
/**
* 按拒绝人数比例终止流程
*/
FINISH_PROCESS_BY_REJECT_RATIO
=
3
,
/**
* 结束任务
*/
FINISH_TASK
=
4
RETURN_USER_TASK
=
2
}
...
...
@@ -233,8 +225,7 @@ export const TIMEOUT_HANDLER_ACTION_TYPES: DictDataVO [] = [
]
export
const
REJECT_HANDLER_TYPES
:
DictDataVO
[]
=
[
{
label
:
'终止流程'
,
value
:
RejectHandlerType
.
FINISH_PROCESS
},
{
label
:
'驳回到指定节点'
,
value
:
RejectHandlerType
.
RETURN_PRE_USER_TASK
},
{
label
:
'按拒绝人数终止流程(用于会签)'
,
value
:
RejectHandlerType
.
FINISH_PROCESS_BY_REJECT_RATIO
}
{
label
:
'驳回到指定节点'
,
value
:
RejectHandlerType
.
RETURN_USER_TASK
}
// { label: '结束任务', value: RejectHandlerType.FINISH_TASK }
]
...
...
src/components/SimpleProcessDesignerV2/src/nodes-config/UserTaskNodeConfig.vue
View file @
5ee0a7b9
...
...
@@ -181,7 +181,6 @@
:key=
"item.value"
:value=
"item.value"
:label=
"item.label"
:disabled=
"rejectHandlerOptionDisabled(item.value)"
/>
</div>
...
...
@@ -191,7 +190,7 @@
<el-form-item
v-if=
"
currentNode.attributes.rejectHandler.type == RejectHandlerType.RETURN_
PRE_
USER_TASK
currentNode.attributes.rejectHandler.type == RejectHandlerType.RETURN_USER_TASK
"
label=
"驳回节点"
prop=
"rejectHandlerNode"
...
...
@@ -540,35 +539,12 @@ const blurEvent = () => {
currentNode
.
value
.
name
||
(
NODE_DEFAULT_NAME
.
get
(
NodeType
.
USER_TASK_NODE
)
as
string
)
}
const
approveMethodChanged
=
()
=>
{
currentNode
.
value
.
attributes
.
rejectHandler
.
type
=
RejectHandlerType
.
FINISH_PROCESS
const
approveMethod
=
currentNode
.
value
.
attributes
?.
approveMethod
if
(
approveMethod
===
ApproveMethodType
.
APPROVE_BY_RATIO
)
{
currentNode
.
value
.
attributes
.
rejectHandler
.
type
=
RejectHandlerType
.
FINISH_PROCESS_BY_REJECT_RATIO
}
else
{
currentNode
.
value
.
attributes
.
rejectHandler
.
type
=
RejectHandlerType
.
FINISH_PROCESS
}
if
(
approveMethod
===
ApproveMethodType
.
APPROVE_BY_RATIO
)
{
currentNode
.
value
.
attributes
.
approveRatio
=
100
;
}
}
const
rejectHandlerOptionDisabled
=
computed
(()
=>
{
return
(
val
:
number
)
=>
{
const
approveMethod
=
currentNode
.
value
.
attributes
?.
approveMethod
if
(
val
===
RejectHandlerType
.
FINISH_PROCESS_BY_REJECT_RATIO
&&
approveMethod
!==
ApproveMethodType
.
APPROVE_BY_RATIO
)
{
return
true
}
if
(
approveMethod
===
ApproveMethodType
.
APPROVE_BY_RATIO
&&
val
!==
RejectHandlerType
.
FINISH_PROCESS_BY_REJECT_RATIO
)
{
return
true
}
return
false
}
})
// 默认 6小时
const
timeDuration
=
ref
(
6
)
const
timeUnit
=
ref
(
TimeUnitType
.
HOUR
)
...
...
src/views/bpm/simpleWorkflow/index.vue
View file @
5ee0a7b9
...
...
@@ -56,5 +56,4 @@ onMounted( async () => {
})
</
script
>
<
style
lang=
'scss'
scoped
>
</
style
>
src/views/bpm/simpleWorkflow/index1.vue
View file @
5ee0a7b9
...
...
@@ -53,18 +53,14 @@ const test = async () => {
message
.
error
(
'缺少模型 modelId 编号'
)
return
}
const
test
=
nodeConfig
.
value
console
.
log
(
'test is '
,
test
)
console
.
log
(
'nodeConfig.value '
,
nodeConfig
.
value
)
const
data1
=
{
modelId
:
modelId
,
simpleModelBody
:
toRaw
(
nodeConfig
.
value
)
}
const
data
=
{
modelI
d
:
modelId
,
i
d
:
modelId
,
simpleModelBody
:
nodeConfig
.
value
}
console
.
log
(
'request json data1 is '
,
data1
)
const
result
=
await
updateBpmSimpleModel
(
data
)
console
.
log
(
'save the result is '
,
result
)
if
(
result
)
{
...
...
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