fix(接口定义): 单条用例执行时保存变化内容

This commit is contained in:
fit2-zhao 2021-01-18 15:44:19 +08:00
parent 8653a20c60
commit 17fc35d01e
1 changed files with 5 additions and 3 deletions

View File

@ -188,13 +188,14 @@
} }
}, },
singleRun(data) { singleRun(data) {
data.message = true;
this.saveTestCase(data);
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 obj = {name: "copy_" + data.name, priority: data.priority, active: true, request: data.request};
this.$emit('copyCase', obj); this.$emit('copyCase', obj);
}, },
selectTestCase(item, $event) { selectTestCase(item, $event) {
if (!item.id || !this.loaded) { if (!item.id || !this.loaded) {
return; return;
@ -210,7 +211,6 @@
$event.currentTarget.className = "el-card is-always-shadow is-selected"; $event.currentTarget.className = "el-card is-always-shadow is-selected";
this.$emit('selectTestCase', item); this.$emit('selectTestCase', item);
} }
}, },
changePriority(row) { changePriority(row) {
if (row.id) { if (row.id) {
@ -242,7 +242,9 @@
row.id = data.id; row.id = data.id;
row.createTime = data.createTime; row.createTime = data.createTime;
row.updateTime = data.updateTime; row.updateTime = data.updateTime;
this.$success(this.$t('commons.save_success')); if (!row.message) {
this.$success(this.$t('commons.save_success'));
}
}); });
}, },
showInput(row) { showInput(row) {