diff --git a/frontend/src/business/components/api/definition/components/complete/EditCompleteDubboApi.vue b/frontend/src/business/components/api/definition/components/complete/EditCompleteDubboApi.vue index 5d5baa5b7e..3698d741f2 100644 --- a/frontend/src/business/components/api/definition/components/complete/EditCompleteDubboApi.vue +++ b/frontend/src/business/components/api/definition/components/complete/EditCompleteDubboApi.vue @@ -249,6 +249,7 @@ export default { } } }); + this.dealWithTag(res.data); this.setRequest(res.data) if (!this.setRequest(res.data)) { this.oldRequest = createComponent("DubboSampler"); @@ -275,6 +276,18 @@ export default { } return false; }, + dealWithTag(api){ + if(api.tags){ + if(Object.prototype.toString.call(api.tags)==="[object String]"){ + api.tags = JSON.parse(api.tags); + } + } + if(this.basisData.tags){ + if(Object.prototype.toString.call(this.basisData.tags)==="[object String]"){ + this.basisData.tags = JSON.parse(this.basisData.tags); + } + } + }, formatApi(api) { if (api.response != null && api.response !== 'null' && api.response !== undefined) { if (Object.prototype.toString.call(api.response).match(/\[object (\w+)\]/)[1].toLowerCase() === 'object') { diff --git a/frontend/src/business/components/api/definition/components/complete/EditCompleteHTTPApi.vue b/frontend/src/business/components/api/definition/components/complete/EditCompleteHTTPApi.vue index 9756671edc..78dcd16a8c 100644 --- a/frontend/src/business/components/api/definition/components/complete/EditCompleteHTTPApi.vue +++ b/frontend/src/business/components/api/definition/components/complete/EditCompleteHTTPApi.vue @@ -573,6 +573,7 @@ export default { } } }); + this.dealWithTag(res.data); this.setRequest(res.data) if (!this.setRequest(res.data)) { this.oldRequest = createComponent("HTTPSamplerProxy"); @@ -598,6 +599,18 @@ export default { } return false; }, + dealWithTag(api){ + if(api.tags){ + if(Object.prototype.toString.call(api.tags)==="[object String]"){ + api.tags = JSON.parse(api.tags); + } + } + if(this.httpForm.tags){ + if(Object.prototype.toString.call(this.httpForm.tags)==="[object String]"){ + this.httpForm.tags = JSON.parse(this.httpForm.tags); + } + } + }, formatApi(api) { if (api.response != null && api.response !== 'null' && api.response !== undefined) { if (Object.prototype.toString.call(api.response).match(/\[object (\w+)\]/)[1].toLowerCase() === 'object') { diff --git a/frontend/src/business/components/api/definition/components/complete/EditCompleteSQLApi.vue b/frontend/src/business/components/api/definition/components/complete/EditCompleteSQLApi.vue index 928f6ade4b..0ac9627005 100644 --- a/frontend/src/business/components/api/definition/components/complete/EditCompleteSQLApi.vue +++ b/frontend/src/business/components/api/definition/components/complete/EditCompleteSQLApi.vue @@ -253,6 +253,7 @@ export default { } } }); + this.dealWithTag(res.data); this.setRequest(res.data) if (!this.setRequest(res.data)) { this.oldRequest = createComponent("JDBCSampler"); @@ -282,6 +283,18 @@ export default { } return false; }, + dealWithTag(api){ + if(api.tags){ + if(Object.prototype.toString.call(api.tags)==="[object String]"){ + api.tags = JSON.parse(api.tags); + } + } + if(this.basisData.tags){ + if(Object.prototype.toString.call(this.basisData.tags)==="[object String]"){ + this.basisData.tags = JSON.parse(this.basisData.tags); + } + } + }, formatApi(api) { if (api.response != null && api.response !== 'null' && api.response !== undefined) { if (Object.prototype.toString.call(api.response).match(/\[object (\w+)\]/)[1].toLowerCase() === 'object') { diff --git a/frontend/src/business/components/api/definition/components/complete/EditCompleteTCPApi.vue b/frontend/src/business/components/api/definition/components/complete/EditCompleteTCPApi.vue index 959e41d6e5..aebb663950 100644 --- a/frontend/src/business/components/api/definition/components/complete/EditCompleteTCPApi.vue +++ b/frontend/src/business/components/api/definition/components/complete/EditCompleteTCPApi.vue @@ -377,6 +377,7 @@ export default { } } }); + this.dealWithTag(res.data); this.setRequest(res.data) if (!this.setRequest(res.data)) { this.oldRequest = createComponent("TCPSampler"); @@ -403,6 +404,18 @@ export default { } return false; }, + dealWithTag(api){ + if(api.tags){ + if(Object.prototype.toString.call(api.tags)==="[object String]"){ + api.tags = JSON.parse(api.tags); + } + } + if(this.basisData.tags){ + if(Object.prototype.toString.call(this.basisData.tags)==="[object String]"){ + this.basisData.tags = JSON.parse(this.basisData.tags); + } + } + }, formatApi(api) { if (api.response != null && api.response !== 'null' && api.response !== undefined) { if (Object.prototype.toString.call(api.response).match(/\[object (\w+)\]/)[1].toLowerCase() === 'object') {