修复权限配置数据长度过大的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({
url: '/api/blade-system/role/grant',
method: 'post',
params: {
data: {
roleIds,
menuIds,
dataScopeIds,

@ -209,16 +209,24 @@
let ids = [];
this.selectionList.forEach(ele => {
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(",");
const dataScopeList = this.$refs.treeDataScope.getCheckedKeys().join(",");
const apiScopeList = this.$refs.treeApiScope.getCheckedKeys().join(",");
grant(this.ids, menuList, dataScopeList, apiScopeList).then(() => {
const menuList = this.$refs.treeMenu.getCheckedKeys();
const dataScopeList = this.$refs.treeDataScope.getCheckedKeys();
const apiScopeList = this.$refs.treeApiScope.getCheckedKeys();
grant(this.idsArray, menuList, dataScopeList, apiScopeList).then(() => {
this.box = false;
this.$message({
type: "success",

Loading…
Cancel
Save