|
|
@@ -188,12 +188,22 @@
|
|
|
v-model="config.active"
|
|
|
>启用该阶段</ElCheckbox>
|
|
|
</div>
|
|
|
- <ElFormItem v-for="(val, key) in config.configs" :key="key" :label="key">
|
|
|
+ <template v-for="(val, key) in config.configs" :key="key" placeholder="请选择">
|
|
|
+ <ElFormItem :label="key">
|
|
|
+ <ElSelect v-if="key === 'apiTestIds'" v-model="config.configs[key]" multiple >
|
|
|
+ <el-option
|
|
|
+ v-for="item in apiTestOptions"
|
|
|
+ :key="item.testId"
|
|
|
+ :label="item.testName"
|
|
|
+ :value="item.testId">
|
|
|
+ </el-option>
|
|
|
+ </ElSelect>
|
|
|
<ElInput
|
|
|
:disabled="!getStage(config.name).configs.find((config) => config.name === key).editable"
|
|
|
v-model="config.configs[key]"
|
|
|
></ElInput>
|
|
|
</ElFormItem>
|
|
|
+ </template>
|
|
|
</ElForm>
|
|
|
</div>
|
|
|
<template #footer>
|
|
|
@@ -322,7 +332,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { PipelineAPI } from '@/api';
|
|
|
+import { APITestAPI, PipelineAPI } from '@/api';
|
|
|
|
|
|
import { formatter } from '@/utils/time';
|
|
|
|
|
|
@@ -354,6 +364,7 @@ export default {
|
|
|
showProductionLogModal: false,
|
|
|
currentLogId: -1,
|
|
|
currentLog: '',
|
|
|
+ apiTestOptions: [],
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
|
@@ -380,6 +391,7 @@ export default {
|
|
|
this.productions = await PipelineAPI.getDeploymentsByProjectId(this.$store.state.workspace.currentProjectId);
|
|
|
this.templates = await PipelineAPI.getPipelineTemplates();
|
|
|
this.stages = await PipelineAPI.getStages();
|
|
|
+ this.apiTestOptions = await APITestAPI.getAPITestInfosByProjectId(this.$store.state.workspace.currentProjectId);
|
|
|
this.loading = false;
|
|
|
},
|
|
|
methods: {
|