diff --git a/src/views/pages/autoexec/detail/test-detail.vue b/src/views/pages/autoexec/detail/test-detail.vue index f65bd4b2b8fe4dea733baa8387735b8b7078be22..1f62f942fea9aac52925c8ef0b8ac51b8bd395f9 100644 --- a/src/views/pages/autoexec/detail/test-detail.vue +++ b/src/views/pages/autoexec/detail/test-detail.vue @@ -66,6 +66,51 @@ +
+ {{ $t('page.autoexecparallel') }} +
+ + + +
+
+ + + +
+
+ + + +
+
{{ $t('term.deploy.actuatorgroup') }} @@ -92,6 +137,9 @@ export default { TsForm: () => import('@/resources/plugins/TsForm/TsForm'), ArgumentParams: () => import('./runnerDetail/argument-params.vue'), TsFormInput: () => import('@/resources/plugins/TsForm/TsFormInput'), + TsFormRadio: () => import('@/resources/plugins/TsForm/TsFormRadio'), + TsFormItem: () => import('@/resources/plugins/TsForm/TsFormItem'), + TsFormSelect: () => import('@/resources/plugins/TsForm/TsFormSelect'), RunnerGroupSetting: () => import('@/views/pages/autoexec/detail/actionDetail/runnergroup-setting.vue') }, filters: {}, @@ -156,7 +204,40 @@ export default { mappingMode: 'constant', value: '-1' }, - scriptId: null + scriptId: null, + roundCount: 32, + parallelCount: 64, + parallelPolicy: 'parallel', + parallelPolicyDataList: [ + { + text: this.$t('page.autoexecparall'), + value: 'parallel' + }, + { + text: this.$t('page.autoexecbatchround'), + value: 'roundCount' + } + ], + roundCountForm: { + placeholder: this.$t('page.selectinput'), + border: 'border', + dataList: this.getRoundCountList(), + filterName: 'text', + search: true, + transfer: true, + desc: this.$t('term.autoexec.roundcountdescrition'), + validateList: ['required'] + }, + parallelForm: { + placeholder: this.$t('page.selectinput'), + border: 'border', + dataList: this.getRoundCountList(), + filterName: 'text', + search: true, + transfer: true, + desc: this.$t('term.autoexec.paralldesc'), + validateList: ['required'] + } }; }, beforeCreate() {}, @@ -244,6 +325,9 @@ export default { isValid = this.$refs.nameForm ? this.$refs.nameForm.valid() && isValid : isValid; isValid = this.$refs.argumentConfig ? this.$refs.argumentConfig.valid() && isValid : isValid; isValid = this.$refs.executeUser ? this.$refs.executeUser.valid() && isValid : isValid; + if ((this.$refs.roundCountForm && !this.$refs.roundCountForm.valid()) || (this.$refs.parallelForm && !this.$refs.parallelForm.valid())) { + isValid = false; + } if (isValid) { this.executeAction(); } @@ -262,6 +346,12 @@ export default { val.executeConfig = this.$refs.executeForm ? this.$refs.executeForm.getFormValue() : {}; if (this.targetShow) { val.executeConfig.executeNodeConfig = this.$refs.addTarget.getValue(); + val.parallelPolicy = this.parallelPolicy; + if (this.parallelPolicy === 'roundCount') { + val.roundCount = this.roundCount; + } else { + val.parallelCount = this.parallelCount; + } } else { val.executeConfig.executeNodeConfig = []; } @@ -321,6 +411,27 @@ export default { } }); } + }, + getRoundCountList() { + let list = [ + { + value: -1, + text: '蓝绿执行' + } + ]; + list.push(...this.$utils.getRoundCountList()); + return list; + }, + changeParallelPolicy(val) { + if (val && val == 'roundCount') { + if (this.$utils.isEmpty(this.roundCount)) { + this.roundCount = 64; + } + } else { + if (this.$utils.isEmpty(this.parallelCount)) { + this.parallelCount = 32; + } + } } }, computed: {},