fix: 导入接口没有带模块

This commit is contained in:
chenjianxing 2021-03-31 17:26:05 +08:00
parent b1a3dd3473
commit b68a0a4586
1 changed files with 14 additions and 5 deletions

View File

@ -248,6 +248,7 @@ import {Api_List} from "@/business/components/common/model/JsonData";
import HeaderCustom from "@/business/components/common/head/HeaderCustom";
import HeaderLabelOperate from "@/business/components/common/head/HeaderLabelOperate";
import {Body} from "@/business/components/api/definition/model/ApiTestModel";
import {buildNodePath} from "@/business/components/api/definition/model/NodeTree";
export default {
@ -768,13 +769,21 @@ export default {
});
},
buildApiPath(apis) {
apis.forEach((api) => {
try {
let options = [];
this.moduleOptions.forEach(item => {
if (api.moduleId === item.id) {
api.modulePath = item.path;
}
buildNodePath(item, {path: ''}, options);
});
});
apis.forEach((api) => {
options.forEach((item) => {
if (api.moduleId === item.id) {
api.modulePath = item.path;
}
})
});
} catch (e) {
console.log(e);
}
},
sort(column) {
//