改成单行进行权限控制

master
wangmeng 3 months ago
parent ef71e3c027
commit 1cf46a7dba
  1. 11
      src/views/authority/role.vue

@ -29,14 +29,14 @@
@click="handleDelete"
>
</el-button> -->
<el-button
<!-- <el-button
size="small"
icon="el-icon-setting"
@click="handleRole"
v-if="userInfo.role_name.includes('admin')"
plain
>权限设置
</el-button>
</el-button> -->
</template>
<template slot-scope="{ row }" slot="menu">
<el-button
@ -126,6 +126,7 @@ export default {
label: "title",
value: "key",
},
currentRoleId: null, //ID
menuGrantList: [],
dataScopeGrantList: [],
apiScopeGrantList: [],
@ -334,8 +335,11 @@ export default {
const menuList = this.$refs.treeMenu ? this.$refs.treeMenu.getCheckedKeys() : [];
const dataScopeList = this.$refs.treeDataScope ? this.$refs.treeDataScope.getCheckedKeys() : [];
const apiScopeList = this.$refs.treeApiScope ? this.$refs.treeApiScope.getCheckedKeys() : [];
console.log(this.idsArray, "this.idsArray")
console.log(this.selectionList, "this.idsArray")
grant(this.idsArray, menuList, dataScopeList, apiScopeList).then(() => {
// ID
grant([this.currentRoleId], menuList, dataScopeList, apiScopeList).then(() => {
this.box = false;
this.$message({
type: "success",
@ -444,6 +448,7 @@ export default {
});
},
handleRowRole(row) {
this.currentRoleId = row.id; // ID
this.menuTreeObj = [];
this.dataScopeTreeObj = [];
this.apiScopeTreeObj = [];

Loading…
Cancel
Save