| | |
| | | <el-table-column |
| | | v-if="containPermissions(['system:role:update', 'system:role:createRolePermission', 'system:role:createRoleMenu', 'system:role:delete'])" |
| | | label="操作" |
| | | min-width="330" |
| | | min-width="260" |
| | | fixed="right" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <el-button type="text" @click="$refs.operaRoleWindow.open('编辑角色', row)" icon="el-icon-edit" v-permissions="['system:role:update']">编辑</el-button> |
| | | <el-button type="text" @click="openRole(row.systemDataPermission)">数据权限</el-button> |
| | | <!-- <el-button type="text" @click="openRole(row.systemDataPermission, row.id)">数据权限</el-button>--> |
| | | <el-button type="text" @click="$refs.permissionConfigWindow.open(row)" v-permissions="['system:role:createRolePermission']">配置权限</el-button> |
| | | <el-button type="text" @click="$refs.menuConfigWindow.open(row)" icon="el-icon-menu" v-permissions="['system:role:createRoleMenu']">授权菜单</el-button> |
| | | <el-button v-if="!row.fixed" type="text" @click="deleteById(row)" icon="el-icon-delete" v-permissions="['system:role:delete']">删除</el-button> |
| | |
| | | this.search() |
| | | }, |
| | | methods: { |
| | | openRole(row) { |
| | | let customData = [] |
| | | row.customData.split(',').forEach(item => { |
| | | customData.push([item]) |
| | | }) |
| | | this.$refs.permissions.open('数据权限', { ...row, customData }) |
| | | openRole(row, id) { |
| | | if (row) { |
| | | let customData = [] |
| | | row.customData.split(',').forEach(item => { |
| | | customData.push([item]) |
| | | }) |
| | | this.$refs.permissions.open('数据权限', { ...row, customData }) |
| | | } else { |
| | | this.$refs.permissions.open('数据权限', { roleId: id, customData: [] }) |
| | | } |
| | | } |
| | | } |
| | | } |