From b4d7f73f8cfda6e0d7d30ddcebfc0d3280d6d816 Mon Sep 17 00:00:00 2001 From: lvzk <897706680@qq.com> Date: Thu, 26 Jun 2025 10:13:20 +0800 Subject: [PATCH 1/5] =?UTF-8?q?[=E5=8A=9F=E8=83=BD]=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E5=8C=96=E6=94=AF=E6=8C=81=E9=80=89=E6=8B=A9=E5=B9=B6=E5=8F=91?= =?UTF-8?q?=E6=95=B0=20#[1447956513783808]=E8=87=AA=E5=8A=A8=E5=8C=96?= =?UTF-8?q?=E6=94=AF=E6=8C=81=E9=80=89=E6=8B=A9=E5=B9=B6=E5=8F=91=E6=95=B0?= =?UTF-8?q?=20http://192.168.0.96:8090/demo/rdm.html#/story-detail/9390509?= =?UTF-8?q?47543040/939050947543042/1447956513783808?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/resources/assets/languages/page/en.json | 6 +- src/resources/assets/languages/page/zh.json | 6 +- src/resources/assets/languages/term/en.json | 4 +- src/resources/assets/languages/term/zh.json | 4 +- .../detail/actionDetail/execute-setting.vue | 67 +++++++++++++++++-- .../pages/autoexec/detail/runner-detail.vue | 66 +++++++++++++++--- 6 files changed, 132 insertions(+), 21 deletions(-) diff --git a/src/resources/assets/languages/page/en.json b/src/resources/assets/languages/page/en.json index cea9303f..0d7ba1e1 100644 --- a/src/resources/assets/languages/page/en.json +++ b/src/resources/assets/languages/page/en.json @@ -1071,5 +1071,9 @@ "ignored": "Neglected", "loaded": "Loaded", "dictionary": "dictionary", - "healthcheckresult": "Inspection results" + "healthcheckresult": "Inspection results", + "autoexecparallpolicy": "Concurrency Strategy", + "autoexecbatchround": "in batches", + "autoexecparall": "Concurrency", + "autoexecparallel": "Concurrent settings" } \ No newline at end of file diff --git a/src/resources/assets/languages/page/zh.json b/src/resources/assets/languages/page/zh.json index 6af57dc8..a16f6539 100644 --- a/src/resources/assets/languages/page/zh.json +++ b/src/resources/assets/languages/page/zh.json @@ -1073,5 +1073,9 @@ "ignored": "已忽略", "loaded": "已加载", "dictionary": "字典", - "healthcheckresult": "检查结果" + "healthcheckresult": "检查结果", + "autoexecparallpolicy": "并发策略", + "autoexecbatchround": "分批", + "autoexecparall": "并发", + "autoexecparallel": "并发设置" } \ No newline at end of file diff --git a/src/resources/assets/languages/term/en.json b/src/resources/assets/languages/term/en.json index b0e027ca..cb1cf860 100644 --- a/src/resources/assets/languages/term/en.json +++ b/src/resources/assets/languages/term/en.json @@ -908,7 +908,9 @@ "resetrunnerphase": "Reset phase or not", "runnerGroupTooltip": "If the actuator group is not filled in here, the current stage will inherit the combination tool actuator group by default. If the actuator group is filled in here, the current stage will use the one filled in here; During execution, the executor group of the stage cannot be modified", "isfirenext": "Do you want to activate the next group", - "inputnodelimit": "The quantity cannot exceed 1000" + "inputnodelimit": "The quantity cannot exceed 1000", + "parall": "Concurrent quantity", + "paralldesc": "Execute the execution targets in order of concurrency." }, "framework": { "roleauth": "Authorize immediately after creating the role", diff --git a/src/resources/assets/languages/term/zh.json b/src/resources/assets/languages/term/zh.json index 6e04d480..63b7cdb8 100644 --- a/src/resources/assets/languages/term/zh.json +++ b/src/resources/assets/languages/term/zh.json @@ -908,7 +908,9 @@ "resetrunnerphase": "是否重置阶段", "runnerGroupTooltip": "若此处不填写执行器组,当前阶段默认继承组合工具执行器组,若此处填写执行器组,当前阶段将采用此处填写的;执行时,不可修改阶段的执行器组", "isfirenext": "是否激活下一个组", - "inputnodelimit": "数量不能大于1000" + "inputnodelimit": "数量不能大于1000", + "parall": "并发数量", + "paralldesc": "将执行目标按并发数量先后执行。" }, "framework": { "roleauth": "创建完角色立即授权", diff --git a/src/views/pages/autoexec/detail/actionDetail/execute-setting.vue b/src/views/pages/autoexec/detail/actionDetail/execute-setting.vue index ca840516..066e167d 100644 --- a/src/views/pages/autoexec/detail/actionDetail/execute-setting.vue +++ b/src/views/pages/autoexec/detail/actionDetail/execute-setting.vue @@ -165,9 +165,43 @@ export default { label: this.$t('page.autoexeccomboprunnergrouplabel'), labelWidth: '113' }, + parallelPolicy: { + type: 'radio', + labelWidth: '113', + disabled: !_this.isEditSetting, + label: this.$t('page.autoexecparallpolicy'), + dataList: [ + { + text: this.$t('page.autoexecparall'), + value: 'parallel' + }, + { + text: this.$t('page.autoexecbatchround'), + value: 'roundCount' + } + ], + validateList: ['required'], + transfer: true, + onChange: (val) => { + if (val && val == 'roundCount') { + this.$set(this.form.roundCount, 'isHidden', false); + this.$set(this.form.parallelCount, 'isHidden', true); + this.$set(this.settingConfig, 'parallelCount', null); + this.$set(this.settingConfig, 'roundCount', 32); + } else { + this.$set(this.form.roundCount, 'isHidden', true); + this.$set(this.form.parallelCount, 'isHidden', false); + this.$set(this.settingConfig, 'parallelCount', 64); + this.$set(this.settingConfig, 'roundCount', null); + } + console.log(val); + console.log(this.executeConfig.parallelPolicy); + } + }, roundCount: { type: 'select', value: null, + isHidden: true, transfer: true, disabled: !_this.isEditSetting, label: this.$t('term.autoexec.batchquantity'), @@ -175,6 +209,16 @@ export default { dataList: this.$utils.getRoundCountList(), labelWidth: '113' }, + parallelCount: { + type: 'select', + value: null, + transfer: true, + disabled: !_this.isEditSetting, + label: this.$t('term.autoexec.parall'), + desc: this.$t('term.autoexec.paralldesc'), + dataList: this.$utils.getRoundCountList(), + labelWidth: '113' + }, whenToSpecify: { type: 'radio', label: this.$t('term.autoexec.choosethetime'), @@ -193,7 +237,9 @@ export default { executeUser: null, runnerGroup: null, runnerGroupTag: null, + parallelPolicy: 'parall', roundCount: null, + parallelCount: null, whenToSpecify: 'runtime', executeNodeConfig: {} }, @@ -219,14 +265,22 @@ export default { destroyed() {}, methods: { getExecuteConfig() { - let _this = this; - if (_this.executeConfig) { - Object.keys(_this.executeConfig).forEach(key => { - if (_this.settingConfig.hasOwnProperty(key)) { - _this.settingConfig[key] = _this.executeConfig[key]; + if (this.executeConfig) { + Object.keys(this.executeConfig).forEach(key => { + if (this.settingConfig.hasOwnProperty(key)) { + this.settingConfig[key] = this.executeConfig[key]; + } + if (this.executeConfig.parallelPolicy && this.executeConfig.parallelPolicy === 'roundCount') { + this.$set(this.form.roundCount, 'isHidden', false); + this.$set(this.form.parallelCount, 'isHidden', true); + this.$set(this.settingConfig, 'parallelCount', null); + } else { + this.$set(this.form.roundCount, 'isHidden', true); + this.$set(this.form.parallelCount, 'isHidden', false); + this.$set(this.settingConfig, 'roundCount', null); } }); - if (_this.settingConfig.whenToSpecify == 'runtime') { + if (this.settingConfig.whenToSpecify == 'runtime') { this.runtimeFilter = this.settingConfig.executeNodeConfig.filter || {}; } } @@ -251,6 +305,7 @@ export default { this.$set(this.settingConfig, 'executeUser', this.$refs.executeUser.save()); this.$set(this.settingConfig, 'runnerGroup', this.$refs.runnerGroup.save()); this.$set(this.settingConfig, 'runnerGroupTag', this.$refs.runnerGroupTag.save()); + console.log(this.settingConfig); this.settingConfig.executeNodeConfig = {}; if (this.settingConfig.whenToSpecify == 'now') { this.validSetting(true); diff --git a/src/views/pages/autoexec/detail/runner-detail.vue b/src/views/pages/autoexec/detail/runner-detail.vue index d98ded58..4df70425 100644 --- a/src/views/pages/autoexec/detail/runner-detail.vue +++ b/src/views/pages/autoexec/detail/runner-detail.vue @@ -56,22 +56,37 @@
- {{ $t('term.autoexec.batchsetting') }} + {{ $t('page.autoexecparallel') }}
- +
+
+ + + +
+
{{ $t('term.deploy.actuatorgrouptag') }}
@@ -367,7 +382,7 @@ export default { selectStepList: [], //根据场景选择的阶段 isShowStepList: false, //展示流水线 showScenarioExecute: true, //切换场景是是否需要执行目标(阶段全是'runner'或者'sqlfile'不需要执行目标) - roundCount: 2, + roundCount: 32, roundCountForm: { dataList: this.$utils.getRoundCountList(), placeholder: this.$t('page.selectinput'), @@ -376,7 +391,7 @@ export default { // allowCreate: true, //与发布分批数设置保持一致 search: true, transfer: true, - desc: this.$t('term.autoexec.roundcountdescrition'), + desc: this.$t('term.autoexec.paralldesc'), validateList: ['required', 'maxNum'] }, paramValue: {}, @@ -385,7 +400,19 @@ export default { jobConfig: {}, filterSearchValue: {}, configExpired: 0, - configExpiredReason: {} + configExpiredReason: {}, + parallelPolicyDataList: [ + { + text: this.$t('page.autoexecparall'), + value: 'parallel' + }, + { + text: this.$t('page.autoexecbatchround'), + value: 'roundCount' + } + ], + parallelLabel: this.$t('term.autoexec.parall'), + parallelPolicy: 'parallel' }; }, beforeCreate() {}, @@ -474,6 +501,8 @@ export default { } else { if (!this.$utils.isEmpty(this.executeConfig.roundCount)) { this.roundCount = this.executeConfig.roundCount; + this.parallelPolicy = this.executeConfig.parallelPolicy; + this.changeParallelPolicy(this.parallelPolicy); //组合工具设置了分批数,创建作业时支持修改 // this.$set(this.roundCountForm, 'disabled', true); // this.$set(this.roundCountForm, 'disabledHoverTitle', this.$t('term.autoexec.setbantchnumbernoupdate')); @@ -561,6 +590,10 @@ export default { name: this.nameForm.itemList.name.value }, this.getCombopParams()); this.isCreating = true; + if (val.parallelPolicy === 'parallel') { + val.parallelCount = this.roundCount; + val.roundCount = null; + } this.$api.autoexec.action.executeAction(val).then(res => { if (res.Status == 'OK') { this.$Message.success(this.$t('message.savesuccess')); //保存成功 @@ -641,6 +674,7 @@ export default { } if (this.dataConfig && this.dataConfig.needRoundCount) { //是否需要设置分批数量 this.$set(data, 'roundCount', this.roundCount); + this.$set(data, 'parallelPolicy', this.parallelPolicy); } if (this.$refs.param) { this.$set(data, 'param', this.$refs.param.getValue()); @@ -677,11 +711,12 @@ export default { }, setJobParams(obj) { let config = this.$utils.deepClone(obj); - let {name = '', param = {}, roundCount = 2, scenarioId = null, executeConfig = {}, runnerGroupTag = null, runnerGroup = null} = config || {}; + let {name = '', param = {}, roundCount = 32, parallelPolicy = 'parallel', scenarioId = null, executeConfig = {}, runnerGroupTag = null, runnerGroup = null} = config || {}; this.nameForm.itemList.name.value = name; this.paramValue = param; this.scenarioId = scenarioId; this.roundCount = roundCount; + this.parallelPolicy = parallelPolicy; this.executeConfig = executeConfig; this.runnerGroupTag = runnerGroupTag || { mappingMode: 'constant', @@ -707,6 +742,15 @@ export default { this.getAction(); } }); + }, + changeParallelPolicy(val) { + if (val && val == 'roundCount') { + this.parallelLabel = this.$t('term.autoexec.batchquantity'); + this.roundCountForm.desc = this.$t('term.autoexec.batchcountdisabledesc'); + } else { + this.parallelLabel = this.$t('term.autoexec.parall'); + this.roundCountForm.desc = this.$t('term.autoexec.paralldesc'); + } } }, computed: { -- Gitee From 14c59569bf2114f885ff41ca8addbf5357b7de5d Mon Sep 17 00:00:00 2001 From: dengbf Date: Thu, 26 Jun 2025 11:15:54 +0800 Subject: [PATCH 2/5] commit --- .../detail/actionDetail/execute-setting.vue | 30 +++++++++++-------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/src/views/pages/autoexec/detail/actionDetail/execute-setting.vue b/src/views/pages/autoexec/detail/actionDetail/execute-setting.vue index 066e167d..ed8d531e 100644 --- a/src/views/pages/autoexec/detail/actionDetail/execute-setting.vue +++ b/src/views/pages/autoexec/detail/actionDetail/execute-setting.vue @@ -8,6 +8,7 @@
+ {{ settingConfig.parallelPolicy }} { - if (val && val == 'roundCount') { - this.$set(this.form.roundCount, 'isHidden', false); - this.$set(this.form.parallelCount, 'isHidden', true); - this.$set(this.settingConfig, 'parallelCount', null); - this.$set(this.settingConfig, 'roundCount', 32); - } else { - this.$set(this.form.roundCount, 'isHidden', true); - this.$set(this.form.parallelCount, 'isHidden', false); - this.$set(this.settingConfig, 'parallelCount', 64); - this.$set(this.settingConfig, 'roundCount', null); - } - console.log(val); - console.log(this.executeConfig.parallelPolicy); + this.changeParallelPolicy(val); } }, roundCount: { @@ -385,6 +374,21 @@ export default { changeWhenToSpecify(val) { this.settingConfig.whenToSpecify = val; this.settingConfig.executeNodeConfig = {}; + }, + changeParallelPolicy(val) { + this.$nextTick(() => { + if (val && val == 'roundCount') { + this.$set(this.settingConfig, 'parallelCount', null); + this.$set(this.settingConfig, 'roundCount', 32); + this.$set(this.form.roundCount, 'isHidden', false); + this.$set(this.form.parallelCount, 'isHidden', true); + } else { + this.$set(this.settingConfig, 'parallelCount', 64); + this.$set(this.settingConfig, 'roundCount', null); + this.$set(this.form.roundCount, 'isHidden', true); + this.$set(this.form.parallelCount, 'isHidden', false); + } + }); } }, computed: {}, -- Gitee From ad9ee392e20b55456844799da2e6352bf26e5066 Mon Sep 17 00:00:00 2001 From: dengbf Date: Thu, 26 Jun 2025 11:16:37 +0800 Subject: [PATCH 3/5] commit --- src/views/pages/autoexec/detail/actionDetail/execute-setting.vue | 1 - 1 file changed, 1 deletion(-) diff --git a/src/views/pages/autoexec/detail/actionDetail/execute-setting.vue b/src/views/pages/autoexec/detail/actionDetail/execute-setting.vue index ed8d531e..2d933e4d 100644 --- a/src/views/pages/autoexec/detail/actionDetail/execute-setting.vue +++ b/src/views/pages/autoexec/detail/actionDetail/execute-setting.vue @@ -8,7 +8,6 @@
- {{ settingConfig.parallelPolicy }} Date: Thu, 26 Jun 2025 11:19:20 +0800 Subject: [PATCH 4/5] =?UTF-8?q?[1447956513783808]=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E5=8C=96=E6=94=AF=E6=8C=81=E9=80=89=E6=8B=A9=E5=B9=B6=E5=8F=91?= =?UTF-8?q?=E6=95=B0=20http://192.168.0.96:8090/demo/rdm.html#/story-detai?= =?UTF-8?q?l/939050947543040/939050947543042/1447956513783808?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../detail/actionDetail/execute-setting.vue | 4 +- .../pages/autoexec/detail/runner-detail.vue | 86 +++++++++++-------- 2 files changed, 54 insertions(+), 36 deletions(-) diff --git a/src/views/pages/autoexec/detail/actionDetail/execute-setting.vue b/src/views/pages/autoexec/detail/actionDetail/execute-setting.vue index 066e167d..d9a2bc11 100644 --- a/src/views/pages/autoexec/detail/actionDetail/execute-setting.vue +++ b/src/views/pages/autoexec/detail/actionDetail/execute-setting.vue @@ -187,11 +187,11 @@ export default { this.$set(this.form.roundCount, 'isHidden', false); this.$set(this.form.parallelCount, 'isHidden', true); this.$set(this.settingConfig, 'parallelCount', null); - this.$set(this.settingConfig, 'roundCount', 32); + this.$set(this.settingConfig, 'roundCount', 64); } else { this.$set(this.form.roundCount, 'isHidden', true); this.$set(this.form.parallelCount, 'isHidden', false); - this.$set(this.settingConfig, 'parallelCount', 64); + this.$set(this.settingConfig, 'parallelCount', 32); this.$set(this.settingConfig, 'roundCount', null); } console.log(val); diff --git a/src/views/pages/autoexec/detail/runner-detail.vue b/src/views/pages/autoexec/detail/runner-detail.vue index 4df70425..0ad0f063 100644 --- a/src/views/pages/autoexec/detail/runner-detail.vue +++ b/src/views/pages/autoexec/detail/runner-detail.vue @@ -71,22 +71,35 @@ >
+
+ + + +
+
+ + + +
-
- - - -
-
{{ $t('term.deploy.actuatorgrouptag') }}
@@ -383,7 +396,8 @@ export default { isShowStepList: false, //展示流水线 showScenarioExecute: true, //切换场景是是否需要执行目标(阶段全是'runner'或者'sqlfile'不需要执行目标) roundCount: 32, - roundCountForm: { + parallelCount: 64, + parallelForm: { dataList: this.$utils.getRoundCountList(), placeholder: this.$t('page.selectinput'), border: 'border', @@ -394,6 +408,17 @@ export default { desc: this.$t('term.autoexec.paralldesc'), validateList: ['required', 'maxNum'] }, + roundCountForm: { + dataList: this.$utils.getRoundCountList(), + placeholder: this.$t('page.selectinput'), + border: 'border', + filterName: 'text', + // allowCreate: true, //与发布分批数设置保持一致 + search: true, + transfer: true, + desc: this.$t('term.autoexec.batchcountdisabledesc'), + validateList: ['required', 'maxNum'] + }, paramValue: {}, executeConfig: {}, jobId: null, //作业id,用于复制作业 @@ -411,7 +436,6 @@ export default { value: 'roundCount' } ], - parallelLabel: this.$t('term.autoexec.parall'), parallelPolicy: 'parallel' }; }, @@ -499,14 +523,10 @@ export default { if (this.jobId) { this.setJobParams(this.jobConfig); } else { - if (!this.$utils.isEmpty(this.executeConfig.roundCount)) { - this.roundCount = this.executeConfig.roundCount; - this.parallelPolicy = this.executeConfig.parallelPolicy; - this.changeParallelPolicy(this.parallelPolicy); - //组合工具设置了分批数,创建作业时支持修改 - // this.$set(this.roundCountForm, 'disabled', true); - // this.$set(this.roundCountForm, 'disabledHoverTitle', this.$t('term.autoexec.setbantchnumbernoupdate')); - } + this.roundCount = this.executeConfig.roundCount; + this.parallelCount = this.executeConfig.parallelCount; + this.parallelPolicy = this.executeConfig.parallelPolicy; + if (this.executeConfig.whenToSpecify == 'runtime') { this.$set(this.executeConfig, 'executeNodeConfig', {}); } @@ -569,6 +589,7 @@ export default { isValid = this.$refs.executeForm ? this.$refs.executeForm.valid() && isValid : isValid; isValid = this.$refs.nameForm ? this.$refs.nameForm.valid() && isValid : isValid; isValid = this.$refs.roundCountForm ? this.$refs.roundCountForm.valid() && isValid : isValid; + isValid = this.$refs.parallelForm ? this.$refs.parallelForm.valid() && isValid : isValid; isValid = this.$refs.runnerGroup ? this.$refs.runnerGroup.valid() && isValid : isValid; return isValid; }, @@ -590,10 +611,8 @@ export default { name: this.nameForm.itemList.name.value }, this.getCombopParams()); this.isCreating = true; - if (val.parallelPolicy === 'parallel') { - val.parallelCount = this.roundCount; - val.roundCount = null; - } + val.parallelCount = this.parallelCount; + val.roundCount = this.roundCount; this.$api.autoexec.action.executeAction(val).then(res => { if (res.Status == 'OK') { this.$Message.success(this.$t('message.savesuccess')); //保存成功 @@ -711,11 +730,12 @@ export default { }, setJobParams(obj) { let config = this.$utils.deepClone(obj); - let {name = '', param = {}, roundCount = 32, parallelPolicy = 'parallel', scenarioId = null, executeConfig = {}, runnerGroupTag = null, runnerGroup = null} = config || {}; + let {name = '', param = {}, roundCount = 64, parallelCount = 32, parallelPolicy = 'parallel', scenarioId = null, executeConfig = {}, runnerGroupTag = null, runnerGroup = null} = config || {}; this.nameForm.itemList.name.value = name; this.paramValue = param; this.scenarioId = scenarioId; this.roundCount = roundCount; + this.parallelCount = parallelCount; this.parallelPolicy = parallelPolicy; this.executeConfig = executeConfig; this.runnerGroupTag = runnerGroupTag || { @@ -745,11 +765,9 @@ export default { }, changeParallelPolicy(val) { if (val && val == 'roundCount') { - this.parallelLabel = this.$t('term.autoexec.batchquantity'); - this.roundCountForm.desc = this.$t('term.autoexec.batchcountdisabledesc'); + this.roundCount = this.roundCount || 64; } else { - this.parallelLabel = this.$t('term.autoexec.parall'); - this.roundCountForm.desc = this.$t('term.autoexec.paralldesc'); + this.parallelCount = this.parallelCount || 32; } } }, -- Gitee From bf13f1db26b1dfed4a04417c6588bb321bdba22f Mon Sep 17 00:00:00 2001 From: lvzk <897706680@qq.com> Date: Fri, 27 Jun 2025 10:41:13 +0800 Subject: [PATCH 5/5] =?UTF-8?q?[1447956513783808]=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E5=8C=96=E6=94=AF=E6=8C=81=E9=80=89=E6=8B=A9=E5=B9=B6=E5=8F=91?= =?UTF-8?q?=E6=95=B0=20http://192.168.0.96:8090/demo/rdm.html#/story-detai?= =?UTF-8?q?l/939050947543040/939050947543042/1447956513783808?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../detail/actionDetail/execute-setting.vue | 33 ++++---- .../detail/actionDetail/step-group.vue | 81 ++++++++++++++++++- .../actionDetail/step/edit/step-edit.vue | 72 +++++++++++++++-- .../detail/jobDetail/phase/node-list.vue | 40 +++++++-- .../pages/autoexec/detail/runner-detail.vue | 3 +- src/views/pages/deploy/job/job-add.vue | 69 +++++++++++++++- 6 files changed, 261 insertions(+), 37 deletions(-) diff --git a/src/views/pages/autoexec/detail/actionDetail/execute-setting.vue b/src/views/pages/autoexec/detail/actionDetail/execute-setting.vue index 4206a452..e7c6c912 100644 --- a/src/views/pages/autoexec/detail/actionDetail/execute-setting.vue +++ b/src/views/pages/autoexec/detail/actionDetail/execute-setting.vue @@ -180,7 +180,7 @@ export default { value: 'roundCount' } ], - validateList: ['required'], + allowToggle: true, transfer: true, onChange: (val) => { this.changeParallelPolicy(val); @@ -225,7 +225,7 @@ export default { executeUser: null, runnerGroup: null, runnerGroupTag: null, - parallelPolicy: 'parall', + parallelPolicy: null, roundCount: null, parallelCount: null, whenToSpecify: 'runtime', @@ -258,14 +258,12 @@ export default { if (this.settingConfig.hasOwnProperty(key)) { this.settingConfig[key] = this.executeConfig[key]; } - if (this.executeConfig.parallelPolicy && this.executeConfig.parallelPolicy === 'roundCount') { + this.$set(this.form.roundCount, 'isHidden', true); + this.$set(this.form.parallelCount, 'isHidden', true); + if (this.executeConfig.parallelPolicy && this.executeConfig.parallelPolicy == 'roundCount') { this.$set(this.form.roundCount, 'isHidden', false); - this.$set(this.form.parallelCount, 'isHidden', true); - this.$set(this.settingConfig, 'parallelCount', null); - } else { - this.$set(this.form.roundCount, 'isHidden', true); + } else if (this.executeConfig.parallelPolicy && this.executeConfig.parallelPolicy == 'parallel') { this.$set(this.form.parallelCount, 'isHidden', false); - this.$set(this.settingConfig, 'roundCount', null); } }); if (this.settingConfig.whenToSpecify == 'runtime') { @@ -293,7 +291,6 @@ export default { this.$set(this.settingConfig, 'executeUser', this.$refs.executeUser.save()); this.$set(this.settingConfig, 'runnerGroup', this.$refs.runnerGroup.save()); this.$set(this.settingConfig, 'runnerGroupTag', this.$refs.runnerGroupTag.save()); - console.log(this.settingConfig); this.settingConfig.executeNodeConfig = {}; if (this.settingConfig.whenToSpecify == 'now') { this.validSetting(true); @@ -307,6 +304,14 @@ export default { this.$set(this.settingConfig.executeNodeConfig, 'paramList', paramList); this.save(); } + if (this.$utils.isEmpty(this.settingConfig.parallelPolicy)) { + this.settingConfig.roundCount = null; + this.settingConfig.parallelCount = null; + } else if (this.settingConfig.parallelPolicy === 'parallel') { + this.settingConfig.roundCount = null; + } else { + this.settingConfig.parallelCount = null; + } }, save() { this.closeSetting(this.settingConfig); @@ -376,15 +381,11 @@ export default { }, changeParallelPolicy(val) { this.$nextTick(() => { + this.$set(this.form.roundCount, 'isHidden', true); + this.$set(this.form.parallelCount, 'isHidden', true); if (val && val == 'roundCount') { - this.$set(this.settingConfig, 'parallelCount', null); - this.$set(this.settingConfig, 'roundCount', 64); this.$set(this.form.roundCount, 'isHidden', false); - this.$set(this.form.parallelCount, 'isHidden', true); - } else { - this.$set(this.settingConfig, 'parallelCount', 32); - this.$set(this.settingConfig, 'roundCount', null); - this.$set(this.form.roundCount, 'isHidden', true); + } else if (val && val == 'parallel') { this.$set(this.form.parallelCount, 'isHidden', false); } }); diff --git a/src/views/pages/autoexec/detail/actionDetail/step-group.vue b/src/views/pages/autoexec/detail/actionDetail/step-group.vue index 730de1e9..78136ed5 100644 --- a/src/views/pages/autoexec/detail/actionDetail/step-group.vue +++ b/src/views/pages/autoexec/detail/actionDetail/step-group.vue @@ -100,12 +100,24 @@
-
- + +
+ {{ getParallelPolicyText(groupConfig.config.executeConfig.parallelPolicy) }} +
+
-
+
+
{{ getRoundCountText(groupConfig.config.executeConfig.roundCount) }}
-
+ +
+ {{ getRoundCountText(groupConfig.config.executeConfig.parallelCount) }} +
+
-
+
{ + this.changeParallelPolicy(val); + } + }, roundCount: { type: 'select', value: null, @@ -264,6 +295,14 @@ export default { label: this.$t('term.autoexec.batchquantity'), desc: this.$t('term.deploy.executetargetdesc'), dataList: this.$utils.getRoundCountList() + }, + parallelCount: { + type: 'select', + value: null, + transfer: true, + label: this.$t('term.autoexec.parall'), + desc: this.$t('term.autoexec.paralldesc'), + dataList: this.$utils.getRoundCountList() } } }, @@ -320,6 +359,8 @@ export default { protocolId: null, executeUser: {}, roundCount: null, + parallelCount: null, + parallelPolicy: null, executeNodeConfig: {}, whitelist: [], blacklist: [] @@ -346,6 +387,14 @@ export default { this.isShowBlacklist = true; } this.isShowDialog = true; + + this.$set(this.executeForm.itemList.roundCount, 'isHidden', true); + this.$set(this.executeForm.itemList.parallelCount, 'isHidden', true); + if (this.executeConfig.parallelPolicy && this.executeConfig.parallelPolicy == 'roundCount') { + this.$set(this.executeForm.itemList.roundCount, 'isHidden', false); + } else if (this.executeConfig.parallelPolicy && this.executeConfig.parallelPolicy == 'parallel') { + this.$set(this.executeForm.itemList.parallelCount, 'isHidden', false); + } }, close() { this.isShowExecute = true; @@ -414,6 +463,14 @@ export default { this.executeConfig.whitelist = this.$refs.whitelist.save(); this.executeConfig.blacklist = this.$refs.blacklist.save(); this.groupConfig.policy = this.groupPolicy; + if (this.$utils.isEmpty(this.executeConfig.parallelPolicy)) { + this.executeConfig.roundCount = null; + this.executeConfig.parallelCount = null; + } else if (this.executeConfig.parallelPolicy === 'parallel') { + this.executeConfig.roundCount = null; + } else { + this.executeConfig.parallelCount = null; + } let isEmpty = true; Object.keys(this.executeConfig).forEach(key => { if (!this.$utils.isEmpty(this.executeConfig[key])) { @@ -446,6 +503,17 @@ export default { }, closeValid() { //关闭校验弹框 this.isValid = false; + }, + changeParallelPolicy(val) { + this.$nextTick(() => { + this.$set(this.executeForm.itemList.roundCount, 'isHidden', true); + this.$set(this.executeForm.itemList.parallelCount, 'isHidden', true); + if (val && val == 'roundCount') { + this.$set(this.executeForm.itemList.roundCount, 'isHidden', false); + } else if (val && val == 'parallel') { + this.$set(this.executeForm.itemList.parallelCount, 'isHidden', false); + } + }); } }, computed: { @@ -472,6 +540,17 @@ export default { } return text; }; + }, + getParallelPolicyText() { + return (val) => { + let text = val; + if (val === 'parallel') { + text = this.$t('page.autoexecparall'); + } else if (val === 'roundCount') { + text = this.$t('page.autoexecbatchround'); + } + return text; + }; } }, watch: { diff --git a/src/views/pages/autoexec/detail/actionDetail/step/edit/step-edit.vue b/src/views/pages/autoexec/detail/actionDetail/step/edit/step-edit.vue index 68f339b7..8ea62f24 100644 --- a/src/views/pages/autoexec/detail/actionDetail/step/edit/step-edit.vue +++ b/src/views/pages/autoexec/detail/actionDetail/step/edit/step-edit.vue @@ -242,10 +242,9 @@ export default { popLable: 120 } ], - executeForm: [ - { + executeForm: { + protocolId: { type: 'select', - name: 'protocolId', label: this.$t('page.protocol'), //添加阶段 value: '', multiple: false, @@ -256,15 +255,34 @@ export default { transfer: true, disabled: !_this.canEdit }, - { + executeUser: { type: 'slot', - name: 'executeUser', label: this.$t('page.executeuser'), tooltip: this.$t('term.autoexec.nowriteusertooltip') }, - { + parallelPolicy: { + type: 'radio', + labelWidth: '113', + disabled: !_this.canEdit, + label: this.$t('page.autoexecparallpolicy'), + dataList: [ + { + text: this.$t('page.autoexecparall'), + value: 'parallel' + }, + { + text: this.$t('page.autoexecbatchround'), + value: 'roundCount' + } + ], + allowToggle: true, + transfer: true, + onChange: (val) => { + this.changeParallelPolicy(val); + } + }, + roundCount: { type: 'select', - name: 'roundCount', value: null, transfer: true, label: this.$t('term.autoexec.batchquantity'), @@ -272,11 +290,22 @@ export default { dataList: this.$utils.getRoundCountList(), filterName: 'text', disabled: !_this.canEdit + }, + parallelCount: { + type: 'select', + value: null, + transfer: true, + disabled: !_this.canEdit, + label: this.$t('term.autoexec.parall'), + desc: this.$t('term.autoexec.paralldesc'), + dataList: this.$utils.getRoundCountList() } - ], + }, executeConfig: { protocolId: '', executeUser: {}, + parallelPolicy: null, + parallelCount: null, roundCount: null, isPresetExecuteConfig: 0, executeNodeConfig: {}, @@ -315,6 +344,13 @@ export default { if (!this.$utils.isEmpty(this.executeConfig.runnerGroup) || !this.$utils.isEmpty(this.executeConfig.runnerGroupTag)) { this.$set(this.executeConfig, 'isPresetRunnerGroup', 1); } + this.$set(this.executeForm.roundCount, 'isHidden', true); + this.$set(this.executeForm.parallelCount, 'isHidden', true); + if (this.executeConfig.parallelPolicy && this.executeConfig.parallelPolicy == 'roundCount') { + this.$set(this.executeForm.roundCount, 'isHidden', false); + } else if (this.executeConfig.parallelPolicy && this.executeConfig.parallelPolicy == 'parallel') { + this.$set(this.executeForm.parallelCount, 'isHidden', false); + } } } for (let key in this.formItem) { @@ -350,6 +386,15 @@ export default { if (this.$refs.runnerGroup) { this.$set(this.executeConfig, 'runnerGroup', this.$refs.runnerGroup.save()); } + + if (this.$utils.isEmpty(this.executeConfig.parallelPolicy)) { + this.executeConfig.roundCount = null; + this.executeConfig.parallelCount = null; + } else if (this.executeConfig.parallelPolicy === 'parallel') { + this.executeConfig.roundCount = null; + } else { + this.executeConfig.parallelCount = null; + } if (this.$refs.form.valid()) { let editConfig = this.$utils.deepClone(this.editConfig); @@ -465,6 +510,17 @@ export default { this.executePolicyList = res.Return || []; } }); + }, + changeParallelPolicy(val) { + this.$nextTick(() => { + this.$set(this.executeForm.roundCount, 'isHidden', true); + this.$set(this.executeForm.parallelCount, 'isHidden', true); + if (val && val == 'roundCount') { + this.$set(this.executeForm.roundCount, 'isHidden', false); + } else if (val && val == 'parallel') { + this.$set(this.executeForm.parallelCount, 'isHidden', false); + } + }); } }, computed: {}, diff --git a/src/views/pages/autoexec/detail/jobDetail/phase/node-list.vue b/src/views/pages/autoexec/detail/jobDetail/phase/node-list.vue index e904283a..d305994f 100644 --- a/src/views/pages/autoexec/detail/jobDetail/phase/node-list.vue +++ b/src/views/pages/autoexec/detail/jobDetail/phase/node-list.vue @@ -67,16 +67,28 @@ class="col-span custom-flex text-right" span="14" > - 执行策略:{{ phaseData.jobGroupVo.policy }} + {{ $t('term.deploy.executivestrategy') }}:{{ phaseData.jobGroupVo.policy }} - 分批数:{{ roundCount }} + {{ $t('term.autoexec.parall') }}:{{ parallelCount }}
- 分批数来源: {{ phaseData.roundCountFrom }} +
{{ $t('term.autoexec.parall') }}{{ $t('page.source') }}: {{ phaseData.roundCountFrom }}
+
{{ $t('term.autoexec.batchquantity') }}: {{ phaseData.roundCount }}
+
+
+ + {{ $t('term.autoexec.batchquantity') }}:{{ roundCount }} +
+ {{ $t('term.autoexec.batchquantity') }}{{ $t('page.source') }}: {{ phaseData.roundCountFrom }}
- 执行用户:{{ phaseData.userName }} + {{ $t('page.executeuser') }}:{{ phaseData.userName }}
- 执行用户来源: {{ phaseData.userNameFrom }} + {{ $t('page.executeuser') }}{{ $t('page.source') }}: {{ phaseData.userNameFrom }}
- 执行协议:{{ phaseData.protocol }} + {{ $t('page.protocol') }}:{{ phaseData.protocol }}
- 执行协议来源: {{ phaseData.protocolFrom }} + {{ $t('page.protocol') }}{{ $t('page.source') }}: {{ phaseData.protocolFrom }}
@@ -669,6 +681,18 @@ export default { return roundCount; } }, + parallelCount() { + let parallelCount = this.phaseData.parallelCount; + if (parallelCount == 0) { + return '全部串行'; + } else if (parallelCount == 1) { + return '全部并行'; + } else if (parallelCount == -1) { + return '蓝绿执行'; + } else { + return parallelCount; + } + }, currentNode() { if (this.currentNodeId && this.nodeData && this.nodeData.tbodyList && this.nodeData.tbodyList.length > 0) { return this.nodeData.tbodyList.find(d => d.id === this.currentNodeId); diff --git a/src/views/pages/autoexec/detail/runner-detail.vue b/src/views/pages/autoexec/detail/runner-detail.vue index 0ad0f063..21649a49 100644 --- a/src/views/pages/autoexec/detail/runner-detail.vue +++ b/src/views/pages/autoexec/detail/runner-detail.vue @@ -525,7 +525,7 @@ export default { } else { this.roundCount = this.executeConfig.roundCount; this.parallelCount = this.executeConfig.parallelCount; - this.parallelPolicy = this.executeConfig.parallelPolicy; + this.parallelPolicy = this.executeConfig.parallelPolicy || 'parallel'; if (this.executeConfig.whenToSpecify == 'runtime') { this.$set(this.executeConfig, 'executeNodeConfig', {}); @@ -693,6 +693,7 @@ export default { } if (this.dataConfig && this.dataConfig.needRoundCount) { //是否需要设置分批数量 this.$set(data, 'roundCount', this.roundCount); + this.$set(data, 'parallelCount', this.parallelCount); this.$set(data, 'parallelPolicy', this.parallelPolicy); } if (this.$refs.param) { diff --git a/src/views/pages/deploy/job/job-add.vue b/src/views/pages/deploy/job/job-add.vue index 857fc049..50f74e4b 100644 --- a/src/views/pages/deploy/job/job-add.vue +++ b/src/views/pages/deploy/job/job-add.vue @@ -114,8 +114,22 @@ >
- {{ $t('term.autoexec.batchsetting') }} + {{ $t('page.autoexecparallel') }}
+ + + +
+
+
+ + + +
{{ $t('term.autoexec.jobparam') }} @@ -174,7 +202,8 @@ export default { SaveSetting: () => import('@/views/pages/autoexec/detail/runnerDetail/save-setting.vue'), ResultDialog: () => import('./publishing/result-dialog'), PublishingValid: () => import('./publishing/publishing-valid'), - PhaseList: () => import('./publishing/phase-list') + PhaseList: () => import('./publishing/phase-list'), + TsFormRadio: () => import('@/resources/plugins/TsForm/TsFormRadio') }, props: {}, data() { @@ -201,6 +230,17 @@ export default { desc: this.$t('term.autoexec.roundcountdescrition'), validateList: ['required', 'maxNum'] }, + parallelForm: { + placeholder: this.$t('page.selectinput'), + border: 'border', + dataList: this.getRoundCountList(), + filterName: 'text', + // allowCreate: true, + search: true, + transfer: true, + desc: this.$t('term.autoexec.paralldesc'), + validateList: ['required', 'maxNum'] + }, runtimeParamList: [], //作业参数 combopPhaseList: [], isSaveDialog: false, @@ -216,7 +256,19 @@ export default { jobConfig: {}, paramValue: {}, saveLoading: false, - moduleEnvInstanceMap: {} + moduleEnvInstanceMap: {}, + parallelPolicyDataList: [ + { + text: this.$t('page.autoexecparall'), + value: 'parallel' + }, + { + text: this.$t('page.autoexecbatchround'), + value: 'roundCount' + } + ], + parallelPolicy: 'roundCount', + parallelCount: 4 }; }, beforeCreate() {}, @@ -376,6 +428,8 @@ export default { envId: this.envId, scenarioId: this.scenarioId, roundCount: this.roundCount, + parallelCount: this.parallelCount, + parallelPolicy: this.parallelPolicy, param: {}, moduleList: this.$refs.moduleList.getData() }; @@ -524,6 +578,8 @@ export default { } }); this.jobConfig.roundCount && (this.roundCount = this.jobConfig.roundCount); + this.jobConfig.parallelCount && (this.parallelCount = this.jobConfig.parallelCount); + this.jobConfig.parallelPolicy && (this.parallelPolicy = this.jobConfig.parallelPolicy); this.paramValue = this.jobConfig.param || {}; if (this.jobConfig.scenarioId) { let findScenario = this.initData.scenarioList.find((item) => item.isEnable == true && item.scenarioId == this.jobConfig.scenarioId); @@ -549,6 +605,13 @@ export default { ]; list.push(...this.$utils.getRoundCountList()); return list; + }, + changeParallelPolicy(val) { + if (val && val == 'roundCount') { + this.roundCount = this.roundCount || 64; + } else { + this.parallelCount = this.parallelCount || 32; + } } }, filter: {}, -- Gitee