fix(版本对比): 版本对比切换标签处理

--user=郭雨琦 版本对比切换标签处理
This commit is contained in:
guoyuqi 2022-01-19 19:00:27 +08:00 committed by song-tianyang
parent d0fc490581
commit 23b4884e19
4 changed files with 52 additions and 0 deletions

View File

@ -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') {

View File

@ -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') {

View File

@ -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') {

View File

@ -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') {