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
506d87ec
authored
Jan 19, 2025
by
Lesan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 审批意见
parent
fea238ef
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
4 deletions
+22
-4
src/components/SimpleProcessDesignerV2/src/consts.ts
+2
-0
src/components/SimpleProcessDesignerV2/src/node.ts
+1
-0
src/components/SimpleProcessDesignerV2/src/nodes-config/UserTaskNodeConfig.vue
+9
-0
src/views/bpm/processInstance/detail/ProcessInstanceOperationButton.vue
+10
-4
No files found.
src/components/SimpleProcessDesignerV2/src/consts.ts
View file @
506d87ec
...
...
@@ -120,6 +120,8 @@ export interface SimpleFlowNode {
defaultFlowId
?:
string
// 签名
signEnable
?:
boolean
// 审批意见
reasonRequire
?:
boolean
}
// 候选人策略枚举 ( 用于审批节点。抄送节点 )
export
enum
CandidateStrategy
{
...
...
src/components/SimpleProcessDesignerV2/src/node.ts
View file @
506d87ec
...
...
@@ -149,6 +149,7 @@ export type UserTaskFormType = {
taskCompleteListenerHeader
?:
ListenerParam
[]
taskCompleteListenerBody
?:
ListenerParam
[]
signEnable
:
boolean
reasonRequire
:
boolean
}
export
type
CopyTaskFormType
=
{
...
...
src/components/SimpleProcessDesignerV2/src/nodes-config/UserTaskNodeConfig.vue
View file @
506d87ec
...
...
@@ -361,6 +361,11 @@
<el-form-item
prop=
"signEnable"
>
<el-switch
v-model=
"configForm.signEnable"
active-text=
"是"
inactive-text=
"否"
/>
</el-form-item>
<el-divider
content-position=
"left"
>
审批意见
</el-divider>
<el-form-item
prop=
"reasonRequire"
>
<el-switch
v-model=
"configForm.reasonRequire"
active-text=
"必填"
inactive-text=
"非必填"
/>
</el-form-item>
</el-form>
</div>
</el-tab-pane>
...
...
@@ -698,6 +703,8 @@ const saveConfig = async () => {
}
// 签名
currentNode
.
value
.
signEnable
=
configForm
.
value
.
signEnable
// 审批意见
currentNode
.
value
.
reasonRequire
=
configForm
.
value
.
reasonRequire
currentNode
.
value
.
showText
=
showText
settingVisible
.
value
=
false
...
...
@@ -767,6 +774,8 @@ const showUserTaskNodeConfig = (node: SimpleFlowNode) => {
configForm
.
value
.
taskCompleteListenerBody
=
node
.
taskCompleteListener
?.
body
??
[]
// 6. 签名
configForm
.
value
.
signEnable
=
node
?.
signEnable
??
false
// 7. 审批意见
configForm
.
value
.
reasonRequire
=
node
?.
reasonRequire
??
false
}
defineExpose
({
openDrawer
,
showUserTaskNodeConfig
})
// 暴露方法给父组件
...
...
src/views/bpm/processInstance/detail/ProcessInstanceOperationButton.vue
View file @
506d87ec
...
...
@@ -548,6 +548,7 @@ const approveForm = ref<any>({}) // 审批通过时,额外的补充信息
const
approveFormFApi
=
ref
<
any
>
({})
// approveForms 的 fAPi
// 审批通过意见表单
const
reasonRequire
=
ref
()
const
approveFormRef
=
ref
<
FormInstance
>
()
const
signRef
=
ref
()
const
approveSignFormRef
=
ref
()
...
...
@@ -555,17 +556,21 @@ const approveReasonForm = reactive({
reason
:
''
,
signPicUrl
:
''
})
const
approveReasonRule
=
reactive
<
FormRules
<
typeof
approveReasonForm
>>
({
reason
:
[{
required
:
true
,
message
:
'审批意见不能为空'
,
trigger
:
'blur'
}],
const
approveReasonRule
=
computed
(()
=>
{
return
{
reason
:
[{
required
:
reasonRequire
.
value
,
message
:
'审批意见不能为空'
,
trigger
:
'blur'
}],
signPicUrl
:
[{
required
:
true
,
message
:
'签名不能为空'
,
trigger
:
'change'
}]
}
})
// 拒绝表单
const
rejectFormRef
=
ref
<
FormInstance
>
()
const
rejectReasonForm
=
reactive
({
reason
:
''
})
const
rejectReasonRule
=
reactive
<
FormRules
<
typeof
rejectReasonForm
>>
({
reason
:
[{
required
:
true
,
message
:
'审批意见不能为空'
,
trigger
:
'blur'
}]
const
rejectReasonRule
=
computed
(()
=>
{
return
{
reason
:
[{
required
:
reasonRequire
.
value
,
message
:
'审批意见不能为空'
,
trigger
:
'blur'
}]
}
})
// 抄送表单
...
...
@@ -966,6 +971,7 @@ const loadTodoTask = (task: any) => {
approveForm
.
value
=
{}
approveFormFApi
.
value
=
{}
runningTask
.
value
=
task
reasonRequire
.
value
=
task
?.
reasonRequire
??
false
// 处理 approve 表单.
if
(
task
&&
task
.
formId
&&
task
.
formConf
)
{
const
tempApproveForm
=
{}
...
...
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