fix(接口测试): 接口详情变更历史无变更详情日志
--bug=1009209 --user=王孝刚 [ github#8776]接口详情-变更历史无变更详情日志 https://www.tapd.cn/55049933/s/1088966
This commit is contained in:
parent
5d0367895f
commit
f2730dc27f
|
@ -8,7 +8,7 @@
|
|||
<el-input v-if="!apiCase.id || isShowInput" size="small" v-model="apiCase.name" :name="index" :key="index"
|
||||
class="ms-api-header-select" style="width: 180px"
|
||||
:readonly="!hasPermission('PROJECT_API_DEFINITION:READ+EDIT_CASE')"
|
||||
@blur="saveTestCase(apiCase,true)" :placeholder="$t('commons.input_name')" ref="nameEdit"/>
|
||||
@blur="saveTestCase(apiCase , true)" :placeholder="$t('commons.input_name')" ref="nameEdit"/>
|
||||
<span v-else>
|
||||
<el-tooltip :content="apiCase.id ? apiCase.name : ''" placement="top">
|
||||
<span>{{ apiCase.id ? apiCase.name : '' | ellipsis }}</span>
|
||||
|
@ -220,6 +220,7 @@ export default {
|
|||
showFollow: false,
|
||||
beforeRequest: {},
|
||||
compare: [],
|
||||
isSave: false
|
||||
}
|
||||
},
|
||||
props: {
|
||||
|
@ -404,6 +405,7 @@ export default {
|
|||
}
|
||||
},
|
||||
saveCase(row, hideAlert) {
|
||||
this.isSave = true;
|
||||
let tmp = JSON.parse(JSON.stringify(row));
|
||||
this.isShowInput = false;
|
||||
tmp.request.body = row.request.body;
|
||||
|
@ -451,6 +453,7 @@ export default {
|
|||
if (!row.message) {
|
||||
this.$success(this.$t('commons.save_success'));
|
||||
this.reload();
|
||||
this.isSave = false;
|
||||
// 刷新编辑后用例列表
|
||||
if (this.api.source === "editCase") {
|
||||
this.$emit('reLoadCase');
|
||||
|
@ -459,6 +462,8 @@ export default {
|
|||
this.$emit('refresh');
|
||||
}
|
||||
}
|
||||
}, (error) => {
|
||||
this.isSave = false;
|
||||
});
|
||||
},
|
||||
saveTestCase(row, hideAlert) {
|
||||
|
@ -472,7 +477,9 @@ export default {
|
|||
this.addModule(row);
|
||||
} else {
|
||||
this.api.source = "editCase";
|
||||
this.saveCase(row, hideAlert);
|
||||
if (!this.isSave){
|
||||
this.saveCase(row, hideAlert);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
@ -38,7 +38,11 @@
|
|||
},
|
||||
methods: {
|
||||
getDiff(v1, v2) {
|
||||
let delta = jsondiffpatch.diff(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);
|
||||
return formattersHtml.format(delta, v1);
|
||||
},
|
||||
handleClose() {
|
||||
|
|
Loading…
Reference in New Issue