From 4cf2fe456cc9ea2bafd961c13d59c355f8b6f6bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90Li?= <15040126243@163.com> Date: Mon, 26 Oct 2026 18:15:40 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E4=BF=AE=E5=A4=8D=20=E5=AE=9A=E6=97=B6?= =?UTF-8?q?=E4=BA=8B=E4=BB=B6=E4=BB=BB=E5=8A=A1=20=E8=A1=A8=E5=8D=95?= =?UTF-8?q?=E6=97=A0=E6=B3=95=E6=9F=A5=E7=9C=8B=E6=B5=81=E7=A8=8B=E7=9B=91?= =?UTF-8?q?=E6=8E=A7=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/workflow/instance/index.ts | 7 ++++--- src/api/workflow/workflowCommon/index.ts | 1 + src/api/workflow/workflowCommon/types.ts | 1 + src/components/Process/approvalButton.vue | 4 +++- src/components/Process/approvalRecord.vue | 4 ++-- src/views/workflow/leave/leaveEdit.vue | 4 +++- src/views/workflow/processInstance/index.vue | 1 + 7 files changed, 15 insertions(+), 7 deletions(-) diff --git a/src/api/workflow/instance/index.ts b/src/api/workflow/instance/index.ts index 4f53a9a8..b98c94b9 100644 --- a/src/api/workflow/instance/index.ts +++ b/src/api/workflow/instance/index.ts @@ -32,10 +32,11 @@ export const pageByFinish = (query: FlowInstanceQuery): AxiosPromise { +export const flowHisTaskList = (ids: { businessId?: string | number; instanceId?: string | number }) => { return request({ - url: `/workflow/instance/flowHisTaskList/${businessId}?t=${Math.random()}`, - method: 'get' + url: '/workflow/instance/flowHisTaskList', + method: 'get', + params: ids }); }; diff --git a/src/api/workflow/workflowCommon/index.ts b/src/api/workflow/workflowCommon/index.ts index 3aad766d..48311d58 100644 --- a/src/api/workflow/workflowCommon/index.ts +++ b/src/api/workflow/workflowCommon/index.ts @@ -9,6 +9,7 @@ export default { path: routerJumpVo.formPath, query: { id: routerJumpVo.businessId, + instanceId: routerJumpVo.instanceId, type: routerJumpVo.type, taskId: routerJumpVo.taskId } diff --git a/src/api/workflow/workflowCommon/types.ts b/src/api/workflow/workflowCommon/types.ts index 4815554a..03af14d7 100644 --- a/src/api/workflow/workflowCommon/types.ts +++ b/src/api/workflow/workflowCommon/types.ts @@ -1,5 +1,6 @@ export interface RouterJumpVo { businessId: string; + instanceId?: string | number; taskId: string | number; type: string; formCustom: string; diff --git a/src/components/Process/approvalButton.vue b/src/components/Process/approvalButton.vue index a2221c41..1768e703 100644 --- a/src/components/Process/approvalButton.vue +++ b/src/components/Process/approvalButton.vue @@ -15,7 +15,7 @@ 审批 - + 流程进度 @@ -37,6 +37,8 @@ const props = defineProps({ pageType: propTypes.string.def(''), buttonLoading: propTypes.bool.def(false), id: propTypes.string.def('') || propTypes.number.def(), + businessId: propTypes.string.def(''), + instanceId: propTypes.string.def(''), mode: propTypes.bool.def(false) }); const emits = defineEmits(['submitForm', 'approvalVerifyOpen', 'handleApprovalRecord']); diff --git a/src/components/Process/approvalRecord.vue b/src/components/Process/approvalRecord.vue index b420906f..e28d2c5e 100644 --- a/src/components/Process/approvalRecord.vue +++ b/src/components/Process/approvalRecord.vue @@ -113,12 +113,12 @@ const tabActiveName = ref('image'); const insId = ref(null); //初始化查询审批记录 -const init = async (businessId: string | number) => { +const init = async (ids: { businessId?: string | number; instanceId?: string | number }) => { visible.value = true; loading.value = true; tabActiveName.value = 'image'; historyList.value = []; - flowHisTaskList(businessId).then(resp => { + flowHisTaskList(ids).then(resp => { if (resp.data) { historyList.value = resp.data.list; insId.value = resp.data.instanceId; diff --git a/src/views/workflow/leave/leaveEdit.vue b/src/views/workflow/leave/leaveEdit.vue index d5505378..9db4fe8f 100644 --- a/src/views/workflow/leave/leaveEdit.vue +++ b/src/views/workflow/leave/leaveEdit.vue @@ -9,6 +9,8 @@ @handleApprovalRecord="handleApprovalRecord" :buttonLoading="buttonLoading" :id="form.id" + :business-id="routeParams.id" + :instance-id="routeParams.instanceId" :status="form.status" :pageType="routeParams.type" :mode="false" @@ -271,7 +273,7 @@ const handleStartWorkFlow = async (data: LeaveForm) => { }; //审批记录 const handleApprovalRecord = () => { - approvalRecordRef.value.init(form.value.id); + approvalRecordRef.value?.init({ businessId: routeParams.value.id || form.value.id, instanceId: routeParams.value.instanceId }); }; //提交回调 const submitCallback = async () => { diff --git a/src/views/workflow/processInstance/index.vue b/src/views/workflow/processInstance/index.vue index e49c0612..e3e16c28 100644 --- a/src/views/workflow/processInstance/index.vue +++ b/src/views/workflow/processInstance/index.vue @@ -491,6 +491,7 @@ const cancelPopover = async (index: number) => { const handleView = row => { const routerJumpVo = reactive({ businessId: row.businessId, + instanceId: row.id, taskId: row.id, type: 'view', formCustom: row.formCustom,