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
842fe09e
authored
Oct 13, 2024
by
jason
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【功能修改】 新审批页面增加减签
parent
6b06f320
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
204 additions
and
163 deletions
+204
-163
src/api/bpm/task/index.ts
+9
-5
src/assets/svgs/bpm/audit4.svg
+2
-0
src/router/modules/remaining.ts
+2
-2
src/views/bpm/processInstance/detail/ProcessInstanceOperationButton.vue
+184
-136
src/views/bpm/processInstance/detail/dialog/TaskSignList.vue
+1
-1
src/views/bpm/processInstance/detail/index_new.vue
+6
-19
No files found.
src/api/bpm/task/index.ts
View file @
842fe09e
...
@@ -9,10 +9,10 @@ export enum TaskStatusEnum {
...
@@ -9,10 +9,10 @@ export enum TaskStatusEnum {
*/
*/
NOT_START
=
-
1
,
NOT_START
=
-
1
,
/**
/**
* 待审批
* 待审批
*/
*/
WAIT
=
0
,
WAIT
=
0
,
/**
/**
* 审批中
* 审批中
*/
*/
...
@@ -26,7 +26,7 @@ export enum TaskStatusEnum {
...
@@ -26,7 +26,7 @@ export enum TaskStatusEnum {
* 审批不通过
* 审批不通过
*/
*/
REJECT
=
3
,
REJECT
=
3
,
/**
/**
* 已取消
* 已取消
*/
*/
...
@@ -42,8 +42,7 @@ export enum TaskStatusEnum {
...
@@ -42,8 +42,7 @@ export enum TaskStatusEnum {
/**
/**
* 审批通过中
* 审批通过中
*/
*/
APPROVING
=
7
,
APPROVING
=
7
}
}
export
type
TaskVO
=
{
export
type
TaskVO
=
{
...
@@ -111,6 +110,11 @@ export const copyTask = async (data: any) => {
...
@@ -111,6 +110,11 @@ export const copyTask = async (data: any) => {
return
await
request
.
put
({
url
:
'/bpm/task/copy'
,
data
})
return
await
request
.
put
({
url
:
'/bpm/task/copy'
,
data
})
}
}
// 获取我的待办任务
export
const
myTodoTask
=
async
(
processInstanceId
:
string
)
=>
{
return
await
request
.
get
({
url
:
'/bpm/task/my-todo?processInstanceId='
+
processInstanceId
})
}
// 获取减签任务列表
// 获取减签任务列表
export
const
getChildrenTaskList
=
async
(
id
:
string
)
=>
{
export
const
getChildrenTaskList
=
async
(
id
:
string
)
=>
{
return
await
request
.
get
({
url
:
'/bpm/task/list-by-parent-task-id?parentTaskId='
+
id
})
return
await
request
.
get
({
url
:
'/bpm/task/list-by-parent-task-id?parentTaskId='
+
id
})
...
...
src/assets/svgs/bpm/audit4.svg
0 → 100644
View file @
842fe09e
<svg
t=
"1728812935276"
class=
"icon"
viewBox=
"0 0 1167 1024"
version=
"1.1"
xmlns=
"http://www.w3.org/2000/svg"
p-id=
"4361"
width=
"200"
height=
"200"
><path
d=
"M1159.10034 346.809949l-177.334385-280.171946a52.524561 52.524561 0 0 0-72.305741-16.279543L24.344573 611.35763a52.626948 52.626948 0 0 0-16.30002 72.305741L185.399416 963.876272a52.504083 52.504083 0 0 0 72.244308 16.21811l885.156596-560.958215a52.422174 52.422174 0 0 0 16.30002-72.326218z m-35.323535 42.203945L238.640686 950.054019a16.627658 16.627658 0 0 1-23.016611-5.180785L38.310168 664.660333a16.730045 16.730045 0 0 1 5.180785-23.078043L928.668027 80.562642a16.607181 16.607181 0 0 1 22.975655 5.22174l177.416295 280.212902a16.996252 16.996252 0 0 1-5.283172 23.01661z m-763.008836-177.784888l14.682304 35.303058 19.043993-33.132452 38.047031-3.071612-25.617242-28.422647 8.723377-37.146025-34.770645 15.644743-32.681949-19.801658 4.136438 38.067509-28.975538 24.736713 37.412231 7.822371zM586.121884 106.077497l-18.265851-33.62391-15.5014 35.016374-37.596528 7.167094 28.381692 25.514855-4.894101 37.924167 33.111975-19.187335 34.545393 16.422884-7.98619-37.473663 26.211086-27.787848-38.006076-3.972618z m343.610968 563.29264l-30.245137-23.303294-0.143342 38.190372-31.596646 21.460328 36.38836 12.040718 10.730164 36.654567 22.566108-30.85946 38.190372 1.085303-22.422765-31.043756 12.921246-35.83547-36.38836 11.610692z m-123.49927 152.270033l-14.416098-35.425922-19.351154 33.030065-38.026553 2.764451 25.39199 28.545512-9.030538 37.105069 34.975419-15.296626 32.538607 20.25216-3.849753-38.087986 28.975537-24.716235-37.207457-8.170488z m-226.234444 103.574748l18.102032 33.767252 15.808562-34.913987 37.596528-6.757545-28.217873-25.781062 5.180785-37.883211-33.255317 18.839218-34.361097-16.648135 7.658552 37.391753-26.57968 27.685461 38.067508 4.300256z m-338.901163-565.954703l30.081318 23.671888 0.430026-38.231328 31.739988-21.35794-36.183587-12.286447-10.443479-36.818386-22.852792 30.654685-38.190373-1.392464 22.115605 31.187098-13.166976 35.937858 36.449793-11.364964z m-134.372775 165.047938C102.711627 362.454691 181.242501 202.444197 327.61504 109.722477 473.987578 17.000757 651.915808 14.379648 796.465857 87.033505L831.400321 64.9179A508.106015 508.106015 0 0 0 694.119753 12.536681a510.133279 510.133279 0 0 0-195.927874-5.651766 506.611164 506.611164 0 0 0-189.620832 72.612902 509.355138 509.355138 0 0 0-146.659222 140.638863 509.989937 509.989937 0 0 0-78.858513 179.627855 508.679383 508.679383 0 0 0-11.344486 146.618268l35.016374-22.095127z m950.520494-24.757191c4.156915 161.832984-74.394437 321.823002-220.72602 414.524244-146.331584 92.844584-324.321246 95.404261-468.83034 22.729927l-34.975419 22.177037a510.338053 510.338053 0 0 0 137.301045 52.319787 508.658906 508.658906 0 0 0 195.907398 5.672243 506.201616 506.201616 0 0 0 189.620832-72.592424A510.235666 510.235666 0 0 0 1080.876627 624.156012c10.91446-48.531466 14.702782-97.718208 11.324009-146.700177l-34.975419 22.115605zM433.176097 276.613382a276.322193 276.322193 0 0 1 131.321641-42.511107l54.019412-34.217755a312.075754 312.075754 0 0 0-204.528388 46.688499 312.055276 312.055276 0 0 0-129.478674 165.047938l53.998935-34.197278a276.50649 276.50649 0 0 1 94.667074-100.810297z m297.741565 470.57092c40.954823-25.903926 72.756244-60.879345 94.687552-100.666956l53.957979-34.279187a311.686683 311.686683 0 0 1-129.417241 165.047938c-61.718919 39.009469-133.164608 55.14567-204.50791 46.708976l53.978457-34.197278c45.25508-2.784928 90.305385-16.586703 131.301163-42.593016z m-303.00426-123.990728L277.895884 716.918687l40.565753 64.913395c5.467469 8.764332 12.573131 10.402525 21.337463 4.914579l120.816728-75.500217a19.494496 19.494496 0 0 0 8.211442-11.201144c1.290077-5.528901-5.487946-21.235076-19.53545-46.954705l29.671769-7.719984c16.279542 33.091497 23.549023 53.917025 22.013218 62.312763-2.477767 8.989584-8.682423 16.914342-18.102032 23.487592l-135.171395 84.448845c-20.927915 13.064589-37.965121 8.518603-51.644032-13.37175l-78.694693-125.936081 25.289604-15.788085 20.067863 32.088104 124.215979-77.629867-34.627303-55.432353-159.723811 99.806904-15.194239-24.306688 185.484395-115.90215 65.036259 104.025252z m160.133359-51.050187l8.805287 14.108936 31.596646-19.760702-8.805287-14.088459-31.617123 19.740225z m20.047386-38.21085l-8.661945-13.863208-31.617124 19.740225 8.661946 13.863207 31.617123-19.740224z m0.286684 70.790412l25.228171 40.360978-21.890353 13.678911-78.223713-125.219372 72.694812-45.418899-5.610811-1.9044c-0.327639-4.873624-0.901006-9.583429-1.228645-14.436575l-9.010061 13.719866c-2.477767-1.82249-4.730282-3.788321-6.675636-5.283172-11.979286 12.225015-31.064233 28.197396-57.111501 48.203827l-15.214717-17.876781c4.300256-3.378773 6.470862-9.112448 6.614204-16.996251-0.286684-5.897495-0.839574-14.334188-2.109173-25.023397l-22.852792 14.272756-14.293233-22.852792 33.07102-20.682186a213.84561 213.84561 0 0 0-19.023516-13.105543l22.361334-19.392109c6.286565 5.201263 13.044111 11.119235 20.25216 17.774393l33.787729-21.091734 14.272756 22.832314-43.760229 27.337345c0.921484 12.286447 1.2696 24.224778 1.576761 35.528309l25.125784-21.43985c-5.610811-3.583547-10.689209-6.839455-15.460446-9.624383l13.863208-16.750523c11.426396 6.368475 22.525153 13.310318 33.173407 21.173644-4.607418-26.866364-14.784691-56.681475-30.286092-89.588676l25.043875-10.238706c5.590333 12.73695 10.648254 25.125784 14.989465 36.961728l37.678437-23.549024 14.743737 23.569501-7.064707 4.423121c23.794752 40.238114 39.31663 77.507003 47.057092 111.560939 19.371631 12.573131 37.65796 20.743618 54.736121 24.28621l-1.290077 29.856066c-15.399014-3.542592-31.658078-10.648254-48.613375-20.989347a171.682619 171.682619 0 0 1-4.464076 54.51087l-25.801539-12.614085c5.160308-18.777786 5.938449-39.193766 2.272993-61.268416a484.905108 484.905108 0 0 1-51.644032-47.507595c0.020477 4.382166 0.307161 8.600513 0.184297 12.73695l-14.661827-5.037443 61.841783 98.946853c9.112448 14.579917 5.795107 27.13257-9.767725 36.859341l-14.08846 8.805287-19.125902-18.142987 13.515092-7.064707c5.569856-3.501637 7.126139-7.51521 4.545985-11.651647l-7.740462-12.388834-31.617123 19.740225z m11.569737-162.733991c15.910949 18.450148 31.596646 34.361097 46.790886 47.855711-8.088578-22.688972-19.535451-46.954705-34.606826-72.694811l-15.808561 9.870112c1.290077 5.283172 2.662064 10.177274 3.624501 14.968988z m-53.896547 244.295521l-18.224896 11.385441-19.944999-19.985954a102.387058 102.387058 0 0 0 16.381929-7.863326c4.607418-2.887315 4.914579-7.822371 0.819096-14.375143l-30.388478-48.633852c-4.505031 6.88041-9.153403 13.494614-13.945118 19.863089l-22.668494-21.665102c7.371868-7.638075 14.211324-15.644743 20.354547-24.2043l-31.125666-49.84202-20.927915 13.064588-15.03042-24.060958 20.88696-13.064589-26.1087-41.835352 24.060959-15.03042 26.129177 41.814875 14.600395-9.112449 15.03042 24.060959-14.579917 9.112448 23.999526 38.415625c3.030657-5.938449 6.32752-12.061195 9.214835-18.265852l16.095246 25.781062c-3.030657 5.938449-6.32752 12.081673-9.358177 18.020122l41.77392 66.858749c10.484435 16.791478 8.027145 30.14275-7.04423 39.562359z m226.275399-449.356321l25.043874-15.644743 40.401933 64.667666 44.743145-27.951667 80.373841 128.598146c12.143105 19.453541 9.870112 34.750168-6.921366 45.214125l-23.078042 14.436575-21.60367-19.965477 22.381811-12.286447c5.344604-3.358296 5.446992-9.153403 0.430026-17.201025l-9.870113-15.767607-64.176208 40.094772 32.04715 51.295916-25.289604 15.788084-99.04924-158.495166 44.968396-28.115486-40.401933-64.667666z m61.739396 142.604695l12.614085 20.190728 64.176209-40.11525-12.614086-20.17025-64.176208 40.094772z m50.804458-61.493668l-12.593608-20.17025-64.196685 40.094772 12.614085 20.190728 64.176208-40.11525z m-136.911974-53.036496c14.743736 7.371868 29.978931 16.074768 45.910357 26.415861l-14.047505 22.975656a356.245531 356.245531 0 0 0-46.647543-25.965358l14.784691-23.426159z m83.650227-56.005721l27.296389-2.866837c3.276386 18.245374 4.791714 36.900296 4.075005 56.312882l-27.112093 2.047741c0.409548-19.863089-0.941961-38.29276-4.259301-55.493786z m-176.371947 100.748866l27.501164-10.074887c2.559676 7.863326 4.791714 15.255672 6.655159 22.54563l40.340501-25.228171 15.050897 24.081436-48.613375 30.388479c1.965832 11.262576 3.39925 22.197514 4.361688 32.415743l55.903334-34.934464 14.129414 22.607062-22.340856 13.965595 14.272756 22.852791 30.634208-19.125902 14.579917 23.344249-30.634208 19.125903 29.630815 47.405208a230.166107 230.166107 0 0 0 20.682186-32.866246l18.224896 19.392109c-11.324009 19.22829-25.965358 38.518011-43.965003 57.869165l-24.122391-15.337581c4.709805-5.979404 5.733675-11.364963 3.01018-15.74713l-28.258828-45.214125-30.634208 19.14638-14.579917-23.344249 30.634208-19.14638-14.272756-22.852792-11.672125 7.289959-10.648254-16.996252c0.307161 5.877017 0.47098 11.528783 0.47098 16.93482l-28.87315-0.204774a297.802998 297.802998 0 0 0-17.467232-98.291576z"
fill=
"#8a8a8a"
p-id=
"4362"
></path></svg>
\ No newline at end of file
src/router/modules/remaining.ts
View file @
842fe09e
...
@@ -292,8 +292,8 @@ const remainingRouter: AppRouteRecordRaw[] = [
...
@@ -292,8 +292,8 @@ const remainingRouter: AppRouteRecordRaw[] = [
},
},
{
{
path
:
'process-instance/detail'
,
path
:
'process-instance/detail'
,
//
component: () => import('@/views/bpm/processInstance/detail/index_new.vue'),
component
:
()
=>
import
(
'@/views/bpm/processInstance/detail/index_new.vue'
),
component
:
()
=>
import
(
'@/views/bpm/processInstance/detail/index.vue'
),
//
component: () => import('@/views/bpm/processInstance/detail/index.vue'),
name
:
'BpmProcessInstanceDetail'
,
name
:
'BpmProcessInstanceDetail'
,
meta
:
{
meta
:
{
noCache
:
true
,
noCache
:
true
,
...
...
src/views/bpm/processInstance/detail/ProcessInstanceOperationButton.vue
View file @
842fe09e
<
template
>
<
template
>
<div
<div
class=
"h-50px bottom-10 text-14px flex items-center color-#32373c dark:color-#fff font-bold btn-container"
class=
"h-50px bottom-10 text-14px flex items-center color-#32373c dark:color-#fff font-bold btn-container"
v-if=
"runningTask.id"
v-if=
"runningTask
&& runningTask
.id"
>
>
<!-- 【通过】按钮 -->
<!-- 【通过】按钮 -->
<el-popover
<el-popover
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
placement=
"top-end"
placement=
"top-end"
:width=
"420"
:width=
"420"
trigger=
"click"
trigger=
"click"
v-if=
"isShowButton(OperationButtonType.APPROVE)"
v-if=
"
isHandleTaskStatus() &&
isShowButton(OperationButtonType.APPROVE)"
>
>
<template
#
reference
>
<template
#
reference
>
<el-button
plain
type=
"success"
@
click=
"openPopover('approve')"
>
<el-button
plain
type=
"success"
@
click=
"openPopover('approve')"
>
...
@@ -38,7 +38,12 @@
...
@@ -38,7 +38,12 @@
/>
/>
</el-card>
</el-card>
<el-form-item
label=
"审批意见"
prop=
"reason"
>
<el-form-item
label=
"审批意见"
prop=
"reason"
>
<el-input
v-model=
"genericForm.reason"
placeholder=
"请输入审批意见"
type=
"textarea"
:rows=
"4"
/>
<el-input
v-model=
"genericForm.reason"
placeholder=
"请输入审批意见"
type=
"textarea"
:rows=
"4"
/>
</el-form-item>
</el-form-item>
<el-form-item>
<el-form-item>
<el-button
:disabled=
"formLoading"
type=
"success"
@
click=
"handleAudit(true)"
>
<el-button
:disabled=
"formLoading"
type=
"success"
@
click=
"handleAudit(true)"
>
...
@@ -56,7 +61,7 @@
...
@@ -56,7 +61,7 @@
placement=
"top-end"
placement=
"top-end"
:width=
"420"
:width=
"420"
trigger=
"click"
trigger=
"click"
v-if=
"isShowButton(OperationButtonType.REJECT)"
v-if=
"
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')"
>
...
@@ -85,7 +90,12 @@
...
@@ -85,7 +90,12 @@
/>
/>
</el-card>
</el-card>
<el-form-item
label=
"审批意见"
prop=
"reason"
>
<el-form-item
label=
"审批意见"
prop=
"reason"
>
<el-input
v-model=
"genericForm.reason"
placeholder=
"请输入审批意见"
type=
"textarea"
:rows=
"4"
/>
<el-input
v-model=
"genericForm.reason"
placeholder=
"请输入审批意见"
type=
"textarea"
:rows=
"4"
/>
</el-form-item>
</el-form-item>
<el-form-item>
<el-form-item>
<el-button
:disabled=
"formLoading"
type=
"danger"
@
click=
"handleAudit(false)"
>
<el-button
:disabled=
"formLoading"
type=
"danger"
@
click=
"handleAudit(false)"
>
...
@@ -103,10 +113,10 @@
...
@@ -103,10 +113,10 @@
placement=
"top-start"
placement=
"top-start"
:width=
"420"
:width=
"420"
trigger=
"click"
trigger=
"click"
v-if=
"isShowButton(OperationButtonType.COPY)"
v-if=
"is
HandleTaskStatus() && is
ShowButton(OperationButtonType.COPY)"
>
>
<
template
#
reference
>
<
template
#
reference
>
<div
@
click=
"openPopover('copy')"
class=
"hover-bg-gray-100 rounded-xl p-6px"
>
<div
@
click=
"openPopover('copy')"
class=
"hover-bg-gray-100 rounded-xl p-6px"
>
<Icon
:size=
"14"
icon=
"svg-icon:send"
/>
<Icon
:size=
"14"
icon=
"svg-icon:send"
/>
{{
getButtonDisplayName
(
OperationButtonType
.
COPY
)
}}
{{
getButtonDisplayName
(
OperationButtonType
.
COPY
)
}}
</div>
</div>
...
@@ -120,9 +130,14 @@
...
@@ -120,9 +130,14 @@
:rules=
"genericRule"
:rules=
"genericRule"
label-width=
"100px"
label-width=
"100px"
>
>
<el-form-item
label=
"抄送人"
prop=
"copyUserIds"
>
<el-form-item
label=
"抄送人"
prop=
"copyUserIds"
>
<el-select
v-model=
"genericForm.copyUserIds"
clearable
style=
"width: 100%"
multiple
placeholder=
"请选择抄送人"
>
<el-select
v-model=
"genericForm.copyUserIds"
clearable
style=
"width: 100%"
multiple
placeholder=
"请选择抄送人"
>
<el-option
<el-option
v-for=
"item in userOptions"
v-for=
"item in userOptions"
:key=
"item.id"
:key=
"item.id"
...
@@ -132,7 +147,13 @@
...
@@ -132,7 +147,13 @@
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item
label=
"抄送意见"
prop=
"copyReason"
>
<el-form-item
label=
"抄送意见"
prop=
"copyReason"
>
<el-input
v-model=
"genericForm.copyReason"
clearable
placeholder=
"请输入抄送意见"
type=
"textarea"
:rows=
"3"
/>
<el-input
v-model=
"genericForm.copyReason"
clearable
placeholder=
"请输入抄送意见"
type=
"textarea"
:rows=
"3"
/>
</el-form-item>
</el-form-item>
<el-form-item>
<el-form-item>
...
@@ -151,10 +172,10 @@
...
@@ -151,10 +172,10 @@
placement=
"top-start"
placement=
"top-start"
:width=
"420"
:width=
"420"
trigger=
"click"
trigger=
"click"
v-if=
"isShowButton(OperationButtonType.TRANSFER)"
v-if=
"
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"
>
<Icon
:size=
"14"
icon=
"fa:share-square-o"
/>
<Icon
:size=
"14"
icon=
"fa:share-square-o"
/>
{{
getButtonDisplayName
(
OperationButtonType
.
TRANSFER
)
}}
{{
getButtonDisplayName
(
OperationButtonType
.
TRANSFER
)
}}
</div>
</div>
...
@@ -168,7 +189,6 @@
...
@@ -168,7 +189,6 @@
:rules=
"genericRule"
:rules=
"genericRule"
label-width=
"100px"
label-width=
"100px"
>
>
<el-form-item
label=
"新审批人"
prop=
"assigneeUserId"
>
<el-form-item
label=
"新审批人"
prop=
"assigneeUserId"
>
<el-select
v-model=
"genericForm.assigneeUserId"
clearable
style=
"width: 100%"
>
<el-select
v-model=
"genericForm.assigneeUserId"
clearable
style=
"width: 100%"
>
<el-option
<el-option
...
@@ -180,12 +200,17 @@
...
@@ -180,12 +200,17 @@
</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=
"genericForm.reason"
clearable
placeholder=
"请输入审批意见"
type=
"textarea"
:rows=
"3"
/>
<el-input
v-model=
"genericForm.reason"
clearable
placeholder=
"请输入审批意见"
type=
"textarea"
:rows=
"3"
/>
</el-form-item>
</el-form-item>
<el-form-item>
<el-form-item>
<el-button
:disabled=
"formLoading"
type=
"primary"
@
click=
"handleTransfer()"
>
<el-button
:disabled=
"formLoading"
type=
"primary"
@
click=
"handleTransfer()"
>
{{ getButtonDisplayName(OperationButtonType.TRANSFER) }}
{{ getButtonDisplayName(OperationButtonType.TRANSFER) }}
</el-button>
</el-button>
<el-button
@
click=
"popOverVisible.transfer = false"
>
取消
</el-button>
<el-button
@
click=
"popOverVisible.transfer = false"
>
取消
</el-button>
...
@@ -193,22 +218,22 @@
...
@@ -193,22 +218,22 @@
</el-form>
</el-form>
</div>
</div>
</el-popover>
</el-popover>
<!-- 【委派】按钮 -->
<!-- 【委派】按钮 -->
<el-popover
<el-popover
:visible=
"popOverVisible.delegate"
:visible=
"popOverVisible.delegate"
placement=
"top-start"
placement=
"top-start"
:width=
"420"
:width=
"420"
trigger=
"click"
trigger=
"click"
v-if=
"isShowButton(OperationButtonType.DELEGATE)"
v-if=
"is
HandleTaskStatus() && is
ShowButton(OperationButtonType.DELEGATE)"
>
>
<
template
#
reference
>
<
template
#
reference
>
<div
@
click=
"openPopover('delegate')"
class=
"hover-bg-gray-100 rounded-xl p-6px"
>
<div
@
click=
"openPopover('delegate')"
class=
"hover-bg-gray-100 rounded-xl p-6px"
>
<Icon
:size=
"14"
icon=
"ep:position"
/>
<Icon
:size=
"14"
icon=
"ep:position"
/>
{{
getButtonDisplayName
(
OperationButtonType
.
DELEGATE
)
}}
{{
getButtonDisplayName
(
OperationButtonType
.
DELEGATE
)
}}
</div>
</div>
</
template
>
</
template
>
<div
class=
"flex flex-col flex-1 pt-20px px-20px"
v-loading=
"formLoading"
>
<div
class=
"flex flex-col flex-1 pt-20px px-20px"
v-loading=
"formLoading"
>
<el-form
<el-form
label-position=
"top"
label-position=
"top"
...
@@ -228,9 +253,15 @@
...
@@ -228,9 +253,15 @@
/>
/>
</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=
"genericForm.reason"
clearable
placeholder=
"请输入审批意见"
type=
"textarea"
:rows=
"3"
/>
<el-input
v-model=
"genericForm.reason"
clearable
placeholder=
"请输入审批意见"
type=
"textarea"
:rows=
"3"
/>
</el-form-item>
</el-form-item>
<el-form-item>
<el-form-item>
...
@@ -241,7 +272,6 @@
...
@@ -241,7 +272,6 @@
</el-form-item>
</el-form-item>
</el-form>
</el-form>
</div>
</div>
</el-popover>
</el-popover>
<!-- 【加签】按钮 当前任务审批人为A,向前加签选了一个C,则需要C先审批,然后再是A审批,向后加签B,A审批完,需要B再审批完,才算完成这个任务节点 -->
<!-- 【加签】按钮 当前任务审批人为A,向前加签选了一个C,则需要C先审批,然后再是A审批,向后加签B,A审批完,需要B再审批完,才算完成这个任务节点 -->
...
@@ -250,10 +280,10 @@
...
@@ -250,10 +280,10 @@
placement=
"top-start"
placement=
"top-start"
:width=
"420"
:width=
"420"
trigger=
"click"
trigger=
"click"
v-if=
"isShowButton(OperationButtonType.ADD_SIGN)"
v-if=
"is
HandleTaskStatus() && is
ShowButton(OperationButtonType.ADD_SIGN)"
>
>
<
template
#
reference
>
<
template
#
reference
>
<div
@
click=
"openPopover('addSign')"
class=
"hover-bg-gray-100 rounded-xl p-6px"
>
<div
@
click=
"openPopover('addSign')"
class=
"hover-bg-gray-100 rounded-xl p-6px"
>
<Icon
:size=
"14"
icon=
"ep:plus"
/>
<Icon
:size=
"14"
icon=
"ep:plus"
/>
{{
getButtonDisplayName
(
OperationButtonType
.
ADD_SIGN
)
}}
{{
getButtonDisplayName
(
OperationButtonType
.
ADD_SIGN
)
}}
</div>
</div>
...
@@ -278,9 +308,15 @@
...
@@ -278,9 +308,15 @@
/>
/>
</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=
"genericForm.reason"
clearable
placeholder=
"请输入审批意见"
type=
"textarea"
:rows=
"3"
/>
<el-input
v-model=
"genericForm.reason"
clearable
placeholder=
"请输入审批意见"
type=
"textarea"
:rows=
"3"
/>
</el-form-item>
</el-form-item>
<el-form-item>
<el-form-item>
<el-button
:disabled=
"formLoading"
type=
"primary"
@
click=
"handlerAddSign('before')"
>
<el-button
:disabled=
"formLoading"
type=
"primary"
@
click=
"handlerAddSign('before')"
>
...
@@ -295,17 +331,25 @@
...
@@ -295,17 +331,25 @@
</div>
</div>
</el-popover>
</el-popover>
<!-- TODO @jason:减签 -->
<!-- 【减签】按钮 -->
<div
@
click=
"openChildrenTask()"
class=
"hover-bg-gray-100 rounded-xl p-6px"
v-if=
"runningTask.children"
>
<Icon
:size=
"14"
icon=
"ep:semi-select"
/>
减签
</div>
<!-- 【退回】按钮 -->
<!-- 【退回】按钮 -->
<el-popover
<el-popover
:visible=
"popOverVisible.return"
:visible=
"popOverVisible.return"
placement=
"top-start"
placement=
"top-start"
:width=
"420"
:width=
"420"
trigger=
"click"
trigger=
"click"
v-if=
"isShowButton(OperationButtonType.RETURN)"
v-if=
"is
HandleTaskStatus() && is
ShowButton(OperationButtonType.RETURN)"
>
>
<
template
#
reference
>
<
template
#
reference
>
<div
@
click=
"openReturnPopover"
class=
"hover-bg-gray-100 rounded-xl p-6px"
>
<div
@
click=
"openReturnPopover"
class=
"hover-bg-gray-100 rounded-xl p-6px"
>
<Icon
:size=
"14"
icon=
"fa:mail-reply"
/>
<Icon
:size=
"14"
icon=
"fa:mail-reply"
/>
{{
getButtonDisplayName
(
OperationButtonType
.
RETURN
)
}}
{{
getButtonDisplayName
(
OperationButtonType
.
RETURN
)
}}
</div>
</div>
...
@@ -320,20 +364,26 @@
...
@@ -320,20 +364,26 @@
label-width=
"100px"
label-width=
"100px"
>
>
<el-form-item
label=
"退回节点"
prop=
"targetTaskDefinitionKey"
>
<el-form-item
label=
"退回节点"
prop=
"targetTaskDefinitionKey"
>
<el-select
v-model=
"genericForm.targetTaskDefinitionKey"
clearable
style=
"width: 100%"
>
<el-select
v-model=
"genericForm.targetTaskDefinitionKey"
clearable
style=
"width: 100%"
>
<el-option
<el-option
v-for=
"item in returnList"
v-for=
"item in returnList"
:key=
"item.taskDefinitionKey"
:key=
"item.taskDefinitionKey"
:label=
"item.name"
:label=
"item.name"
:value=
"item.taskDefinitionKey"
:value=
"item.taskDefinitionKey"
/>
/>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item
label=
"退回理由"
prop=
"returnReason"
>
<el-form-item
label=
"退回理由"
prop=
"returnReason"
>
<el-input
v-model=
"genericForm.returnReason"
clearable
placeholder=
"请输入退回理由"
type=
"textarea"
:rows=
"3"
/>
<el-input
v-model=
"genericForm.returnReason"
clearable
placeholder=
"请输入退回理由"
type=
"textarea"
:rows=
"3"
/>
</el-form-item>
</el-form-item>
<el-form-item>
<el-form-item>
<el-button
:disabled=
"formLoading"
type=
"primary"
@
click=
"handleReturn()"
>
<el-button
:disabled=
"formLoading"
type=
"primary"
@
click=
"handleReturn()"
>
{{ getButtonDisplayName(OperationButtonType.RETURN) }}
{{ getButtonDisplayName(OperationButtonType.RETURN) }}
</el-button>
</el-button>
<el-button
@
click=
"popOverVisible.return = false"
>
取消
</el-button>
<el-button
@
click=
"popOverVisible.return = false"
>
取消
</el-button>
...
@@ -341,29 +391,29 @@
...
@@ -341,29 +391,29 @@
</el-form>
</el-form>
</div>
</div>
</el-popover>
</el-popover>
<!-- 弹窗:子任务 -->
<TaskSignList
ref=
"taskSignListRef"
@
success=
"reload"
/>
<!--TODO @jason:撤回 -->
<!--TODO @jason:撤回 -->
<!--TODO @jason:再次发起 -->
<!--TODO @jason:再次发起 -->
</div>
</div>
</template>
</template>
<
script
lang=
"ts"
setup
>
<
script
lang=
"ts"
setup
>
import
TaskSignList
from
'./dialog/TaskSignList.vue'
import
{
setConfAndFields2
}
from
'@/utils/formCreate'
import
{
setConfAndFields2
}
from
'@/utils/formCreate'
import
{
useUserStore
}
from
'@/store/modules/user'
import
*
as
TaskApi
from
'@/api/bpm/task'
import
*
as
TaskApi
from
'@/api/bpm/task'
import
{
propTypes
}
from
'@/utils/propTypes'
import
{
propTypes
}
from
'@/utils/propTypes'
import
{
isEmpty
}
from
'@/utils/is'
import
{
import
{
OperationButtonType
,
OperationButtonType
,
OPERATION_BUTTON_NAME
OPERATION_BUTTON_NAME
}
from
'@/components/SimpleProcessDesignerV2/src/consts'
}
from
'@/components/SimpleProcessDesignerV2/src/consts'
defineOptions
({
name
:
'ProcessInstanceBtnConatiner'
})
defineOptions
({
name
:
'ProcessInstanceBtnConatiner'
})
const
userId
=
useUserStore
().
getUser
.
id
// 当前登录的编号
const
message
=
useMessage
()
// 消息弹窗
const
message
=
useMessage
()
// 消息弹窗
const
{
proxy
}
=
getCurrentInstance
()
as
any
const
{
proxy
}
=
getCurrentInstance
()
as
any
const
emit
=
defineEmits
([
'success'
])
// 定义 success 事件,用于操作成功后的回调
const
emit
=
defineEmits
([
'success'
])
// 定义 success 事件,用于操作成功后的回调
defineProps
({
const
props
=
defineProps
({
processInstance
:
propTypes
.
any
,
// 流程实例信息
processInstance
Id
:
propTypes
.
string
,
// 流程实例信息
userOptions
:
propTypes
.
any
userOptions
:
propTypes
.
any
})
})
const
formLoading
=
ref
(
false
)
// 表单加载中
const
formLoading
=
ref
(
false
)
// 表单加载中
...
@@ -374,7 +424,7 @@ const popOverVisible = ref({
...
@@ -374,7 +424,7 @@ const popOverVisible = ref({
transfer
:
false
,
transfer
:
false
,
delegate
:
false
,
delegate
:
false
,
addSign
:
false
,
addSign
:
false
,
return
:
false
,
return
:
false
,
copy
:
false
copy
:
false
})
})
/** 退回节点 */
/** 退回节点 */
...
@@ -390,7 +440,7 @@ const genericRule = reactive({
...
@@ -390,7 +440,7 @@ 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'
}],
copyUserIds
:
[{
required
:
true
,
message
:
'抄送人不能为空'
,
trigger
:
'change'
}],
copyUserIds
:
[{
required
:
true
,
message
:
'抄送人不能为空'
,
trigger
:
'change'
}],
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'
}]
})
})
...
@@ -407,43 +457,25 @@ watch(
...
@@ -407,43 +457,25 @@ watch(
}
}
)
)
// TODO @jaosn:具体的审批任务,要不改成后端返回。让前端弱化下
/** 弹出退回气泡卡 */
/**
const
openReturnPopover
=
async
()
=>
{
* 设置 runningTasks 中的任务
returnList
.
value
=
await
TaskApi
.
getTaskListByReturn
(
runningTask
.
value
.
id
)
*/
if
(
returnList
.
value
.
length
===
0
)
{
const
loadRunningTask
=
(
tasks
:
any
[])
=>
{
message
.
warning
(
'当前没有可退回的节点'
)
runningTask
.
value
=
{}
return
genericForm
.
value
=
{}
}
approveForm
.
value
=
{}
openPopover
(
'return'
)
approveFormFApi
.
value
=
{}
}
tasks
.
forEach
((
task
:
any
)
=>
{
/** 弹出气泡卡 */
if
(
!
isEmpty
(
task
.
children
))
{
const
openPopover
=
(
type
:
string
)
=>
{
loadRunningTask
(
task
.
children
)
Object
.
keys
(
popOverVisible
.
value
).
forEach
((
item
)
=>
{
}
if
(
item
===
type
)
{
// 2.1 只有待处理才需要
popOverVisible
.
value
[
item
]
=
true
if
(
task
.
status
!==
1
&&
task
.
status
!==
6
)
{
return
}
// 2.2 自己不是处理人
if
(
!
task
.
assigneeUser
||
task
.
assigneeUser
.
id
!==
userId
)
{
return
}
// 2.3 添加到处理任务
runningTask
.
value
=
{
...
task
}
genericForm
.
value
=
{
reason
:
''
,
copyUserIds
:
[]
}
// 2.4 处理 approve 表单
if
(
task
.
formId
&&
task
.
formConf
)
{
const
tempApproveForm
=
{}
setConfAndFields2
(
tempApproveForm
,
task
.
formConf
,
task
.
formFields
,
task
.
formVariables
)
approveForm
.
value
=
tempApproveForm
}
else
{
}
else
{
approveForm
.
value
=
{}
// 占位,避免为空
popOverVisible
.
value
[
item
]
=
false
}
}
})
})
formRef
.
value
.
resetFields
()
}
}
/** 处理审批通过和不通过的操作 */
/** 处理审批通过和不通过的操作 */
...
@@ -479,7 +511,7 @@ const handleAudit = async (pass: boolean) => {
...
@@ -479,7 +511,7 @@ const handleAudit = async (pass: boolean) => {
message
.
success
(
'审批不通过成功'
)
message
.
success
(
'审批不通过成功'
)
}
}
// 2.2 加载最新数据
// 2.2 加载最新数据
getDetail
()
reload
()
}
finally
{
}
finally
{
formLoading
.
value
=
false
formLoading
.
value
=
false
}
}
...
@@ -511,7 +543,6 @@ const handleCopy = async () => {
...
@@ -511,7 +543,6 @@ const handleCopy = async () => {
/** 处理转交 */
/** 处理转交 */
const
handleTransfer
=
async
()
=>
{
const
handleTransfer
=
async
()
=>
{
formLoading
.
value
=
true
formLoading
.
value
=
true
try
{
try
{
const
transferFormRef
=
proxy
.
$refs
[
'formRef'
]
const
transferFormRef
=
proxy
.
$refs
[
'formRef'
]
...
@@ -526,12 +557,12 @@ const handleTransfer = async () => {
...
@@ -526,12 +557,12 @@ const handleTransfer = async () => {
reason
:
genericForm
.
value
.
reason
,
reason
:
genericForm
.
value
.
reason
,
assigneeUserId
:
genericForm
.
value
.
assigneeUserId
assigneeUserId
:
genericForm
.
value
.
assigneeUserId
}
}
await
TaskApi
.
transferTask
(
data
)
await
TaskApi
.
transferTask
(
data
)
popOverVisible
.
value
.
transfer
=
false
popOverVisible
.
value
.
transfer
=
false
message
.
success
(
'操作成功'
)
message
.
success
(
'操作成功'
)
// 2. 加载最新数据
// 2. 加载最新数据
getDetail
()
reload
()
}
finally
{
}
finally
{
formLoading
.
value
=
false
formLoading
.
value
=
false
}
}
...
@@ -539,30 +570,30 @@ const handleTransfer = async () => {
...
@@ -539,30 +570,30 @@ const handleTransfer = async () => {
/** 处理委派 */
/** 处理委派 */
const
handleDelegate
=
async
()
=>
{
const
handleDelegate
=
async
()
=>
{
formLoading
.
value
=
true
formLoading
.
value
=
true
try
{
try
{
const
deletegateFormRef
=
proxy
.
$refs
[
'formRef'
]
const
deletegateFormRef
=
proxy
.
$refs
[
'formRef'
]
// 1.1 校验表单
// 1.1 校验表单
const
elForm
=
unref
(
deletegateFormRef
)
const
elForm
=
unref
(
deletegateFormRef
)
if
(
!
elForm
)
return
if
(
!
elForm
)
return
const
valid
=
await
elForm
.
validate
()
const
valid
=
await
elForm
.
validate
()
if
(
!
valid
)
return
if
(
!
valid
)
return
// 1.2 处理委派
// 1.2 处理委派
const
data
=
{
const
data
=
{
id
:
runningTask
.
value
.
id
,
id
:
runningTask
.
value
.
id
,
reason
:
genericForm
.
value
.
reason
,
reason
:
genericForm
.
value
.
reason
,
delegateUserId
:
genericForm
.
value
.
delegateUserId
delegateUserId
:
genericForm
.
value
.
delegateUserId
}
}
await
TaskApi
.
delegateTask
(
data
)
await
TaskApi
.
delegateTask
(
data
)
popOverVisible
.
value
.
delegate
=
false
popOverVisible
.
value
.
delegate
=
false
message
.
success
(
'操作成功'
)
message
.
success
(
'操作成功'
)
// 2. 加载最新数据
// 2. 加载最新数据
getDetail
()
reload
()
}
finally
{
}
finally
{
formLoading
.
value
=
false
formLoading
.
value
=
false
}
}
}
}
/** 处理加签 */
/** 处理加签 */
const
handlerAddSign
=
async
(
type
:
string
)
=>
{
const
handlerAddSign
=
async
(
type
:
string
)
=>
{
...
@@ -585,7 +616,7 @@ const handlerAddSign = async (type: string) => {
...
@@ -585,7 +616,7 @@ const handlerAddSign = async (type: string) => {
message
.
success
(
'操作成功'
)
message
.
success
(
'操作成功'
)
popOverVisible
.
value
.
addSign
=
false
popOverVisible
.
value
.
addSign
=
false
// 2 加载最新数据
// 2 加载最新数据
getDetail
()
reload
()
}
finally
{
}
finally
{
formLoading
.
value
=
false
formLoading
.
value
=
false
}
}
...
@@ -607,43 +638,41 @@ const handleReturn = async () => {
...
@@ -607,43 +638,41 @@ const handleReturn = async () => {
reason
:
genericForm
.
value
.
returnReason
,
reason
:
genericForm
.
value
.
returnReason
,
targetTaskDefinitionKey
:
genericForm
.
value
.
targetTaskDefinitionKey
targetTaskDefinitionKey
:
genericForm
.
value
.
targetTaskDefinitionKey
}
}
await
TaskApi
.
returnTask
(
data
)
await
TaskApi
.
returnTask
(
data
)
popOverVisible
.
value
.
return
=
false
popOverVisible
.
value
.
return
=
false
message
.
success
(
'操作成功'
)
message
.
success
(
'操作成功'
)
// 2
加载最新
数据
// 2
重新加载
数据
getDetail
()
reload
()
}
finally
{
}
finally
{
formLoading
.
value
=
false
formLoading
.
value
=
false
}
}
}
}
/** 弹出退回气泡卡 */
/** 子任务 */
const
openReturnPopover
=
async
()
=>
{
const
taskSignListRef
=
ref
()
returnList
.
value
=
await
TaskApi
.
getTaskListByReturn
(
runningTask
.
value
.
id
)
const
openChildrenTask
=
()
=>
{
if
(
returnList
.
value
.
length
===
0
)
{
taskSignListRef
.
value
.
open
(
runningTask
.
value
)
message
.
warning
(
'当前没有可退回的节点'
)
return
}
openPopover
(
'return'
)
}
/** 弹出气泡卡 */
const
openPopover
=
(
type
:
string
)
=>
{
Object
.
keys
(
popOverVisible
.
value
).
forEach
(
item
=>
{
if
(
item
===
type
)
{
popOverVisible
.
value
[
item
]
=
true
}
else
{
popOverVisible
.
value
[
item
]
=
false
}
})
formRef
.
value
.
resetFields
()
}
}
/** 获得详情 */
/** 重新加载数据 */
const
getDetail
=
()
=>
{
const
reload
=
()
=>
{
getMyTodoTask
()
emit
(
'success'
)
emit
(
'success'
)
}
}
/** 任务是否为处理中状态 */
const
isHandleTaskStatus
=
()
=>
{
let
canHandle
=
false
if
(
TaskApi
.
TaskStatusEnum
.
RUNNING
===
runningTask
.
value
.
status
||
TaskApi
.
TaskStatusEnum
.
DELEGATE
===
runningTask
.
value
.
status
)
{
canHandle
=
true
}
return
canHandle
}
/** 是否显示按钮 */
/** 是否显示按钮 */
const
isShowButton
=
(
btnType
:
OperationButtonType
):
boolean
=>
{
const
isShowButton
=
(
btnType
:
OperationButtonType
):
boolean
=>
{
let
isShow
=
true
let
isShow
=
true
...
@@ -662,7 +691,26 @@ const getButtonDisplayName = (btnType: OperationButtonType) => {
...
@@ -662,7 +691,26 @@ const getButtonDisplayName = (btnType: OperationButtonType) => {
return
displayName
return
displayName
}
}
defineExpose
({
loadRunningTask
})
/** 获取我的待办任务 */
const
getMyTodoTask
=
async
()
=>
{
genericForm
.
value
=
{}
approveForm
.
value
=
{}
approveFormFApi
.
value
=
{}
const
data
=
await
TaskApi
.
myTodoTask
(
props
.
processInstanceId
)
runningTask
.
value
=
data
// 处理 approve 表单.
if
(
data
&&
data
.
formId
&&
data
.
formConf
)
{
const
tempApproveForm
=
{}
setConfAndFields2
(
tempApproveForm
,
data
.
formConf
,
data
.
formFields
,
data
.
formVariables
)
approveForm
.
value
=
tempApproveForm
}
else
{
approveForm
.
value
=
{}
// 占位,避免为空
}
}
onMounted
(
async
()
=>
{
await
getMyTodoTask
()
})
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
...
...
src/views/bpm/processInstance/detail/dialog/TaskSignList.vue
View file @
842fe09e
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
<el-drawer
v-model=
"drawerVisible"
title=
"子任务"
size=
"880px"
>
<el-drawer
v-model=
"drawerVisible"
title=
"子任务"
size=
"880px"
>
<!-- 当前任务 -->
<!-- 当前任务 -->
<template
#
header
>
<template
#
header
>
<h4>
【
{{
parentTask
.
name
}}
】审批人:
{{
parentTask
?.
assignee
User
?.
nickname
}}
</h4>
<h4>
【
{{
parentTask
.
name
}}
】审批人:
{{
parentTask
?.
owner
User
?.
nickname
}}
</h4>
<el-button
<el-button
style=
"margin-left: 5px"
style=
"margin-left: 5px"
v-if=
"isSignDeleteButtonVisible(parentTask)"
v-if=
"isSignDeleteButtonVisible(parentTask)"
...
...
src/views/bpm/processInstance/detail/index_new.vue
View file @
842fe09e
...
@@ -37,7 +37,7 @@
...
@@ -37,7 +37,7 @@
<div
class=
"text-#878c93"
>
{{
formatDate
(
processInstance
.
startTime
)
}}
提交
</div>
<div
class=
"text-#878c93"
>
{{
formatDate
(
processInstance
.
startTime
)
}}
提交
</div>
</div>
</div>
<el-tabs
v-model=
"activeTab"
@
tab-change=
"onTabChange"
>
<el-tabs
v-model=
"activeTab"
>
<!-- 表单信息 -->
<!-- 表单信息 -->
<el-tab-pane
label=
"审批详情"
name=
"form"
>
<el-tab-pane
label=
"审批详情"
name=
"form"
>
<div
class=
"form-scroll-area"
>
<div
class=
"form-scroll-area"
>
...
@@ -104,8 +104,7 @@
...
@@ -104,8 +104,7 @@
<div
class=
"b-t-solid border-t-1px border-[var(--el-border-color)]"
>
<div
class=
"b-t-solid border-t-1px border-[var(--el-border-color)]"
>
<!-- 操作栏按钮 -->
<!-- 操作栏按钮 -->
<ProcessInstanceOperationButton
<ProcessInstanceOperationButton
ref=
"operationButtonRef"
:process-instance-id=
"id"
:processInstance=
"processInstance"
:userOptions=
"userOptions"
:userOptions=
"userOptions"
@
success=
"refresh"
@
success=
"refresh"
/>
/>
...
@@ -119,7 +118,6 @@ import { formatDate } from '@/utils/formatTime'
...
@@ -119,7 +118,6 @@ import { formatDate } from '@/utils/formatTime'
import
{
DICT_TYPE
}
from
'@/utils/dict'
import
{
DICT_TYPE
}
from
'@/utils/dict'
import
{
setConfAndFields2
}
from
'@/utils/formCreate'
import
{
setConfAndFields2
}
from
'@/utils/formCreate'
import
type
{
ApiAttrs
}
from
'@form-create/element-ui/types/config'
import
type
{
ApiAttrs
}
from
'@form-create/element-ui/types/config'
import
*
as
DefinitionApi
from
'@/api/bpm/definition'
import
*
as
ProcessInstanceApi
from
'@/api/bpm/processInstance'
import
*
as
ProcessInstanceApi
from
'@/api/bpm/processInstance'
import
*
as
TaskApi
from
'@/api/bpm/task'
import
*
as
TaskApi
from
'@/api/bpm/task'
import
ProcessInstanceBpmnViewer
from
'./ProcessInstanceBpmnViewer.vue'
import
ProcessInstanceBpmnViewer
from
'./ProcessInstanceBpmnViewer.vue'
...
@@ -132,6 +130,7 @@ import { FieldPermissionType } from '@/components/SimpleProcessDesignerV2/src/co
...
@@ -132,6 +130,7 @@ import { FieldPermissionType } from '@/components/SimpleProcessDesignerV2/src/co
import
audit1
from
'@/assets/svgs/bpm/audit1.svg'
import
audit1
from
'@/assets/svgs/bpm/audit1.svg'
import
audit2
from
'@/assets/svgs/bpm/audit2.svg'
import
audit2
from
'@/assets/svgs/bpm/audit2.svg'
import
audit3
from
'@/assets/svgs/bpm/audit3.svg'
import
audit3
from
'@/assets/svgs/bpm/audit3.svg'
import
audit4
from
'@/assets/svgs/bpm/audit4.svg'
defineOptions
({
name
:
'BpmProcessInstanceDetail'
})
defineOptions
({
name
:
'BpmProcessInstanceDetail'
})
const
props
=
defineProps
<
{
const
props
=
defineProps
<
{
...
@@ -142,16 +141,14 @@ const props = defineProps<{
...
@@ -142,16 +141,14 @@ const props = defineProps<{
const
message
=
useMessage
()
// 消息弹窗
const
message
=
useMessage
()
// 消息弹窗
const
processInstanceLoading
=
ref
(
false
)
// 流程实例的加载中
const
processInstanceLoading
=
ref
(
false
)
// 流程实例的加载中
const
processInstance
=
ref
<
any
>
({})
// 流程实例
const
processInstance
=
ref
<
any
>
({})
// 流程实例
let
processDefinitionId
=
undefined
// 流程定义 Id
const
operationButtonRef
=
ref
()
const
timelineRef
=
ref
()
const
timelineRef
=
ref
()
const
bpmnXml
=
ref
(
''
)
// BPMN XML
const
tasksLoad
=
ref
(
true
)
// 任务的加载中
const
tasksLoad
=
ref
(
true
)
// 任务的加载中
const
tasks
=
ref
<
any
[]
>
([])
// 任务列表
const
tasks
=
ref
<
any
[]
>
([])
// 任务列表
const
auditIcons
=
{
const
auditIcons
=
{
1
:
audit1
,
1
:
audit1
,
2
:
audit2
,
2
:
audit2
,
3
:
audit3
3
:
audit3
,
4
:
audit4
}
}
// ========== 申请信息 ==========
// ========== 申请信息 ==========
...
@@ -220,9 +217,6 @@ const getProcessInstance = async () => {
...
@@ -220,9 +217,6 @@ const getProcessInstance = async () => {
// 注意:data.processDefinition.formCustomViewPath 是组件的全路径,例如说:/crm/contract/detail/index.vue
// 注意:data.processDefinition.formCustomViewPath 是组件的全路径,例如说:/crm/contract/detail/index.vue
BusinessFormComponent
.
value
=
registerComponent
(
data
.
processDefinition
.
formCustomViewPath
)
BusinessFormComponent
.
value
=
registerComponent
(
data
.
processDefinition
.
formCustomViewPath
)
}
}
processDefinitionId
=
processDefinition
.
id
// 加载流程图
// bpmnXml.value = (await DefinitionApi.getProcessDefinition(processDefinition.id))?.bpmnXml
}
finally
{
}
finally
{
processInstanceLoading
.
value
=
false
processInstanceLoading
.
value
=
false
}
}
...
@@ -272,7 +266,7 @@ const getTaskList = async () => {
...
@@ -272,7 +266,7 @@ const getTaskList = async () => {
})
})
// 获得需要自己审批的任务
// 获得需要自己审批的任务
operationButtonRef
.
value
?.
loadRunningTask
(
tasks
.
value
)
//
operationButtonRef.value?.loadRunningTask(tasks.value)
}
finally
{
}
finally
{
tasksLoad
.
value
=
false
tasksLoad
.
value
=
false
}
}
...
@@ -291,13 +285,6 @@ const refresh = () => {
...
@@ -291,13 +285,6 @@ const refresh = () => {
/** 当前的Tab */
/** 当前的Tab */
const
activeTab
=
ref
(
'form'
)
const
activeTab
=
ref
(
'form'
)
/** Tab 切换 加载流程图,直接加载显示不出来,不知道啥原因,所以切换以后在加载 */
const
onTabChange
=
async
(
tabName
:
string
)
=>
{
if
(
tabName
===
'diagram'
&&
processDefinitionId
&&
!
bpmnXml
.
value
)
{
//加载流程图
bpmnXml
.
value
=
(
await
DefinitionApi
.
getProcessDefinition
(
processDefinitionId
))?.
bpmnXml
}
}
/** 初始化 */
/** 初始化 */
const
userOptions
=
ref
<
UserApi
.
UserVO
[]
>
([])
// 用户列表
const
userOptions
=
ref
<
UserApi
.
UserVO
[]
>
([])
// 用户列表
onMounted
(
async
()
=>
{
onMounted
(
async
()
=>
{
...
...
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