From 98ff1b8452504f277f290162190555f72271bea1 Mon Sep 17 00:00:00 2001 From: yiwenZhou <67539158+ywywZhou@users.noreply.github.com> Date: Mon, 27 Nov 2023 18:21:02 +0800 Subject: [PATCH] =?UTF-8?q?=E7=8B=AC=E7=AB=8B=E5=AD=90=E6=B5=81=E7=A8=8B?= =?UTF-8?q?=E8=8A=82=E7=82=B9=E5=A4=B1=E8=B4=A5=E5=90=8E=E8=B7=B3=E8=BF=87?= =?UTF-8?q?=E5=90=8E=EF=BC=8C=E5=85=B6=E4=B8=8B=E9=9D=A2=E7=9A=84=E5=AD=90?= =?UTF-8?q?=E8=8A=82=E7=82=B9=E7=A6=81=E6=AD=A2=E6=93=8D=E4=BD=9C=20(#7192?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * minor: 项目变量查看页添加默认值 * optimization: 独立子流程节点失败后跳过后,其下面的子节点禁止操作 --- .../pages/task/TaskExecute/ExecuteInfo.vue | 26 ++++++++++++++++++- .../TabGlobalVariables/VariableEdit.vue | 11 ++++++-- 2 files changed, 34 insertions(+), 3 deletions(-) diff --git a/frontend/desktop/src/pages/task/TaskExecute/ExecuteInfo.vue b/frontend/desktop/src/pages/task/TaskExecute/ExecuteInfo.vue index 75b52bb83f..c2c383da79 100644 --- a/frontend/desktop/src/pages/task/TaskExecute/ExecuteInfo.vue +++ b/frontend/desktop/src/pages/task/TaskExecute/ExecuteInfo.vue @@ -456,6 +456,28 @@ isShowActionWrap () { // 任务终止时禁止节点操作 if (this.state === 'REVOKED') return false + // 判断父级节点是否存在失败后跳过 + if (this.nodeDetailConfig.taskId) { + const allNodeStatus = { + ...this.nodeDisplayStatus.children, + ...Object.values(this.subprocessNodeStatus).reduce((acc, item) => { + return { + ...acc, + ...item.data.children + } + }, {}) + } + + const parentIds = this.nodeDetailConfig.root_node.split('-') + const isFailedSkip = parentIds.some(id => { + const { state, skip } = allNodeStatus[id] || {} + return state === 'FINISHED' && skip + }) + + if (isFailedSkip) { + return false + } + } return (this.realTimeState.state === 'RUNNING' && !this.isSubProcessNode) || this.isShowRetryBtn || this.isShowSkipBtn @@ -1391,7 +1413,9 @@ } const resp = await this.getBatchInstanceStatus(data) if (!resp.result) return - this.subprocessNodeStatus = resp.data + Object.keys(resp.data).forEach(key => { + this.$set(this.subprocessNodeStatus, key, resp.data[key]) + }) for (const [key, value] of Object.entries(resp.data)) { const { root_node, node_id } = this.subprocessTasks[key] const nodeInfo = this.getNodeInfo(this.nodeData, root_node, node_id) diff --git a/frontend/desktop/src/pages/template/TemplateEdit/TemplateSetting/TabGlobalVariables/VariableEdit.vue b/frontend/desktop/src/pages/template/TemplateEdit/TemplateSetting/TabGlobalVariables/VariableEdit.vue index 4e3d8d413a..e93c8370b3 100644 --- a/frontend/desktop/src/pages/template/TemplateEdit/TemplateSetting/TabGlobalVariables/VariableEdit.vue +++ b/frontend/desktop/src/pages/template/TemplateEdit/TemplateSetting/TabGlobalVariables/VariableEdit.vue @@ -194,10 +194,17 @@ -
+

{{ theEditingData.is_meta ? $t('配置') : $t('默认值') }}

+ +
+ +
+ +
+
-
+