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
dcdce412
authored
Oct 19, 2024
by
YunaiV
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【文案修改】工作流:“回退”统一改成“退回”,和飞书保持一致
parent
410c3bc9
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
91 additions
and
75 deletions
+91
-75
src/api/bpm/task/index.ts
+2
-2
src/components/SimpleProcessDesignerV2/src/consts.ts
+4
-4
src/components/SimpleProcessDesignerV2/src/nodes-config/UserTaskNodeConfig.vue
+3
-11
src/components/bpmnProcessDesigner/package/designer/ProcessViewer.vue
+4
-1
src/views/bpm/processInstance/detail/ProcessInstanceOperationButton.vue
+39
-34
src/views/bpm/processInstance/detail/ProcessInstanceTimeline.vue
+31
-15
src/views/bpm/processInstance/detail/dialog/TaskReturnForm.vue
+7
-7
src/views/bpm/processInstance/detail/index.vue
+1
-1
No files found.
src/api/bpm/task/index.ts
View file @
dcdce412
...
@@ -75,12 +75,12 @@ export const getTaskListByProcessInstanceId = async (processInstanceId: string)
...
@@ -75,12 +75,12 @@ export const getTaskListByProcessInstanceId = async (processInstanceId: string)
})
})
}
}
// 获取所有可
回退
的节点
// 获取所有可
退回
的节点
export
const
getTaskListByReturn
=
async
(
id
:
string
)
=>
{
export
const
getTaskListByReturn
=
async
(
id
:
string
)
=>
{
return
await
request
.
get
({
url
:
'/bpm/task/list-by-return'
,
params
:
{
id
}
})
return
await
request
.
get
({
url
:
'/bpm/task/list-by-return'
,
params
:
{
id
}
})
}
}
//
回退
//
退回
export
const
returnTask
=
async
(
data
:
any
)
=>
{
export
const
returnTask
=
async
(
data
:
any
)
=>
{
return
await
request
.
put
({
url
:
'/bpm/task/return'
,
data
})
return
await
request
.
put
({
url
:
'/bpm/task/return'
,
data
})
}
}
...
...
src/components/SimpleProcessDesignerV2/src/consts.ts
View file @
dcdce412
...
@@ -177,7 +177,7 @@ export enum ApproveMethodType {
...
@@ -177,7 +177,7 @@ export enum ApproveMethodType {
export
type
RejectHandler
=
{
export
type
RejectHandler
=
{
// 审批拒绝类型
// 审批拒绝类型
type
:
RejectHandlerType
type
:
RejectHandlerType
//
回退
节点 Id
//
退回
节点 Id
returnNodeId
?:
string
returnNodeId
?:
string
}
}
...
@@ -359,7 +359,7 @@ export enum OperationButtonType {
...
@@ -359,7 +359,7 @@ export enum OperationButtonType {
*/
*/
ADD_SIGN
=
5
,
ADD_SIGN
=
5
,
/**
/**
*
回退
*
退回
*/
*/
RETURN
=
6
,
RETURN
=
6
,
/**
/**
...
@@ -516,7 +516,7 @@ export const DEFAULT_BUTTON_SETTING: ButtonSetting[] = [
...
@@ -516,7 +516,7 @@ export const DEFAULT_BUTTON_SETTING: ButtonSetting[] = [
{
id
:
OperationButtonType
.
TRANSFER
,
displayName
:
'转办'
,
enable
:
true
},
{
id
:
OperationButtonType
.
TRANSFER
,
displayName
:
'转办'
,
enable
:
true
},
{
id
:
OperationButtonType
.
DELEGATE
,
displayName
:
'委派'
,
enable
:
true
},
{
id
:
OperationButtonType
.
DELEGATE
,
displayName
:
'委派'
,
enable
:
true
},
{
id
:
OperationButtonType
.
ADD_SIGN
,
displayName
:
'加签'
,
enable
:
true
},
{
id
:
OperationButtonType
.
ADD_SIGN
,
displayName
:
'加签'
,
enable
:
true
},
{
id
:
OperationButtonType
.
RETURN
,
displayName
:
'
回退
'
,
enable
:
true
}
{
id
:
OperationButtonType
.
RETURN
,
displayName
:
'
退回
'
,
enable
:
true
}
]
]
// 发起人的按钮权限。暂时定死,不可以编辑
// 发起人的按钮权限。暂时定死,不可以编辑
...
@@ -526,7 +526,7 @@ export const START_USER_BUTTON_SETTING: ButtonSetting[] = [
...
@@ -526,7 +526,7 @@ export const START_USER_BUTTON_SETTING: ButtonSetting[] = [
{
id
:
OperationButtonType
.
TRANSFER
,
displayName
:
'转办'
,
enable
:
false
},
{
id
:
OperationButtonType
.
TRANSFER
,
displayName
:
'转办'
,
enable
:
false
},
{
id
:
OperationButtonType
.
DELEGATE
,
displayName
:
'委派'
,
enable
:
false
},
{
id
:
OperationButtonType
.
DELEGATE
,
displayName
:
'委派'
,
enable
:
false
},
{
id
:
OperationButtonType
.
ADD_SIGN
,
displayName
:
'加签'
,
enable
:
false
},
{
id
:
OperationButtonType
.
ADD_SIGN
,
displayName
:
'加签'
,
enable
:
false
},
{
id
:
OperationButtonType
.
RETURN
,
displayName
:
'
回退
'
,
enable
:
false
}
{
id
:
OperationButtonType
.
RETURN
,
displayName
:
'
退回
'
,
enable
:
false
}
]
]
export
const
MULTI_LEVEL_DEPT
:
DictDataVO
=
[
export
const
MULTI_LEVEL_DEPT
:
DictDataVO
=
[
...
...
src/components/SimpleProcessDesignerV2/src/nodes-config/UserTaskNodeConfig.vue
View file @
dcdce412
...
@@ -134,12 +134,7 @@
...
@@ -134,12 +134,7 @@
prop=
"userIds"
prop=
"userIds"
span=
"24"
span=
"24"
>
>
<el-select
<el-select
v-model=
"configForm.userIds"
clearable
multiple
style=
"width: 100%"
>
v-model=
"configForm.userIds"
clearable
multiple
style=
"width: 100%"
>
<el-option
<el-option
v-for=
"item in userOptions"
v-for=
"item in userOptions"
:key=
"item.id"
:key=
"item.id"
...
@@ -183,10 +178,7 @@
...
@@ -183,10 +178,7 @@
:key=
"index"
:key=
"index"
class=
"flex items-center"
class=
"flex items-center"
>
>
<el-radio
<el-radio
:value=
"item.value"
:label=
"item.value"
>
:value=
"item.value"
:label=
"item.value"
>
{{ item.label }}
{{ item.label }}
</el-radio>
</el-radio>
<el-form-item
prop=
"approveRatio"
>
<el-form-item
prop=
"approveRatio"
>
...
@@ -552,7 +544,7 @@ const approveMethodChanged = () => {
...
@@ -552,7 +544,7 @@ const approveMethodChanged = () => {
}
}
formRef
.
value
.
clearValidate
(
'approveRatio'
)
formRef
.
value
.
clearValidate
(
'approveRatio'
)
}
}
// 审批拒绝 可
回退
的节点
// 审批拒绝 可
退回
的节点
const
returnTaskList
=
ref
<
SimpleFlowNode
[]
>
([])
const
returnTaskList
=
ref
<
SimpleFlowNode
[]
>
([])
// 审批人超时未处理设置
// 审批人超时未处理设置
const
{
const
{
...
...
src/components/bpmnProcessDesigner/package/designer/ProcessViewer.vue
View file @
dcdce412
...
@@ -282,9 +282,12 @@ const importXML = async (xml: string) => {
...
@@ -282,9 +282,12 @@ const importXML = async (xml: string) => {
/** 高亮流程 */
/** 高亮流程 */
const
setProcessStatus
=
(
view
:
any
)
=>
{
const
setProcessStatus
=
(
view
:
any
)
=>
{
// 设置相关变量
// 设置相关变量
if
(
!
view
||
!
view
.
processInstance
)
{
return
}
processInstance
.
value
=
view
.
processInstance
processInstance
.
value
=
view
.
processInstance
tasks
.
value
=
view
.
tasks
tasks
.
value
=
view
.
tasks
if
(
isLoading
.
value
||
!
processInstance
.
value
||
!
bpmnViewer
.
value
)
{
if
(
isLoading
.
value
||
!
bpmnViewer
.
value
)
{
return
return
}
}
const
{
const
{
...
...
src/views/bpm/processInstance/detail/ProcessInstanceOperationButton.vue
View file @
dcdce412
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
placement=
"top-end"
placement=
"top-end"
:width=
"420"
:width=
"420"
trigger=
"click"
trigger=
"click"
v-if=
"
runningTask && isHandleTaskStatus() && isShowButton(OperationButtonType.APPROVE)"
v-if=
"runningTask && isHandleTaskStatus() && isShowButton(OperationButtonType.APPROVE)"
>
>
<template
#
reference
>
<template
#
reference
>
<el-button
plain
type=
"success"
@
click=
"openPopover('approve')"
>
<el-button
plain
type=
"success"
@
click=
"openPopover('approve')"
>
...
@@ -60,7 +60,7 @@
...
@@ -60,7 +60,7 @@
placement=
"top-end"
placement=
"top-end"
:width=
"420"
:width=
"420"
trigger=
"click"
trigger=
"click"
v-if=
"
runningTask && isHandleTaskStatus() && isShowButton(OperationButtonType.REJECT)"
v-if=
"runningTask && isHandleTaskStatus() && isShowButton(OperationButtonType.REJECT)"
>
>
<
template
#
reference
>
<
template
#
reference
>
<el-button
class=
"mr-20px"
plain
type=
"danger"
@
click=
"openPopover('reject')"
>
<el-button
class=
"mr-20px"
plain
type=
"danger"
@
click=
"openPopover('reject')"
>
...
@@ -171,7 +171,7 @@
...
@@ -171,7 +171,7 @@
placement=
"top-start"
placement=
"top-start"
:width=
"420"
:width=
"420"
trigger=
"click"
trigger=
"click"
v-if=
"
runningTask && isHandleTaskStatus() && isShowButton(OperationButtonType.TRANSFER)"
v-if=
"runningTask && isHandleTaskStatus() && isShowButton(OperationButtonType.TRANSFER)"
>
>
<
template
#
reference
>
<
template
#
reference
>
<div
@
click=
"openPopover('transfer')"
class=
"hover-bg-gray-100 rounded-xl p-6px"
>
<div
@
click=
"openPopover('transfer')"
class=
"hover-bg-gray-100 rounded-xl p-6px"
>
...
@@ -397,7 +397,9 @@
...
@@ -397,7 +397,9 @@
placement=
"top-start"
placement=
"top-start"
:width=
"420"
:width=
"420"
trigger=
"click"
trigger=
"click"
v-if=
"userId === processInstance?.startUser?.id && !isEndProcessStatus(processInstance?.status)"
v-if=
"
userId === processInstance?.startUser?.id && !isEndProcessStatus(processInstance?.status)
"
>
>
<
template
#
reference
>
<
template
#
reference
>
<div
@
click=
"openPopover('cancel')"
class=
"hover-bg-gray-100 rounded-xl p-6px"
>
<div
@
click=
"openPopover('cancel')"
class=
"hover-bg-gray-100 rounded-xl p-6px"
>
...
@@ -414,7 +416,7 @@
...
@@ -414,7 +416,7 @@
label-width=
"100px"
label-width=
"100px"
>
>
<el-form-item
label=
"撤消理由"
prop=
"cancelReason"
>
<el-form-item
label=
"撤消理由"
prop=
"cancelReason"
>
<span
class=
"
text-#878c93 text-12px"
>
撤消后,该审批流程将自动结束
</span>
<span
class=
"text-#878c93 text-12px"
>
撤消后,该审批流程将自动结束
</span>
<el-input
<el-input
v-model=
"genericForm.cancelReason"
v-model=
"genericForm.cancelReason"
clearable
clearable
...
@@ -424,7 +426,9 @@
...
@@ -424,7 +426,9 @@
/>
/>
</el-form-item>
</el-form-item>
<el-form-item>
<el-form-item>
<el-button
:disabled=
"formLoading"
type=
"primary"
@
click=
"handleCancel()"
>
撤消
</el-button>
<el-button
:disabled=
"formLoading"
type=
"primary"
@
click=
"handleCancel()"
>
撤消
</el-button
>
<el-button
@
click=
"popOverVisible.cancel = false"
>
取消
</el-button>
<el-button
@
click=
"popOverVisible.cancel = false"
>
取消
</el-button>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
...
@@ -434,15 +438,16 @@
...
@@ -434,15 +438,16 @@
<div
<div
@
click=
"handleReCreate()"
@
click=
"handleReCreate()"
class=
"hover-bg-gray-100 rounded-xl p-6px"
class=
"hover-bg-gray-100 rounded-xl p-6px"
v-if=
"userId === processInstance?.startUser?.id && isEndProcessStatus(processInstance?.status)
v-if=
"
&& processDefinition?.formType === 10"
userId === processInstance?.startUser?.id &&
isEndProcessStatus(processInstance?.status) &&
processDefinition?.formType === 10
"
>
>
<Icon
:size=
"14"
icon=
"ep:refresh"
/>
再次提交
<Icon
:size=
"14"
icon=
"ep:refresh"
/>
再次提交
</div>
</div>
<!-- 弹窗:子任务 -->
<!-- 弹窗:子任务 -->
<TaskSignList
ref=
"taskSignListRef"
@
success=
"reload"
/>
<TaskSignList
ref=
"taskSignListRef"
@
success=
"reload"
/>
</div>
</div>
</template>
</template>
<
script
lang=
"ts"
setup
>
<
script
lang=
"ts"
setup
>
...
@@ -457,20 +462,22 @@ import {
...
@@ -457,20 +462,22 @@ import {
OPERATION_BUTTON_NAME
OPERATION_BUTTON_NAME
}
from
'@/components/SimpleProcessDesignerV2/src/consts'
}
from
'@/components/SimpleProcessDesignerV2/src/consts'
import
{
BpmProcessInstanceStatus
}
from
'@/utils/constants'
import
{
BpmProcessInstanceStatus
}
from
'@/utils/constants'
defineOptions
({
name
:
'ProcessInstanceBtnConatiner'
})
defineOptions
({
name
:
'ProcessInstanceBtnContainer'
})
const
router
=
useRouter
()
// 路由
const
router
=
useRouter
()
// 路由
const
message
=
useMessage
()
// 消息弹窗
const
message
=
useMessage
()
// 消息弹窗
const
{
proxy
}
=
getCurrentInstance
()
as
any
const
{
proxy
}
=
getCurrentInstance
()
as
any
const
userId
=
useUserStoreWithOut
().
getUser
.
id
// 当前登录的编号
const
userId
=
useUserStoreWithOut
().
getUser
.
id
// 当前登录的编号
const
emit
=
defineEmits
([
'success'
])
// 定义 success 事件,用于操作成功后的回调
const
emit
=
defineEmits
([
'success'
])
// 定义 success 事件,用于操作成功后的回调
const
props
=
defineProps
({
const
props
=
defineProps
({
processInstance
:
propTypes
.
object
,
// 流程实例信息
processInstance
:
propTypes
.
object
,
// 流程实例信息
processDefinition
:
propTypes
.
object
,
// 流程定义信息
processDefinition
:
propTypes
.
object
,
// 流程定义信息
userOptions
:
propTypes
.
any
userOptions
:
propTypes
.
any
})
})
const
formLoading
=
ref
(
false
)
// 表单加载中
const
formLoading
=
ref
(
false
)
// 表单加载中
/** 气泡卡是否展示 */
const
popOverVisible
=
ref
({
const
popOverVisible
=
ref
({
approve
:
false
,
approve
:
false
,
reject
:
false
,
reject
:
false
,
...
@@ -480,16 +487,15 @@ const popOverVisible = ref({
...
@@ -480,16 +487,15 @@ const popOverVisible = ref({
return
:
false
,
return
:
false
,
copy
:
false
,
copy
:
false
,
cancel
:
false
cancel
:
false
})
})
// 气泡卡是否展示
/** 退回节点 */
const
returnList
=
ref
([]
as
any
)
// 退回节点
const
returnList
=
ref
([]
as
any
)
// ========== 审批信息 ==========
// ========== 审批信息 ==========
const
runningTask
=
ref
<
any
>
()
// 运行中的任务
const
runningTask
=
ref
<
any
>
()
// 运行中的任务
const
genericForm
=
ref
<
any
>
({})
// 通用表单
const
genericForm
=
ref
<
any
>
({})
// 通用表单
const
approveForm
=
ref
<
any
>
({})
// 审批通过时,额外的补充信息
const
approveForm
=
ref
<
any
>
({})
// 审批通过时,额外的补充信息
const
approveFormFApi
=
ref
<
any
>
({})
// approveForms 的 fAPi
const
approveFormFApi
=
ref
<
any
>
({})
// approveForms 的 fAPi
const
formRef
=
ref
()
const
formRef
=
ref
()
/** 表单校验规则 */
const
genericRule
=
reactive
({
const
genericRule
=
reactive
({
reason
:
[{
required
:
true
,
message
:
'审批意见不能为空'
,
trigger
:
'blur'
}],
reason
:
[{
required
:
true
,
message
:
'审批意见不能为空'
,
trigger
:
'blur'
}],
returnReason
:
[{
required
:
true
,
message
:
'退回理由不能为空'
,
trigger
:
'blur'
}],
returnReason
:
[{
required
:
true
,
message
:
'退回理由不能为空'
,
trigger
:
'blur'
}],
...
@@ -498,8 +504,8 @@ const genericRule = reactive({
...
@@ -498,8 +504,8 @@ const genericRule = reactive({
assigneeUserId
:
[{
required
:
true
,
message
:
'新审批人不能为空'
,
trigger
:
'change'
}],
assigneeUserId
:
[{
required
:
true
,
message
:
'新审批人不能为空'
,
trigger
:
'change'
}],
delegateUserId
:
[{
required
:
true
,
message
:
'接收人不能为空'
,
trigger
:
'change'
}],
delegateUserId
:
[{
required
:
true
,
message
:
'接收人不能为空'
,
trigger
:
'change'
}],
addSignUserIds
:
[{
required
:
true
,
message
:
'加签处理人不能为空'
,
trigger
:
'change'
}],
addSignUserIds
:
[{
required
:
true
,
message
:
'加签处理人不能为空'
,
trigger
:
'change'
}],
targetTaskDefinitionKey
:
[{
required
:
true
,
message
:
'退回节点不能为空'
,
trigger
:
'change'
}]
targetTaskDefinitionKey
:
[{
required
:
true
,
message
:
'退回节点不能为空'
,
trigger
:
'change'
}]
})
})
// 表单校验规则
/** 监听 approveFormFApis,实现它对应的 form-create 初始化后,隐藏掉对应的表单提交按钮 */
/** 监听 approveFormFApis,实现它对应的 form-create 初始化后,隐藏掉对应的表单提交按钮 */
watch
(
watch
(
...
@@ -520,20 +526,16 @@ const openReturnPopover = async () => {
...
@@ -520,20 +526,16 @@ const openReturnPopover = async () => {
message
.
warning
(
'当前没有可退回的节点'
)
message
.
warning
(
'当前没有可退回的节点'
)
return
return
}
}
openPopover
(
'return'
)
await
openPopover
(
'return'
)
}
}
/** 弹出气泡卡 */
/** 弹出气泡卡 */
const
openPopover
=
(
type
:
string
)
=>
{
const
openPopover
=
async
(
type
:
string
)
=>
{
Object
.
keys
(
popOverVisible
.
value
).
forEach
((
item
)
=>
{
Object
.
keys
(
popOverVisible
.
value
).
forEach
((
item
)
=>
{
if
(
item
===
type
)
{
popOverVisible
.
value
[
item
]
=
item
===
type
popOverVisible
.
value
[
item
]
=
true
}
else
{
popOverVisible
.
value
[
item
]
=
false
}
})
nextTick
().
then
(()
=>
{
formRef
.
value
.
resetFields
()
})
})
await
nextTick
()
formRef
.
value
.
resetFields
()
}
}
/** 处理审批通过和不通过的操作 */
/** 处理审批通过和不通过的操作 */
...
@@ -575,7 +577,7 @@ const handleAudit = async (pass: boolean) => {
...
@@ -575,7 +577,7 @@ const handleAudit = async (pass: boolean) => {
}
}
}
}
/* 处理抄送 */
/*
*
处理抄送 */
const
handleCopy
=
async
()
=>
{
const
handleCopy
=
async
()
=>
{
formLoading
.
value
=
true
formLoading
.
value
=
true
try
{
try
{
...
@@ -718,7 +720,10 @@ const handleCancel = async () => {
...
@@ -718,7 +720,10 @@ const handleCancel = async () => {
const
valid
=
await
elForm
.
validate
()
const
valid
=
await
elForm
.
validate
()
if
(
!
valid
)
return
if
(
!
valid
)
return
// 1.2 提交取消
// 1.2 提交取消
await
ProcessInstanceApi
.
cancelProcessInstanceByStartUser
(
props
.
processInstance
.
id
,
genericForm
.
value
.
cancelReason
)
await
ProcessInstanceApi
.
cancelProcessInstanceByStartUser
(
props
.
processInstance
.
id
,
genericForm
.
value
.
cancelReason
)
popOverVisible
.
value
.
return
=
false
popOverVisible
.
value
.
return
=
false
message
.
success
(
'操作成功'
)
message
.
success
(
'操作成功'
)
// 2 重新加载数据
// 2 重新加载数据
...
@@ -764,8 +769,9 @@ const isHandleTaskStatus = () => {
...
@@ -764,8 +769,9 @@ const isHandleTaskStatus = () => {
const
isEndProcessStatus
=
(
status
:
number
)
=>
{
const
isEndProcessStatus
=
(
status
:
number
)
=>
{
let
isEndStatus
=
false
let
isEndStatus
=
false
if
(
if
(
BpmProcessInstanceStatus
.
APPROVE
===
status
||
BpmProcessInstanceStatus
.
REJECT
===
status
||
BpmProcessInstanceStatus
.
APPROVE
===
status
||
BpmProcessInstanceStatus
.
CANCEL
===
status
BpmProcessInstanceStatus
.
REJECT
===
status
||
BpmProcessInstanceStatus
.
CANCEL
===
status
)
{
)
{
isEndStatus
=
true
isEndStatus
=
true
}
}
...
@@ -806,7 +812,6 @@ const loadTodoTask = (task: any) => {
...
@@ -806,7 +812,6 @@ const loadTodoTask = (task: any) => {
}
}
defineExpose
({
loadTodoTask
})
defineExpose
({
loadTodoTask
})
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
...
...
src/views/bpm/processInstance/detail/ProcessInstanceTimeline.vue
View file @
dcdce412
...
@@ -11,28 +11,45 @@
...
@@ -11,28 +11,45 @@
>
>
<div
class=
"flex flex-col items-start"
>
<div
class=
"flex flex-col items-start"
>
<div
class=
"font-bold"
>
{{
activity
.
name
}}
</div>
<div
class=
"font-bold"
>
{{
activity
.
name
}}
</div>
<div
class=
"flex items-center flex-wrap mt-1
"
>
<div
class=
"flex items-center flex-wrap mt-1"
>
<!-- 情况一:遍历每个审批节点下的【进行中】task 任务 -->
<!-- 情况一:遍历每个审批节点下的【进行中】task 任务 -->
<div
v-for=
"(task, idx) in activity.tasks"
:key=
"idx"
class=
"flex items-center"
>
<div
v-for=
"(task, idx) in activity.tasks"
:key=
"idx"
class=
"flex items-center"
>
<div
class=
"flex flex-col pr-2"
>
<div
class=
"flex flex-col pr-2"
>
<div
class=
"position-relative"
v-if=
"task.assigneeUser || task.ownerUser"
>
<div
class=
"position-relative"
v-if=
"task.assigneeUser || task.ownerUser"
>
<!-- 信息:头像 -->
<!-- 信息:头像 -->
<el-tooltip
:content=
"task.reason"
placement=
"bottom"
v-if=
"task.assigneeUser && task.assigneeUser.avatar"
effect=
"light"
>
<el-tooltip
<el-avatar
:content=
"task.reason"
:size=
"36"
placement=
"bottom"
:src=
"task.assigneeUser.avatar"
v-if=
"task.assigneeUser && task.assigneeUser.avatar"
/>
effect=
"light"
>
<el-avatar
:size=
"36"
:src=
"task.assigneeUser.avatar"
/>
</el-tooltip>
</el-tooltip>
<el-tooltip
:content=
"task.reason"
placement=
"bottom"
v-else-if=
"task.assigneeUser && task.assigneeUser.nickname"
effect=
"light"
>
<el-tooltip
<el-avatar
>
:content=
"task.reason"
placement=
"bottom"
v-else-if=
"task.assigneeUser && task.assigneeUser.nickname"
effect=
"light"
>
<el-avatar>
{{
task
.
assigneeUser
.
nickname
.
substring
(
0
,
1
)
}}
{{
task
.
assigneeUser
.
nickname
.
substring
(
0
,
1
)
}}
</el-avatar>
</el-avatar>
</el-tooltip>
</el-tooltip>
<el-tooltip
:content=
"task.reason"
placement=
"bottom"
v-else-if=
"task.ownerUser && task.ownerUser.avatar"
effect=
"light"
>
<el-tooltip
<el-avatar
:src=
"task.ownerUser.avatar"
/>
:content=
"task.reason"
placement=
"bottom"
v-else-if=
"task.ownerUser && task.ownerUser.avatar"
effect=
"light"
>
<el-avatar
:src=
"task.ownerUser.avatar"
/>
</el-tooltip>
</el-tooltip>
<el-tooltip
:content=
"task.reason"
placement=
"bottom"
v-else-if=
"task.ownerUser && task.ownerUser.nickname"
effect=
"light"
>
<el-tooltip
<el-avatar
>
:content=
"task.reason"
placement=
"bottom"
v-else-if=
"task.ownerUser && task.ownerUser.nickname"
effect=
"light"
>
<el-avatar>
{{
task
.
ownerUser
.
nickname
.
substring
(
0
,
1
)
}}
{{
task
.
ownerUser
.
nickname
.
substring
(
0
,
1
)
}}
</el-avatar>
</el-avatar>
</el-tooltip>
</el-tooltip>
...
@@ -146,7 +163,6 @@ defineProps<{
...
@@ -146,7 +163,6 @@ defineProps<{
// 审批节点
// 审批节点
const
statusIconMap2
=
{
const
statusIconMap2
=
{
// 未开始
// 未开始
'-1'
:
{
color
:
'#e5e7ec'
,
icon
:
'ep-clock'
},
'-1'
:
{
color
:
'#e5e7ec'
,
icon
:
'ep-clock'
},
...
@@ -160,7 +176,7 @@ const statusIconMap2 = {
...
@@ -160,7 +176,7 @@ const statusIconMap2 = {
'3'
:
{
color
:
'#f46b6c'
,
icon
:
'fa-solid:times-circle'
},
'3'
:
{
color
:
'#f46b6c'
,
icon
:
'fa-solid:times-circle'
},
// 取消
// 取消
'4'
:
{
color
:
'#cccccc'
,
icon
:
'ep:delete-filled'
},
'4'
:
{
color
:
'#cccccc'
,
icon
:
'ep:delete-filled'
},
//
回退
//
退回
'5'
:
{
color
:
'#f46b6c'
,
icon
:
'ep:remove-filled'
},
'5'
:
{
color
:
'#f46b6c'
,
icon
:
'ep:remove-filled'
},
// 委派中
// 委派中
'6'
:
{
color
:
'#448ef7'
,
icon
:
'ep:loading'
},
'6'
:
{
color
:
'#448ef7'
,
icon
:
'ep:loading'
},
...
@@ -180,7 +196,7 @@ const statusIconMap = {
...
@@ -180,7 +196,7 @@ const statusIconMap = {
'3'
:
{
color
:
'#f46b6c'
,
icon
:
Close
},
'3'
:
{
color
:
'#f46b6c'
,
icon
:
Close
},
// 已取消
// 已取消
'4'
:
{
color
:
'#cccccc'
,
icon
:
Delete
},
'4'
:
{
color
:
'#cccccc'
,
icon
:
Delete
},
//
回退
//
退回
'5'
:
{
color
:
'#f46b6c'
,
icon
:
Minus
},
'5'
:
{
color
:
'#f46b6c'
,
icon
:
Minus
},
// 委派中
// 委派中
'6'
:
{
color
:
'#448ef7'
,
icon
:
Loading
},
'6'
:
{
color
:
'#448ef7'
,
icon
:
Loading
},
...
...
src/views/bpm/processInstance/detail/dialog/TaskReturnForm.vue
View file @
dcdce412
<
template
>
<
template
>
<Dialog
v-model=
"dialogVisible"
title=
"
回退
任务"
width=
"500"
>
<Dialog
v-model=
"dialogVisible"
title=
"
退回
任务"
width=
"500"
>
<el-form
<el-form
ref=
"formRef"
ref=
"formRef"
v-loading=
"formLoading"
v-loading=
"formLoading"
...
@@ -17,8 +17,8 @@
...
@@ -17,8 +17,8 @@
/>
/>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item
label=
"
回退
理由"
prop=
"reason"
>
<el-form-item
label=
"
退回
理由"
prop=
"reason"
>
<el-input
v-model=
"formData.reason"
clearable
placeholder=
"请输入
回退
理由"
/>
<el-input
v-model=
"formData.reason"
clearable
placeholder=
"请输入
退回
理由"
/>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
<template
#
footer
>
<template
#
footer
>
...
@@ -39,8 +39,8 @@ const formData = ref({
...
@@ -39,8 +39,8 @@ const formData = ref({
reason
:
''
reason
:
''
})
})
const
formRules
=
ref
({
const
formRules
=
ref
({
targetTaskDefinitionKey
:
[{
required
:
true
,
message
:
'必须选择
回退
节点'
,
trigger
:
'change'
}],
targetTaskDefinitionKey
:
[{
required
:
true
,
message
:
'必须选择
退回
节点'
,
trigger
:
'change'
}],
reason
:
[{
required
:
true
,
message
:
'
回退
理由不能为空'
,
trigger
:
'blur'
}]
reason
:
[{
required
:
true
,
message
:
'
退回
理由不能为空'
,
trigger
:
'blur'
}]
})
})
const
formRef
=
ref
()
// 表单 Ref
const
formRef
=
ref
()
// 表单 Ref
...
@@ -49,7 +49,7 @@ const returnList = ref([] as any)
...
@@ -49,7 +49,7 @@ const returnList = ref([] as any)
const
open
=
async
(
id
:
string
)
=>
{
const
open
=
async
(
id
:
string
)
=>
{
returnList
.
value
=
await
TaskApi
.
getTaskListByReturn
(
id
)
returnList
.
value
=
await
TaskApi
.
getTaskListByReturn
(
id
)
if
(
returnList
.
value
.
length
===
0
)
{
if
(
returnList
.
value
.
length
===
0
)
{
message
.
warning
(
'当前没有可
回退
的节点'
)
message
.
warning
(
'当前没有可
退回
的节点'
)
return
false
return
false
}
}
dialogVisible
.
value
=
true
dialogVisible
.
value
=
true
...
@@ -69,7 +69,7 @@ const submitForm = async () => {
...
@@ -69,7 +69,7 @@ const submitForm = async () => {
formLoading
.
value
=
true
formLoading
.
value
=
true
try
{
try
{
await
TaskApi
.
returnTask
(
formData
.
value
)
await
TaskApi
.
returnTask
(
formData
.
value
)
message
.
success
(
'
回退
成功'
)
message
.
success
(
'
退回
成功'
)
dialogVisible
.
value
=
false
dialogVisible
.
value
=
false
// 发送操作成功的事件
// 发送操作成功的事件
emit
(
'success'
)
emit
(
'success'
)
...
...
src/views/bpm/processInstance/detail/index.vue
View file @
dcdce412
...
@@ -161,7 +161,7 @@
...
@@ -161,7 +161,7 @@
<!-- 弹窗:转派审批人 -->
<!-- 弹窗:转派审批人 -->
<TaskTransferForm
ref=
"taskTransferFormRef"
@
success=
"getDetail"
/>
<TaskTransferForm
ref=
"taskTransferFormRef"
@
success=
"getDetail"
/>
<!-- 弹窗:
回退
节点 -->
<!-- 弹窗:
退回
节点 -->
<TaskReturnForm
ref=
"taskReturnFormRef"
@
success=
"getDetail"
/>
<TaskReturnForm
ref=
"taskReturnFormRef"
@
success=
"getDetail"
/>
<!-- 弹窗:委派,将任务委派给别人处理,处理完成后,会重新回到原审批人手中-->
<!-- 弹窗:委派,将任务委派给别人处理,处理完成后,会重新回到原审批人手中-->
<TaskDelegateForm
ref=
"taskDelegateForm"
@
success=
"getDetail"
/>
<TaskDelegateForm
ref=
"taskDelegateForm"
@
success=
"getDetail"
/>
...
...
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