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 }}
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 @@ -