From a40866e27f43505226977178772cc8fb6f1e3b27 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Mon, 18 Mar 2024 20:45:39 +0800 Subject: [PATCH] =?UTF-8?q?BPM=EF=BC=9A=E5=AE=8C=E5=96=84=20task=20?= =?UTF-8?q?=E8=BD=AC=E6=B4=BE=E7=9A=84=E5=AE=9E=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/bpm/task/index.ts | 27 +++++-------------- .../detail/ProcessInstanceTaskList.vue | 4 +-- .../detail/{ => dialog}/TaskDelegateForm.vue | 9 ++++--- .../TaskReturnForm.vue} | 2 +- .../TaskTransferForm.vue} | 18 ++++++++----- .../bpm/processInstance/detail/index.vue | 26 +++++++++--------- 6 files changed, 40 insertions(+), 46 deletions(-) rename src/views/bpm/processInstance/detail/{ => dialog}/TaskDelegateForm.vue (92%) rename src/views/bpm/processInstance/detail/{TaskReturnDialogForm.vue => dialog/TaskReturnForm.vue} (97%) rename src/views/bpm/processInstance/detail/{TaskUpdateAssigneeForm.vue => dialog/TaskTransferForm.vue} (79%) diff --git a/src/api/bpm/task/index.ts b/src/api/bpm/task/index.ts index 78bbb984..de575244 100644 --- a/src/api/bpm/task/index.ts +++ b/src/api/bpm/task/index.ts @@ -12,10 +12,6 @@ export const getDoneTaskPage = async (params) => { return await request.get({ url: '/bpm/task/done-page', params }) } -export const completeTask = async (data) => { - return await request.put({ url: '/bpm/task/complete', data }) -} - export const approveTask = async (data) => { return await request.put({ url: '/bpm/task/approve', data }) } @@ -23,13 +19,6 @@ export const approveTask = async (data) => { export const rejectTask = async (data) => { return await request.put({ url: '/bpm/task/reject', data }) } -export const backTask = async (data) => { - return await request.put({ url: '/bpm/task/back', data }) -} - -export const updateTaskAssignee = async (data) => { - return await request.put({ url: '/bpm/task/update-assignee', data }) -} export const getTaskListByProcessInstanceId = async (processInstanceId) => { return await request.get({ @@ -37,11 +26,6 @@ export const getTaskListByProcessInstanceId = async (processInstanceId) => { }) } -// 导出任务 -export const exportTask = async (params) => { - return await request.download({ url: '/bpm/task/export', params }) -} - // 获取所有可回退的节点 export const getTaskListByReturn = async (id: string) => { return await request.get({ url: '/bpm/task/list-by-return', params: { id } }) @@ -52,13 +36,16 @@ export const returnTask = async (data: any) => { return await request.put({ url: '/bpm/task/return', data }) } -/** - * 委派 - */ -export const delegateTask = async (data) => { +// 委派 +export const delegateTask = async (data: any) => { return await request.put({ url: '/bpm/task/delegate', data }) } +// 转派 +export const transferTask = async (data: any) => { + return await request.put({ url: '/bpm/task/transfer', data }) +} + /** * 加签 */ diff --git a/src/views/bpm/processInstance/detail/ProcessInstanceTaskList.vue b/src/views/bpm/processInstance/detail/ProcessInstanceTaskList.vue index e20872db..e9b9d64d 100644 --- a/src/views/bpm/processInstance/detail/ProcessInstanceTaskList.vue +++ b/src/views/bpm/processInstance/detail/ProcessInstanceTaskList.vue @@ -44,9 +44,7 @@ -

- {{ item.reason }} -

+

审批建议:{{ item.reason }}

diff --git a/src/views/bpm/processInstance/detail/TaskDelegateForm.vue b/src/views/bpm/processInstance/detail/dialog/TaskDelegateForm.vue similarity index 92% rename from src/views/bpm/processInstance/detail/TaskDelegateForm.vue rename to src/views/bpm/processInstance/detail/dialog/TaskDelegateForm.vue index dc757a0c..178b1b97 100644 --- a/src/views/bpm/processInstance/detail/TaskDelegateForm.vue +++ b/src/views/bpm/processInstance/detail/dialog/TaskDelegateForm.vue @@ -37,10 +37,12 @@ const dialogVisible = ref(false) // 弹窗的是否展示 const formLoading = ref(false) // 表单的加载中 const formData = ref({ id: '', - delegateUserId: undefined + delegateUserId: undefined, + reason: '' }) const formRules = ref({ - delegateUserId: [{ required: true, message: '接收人不能为空', trigger: 'change' }] + delegateUserId: [{ required: true, message: '接收人不能为空', trigger: 'change' }], + reason: [{ required: true, message: '委派理由不能为空', trigger: 'blur' }] }) const formRef = ref() // 表单 Ref @@ -79,7 +81,8 @@ const submitForm = async () => { const resetForm = () => { formData.value = { id: '', - delegateUserId: undefined + delegateUserId: undefined, + reason: '' } formRef.value?.resetFields() } diff --git a/src/views/bpm/processInstance/detail/TaskReturnDialogForm.vue b/src/views/bpm/processInstance/detail/dialog/TaskReturnForm.vue similarity index 97% rename from src/views/bpm/processInstance/detail/TaskReturnDialogForm.vue rename to src/views/bpm/processInstance/detail/dialog/TaskReturnForm.vue index 82a8f960..a1391697 100644 --- a/src/views/bpm/processInstance/detail/TaskReturnDialogForm.vue +++ b/src/views/bpm/processInstance/detail/dialog/TaskReturnForm.vue @@ -1,5 +1,5 @@