fix: 导入接口没有带模块
This commit is contained in:
parent
b1a3dd3473
commit
b68a0a4586
|
@ -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) {
|
||||
// 每次只对一个字段排序
|
||||
|
|
Loading…
Reference in New Issue