This commit is contained in:
linfso 2023-12-14 21:11:31 +08:00
parent 46ab730f58
commit d7cd211f2e

View File

@ -80,7 +80,6 @@ export default {
this.loading = false;
});
}
this.getTreeselect();
},
// 取消按钮
cancel() {
@ -123,32 +122,7 @@ export default {
}
});
},
/** 转换菜单数据结构 */
normalizer(node) {
if (node.children && !node.children.length) {
delete node.children;
}
return {
id: node.id,
label: node.idName,
children: node.children
};
},
/** 查询菜单下拉树结构 */
getTreeselect() {
const queryParams = {}
listEmisCountryArea(queryParams).then(response => {
this.emisCountryAreaOptions = [];
const rootItem = { idId: 0, emisCountryAreaName: '-', children: [] };
rootItem.children = this.handleTree(response.data, "id");
this.emisCountryAreaOptions.push(rootItem);
if(this.parentId != undefined) {
this.form.parentId = this.parentId;
}
});
},
}
};
</script>