fix(接口测试): 接口CASE复制后,显示接口名称的地方显示了ID
--user=郭雨琦 --bug=1014075 【接口测试】【特殊数据】接口CASE复制后,显示接口名称的地方显示了ID https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001014075
This commit is contained in:
parent
4993d23970
commit
4b23b18677
|
@ -864,7 +864,15 @@ export default {
|
|||
});
|
||||
},
|
||||
handleCopy(row) {
|
||||
this.$get('/api/testcase/findById/' + row.id, (response) => {
|
||||
this.$get('/api/definition/get/' + row.apiDefinitionId, (response) => {
|
||||
let api = response.data;
|
||||
if (api) {
|
||||
this.getCaseAndOpen(row.id, api.name, row.apiDefinitionId);
|
||||
}
|
||||
});
|
||||
},
|
||||
getCaseAndOpen(id, apiName, apiId) {
|
||||
this.$get('/api/testcase/findById/' + id, (response) => {
|
||||
let data = response.data;
|
||||
let uuid = getUUID();
|
||||
let apiCaseRequest = JSON.parse(data.request);
|
||||
|
@ -874,9 +882,10 @@ export default {
|
|||
} else if (apiCaseRequest.type === "JDBCSampler") {
|
||||
apiCaseRequest.method = "SQL";
|
||||
}
|
||||
apiCaseRequest.name = apiName;
|
||||
let obj = {
|
||||
name: "copy_" + data.name,
|
||||
apiDefinitionId: row.apiDefinitionId,
|
||||
apiDefinitionId: apiId,
|
||||
versionId: data.versionId,
|
||||
priority: data.priority,
|
||||
active: true,
|
||||
|
|
Loading…
Reference in New Issue