From 683e319c723645887487b565567b72acc727e8a3 Mon Sep 17 00:00:00 2001 From: kehaiyou Date: Sun, 8 Oct 2023 22:35:50 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E3=80=90=E5=B7=A5=E4=BD=9C=E6=B5=81?= =?UTF-8?q?=E3=80=91--=E5=8A=A0=E7=AD=BE=E5=87=8F=E7=AD=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/bpm/task/index.ts | 21 ++++ .../package/designer/ProcessViewer.vue | 8 +- src/utils/is.ts | 3 + .../ProcessInstanceChildrenTaskList.vue | 86 ++++++++++++++++ .../detail/ProcessInstanceTaskList.vue | 30 +++++- .../detail/TaskAddSignDialogForm.vue | 97 +++++++++++++++++++ .../detail/TaskSubSignDialogForm.vue | 85 ++++++++++++++++ .../bpm/processInstance/detail/index.vue | 54 ++++++++--- 8 files changed, 367 insertions(+), 17 deletions(-) create mode 100644 src/views/bpm/processInstance/detail/ProcessInstanceChildrenTaskList.vue create mode 100644 src/views/bpm/processInstance/detail/TaskAddSignDialogForm.vue create mode 100644 src/views/bpm/processInstance/detail/TaskSubSignDialogForm.vue diff --git a/src/api/bpm/task/index.ts b/src/api/bpm/task/index.ts index ccd5c4ee..a18ba998 100644 --- a/src/api/bpm/task/index.ts +++ b/src/api/bpm/task/index.ts @@ -58,3 +58,24 @@ export const returnTask = async (data) => { export const delegateTask = async (data) => { return await request.put({ url: '/bpm/task/delegate', data }) } + +/** + * 加签 + */ +export const taskAddSign = async (data) => { + return await request.put({ url: '/bpm/task/add-sign', data }) +} + +/** + * 获取减签任务列表 + */ +export const getSubSignTaskList = async (id: string) => { + return await request.get({ url: '/bpm/task/get-sub-sign?taskId=' + id }) +} + +/** + * 减签 + */ +export const taskSubSign = async (data) => { + return await request.put({ url: '/bpm/task/sub-sign', data }) +} diff --git a/src/components/bpmnProcessDesigner/package/designer/ProcessViewer.vue b/src/components/bpmnProcessDesigner/package/designer/ProcessViewer.vue index e2cd4679..ed4fde9d 100644 --- a/src/components/bpmnProcessDesigner/package/designer/ProcessViewer.vue +++ b/src/components/bpmnProcessDesigner/package/designer/ProcessViewer.vue @@ -250,6 +250,12 @@ const getResultCss = (result) => { } else if (result === 5) { // 退回 return 'highlight-return' + } else if (result === 6) { + // 委派 + return 'highlight-return' + } else if (result === 7 || result === 8 || result === 9) { + // 待后加签任务完成/待前加签任务完成/待前置任务完成 + return 'highlight-return' } return '' } @@ -362,7 +368,7 @@ const elementHover = (element) => { } } console.log(html, 'html111111111111111') - elementOverlayIds.value[element.value.id] = toRaw(overlays.value).add(element.value, { + elementOverlayIds.value[element.value.id] = toRaw(overlays.value)?.add(element.value, { position: { left: 0, bottom: 0 }, html: `
${html}
` }) diff --git a/src/utils/is.ts b/src/utils/is.ts index 37529859..cb8f1a0e 100644 --- a/src/utils/is.ts +++ b/src/utils/is.ts @@ -19,6 +19,9 @@ export const isObject = (val: any): val is Record => { } export const isEmpty = (val: T): val is T => { + if (val === null) { + return true + } if (isArray(val) || isString(val)) { return val.length === 0 } diff --git a/src/views/bpm/processInstance/detail/ProcessInstanceChildrenTaskList.vue b/src/views/bpm/processInstance/detail/ProcessInstanceChildrenTaskList.vue new file mode 100644 index 00000000..962d0a00 --- /dev/null +++ b/src/views/bpm/processInstance/detail/ProcessInstanceChildrenTaskList.vue @@ -0,0 +1,86 @@ + + diff --git a/src/views/bpm/processInstance/detail/ProcessInstanceTaskList.vue b/src/views/bpm/processInstance/detail/ProcessInstanceTaskList.vue index 6f4557ae..97287e99 100644 --- a/src/views/bpm/processInstance/detail/ProcessInstanceTaskList.vue +++ b/src/views/bpm/processInstance/detail/ProcessInstanceTaskList.vue @@ -12,7 +12,18 @@ :icon="getTimelineItemIcon(item)" :type="getTimelineItemType(item)" > -

任务:{{ item.name }}

+

+ 任务:{{ item.name }} + + + + 子任务 + +

diff --git a/src/views/bpm/processInstance/detail/TaskAddSignDialogForm.vue b/src/views/bpm/processInstance/detail/TaskAddSignDialogForm.vue new file mode 100644 index 00000000..4b91c9b9 --- /dev/null +++ b/src/views/bpm/processInstance/detail/TaskAddSignDialogForm.vue @@ -0,0 +1,97 @@ + + diff --git a/src/views/bpm/processInstance/detail/TaskSubSignDialogForm.vue b/src/views/bpm/processInstance/detail/TaskSubSignDialogForm.vue new file mode 100644 index 00000000..f776ef86 --- /dev/null +++ b/src/views/bpm/processInstance/detail/TaskSubSignDialogForm.vue @@ -0,0 +1,85 @@ + + diff --git a/src/views/bpm/processInstance/detail/index.vue b/src/views/bpm/processInstance/detail/index.vue index 585c60db..f9c5452b 100644 --- a/src/views/bpm/processInstance/detail/index.vue +++ b/src/views/bpm/processInstance/detail/index.vue @@ -49,6 +49,10 @@ 委派 + + + 加签 + 回退 @@ -95,6 +99,8 @@ + +