fix(接口测试): 修复TCP用例和JDBC用例copy显示问题

--bug=1013754 --user=赵勇 【接口测试】TCP接口case 和 sql接口case 复制显示异常。复制完之后再打开可以正常编辑 https://www.tapd.cn/55049933/s/1171876
This commit is contained in:
fit2-zhao 2022-06-01 18:32:41 +08:00 committed by f2c-ci-robot[bot]
parent 502d6c3f59
commit b7f165c9ce
2 changed files with 6 additions and 1 deletions

View File

@ -149,7 +149,7 @@
:showScript="true"
:request="apiCase.request"
:response="apiCase.responseData"
v-if="api.protocol==='SQL'"/>
v-if="api.method==='SQL'"/>
<ms-dubbo-basis-parameters
:showScript="true"
:request="apiCase.request"

View File

@ -864,6 +864,11 @@ export default {
let uuid = getUUID();
let apiCaseRequest = JSON.parse(data.request);
apiCaseRequest.id = uuid;
if(apiCaseRequest.type === "TCPSampler"){
apiCaseRequest.method = "TCP";
}else if(apiCaseRequest.type === "JDBCSampler"){
apiCaseRequest.method = "SQL";
}
let obj = {
name: "copy_" + data.name,
apiDefinitionId: row.apiDefinitionId,