优化顶部菜单配置接口

dev
smallchill 6 years ago
parent 4739ae51b8
commit 1d5c83e7e8
  1. 2
      src/api/system/topmenu.js
  2. 11
      src/views/system/topmenu.vue

@ -69,7 +69,7 @@ export const grant = (topMenuIds, menuIds) => {
return request({
url: '/api/blade-system/topmenu/grant',
method: 'post',
params: {
data: {
topMenuIds,
menuIds,
}

@ -168,12 +168,19 @@
ids.push(ele.id);
});
return ids.join(",");
},
idsArray() {
let ids = [];
this.selectionList.forEach(ele => {
ids.push(ele.id);
});
return ids;
}
},
methods: {
submit() {
const menuList = this.$refs.treeMenu.getCheckedKeys().join(",");
grant(this.ids, menuList).then(() => {
const menuList = this.$refs.treeMenu.getCheckedKeys();
grant(this.idsArray, menuList).then(() => {
this.box = false;
this.$message({
type: "success",

Loading…
Cancel
Save