diff --git a/src/api/bpm/task/index.ts b/src/api/bpm/task/index.ts index df6d8160..78bbb984 100644 --- a/src/api/bpm/task/index.ts +++ b/src/api/bpm/task/index.ts @@ -43,12 +43,12 @@ export const exportTask = async (params) => { } // 获取所有可回退的节点 -export const getReturnList = async (params) => { - return await request.get({ url: '/bpm/task/return-list', params }) +export const getTaskListByReturn = async (id: string) => { + return await request.get({ url: '/bpm/task/list-by-return', params: { id } }) } // 回退 -export const returnTask = async (data) => { +export const returnTask = async (data: any) => { return await request.put({ url: '/bpm/task/return', data }) } @@ -70,7 +70,7 @@ export const taskAddSign = async (data) => { * 获取减签任务列表 */ export const getChildrenTaskList = async (id: string) => { - return await request.get({ url: '/bpm/task/children-list?taskId=' + id }) + return await request.get({ url: '/bpm/task/children-list?parentId=' + id }) } /** diff --git a/src/components/bpmnProcessDesigner/package/designer/ProcessViewer.vue b/src/components/bpmnProcessDesigner/package/designer/ProcessViewer.vue index a7958adb..27e6151a 100644 --- a/src/components/bpmnProcessDesigner/package/designer/ProcessViewer.vue +++ b/src/components/bpmnProcessDesigner/package/designer/ProcessViewer.vue @@ -121,13 +121,13 @@ const highlightDiagram = async () => { return } // 高亮任务 - canvas.addMarker(n.id, getResultCss(task.result)) + canvas.addMarker(n.id, getResultCss(task.status)) //标记是否高亮了进行中任务 - if (task.result === 1) { + if (task.status === 1) { findProcessTask = true } // 如果非通过,就不走后面的线条了 - if (task.result !== 2) { + if (task.status !== 2) { return } // 处理 outgoing 出线 @@ -205,10 +205,10 @@ const highlightDiagram = async () => { }) } else if (n.$type === 'bpmn:EndEvent') { // 结束节点 - if (!processInstance.value || processInstance.value.result === 1) { + if (!processInstance.value || processInstance.value.status === 1) { return } - canvas.addMarker(n.id, getResultCss(processInstance.value.result)) + canvas.addMarker(n.id, getResultCss(processInstance.value.status)) } else if (n.$type === 'bpmn:ServiceTask') { //服务任务 if (activity.startTime > 0 && activity.endTime === 0) { @@ -226,6 +226,7 @@ const highlightDiagram = async () => { } }) if (!isEmpty(removeTaskDefinitionKeyList)) { + // TODO 芋艿:后面 .definitionKey 再看 taskList.value = taskList.value.filter( (item) => !removeTaskDefinitionKeyList.includes(item.definitionKey) ) @@ -321,7 +322,7 @@ const elementHover = (element) => { let optionData = getIntDictOptions(DICT_TYPE.BPM_PROCESS_INSTANCE_RESULT) let dataResult = '' optionData.forEach((element) => { - if (element.value == task.result) { + if (element.value == task.status) { dataResult = element.label } }) @@ -333,7 +334,7 @@ const elementHover = (element) => { //

部门:${task.assigneeUser.deptName}

//

结果:${getIntDictOptions( // DICT_TYPE.BPM_PROCESS_INSTANCE_RESULT, - // task.result + // task.status // )}

//

创建时间:${formatDate(task.createTime)}

` if (task.endTime) { @@ -354,14 +355,14 @@ const elementHover = (element) => { let optionData = getIntDictOptions(DICT_TYPE.BPM_PROCESS_INSTANCE_RESULT) let dataResult = '' optionData.forEach((element) => { - if (element.value == processInstance.value.result) { + if (element.value == processInstance.value.status) { dataResult = element.label } }) html = `

结果:${dataResult}

` // html = `

结果:${getIntDictOptions( // DICT_TYPE.BPM_PROCESS_INSTANCE_RESULT, - // processInstance.value.result + // processInstance.value.status // )}

` if (processInstance.value.endTime) { html += `

结束时间:${formatDate(processInstance.value.endTime)}

` diff --git a/src/views/bpm/processInstance/detail/ProcessInstanceChildrenTaskList.vue b/src/views/bpm/processInstance/detail/ProcessInstanceChildrenTaskList.vue index 363874cf..02aab321 100644 --- a/src/views/bpm/processInstance/detail/ProcessInstanceChildrenTaskList.vue +++ b/src/views/bpm/processInstance/detail/ProcessInstanceChildrenTaskList.vue @@ -17,9 +17,9 @@ - + { const isSubSignButtonVisible = (task: any) => { if (task && task.children && !isEmpty(task.children)) { // 有子任务,且子任务有任意一个是 待处理 和 待前置任务完成 则显示减签按钮 - const subTask = task.children.find((item) => item.result === 1 || item.result === 9) + const subTask = task.children.find((item) => item.status === 1 || item.status === 9) return !isEmpty(subTask) } return false diff --git a/src/views/bpm/processInstance/detail/ProcessInstanceTaskList.vue b/src/views/bpm/processInstance/detail/ProcessInstanceTaskList.vue index 97287e99..9876d5d3 100644 --- a/src/views/bpm/processInstance/detail/ProcessInstanceTaskList.vue +++ b/src/views/bpm/processInstance/detail/ProcessInstanceTaskList.vue @@ -14,7 +14,7 @@ >

任务:{{ item.name }} - + { - if (item.result === 1) { + if (item.status === 1) { return 'el-icon-time' } - if (item.result === 2) { + if (item.status === 2) { return 'el-icon-check' } - if (item.result === 3) { + if (item.status === 3) { return 'el-icon-close' } - if (item.result === 4) { + if (item.status === 4) { return 'el-icon-remove-outline' } - if (item.result === 5) { + if (item.status === 5) { return 'el-icon-back' } return '' @@ -93,25 +93,25 @@ const getTimelineItemIcon = (item) => { /** 获得任务对应的颜色 */ const getTimelineItemType = (item) => { - if (item.result === 1) { + if (item.status === 1) { return 'primary' } - if (item.result === 2) { + if (item.status === 2) { return 'success' } - if (item.result === 3) { + if (item.status === 3) { return 'danger' } - if (item.result === 4) { + if (item.status === 4) { return 'info' } - if (item.result === 5) { + if (item.status === 5) { return 'warning' } - if (item.result === 6) { + if (item.status === 6) { return 'default' } - if (item.result === 7 || item.result === 8) { + if (item.status === 7 || item.status === 8) { return 'warning' } return '' diff --git a/src/views/bpm/processInstance/detail/TaskReturnDialogForm.vue b/src/views/bpm/processInstance/detail/TaskReturnDialogForm.vue index f93bf2c5..82a8f960 100644 --- a/src/views/bpm/processInstance/detail/TaskReturnDialogForm.vue +++ b/src/views/bpm/processInstance/detail/TaskReturnDialogForm.vue @@ -7,13 +7,13 @@ :rules="formRules" label-width="110px" > - - + + @@ -35,19 +35,19 @@ const dialogVisible = ref(false) // 弹窗的是否展示 const formLoading = ref(false) // 表单的加载中 const formData = ref({ id: '', - targetDefinitionKey: undefined, + targetTaskDefinitionKey: undefined, reason: '' }) const formRules = ref({ - targetDefinitionKey: [{ required: true, message: '必须选择回退节点', trigger: 'change' }], + targetTaskDefinitionKey: [{ required: true, message: '必须选择回退节点', trigger: 'change' }], reason: [{ required: true, message: '回退理由不能为空', trigger: 'blur' }] }) const formRef = ref() // 表单 Ref -const returnList = ref([]) +const returnList = ref([] as any) /** 打开弹窗 */ const open = async (id: string) => { - returnList.value = await TaskApi.getReturnList({ taskId: id }) + returnList.value = await TaskApi.getTaskListByReturn(id) if (returnList.value.length === 0) { message.warning('当前没有可回退的节点') return false @@ -82,7 +82,7 @@ const submitForm = async () => { const resetForm = () => { formData.value = { id: '', - targetDefinitionKey: undefined, + targetTaskDefinitionKey: undefined, reason: '' } formRef.value?.resetFields() diff --git a/src/views/bpm/processInstance/detail/index.vue b/src/views/bpm/processInstance/detail/index.vue index 074d1329..3ce665f6 100644 --- a/src/views/bpm/processInstance/detail/index.vue +++ b/src/views/bpm/processInstance/detail/index.vue @@ -254,7 +254,7 @@ const getTaskList = async () => { tasks.value = [] // 1.1 移除已取消的审批 data.forEach((task) => { - if (task.result !== 4) { + if (task.status !== 4) { tasks.value.push(task) } }) @@ -291,7 +291,10 @@ const loadRunningTask = (tasks) => { loadRunningTask(task.children) } // 2.1 只有待处理才需要 - if (task.result !== 1 && task.result !== 6) { + // if (task.status !== 1 && task.status !== 6) { + // return + // } + if (task.status !== 1 && task.status !== 6) { return } // 2.2 自己不是处理人 diff --git a/src/views/bpm/task/done/TaskDetail.vue b/src/views/bpm/task/done/TaskDetail.vue index 5bc06f19..ff8f313d 100644 --- a/src/views/bpm/task/done/TaskDetail.vue +++ b/src/views/bpm/task/done/TaskDetail.vue @@ -14,7 +14,7 @@ {{ detailData.processInstance.startUserNickname }} - + {{ detailData.reason }} diff --git a/src/views/bpm/task/done/index.vue b/src/views/bpm/task/done/index.vue index ee1e1d14..b190bd4f 100644 --- a/src/views/bpm/task/done/index.vue +++ b/src/views/bpm/task/done/index.vue @@ -50,9 +50,9 @@ - + diff --git a/src/views/bpm/task/todo/index.vue b/src/views/bpm/task/todo/index.vue index 29ba73dd..43d29921 100644 --- a/src/views/bpm/task/todo/index.vue +++ b/src/views/bpm/task/todo/index.vue @@ -46,27 +46,33 @@ - - - - + + - + + + + + - - - @@ -77,16 +83,14 @@ :total="total" @pagination="getList" /> -