From 1f9b84d8c6244ac736de457d438f43e610727929 Mon Sep 17 00:00:00 2001 From: dengbf Date: Fri, 27 Jun 2025 20:22:00 +0800 Subject: [PATCH] =?UTF-8?q?-[=E5=85=B3=E8=81=94]=20#[1447956513783808]?= =?UTF-8?q?=E8=87=AA=E5=8A=A8=E5=8C=96=E6=94=AF=E6=8C=81=E9=80=89=E6=8B=A9?= =?UTF-8?q?=E5=B9=B6=E5=8F=91=E6=95=B0=20http://192.168.0.96:8090/demo/rdm?= =?UTF-8?q?.html#/story-detail/939050947543040/939050947543042/14479565137?= =?UTF-8?q?83808?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../quick-service/catalog/service.vue | 199 +++++-- .../createjob/params/execute-param.vue | 488 ++++++++++++++---- 2 files changed, 536 insertions(+), 151 deletions(-) diff --git a/src/views/pages/autoexec/quick-service/catalog/service.vue b/src/views/pages/autoexec/quick-service/catalog/service.vue index 66aca1c3..29dcfb02 100644 --- a/src/views/pages/autoexec/quick-service/catalog/service.vue +++ b/src/views/pages/autoexec/quick-service/catalog/service.vue @@ -51,45 +51,102 @@ {{ $t('term.autoexec.batchsetting') }} - -
- - - -
+ + + +
@@ -703,7 +760,40 @@ export default { jobParamValue: {}, // 作业参数值 jobParamsMappingMode: {}, // 作业参数映射关系 locationKey: '', - dataConfig: null + dataConfig: null, + parallelPolicy: { + mappingMode: 'constant', + value: '' + }, + parallelPolicyForm: { + dataList: [ + { + text: this.$t('page.autoexecparall'), + value: 'parallel' + }, + { + text: this.$t('page.autoexecbatchround'), + value: 'roundCount' + } + ], + allowToggle: true, + disabled: false + }, + parallelCount: { + mappingMode: 'constant', + value: '' + }, + parallelCountForm: { + dataList: this.$utils.getRoundCountList(), + border: 'border', + filterName: 'text', + labelWidth: 0, + hideLabel: true, + search: true, + transfer: true, + desc: this.$t('term.autoexec.paralldesc'), + disabled: false + } }; }, beforeCreate() {}, @@ -752,7 +842,7 @@ export default { // 清空映射关系 this.formUuid = ''; this.$set(this.basicFormValue, 'formUuid', ''); - let clearAttrList = ['roundCount', 'protocol', 'executeUser', 'executeNode']; + let clearAttrList = ['roundCount', 'protocol', 'executeUser', 'executeNode', 'parallelCount', 'parallelPolicy']; clearAttrList.forEach(item => { if (this[item] && this[item].mappingMode && this[item].mappingMode == 'formattr') { this.$set(this[item], 'mappingMode', 'constant'); @@ -808,6 +898,9 @@ export default { this.jobParamValue = {}; this.jobParamsMappingMode = {}; this.paramsList = []; + this.parallelPolicy = { mappingMode: 'constant', value: null }; //并发策略 + this.parallelPolicyForm.disabled = false; + this.parallelCount = {mappingMode: 'constant', value: null}; //并发数量 }, async initData() { this.defaultIniData(); @@ -1051,7 +1144,15 @@ export default { }, runnerGroup: this.runnerGroup, runnerGroupTag: this.runnerGroupTag, - runtimeParamList: runtimeParamList + runtimeParamList: runtimeParamList, + parallelPolicy: { + mappingMode: this.parallelPolicy.mappingMode, + value: this.parallelPolicy.value + }, + parallelCount: { + mappingMode: this.parallelCount.mappingMode, + value: this.parallelCount.value + } } }; if (params && params.hasOwnProperty('citeForm')) { @@ -1060,6 +1161,8 @@ export default { // 组合工具已设置好的参数,这里不需要传递给后端 if (!this.needRoundCount) { delete params.config.roundCount; + delete params.config.parallelPolicy; + delete params.config.parallelCount; } if (!this.needExecuteNode) { delete params.config.executeNodeConfig; @@ -1155,14 +1258,24 @@ export default { } // 场景 this.scenarioList = scenarioList; - if (this.executeConfig.roundCount == 0 || !this.$utils.isEmpty(this.executeConfig.roundCount)) { + if (!this.$utils.isEmpty(this.executeConfig.roundCount)) { if (this.$utils.isEmpty(this.roundCount.value)) { - this.$set(this.roundCount, 'value', this.executeConfig.roundCount || 2); + this.$set(this.roundCount, 'value', this.executeConfig.roundCount); } //组合工具设置了分批数,编辑服务需要支持修改 // this.$set(this.roundCountForm, 'disabled', true); // this.$set(this.roundCountForm, 'disabledHoverTitle', this.$t('term.autoexec.setbantchnumbernoupdate')); } + if (!this.$utils.isEmpty(this.executeConfig.parallelCount)) { + if (this.$utils.isEmpty(this.parallelCount.value)) { + this.$set(this.parallelCount, 'value', this.executeConfig.parallelCount); + } + } + if (!this.$utils.isEmpty(this.executeConfig.parallelPolicy)) { + if (this.$utils.isEmpty(this.parallelPolicy.value)) { + this.$set(this.parallelPolicy, 'value', this.executeConfig.parallelPolicy); + } + } if (this.executeConfig.whenToSpecify == 'runtime') { // 过滤器运行在执行,需要把执行目标值清空 this.$set(this.executeConfig, 'executeNodeConfig', this.filterSearchValue || {}); diff --git a/src/views/pages/process/flow/flowedit/components/createjob/params/execute-param.vue b/src/views/pages/process/flow/flowedit/components/createjob/params/execute-param.vue index f035eeb8..bfbb6e95 100644 --- a/src/views/pages/process/flow/flowedit/components/createjob/params/execute-param.vue +++ b/src/views/pages/process/flow/flowedit/components/createjob/params/execute-param.vue @@ -17,121 +17,346 @@
- -
- - + + +
@@ -144,7 +369,8 @@ export default { TsFormSelect: () => import('@/resources/plugins/TsForm/TsFormSelect'), FilterList: () => import('../filter-list.vue'), ExecuteNodeReadonly: () => import('@/views/pages/autoexec/form/component/formresoureces/index.vue'), - ProtocolReadonly: () => import('./protocol-readonly') + ProtocolReadonly: () => import('./protocol-readonly'), + TsFormRadio: () => import('@/resources/plugins/TsForm/TsFormRadio') }, props: { @@ -164,13 +390,22 @@ export default { text: this.$t('term.process.formtableitem'), value: 'formTableComponent' } - ] + ], + parallelPolicyList: [ + { + text: this.$t('page.autoexecparall'), + value: 'parallel' + }, + { + text: this.$t('page.autoexecbatchround'), + value: 'roundCount' + } + ], + whitelist: ['executeNodeConfig', 'protocolId', 'executeUser'] }; }, beforeCreate() {}, - created() { - - }, + created() {}, beforeMount() {}, mounted() {}, beforeUpdate() {}, @@ -222,6 +457,25 @@ export default { } } return isValid; + }, + isShowExecuteParam(key) { + let isShow = false; + if (!this.$utils.isEmpty(this.executeParamMappingGroupList)) { + isShow = !!this.executeParamMappingGroupList.find(item => item.key === key); + } + return isShow; + }, + clearCount() { + this.executeParamMappingGroupList.forEach(item => { + if (item.key === 'roundCount' || item.key === 'parallelCount') { + this.$set(item, 'mappingList', [{ + mappingMode: '', + value: '', + column: '', + filterList: [] + }]); + } + }); } }, filter: {}, @@ -269,6 +523,24 @@ export default { } return dataList; }; + }, + getExecuteParamValue() { + return (key, attr) => { + let value = ''; + let findItem = this.executeParamMappingGroupList.find(item => item.key === key); + if (findItem) { + value = attr ? findItem[attr] : findItem; + } + return value; + }; + }, + parallelPolicyValue() { + let value = ''; + let findItem = this.executeParamMappingGroupList.find(item => item.key === 'parallelPolicy'); + if (findItem) { + value = findItem.value || (findItem.mappingList && findItem.mappingList[0] && findItem.mappingList[0].value) || ''; + } + return value; } }, watch: {} -- Gitee