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); this.$emit('singleRun', data);
}, },
copyCase(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); this.$emit('copyCase', obj);
}, },
selectTestCase(item, $event) { selectTestCase(item, $event) {

View File

@ -20,7 +20,7 @@
<el-container v-loading="result.loading"> <el-container v-loading="result.loading">
<el-main> <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" <api-case-item v-loading="singleLoading && singleRunId === item.id || batchLoadingIds.indexOf(item.id) > -1"
@refresh="refresh" @refresh="refresh"
@singleRun="singleRun" @singleRun="singleRun"
@ -243,7 +243,8 @@
if (!request.hashTree) { if (!request.hashTree) {
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; obj.request = request;
this.apiCaseList.unshift(obj); this.apiCaseList.unshift(obj);
} }