From 4d35c86a9176f91d231732c87c15dbf989371ecc Mon Sep 17 00:00:00 2001 From: hLinx <327159425@qq.com> Date: Mon, 16 Dec 2024 19:50:23 +0800 Subject: [PATCH 1/3] =?UTF-8?q?feat:=20api=20=E5=8D=8F=E8=AE=AE=E5=8F=98?= =?UTF-8?q?=E6=9B=B4=20#3333=20#=20Reviewed,=20transaction=20id:=2026918?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/frontend/src/domain/source/task-execute.js | 10 ++++++---- .../executive-history/common/step-detail-view.vue | 1 + .../components/execution-history-select.vue | 1 + .../step-detail/components/task-status.vue | 1 + .../step-detail/components/task-step/view/approval.vue | 1 + .../view-step-info/components/render-step.vue | 1 + .../src/views/executive-history/step-detail/index.vue | 1 + .../task-detail/components/task-step/index.vue | 1 + 8 files changed, 13 insertions(+), 4 deletions(-) diff --git a/src/frontend/src/domain/source/task-execute.js b/src/frontend/src/domain/source/task-execute.js index e4a07edc46..92ac3c89f9 100644 --- a/src/frontend/src/domain/source/task-execute.js +++ b/src/frontend/src/domain/source/task-execute.js @@ -118,8 +118,8 @@ class TaskExecute extends ModuleBase { } // 获取作业步骤实例详情 - getOneStepInstance({ id }) { - return Request.get(`${this.path}/task-instance/step_instance/${id}`); + getOneStepInstance(params) { + return Request.get(`${this.path}/taskInstance/${params.taskInstanceId}/stepInstance/${params.id}/detail`); } // 获取作业实例全局参数 @@ -175,7 +175,8 @@ class TaskExecute extends ModuleBase { taskExecutionStepOperate(payload) { const params = { ...payload }; delete params.id; - return Request.post(`${this.path}/do-step-operation/stepInstanceId/${payload.id}`, { + delete params.taskInstanceId; + return Request.post(`${this.path}/taskInstance/${payload.taskInstanceId}/stepInstanceId/${payload.id}/operate`, { params, }); } @@ -254,8 +255,9 @@ class TaskExecute extends ModuleBase { // 获取步骤执行历史 getStepExecutionHistory(params = {}) { const realParams = { ...params }; + delete realParams.taskInstanceId; delete realParams.stepInstanceId; - return Request.get(`${this.path}/step-execution-history/${params.stepInstanceId}`, { + return Request.get(`${this.path}/taskInstance/${params.taskInstanceId}/stepInstance/${params.stepInstanceId}/stepExecutionHistory`, { params: realParams, }); } diff --git a/src/frontend/src/views/executive-history/common/step-detail-view.vue b/src/frontend/src/views/executive-history/common/step-detail-view.vue index 5b39a381bd..7aa94b965b 100644 --- a/src/frontend/src/views/executive-history/common/step-detail-view.vue +++ b/src/frontend/src/views/executive-history/common/step-detail-view.vue @@ -108,6 +108,7 @@ // 步骤详情 fetchStep() { return TaskExecuteService.fetchStepInstance({ + taskInstanceId: this.taskId, id: this.id, }).then((data) => { if (data.rollingEnabled) { diff --git a/src/frontend/src/views/executive-history/step-detail/components/execution-history-select.vue b/src/frontend/src/views/executive-history/step-detail/components/execution-history-select.vue index fda429e833..6569c66dae 100644 --- a/src/frontend/src/views/executive-history/step-detail/components/execution-history-select.vue +++ b/src/frontend/src/views/executive-history/step-detail/components/execution-history-select.vue @@ -134,6 +134,7 @@ */ fetchStepExecutionHistory: _.debounce(function (from) { TaskExecuteService.fetchStepExecutionHistory({ + taskInstanceId: this.$route.params.taskInstanceId, stepInstanceId: this.stepInstanceId, batch: this.batch, }).then((data) => { diff --git a/src/frontend/src/views/executive-history/step-detail/components/task-status.vue b/src/frontend/src/views/executive-history/step-detail/components/task-status.vue index acdc0e49a3..810b4b8d91 100644 --- a/src/frontend/src/views/executive-history/step-detail/components/task-status.vue +++ b/src/frontend/src/views/executive-history/step-detail/components/task-status.vue @@ -152,6 +152,7 @@ created() { this.timer = ''; + const { taskInstanceId } = this.$route.params; const { stepInstanceId, executeCount = 0 } = this.$route.query; diff --git a/src/frontend/src/views/executive-history/step-detail/components/task-step/view/approval.vue b/src/frontend/src/views/executive-history/step-detail/components/task-step/view/approval.vue index 8f32fbcdd7..cf81e540c0 100644 --- a/src/frontend/src/views/executive-history/step-detail/components/task-step/view/approval.vue +++ b/src/frontend/src/views/executive-history/step-detail/components/task-step/view/approval.vue @@ -131,6 +131,7 @@ methods: { handleChangeStatus(operationCode) { return TaskExecuteService.updateTaskExecutionStepOperate({ + taskInstanceId: this.$route.params.taskInstanceId, id: this.data.stepInstanceId, operationCode, confirmReason: this.confirmReason, diff --git a/src/frontend/src/views/executive-history/step-detail/components/view-step-info/components/render-step.vue b/src/frontend/src/views/executive-history/step-detail/components/view-step-info/components/render-step.vue index fc466863c4..2367121cc1 100644 --- a/src/frontend/src/views/executive-history/step-detail/components/view-step-info/components/render-step.vue +++ b/src/frontend/src/views/executive-history/step-detail/components/view-step-info/components/render-step.vue @@ -86,6 +86,7 @@ // 步骤详情 const fetchStep = () => TaskExecuteService.fetchStepInstance({ + taskInstanceId: props.taskId, id: props.id, }).then((data) => { if (data.rollingEnabled) { diff --git a/src/frontend/src/views/executive-history/step-detail/index.vue b/src/frontend/src/views/executive-history/step-detail/index.vue index 3f8c870f60..172db72706 100644 --- a/src/frontend/src/views/executive-history/step-detail/index.vue +++ b/src/frontend/src/views/executive-history/step-detail/index.vue @@ -536,6 +536,7 @@ handleStatusUpdate(operationCode) { this.$Progress.start(); return TaskExecuteService.updateTaskExecutionStepOperate({ + taskInstanceId: this.taskInstanceId, id: this.params.id, operationCode, }).then((data) => { diff --git a/src/frontend/src/views/executive-history/task-detail/components/task-step/index.vue b/src/frontend/src/views/executive-history/task-detail/components/task-step/index.vue index e7b513b797..0d70c74dd7 100644 --- a/src/frontend/src/views/executive-history/task-detail/components/task-step/index.vue +++ b/src/frontend/src/views/executive-history/task-detail/components/task-step/index.vue @@ -80,6 +80,7 @@ }, handleChangeStatus(operationCode, confirmReason) { return TaskExecuteService.updateTaskExecutionStepOperate({ + taskInstanceId: this.$route.params.id, id: this.data.stepInstanceId, operationCode, confirmReason, From 4b440f726cde585af00c8cbdd6c3c898011ce410 Mon Sep 17 00:00:00 2001 From: hLinx <327159425@qq.com> Date: Mon, 16 Dec 2024 20:06:38 +0800 Subject: [PATCH 2/3] =?UTF-8?q?perf:=20=E5=AE=9A=E6=97=B6=E4=BB=BB?= =?UTF-8?q?=E5=8A=A1=E6=9F=A5=E7=9C=8B=E8=AF=A6=E6=83=85=E6=97=B6=E5=85=A8?= =?UTF-8?q?=E5=B1=80=E5=8F=98=E9=87=8F=E4=BF=A1=E6=81=AF=E9=80=9A=E8=BF=87?= =?UTF-8?q?=E8=AF=A6=E6=83=85=E6=8E=A5=E5=8F=A3=E8=8E=B7=E5=8F=96=20#3334?= =?UTF-8?q?=20#=20Reviewed,=20transaction=20id:=2026922?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../views/cron-job/list/components/detail.vue | 22 ++++++++++++------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/src/frontend/src/views/cron-job/list/components/detail.vue b/src/frontend/src/views/cron-job/list/components/detail.vue index f434295d65..5ce80b1c80 100644 --- a/src/frontend/src/views/cron-job/list/components/detail.vue +++ b/src/frontend/src/views/cron-job/list/components/detail.vue @@ -108,6 +108,7 @@