fix (接口自动化): 修复导入步骤问题

--bug=1007452 --user=赵勇 【接口测试】场景导入tcp接口后,再次导入接口报错 https://www.tapd.cn/55049933/s/1058800
This commit is contained in:
fit2-zhao 2021-10-25 18:26:39 +08:00 committed by fit2-zhao
parent ed512308e5
commit 1f5de735fd
3 changed files with 6 additions and 9 deletions

View File

@ -259,7 +259,8 @@ export default {
let currentScenario = {
status: "Underway", principal: getCurrentUser().id,
apiScenarioModuleId: "default-module", id: getUUID(),
modulePath: "/" + this.$t("commons.module_title")
modulePath: "/" + this.$t("commons.module_title"),
level: "P0"
};
if (this.nodeTree && this.nodeTree.length > 0) {
currentScenario.apiScenarioModuleId = this.nodeTree[0].id;
@ -279,6 +280,9 @@ export default {
let name = getUUID().substring(0, 8);
this.activeName = name;
label = tab.currentScenario.name;
if (!tab.currentScenario.level) {
tab.currentScenario.level = "P0";
}
this.tabs.push({label: label, name: name, currentScenario: tab.currentScenario});
}
if (this.$refs && this.$refs.autoScenarioConfig) {

View File

@ -53,7 +53,7 @@
</el-col>
<el-col :span="7">
<el-form-item :label="$t('test_track.case.priority')" prop="level">
<el-select class="ms-scenario-input" size="small" v-model="level">
<el-select class="ms-scenario-input" size="small" v-model="currentScenario.level">
<el-option v-for="item in levels" :key="item.id" :label="item.label" :value="item.id"/>
</el-select>
</el-form-item>
@ -407,7 +407,6 @@ export default {
value: API_STATUS[0].id,
options: API_STATUS,
levels: PRIORITY,
level: "P0",
scenario: {},
loading: false,
showHideTree: true,

View File

@ -133,12 +133,6 @@ export default {
},
open() {
this.buttonIsWorking = false;
if (this.$refs.apiList) {
this.$refs.apiList.clearSelection();
}
if (this.$refs.apiCaseList) {
this.$refs.apiCaseList.clearSelection();
}
this.$refs.baseRelevance.open();
},
isApiListEnableChange(data) {