fix (接口定义): 修复case复制显示问题

--bug=1006466 --user=赵勇 【github#6021】CASE复制,会出现无法查看到测试用例的请求参数,也没有复制url https://www.tapd.cn/55049933/s/1045940
This commit is contained in:
fit2-zhao 2021-09-13 15:14:49 +08:00 committed by fit2-zhao
parent 6b6cd726a3
commit 58009a10c0
2 changed files with 14 additions and 4 deletions

View File

@ -444,13 +444,13 @@ export default {
if (!row.message) {
this.$success(this.$t('commons.save_success'));
this.reload();
if (!hideAlert) {
this.$emit('refresh');
}
//
if (this.api.source === "editCase") {
this.$store.state.currentApiCase = {refresh: "true"};
}
if (!hideAlert) {
this.$emit('refresh');
}
}
});
},

View File

@ -190,6 +190,17 @@ export default {
},
copy(apiCase) {
this.api.id = apiCase.apiDefinitionId;
if (apiCase && apiCase.request) {
if (apiCase.request.type === "HTTPSamplerProxy") {
this.api.protocol = "HTTP";
this.api.source = "editCase";
}
this.api.method = apiCase.request.method
this.api.name = apiCase.request.name;
}
if(apiCase.tags){
apiCase.tags =JSON.parse(apiCase.tags);
}
this.condition = {components: API_CASE_CONFIGS};
this.sysAddition(apiCase);
this.visible = true;
@ -257,7 +268,6 @@ export default {
//this.$emit("refresh");
},
refresh() {
this.getApiTest();
this.$emit('refresh');
},
selectAll(isSelectAll) {