feat(role): 添加角色菜单权限分配功能
- 后端新增 listRoleMenuByPid 接口用于获取角色菜单权限 - 前端新增 listRoleMenuByPid API 方法调用接口 - 修改角色页面布局,调整菜单授权区域宽度为6列 - 角色页面导入 listRoleMenuByPid 方法替换原有的 listMenuByPid - 更新树形菜单数据加载方法,使用新的角色菜单权限接口 - 更改前端主题变量从 cyberorange 暗色主题为 cloudsky 亮色主题
This commit is contained in:
@@ -68,7 +68,7 @@
|
||||
</el-dialog>
|
||||
<el-row :gutter="15">
|
||||
<!--角色管理-->
|
||||
<el-col :xs="24" :sm="24" :md="16" :lg="16" :xl="17" style="margin-bottom: 10px">
|
||||
<el-col span="18" style="margin-bottom: 10px">
|
||||
<el-card class="box-card" shadow="never">
|
||||
<div slot="header" class="clearfix">
|
||||
<span class="role-span">角色列表</span>
|
||||
@@ -113,7 +113,7 @@
|
||||
</el-card>
|
||||
</el-col>
|
||||
<!-- 菜单授权 -->
|
||||
<el-col :xs="24" :sm="24" :md="8" :lg="8" :xl="7">
|
||||
<el-col span="6">
|
||||
<el-card class="box-card" shadow="never">
|
||||
<div slot="header" class="clearfix">
|
||||
<el-tooltip class="item" effect="dark" content="选择指定角色分配菜单" placement="top">
|
||||
@@ -153,7 +153,7 @@
|
||||
<script>
|
||||
import crudRoles from '@/api/system/role'
|
||||
import { searchDept, searchDeptTree } from '@/api/system/dept'
|
||||
import { listChildMenuSetByMenuId, listMenuByPid } from '@/api/system/menu'
|
||||
import { listChildMenuSetByMenuId, listRoleMenuByPid } from '@/api/system/menu'
|
||||
import CRUD, { crud, form, header, presenter } from '@crud/crud'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
@@ -197,7 +197,7 @@ export default {
|
||||
methods: {
|
||||
getMenuDatas(node, resolve) {
|
||||
setTimeout(() => {
|
||||
listMenuByPid(node.data.id ? node.data.id : 0).then(res => {
|
||||
listRoleMenuByPid(node.data.id ? node.data.id : 0).then(res => {
|
||||
resolve(res)
|
||||
})
|
||||
}, 100)
|
||||
|
||||
Reference in New Issue
Block a user