refactor(system): 优化系统模块接口命名和参数校验
- 重构了多个控制器的查询接口,统一命名规范 - 新增参数校验,提高接口健壮性 - 更新了前端 API调用,以适应后端接口变更 - 优化了部分前端组件的错误提示文案
This commit is contained in:
@@ -93,7 +93,7 @@
|
||||
ref="table"
|
||||
v-loading="crud.loading"
|
||||
lazy
|
||||
:load="getMenus"
|
||||
:load="queryMenuByArgs"
|
||||
:data="crud.data"
|
||||
:tree-props="{children: 'children', hasChildren: 'hasChildren'}"
|
||||
row-key="id"
|
||||
@@ -199,14 +199,14 @@ export default {
|
||||
this.menus.push({ id: 0, label: '顶级类目', children: null })
|
||||
}
|
||||
},
|
||||
getMenus(tree, treeNode, resolve) {
|
||||
queryMenuByArgs(tree, treeNode, resolve) {
|
||||
const params = {
|
||||
page: 1,
|
||||
size: 999999,
|
||||
args: { pid: tree.id }
|
||||
}
|
||||
setTimeout(() => {
|
||||
crudMenu.getMenus(params).then(res => {
|
||||
crudMenu.queryMenuByArgs(params).then(res => {
|
||||
resolve(res.content)
|
||||
})
|
||||
}, 100)
|
||||
|
||||
Reference in New Issue
Block a user