fix(接口测试): 修复idea导入接口点击编辑模块信息缺失问题
https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001018293 --user=郭雨琦
This commit is contained in:
parent
fee74cc65d
commit
f347fa3718
|
@ -815,20 +815,16 @@ export default {
|
|||
}
|
||||
},
|
||||
editApiModule(row) {
|
||||
if (this.moduleOptions && this.moduleOptions.length === 0) {
|
||||
getApiModuleByProjectIdAndProtocol(row.projectId, row.protocol).then(response => {
|
||||
if (response.data) {
|
||||
response.data.forEach(node => {
|
||||
node.name = node.name === '未规划接口' ? this.$t('api_test.definition.unplanned_api') : node.name
|
||||
buildTree(node, {path: ''});
|
||||
});
|
||||
this.moduleOptions = response.data;
|
||||
}
|
||||
this.editApi(row);
|
||||
});
|
||||
} else {
|
||||
getApiModuleByProjectIdAndProtocol(row.projectId, row.protocol).then(response => {
|
||||
if (response.data) {
|
||||
response.data.forEach(node => {
|
||||
node.name = node.name === '未规划接口' ? this.$t('api_test.definition.unplanned_api') : node.name
|
||||
buildTree(node, {path: ''});
|
||||
});
|
||||
this.moduleOptions = response.data;
|
||||
}
|
||||
this.editApi(row);
|
||||
}
|
||||
});
|
||||
},
|
||||
editApi(row) {
|
||||
const index = this.apiTabs.find(p => p.api && p.api.id === row.id);
|
||||
|
|
Loading…
Reference in New Issue