fix(接口定义): 修复加载方法

This commit is contained in:
fit2-zhao 2020-11-27 14:38:22 +08:00
parent c9e2e3e489
commit 586a6fdb64
1 changed files with 6 additions and 11 deletions

View File

@ -129,8 +129,9 @@
newLabel: ""
}
},
created() {
this.getApiGroupData()
mounted() {
this.getProjects();
this.changeProtocol();
},
watch: {
currentProject() {
@ -189,12 +190,6 @@
}
}
},
// api
getApiGroupData() {
this.getProjects();
this.getApiModuleTree();
this.changeProtocol();
},
findTreeByNodeId(rootNode, nodeId) {
if (rootNode.id == nodeId) {
return rootNode;
@ -268,9 +263,9 @@
this.getTreeNode(this.data, draggingNode.data.id, this.list);
this.$post("/api/module/drag", param, () => {
this.getApiGroupData();
this.getApiModuleTree();
}, (error) => {
this.getApiGroupData();
this.getApiModuleTree();
});
},
@ -390,7 +385,7 @@
data.projectId = this.currentProject.id;
this.$post(url, data, () => {
this.$success(this.$t('commons.save_success'));
this.getApiGroupData();
this.getApiModuleTree();
this.nextFlag = true;
return true;
});