diff --git a/src/views/pages/autoexec/quick-service/catalog/service.vue b/src/views/pages/autoexec/quick-service/catalog/service.vue index 0fc296cfb8d3a0b0c11ac9a2e8675afbfe1a9f79..518480818deb401ff973caeb1f626244141bbb36 100644 --- a/src/views/pages/autoexec/quick-service/catalog/service.vue +++ b/src/views/pages/autoexec/quick-service/catalog/service.vue @@ -284,10 +284,13 @@ {{ $t('term.autoexec.executetarget') }} - + @@ -804,7 +807,8 @@ export default { desc: this.$t('term.autoexec.paralldesc'), disabled: false }, - preCondition: null + preCondition: null, + newPreCondition: null // 服务目录从新设置前置条件 }; }, beforeCreate() {}, @@ -914,6 +918,7 @@ export default { this.parallelPolicyForm.disabled = false; this.parallelCount = {mappingMode: 'constant', value: null}; //并发数量 this.preCondition = null; + this.newPreCondition = null; }, async initData() { this.defaultIniData(); @@ -965,10 +970,10 @@ export default { if (config) { for (let key in config) { if (!this.$utils.isEmpty(config[key])) { - this[key] = config[key]; // 分批数量,执行目标,执行器组标签,执行器组 + this[key] = config[key]; // 分批数量,执行目标,执行器组标签,执行器组 ,前置条件 } } - if (config && !this.$utils.isEmpty(runtimeParamList)) { + if (!this.$utils.isEmpty(runtimeParamList)) { runtimeParamList.forEach(item => { if (item.key) { this.$set(this.jobParamValue, [item.key], item.value); @@ -985,6 +990,9 @@ export default { this.$set(this.executeNode, 'mappingMode', executeNodeConfig.mappingMode || 'constant'); this.$set(this.executeNode, 'value', executeNodeConfig.value); } + if (config.preCondition) { + this.newPreCondition = this.$utils.deepClone(config.preCondition); + } } this.basicFormItemList && this.basicFormItemList.forEach(item => { @@ -1200,6 +1208,9 @@ export default { // 组合工具,执行器组标签如果是作业参数,不需要传递给后端 delete params.config.runnerGroupTag; } + if (this.newPreCondition) { + params.config.preCondition = this.newPreCondition; + } if (params && params.config) { // 删除额外的属性,不需要传递给后端 const { runnerGroupTag, runnerGroup } = params.config; @@ -1317,7 +1328,7 @@ export default { this.executeUser.value = this.executeUser && this.executeUser.value ? this.executeUser.value : executeConfig['executeUser'] ? executeConfig['executeUser']['value'] : ''; this.protocol.value = this.protocol && this.protocol.value ? this.protocol.value : executeConfig['protocolId']; } - if (!this.$utils.isEmpty(executeConfig.preCondition)) { + if (this.$utils.isEmpty(this.newPreCondition) && !this.$utils.isEmpty(executeConfig.preCondition)) { this.preCondition = executeConfig.preCondition; } } @@ -1329,6 +1340,10 @@ export default { changeParallelPolicy(val) { this.roundCount.value = null; this.parallelCount.value = null; + }, + changePreCondition(val) { + this.preCondition = val; + this.newPreCondition = this.$utils.deepClone(val) || {}; } }, filter: {}, diff --git a/src/views/pages/autoexec/quick-service/service-catalog/no-form-service-edit.vue b/src/views/pages/autoexec/quick-service/service-catalog/no-form-service-edit.vue index d5508a036fcad7033cfc79872c09de947f57274f..991f5b8f599ead7e4ef4576769eddd48f9415c1c 100644 --- a/src/views/pages/autoexec/quick-service/service-catalog/no-form-service-edit.vue +++ b/src/views/pages/autoexec/quick-service/service-catalog/no-form-service-edit.vue @@ -562,6 +562,10 @@ export default { if (this.runtimeParamList && !this.$utils.isEmpty(this.runtimeParamList)) { this.initConfig(); // 设置作业参数值 } + //服务目录前置条件 + if (this.defaultData['config'].hasOwnProperty('preCondition')) { + this.$set(this.executeConfig, 'preCondition', this.defaultData['config'].preCondition); + } } }); }, diff --git a/src/views/pages/autoexec/quick-service/service-catalog/other-params.vue b/src/views/pages/autoexec/quick-service/service-catalog/other-params.vue index 55878c4804c80246767391605ede9cbf5d9e7685..055cb2b4032616ee2a8aedd0e616c853e948e67a 100644 --- a/src/views/pages/autoexec/quick-service/service-catalog/other-params.vue +++ b/src/views/pages/autoexec/quick-service/service-catalog/other-params.vue @@ -130,9 +130,11 @@ :label="$t('term.autoexec.precondition')" > +
-
{