fix(接口定义): 修复用例列表新建用例时标签未清空的问题

This commit is contained in:
shiziyuan9527 2021-01-27 14:56:33 +08:00
parent 99ec66a255
commit ead4963413
2 changed files with 5 additions and 3 deletions

View File

@ -212,7 +212,8 @@
this.$emit('singleRun', data);
},
copyCase(data) {
let obj = {name: "copy_" + data.name, priority: data.priority, active: true, request: data.request};
let uuid = getUUID();
let obj = {name: "copy_" + data.name, priority: data.priority, active: true, request: data.request, uuid: uuid};
this.$emit('copyCase', obj);
},
selectTestCase(item, $event) {

View File

@ -20,7 +20,7 @@
<el-container v-loading="result.loading">
<el-main>
<div v-for="(item,index) in apiCaseList" :key="index">
<div v-for="(item,index) in apiCaseList" :key="item.id ? item.id : item.uuid">
<api-case-item v-loading="singleLoading && singleRunId === item.id || batchLoadingIds.indexOf(item.id) > -1"
@refresh="refresh"
@singleRun="singleRun"
@ -243,7 +243,8 @@
if (!request.hashTree) {
request.hashTree = [];
}
let obj = {apiDefinitionId: this.api.id, name: '', priority: 'P0', active: true, tags: []};
let uuid = getUUID();
let obj = {apiDefinitionId: this.api.id, name: '', priority: 'P0', active: true, tags: [], uuid: uuid};
obj.request = request;
this.apiCaseList.unshift(obj);
}