优化代码

This commit is contained in:
smallchill 2019-02-22 21:56:49 +08:00
parent 9a7ddce149
commit 8353e6ab1a
3 changed files with 4 additions and 3 deletions

View File

@ -11,7 +11,7 @@ export const getList = (current, size, params) => {
} }
}) })
} }
export const getTree = () => { export const grantTree = () => {
return request({ return request({
url: '/api/blade-system/menu/grant-tree', url: '/api/blade-system/menu/grant-tree',
method: 'get', method: 'get',

View File

@ -17,6 +17,7 @@ export const build = (ids) => {
method: 'post', method: 'post',
params: { params: {
ids, ids,
key: 'saber'
} }
}) })
} }

View File

@ -62,7 +62,7 @@
update, update,
add, add,
grant, grant,
getTree, grantTree,
getRole, getRole,
getRoleTree getRoleTree
} from "@/api/system/role"; } from "@/api/system/role";
@ -225,7 +225,7 @@
this.$message.warning("请选择至少一条数据"); this.$message.warning("请选择至少一条数据");
return; return;
} }
getTree() grantTree()
.then(res => { .then(res => {
this.list = res.data.data; this.list = res.data.data;
return getRole(this.ids[0]); return getRole(this.ids[0]);