fix(接口测试): 接口详情变更历史无变更详情日志
--bug=1009209 --user=王孝刚 [ github#8776]接口详情-变更历史无变更详情日志 https://www.tapd.cn/55049933/s/1088966
This commit is contained in:
parent
5d0367895f
commit
f2730dc27f
|
@ -220,6 +220,7 @@ export default {
|
||||||
showFollow: false,
|
showFollow: false,
|
||||||
beforeRequest: {},
|
beforeRequest: {},
|
||||||
compare: [],
|
compare: [],
|
||||||
|
isSave: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
|
@ -404,6 +405,7 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
saveCase(row, hideAlert) {
|
saveCase(row, hideAlert) {
|
||||||
|
this.isSave = true;
|
||||||
let tmp = JSON.parse(JSON.stringify(row));
|
let tmp = JSON.parse(JSON.stringify(row));
|
||||||
this.isShowInput = false;
|
this.isShowInput = false;
|
||||||
tmp.request.body = row.request.body;
|
tmp.request.body = row.request.body;
|
||||||
|
@ -451,6 +453,7 @@ export default {
|
||||||
if (!row.message) {
|
if (!row.message) {
|
||||||
this.$success(this.$t('commons.save_success'));
|
this.$success(this.$t('commons.save_success'));
|
||||||
this.reload();
|
this.reload();
|
||||||
|
this.isSave = false;
|
||||||
// 刷新编辑后用例列表
|
// 刷新编辑后用例列表
|
||||||
if (this.api.source === "editCase") {
|
if (this.api.source === "editCase") {
|
||||||
this.$emit('reLoadCase');
|
this.$emit('reLoadCase');
|
||||||
|
@ -459,6 +462,8 @@ export default {
|
||||||
this.$emit('refresh');
|
this.$emit('refresh');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}, (error) => {
|
||||||
|
this.isSave = false;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
saveTestCase(row, hideAlert) {
|
saveTestCase(row, hideAlert) {
|
||||||
|
@ -472,9 +477,11 @@ export default {
|
||||||
this.addModule(row);
|
this.addModule(row);
|
||||||
} else {
|
} else {
|
||||||
this.api.source = "editCase";
|
this.api.source = "editCase";
|
||||||
|
if (!this.isSave){
|
||||||
this.saveCase(row, hideAlert);
|
this.saveCase(row, hideAlert);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
showInput(row) {
|
showInput(row) {
|
||||||
// row.type = "create";
|
// row.type = "create";
|
||||||
|
|
|
@ -38,6 +38,10 @@
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getDiff(v1, v2) {
|
getDiff(v1, v2) {
|
||||||
|
if (this.detail.columnName==='request' && v1 && v2){
|
||||||
|
let delta = jsondiffpatch.diff(JSON.parse(v1) , JSON.parse(v2));
|
||||||
|
return formattersHtml.format(delta, JSON.parse(v1));
|
||||||
|
}
|
||||||
let delta = jsondiffpatch.diff(v1 , v2);
|
let delta = jsondiffpatch.diff(v1 , v2);
|
||||||
return formattersHtml.format(delta, v1);
|
return formattersHtml.format(delta, v1);
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue