修复权限配置数据长度过大的bug

pull/59/head
smallchill 6 years ago
parent 5e2f8854ca
commit 648200606a
  1. 2
      src/api/system/role.js
  2. 16
      src/views/authority/role.vue

@ -22,7 +22,7 @@ export const grant = (roleIds, menuIds, dataScopeIds, apiScopeIds) => {
return request({ return request({
url: '/api/blade-system/role/grant', url: '/api/blade-system/role/grant',
method: 'post', method: 'post',
params: { data: {
roleIds, roleIds,
menuIds, menuIds,
dataScopeIds, dataScopeIds,

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

Loading…
Cancel
Save