Procházet zdrojové kódy

fix:流水线中不可编辑属性现在能显示

chenyitao.0928 před 5 roky
rodič
revize
d85122c151
1 změnil soubory, kde provedl 11 přidání a 1 odebrání
  1. 11 1
      src/views/Project/Pipeline.vue

+ 11 - 1
src/views/Project/Pipeline.vue

@@ -198,7 +198,7 @@
                   :value="item.testId">
                 </el-option>
               </ElSelect>
-              <ElInput
+              <ElInput v-else
                 :disabled="!getStage(config.name).configs.find((config) => config.name === key).editable"
                 v-model="config.configs[key]"
               ></ElInput>
@@ -446,6 +446,16 @@ export default {
             pipelineId: id,
           })).configJson;
           this.pipelineConfig = JSON.parse(config || '{}');
+          this.pipelineConfig.forEach((item) => {
+            const targetStage = this.stages.find((stage) => stage.name === item.name);
+            if (targetStage) {
+              targetStage.configs.forEach((configTemplate) => {
+                if (!item.configs[configTemplate.name]) {
+                  item.configs[configTemplate.name] = configTemplate.value;
+                }
+              });
+            }
+          });
           this.dialogLoading = false;
           break;
         }