From 7468c99d79dfc3444d8aaa5056213bd884195184 Mon Sep 17 00:00:00 2001 From: dengbf Date: Tue, 20 May 2025 18:11:26 +0800 Subject: [PATCH 1/2] =?UTF-8?q?[=E5=8A=9F=E8=83=BD]=20#[1425347218735104]?= =?UTF-8?q?=E7=BB=84=E5=90=88=E5=B7=A5=E5=85=B7=E5=A2=9E=E5=8A=A0=E6=A0=A1?= =?UTF-8?q?=E9=AA=8C=EF=BC=9A=E5=B7=A5=E5=85=B7if/else=20=E8=87=B3?= =?UTF-8?q?=E5=B0=91=E9=80=89=E6=8B=A9=E4=B8=80=E4=B8=AA=E5=B7=A5=E5=85=B7?= =?UTF-8?q?=20http://192.168.0.96:8090/demo/rdm.html#/story-detail/9390509?= =?UTF-8?q?47543040/939050947543042/1425347218735104?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/script/script-list.vue | 14 ++++++++++++-- .../pages/autoexec/detail/action-detail.vue | 19 +++++++++++++++---- .../application-config-pipeline.vue | 10 ++++++++++ .../application-config/pipeline-detail.vue | 9 +++++++++ 4 files changed, 46 insertions(+), 6 deletions(-) diff --git a/src/views/pages/autoexec/components/script/script-list.vue b/src/views/pages/autoexec/components/script/script-list.vue index d46b7c85..cfc58332 100644 --- a/src/views/pages/autoexec/components/script/script-list.vue +++ b/src/views/pages/autoexec/components/script/script-list.vue @@ -284,7 +284,6 @@ export default { let _this = this; _this.list.forEach(l => { if (l.uuid == id) { - console.log(config); Object.assign(l, config); } }); @@ -314,7 +313,7 @@ export default { childrendom.forEach(children => { if (children.__vue__ && children.__vue__.valid) { if (!children.__vue__.valid()) { - children.__vue__.$options.parent.step.isShow = true; + this.setShowStep(children.__vue__.$options.parent); isValid = false; } } @@ -323,6 +322,17 @@ export default { return isValid; } }, + setShowStep(parent) { //设置父级的显示 + if (parent) { + if (parent.step) { + parent.step.isShow = true; + } else { + if (parent.$options.parent) { + this.setShowStep(parent.$options.parent); + } + } + } + }, refreshProfile() { if (this.phaseOperationList && this.phaseOperationList.length) { this.phaseOperationList.forEach(item => { diff --git a/src/views/pages/autoexec/detail/action-detail.vue b/src/views/pages/autoexec/detail/action-detail.vue index f9c64166..9fee20c3 100644 --- a/src/views/pages/autoexec/detail/action-detail.vue +++ b/src/views/pages/autoexec/detail/action-detail.vue @@ -1256,7 +1256,7 @@ export default { if (p.operationName == 'native/IF-Block') { if (p.config) { !p.config.condition && validList.push({ - text: this.$t('page.phase') + step.name + this.$t('term.autoexec.setinputcondition'), + text: this.$t('page.phase') + step.name + '【' + p.operationName + '】' + this.$t('term.autoexec.setinputcondition'), type: 'error', config: { stepName: step.name, @@ -1264,6 +1264,17 @@ export default { stepUuid: step.uuid } }); + if (this.$utils.isEmpty(p.config.ifList) && this.$utils.isEmpty(p.config.elseList)) { + validList.push({ + text: this.$t('page.phase') + step.name + '【' + p.operationName + '】:' + this.$t('term.deploy.chooseatleastonetool'), + type: 'error', + config: { + stepName: step.name, + validComponent: 'operation', + stepUuid: step.uuid + } + }); + } if (p.config.ifList && p.config.ifList.length) { let validIfList = this.validPhaseOperationList(step, p.config.ifList); validIfList.length && validList.push(...validIfList); @@ -1276,7 +1287,7 @@ export default { } else if (p.operationName == 'native/LOOP-Block') { if (p.config) { !p.config.loopItems && validList.push({ - text: this.$t('page.phase') + step.name + this.$t('term.autoexec.setinputloopitems'), + text: this.$t('page.phase') + step.name + '【' + p.operationName + '】' + this.$t('term.autoexec.setinputloopitems'), type: 'error', config: { stepName: step.name, @@ -1285,7 +1296,7 @@ export default { } }); !p.config.loopItemVar && validList.push({ - text: this.$t('page.phase') + step.name + this.$t('term.autoexec.setinputloopitemvar'), + text: this.$t('page.phase') + step.name + '【' + p.operationName + '】' + this.$t('term.autoexec.setinputloopitemvar'), type: 'error', config: { stepName: step.name, @@ -1294,7 +1305,7 @@ export default { } }); (!p.config.operations || p.config.operations.length == 0) && validList.push({ - text: this.$t('page.phase') + step.name + this.$t('term.autoexec.setinputloopoperations'), + text: this.$t('page.phase') + step.name + '【' + p.operationName + '】' + this.$t('term.autoexec.setinputloopoperations'), type: 'error', config: { stepName: step.name, diff --git a/src/views/pages/deploy/application-config/application-config-pipeline.vue b/src/views/pages/deploy/application-config/application-config-pipeline.vue index d9f0080f..4735cdd5 100644 --- a/src/views/pages/deploy/application-config/application-config-pipeline.vue +++ b/src/views/pages/deploy/application-config/application-config-pipeline.vue @@ -608,6 +608,16 @@ export default { id: '#id_' + step.uuid + '_' + p.uuid, current: 1 }); + if (this.$utils.isEmpty(p.config.ifList) && this.$utils.isEmpty(p.config.elseList)) { + validList.push({ + text: this.$t('page.phase') + step.name + '【' + p.operationName + '】:' + this.$t('term.deploy.chooseatleastonetool'), + type: 'error', + stepUuid: step.uuid, + operationUuid: p.uuid, + id: '#id_' + step.uuid + '_' + p.uuid, + current: 1 + }); + } if (p.config.ifList && p.config.ifList.length) { let validIfList = this.validPhaseOperationList(step, p.config.ifList); validIfList.length && validList.push(...validIfList); diff --git a/src/views/pages/deploy/application-config/pipeline-detail.vue b/src/views/pages/deploy/application-config/pipeline-detail.vue index 87faa094..bb2b6453 100644 --- a/src/views/pages/deploy/application-config/pipeline-detail.vue +++ b/src/views/pages/deploy/application-config/pipeline-detail.vue @@ -934,6 +934,15 @@ export default { operationUuid: p.uuid, id: '#id_' + step.uuid + '_' + p.uuid }); + if (this.$utils.isEmpty(p.config.ifList) && this.$utils.isEmpty(p.config.elseList)) { + validList.push({ + text: this.$t('page.phase') + step.name + '【' + p.operationName + '】:' + this.$t('term.deploy.chooseatleastonetool'), + type: 'error', + stepUuid: step.uuid, + operationUuid: p.uuid, + id: '#id_' + step.uuid + '_' + p.uuid + }); + } if (p.config.ifList && p.config.ifList.length) { let validIfList = this.validPhaseOperationList(step, p.config.ifList); validIfList.length && validList.push(...validIfList); -- Gitee From 3cba036284869d0f8fa3cc61639dde83ad011332 Mon Sep 17 00:00:00 2001 From: dengbf Date: Tue, 20 May 2025 18:12:57 +0800 Subject: [PATCH 2/2] =?UTF-8?q?[=E4=BF=AE=E5=A4=8D]=20=E7=BB=84=E5=90=88?= =?UTF-8?q?=E5=B7=A5=E5=85=B7=E9=98=B6=E6=AE=B5=EF=BC=9Brunner=E7=BB=84?= =?UTF-8?q?=E5=8E=BB=E6=8E=89=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/autoexec/detail/actionDetail/runnergroup-setting.vue | 2 +- .../pages/deploy/application-config/pipeline/step/step-edit.vue | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/views/pages/autoexec/detail/actionDetail/runnergroup-setting.vue b/src/views/pages/autoexec/detail/actionDetail/runnergroup-setting.vue index 6b51ec03..b7330f18 100644 --- a/src/views/pages/autoexec/detail/actionDetail/runnergroup-setting.vue +++ b/src/views/pages/autoexec/detail/actionDetail/runnergroup-setting.vue @@ -119,7 +119,7 @@ export default { transfer: true, needCallback: false, border: 'border', - validateList: ['required'], + validateList: this.isRequired ? ['required'] : [], dealDataByUrl: this.$utils.getRunnerGroupList, dynamicUrl: '/api/rest/runnergroup/search', params: { diff --git a/src/views/pages/deploy/application-config/pipeline/step/step-edit.vue b/src/views/pages/deploy/application-config/pipeline/step/step-edit.vue index fbcdf1a0..6172778d 100644 --- a/src/views/pages/deploy/application-config/pipeline/step/step-edit.vue +++ b/src/views/pages/deploy/application-config/pipeline/step/step-edit.vue @@ -102,6 +102,7 @@ :config="executeConfig.runnerGroupTag" :disabled="!canEdit" :runtimeParamList="runtimeParamList" + :isRequired="false" > -- Gitee