| | |
| | | @mouseover="isScroll='left'" |
| | | > |
| | | <div style=" "> |
| | | <i class="el-icon-s-operation" :style="{color:$store.state.settings.theme}" /> 菜单权限 |
| | | <i class="el-icon-s-operation" :style="{color:$store.state.settings.theme}"/> 菜单权限 |
| | | </div> |
| | | |
| | | <el-tree |
| | |
| | | <!-- </div>--> |
| | | </div> |
| | | </el-tab-pane> |
| | | <!-- <el-tab-pane label="APP端" name="APP">--> |
| | | <!-- <div style="display: flex;">--> |
| | | <!-- <div--> |
| | | <!-- ref="scrollLeft"--> |
| | | <!-- style="border-right: 1px solid rgba(0,0,0,0.2);width:100%;--> |
| | | <!-- overflow-y: auto;overflow-x:hidden;"--> |
| | | <!-- :style="{height:(tableHeight-40)+'px'}"--> |
| | | <!-- @scroll="scrollLeftScroll()"--> |
| | | <!-- @mouseover="isScroll='left'"--> |
| | | <!-- >--> |
| | | <!-- <div style=" ">--> |
| | | <!-- <i class="el-icon-s-operation" :style="{color:$store.state.settings.theme}" /> 菜单权限--> |
| | | <!-- </div>--> |
| | | <!-- <el-tab-pane label="APP端" name="APP">--> |
| | | <!-- <div style="display: flex;">--> |
| | | <!-- <div--> |
| | | <!-- ref="scrollLeft"--> |
| | | <!-- style="border-right: 1px solid rgba(0,0,0,0.2);width:100%;--> |
| | | <!-- overflow-y: auto;overflow-x:hidden;"--> |
| | | <!-- :style="{height:(tableHeight-40)+'px'}"--> |
| | | <!-- @scroll="scrollLeftScroll()"--> |
| | | <!-- @mouseover="isScroll='left'"--> |
| | | <!-- >--> |
| | | <!-- <div style=" ">--> |
| | | <!-- <i class="el-icon-s-operation" :style="{color:$store.state.settings.theme}" /> 菜单权限--> |
| | | <!-- </div>--> |
| | | |
| | | <!-- <el-tree--> |
| | | <!-- ref="treeCenterAPPRef"--> |
| | | <!-- style="padding-top: 10px;"--> |
| | | <!-- :data="treeCenter"--> |
| | | <!-- highlight-current--> |
| | | <!-- :props="defaultPropsCenter"--> |
| | | <!-- show-checkbox--> |
| | | <!-- node-key="menucode"--> |
| | | <!-- :default-expand-all="true"--> |
| | | <!-- @check-change="handleTreeCenterCheckChange"--> |
| | | <!-- @check="handleTreeCenterCheck"--> |
| | | <!-- @node-click="getLeftTreeNode"--> |
| | | <!-- />--> |
| | | <!-- </div>--> |
| | | <!-- </div>--> |
| | | <!-- </el-tab-pane>--> |
| | | <!-- <el-tree--> |
| | | <!-- ref="treeCenterAPPRef"--> |
| | | <!-- style="padding-top: 10px;"--> |
| | | <!-- :data="treeCenter"--> |
| | | <!-- highlight-current--> |
| | | <!-- :props="defaultPropsCenter"--> |
| | | <!-- show-checkbox--> |
| | | <!-- node-key="menucode"--> |
| | | <!-- :default-expand-all="true"--> |
| | | <!-- @check-change="handleTreeCenterCheckChange"--> |
| | | <!-- @check="handleTreeCenterCheck"--> |
| | | <!-- @node-click="getLeftTreeNode"--> |
| | | <!-- />--> |
| | | <!-- </div>--> |
| | | <!-- </div>--> |
| | | <!-- </el-tab-pane>--> |
| | | <!-- <el-tab-pane label="工控端" name="工控端">工控端</el-tab-pane>--> |
| | | </el-tabs> |
| | | |
| | |
| | | |
| | | export default { |
| | | name: 'PowerDivider', |
| | | directives: { waves }, |
| | | directives: {waves}, |
| | | data() { |
| | | return { |
| | | mainHeight: 0, |
| | |
| | | |
| | | // 获取角色权限查询角色 |
| | | async getRolePermissionSearchRole() { |
| | | const { data: res } = await RolePermissionSearchRole() |
| | | const {data: res} = await RolePermissionSearchRole() |
| | | this.treeLeft = res |
| | | |
| | | let rolecode = '' |
| | |
| | | |
| | | // 获取菜单权限对应的按钮 |
| | | async getRolePermissionSearchRoleMenuButton(rolecode) { |
| | | const { data: res } = await RolePermissionSearchRoleMenuButton({ rolecode, type: this.activeName }) |
| | | const {data: res} = await RolePermissionSearchRoleMenuButton({rolecode, type: this.activeName}) |
| | | this.allButtonData = res.length > 0 ? JSON.parse(res[0].jsondate) : [] |
| | | }, |
| | | // 获取菜单权限 |
| | | async getRolePermissionSearchRoleMenu(rolecode) { |
| | | const { data: res } = await RolePermissionSearchRoleMenu({ rolecode, type: this.activeName }) |
| | | const {data: res} = await RolePermissionSearchRoleMenu({rolecode, type: this.activeName}) |
| | | |
| | | // 拿到数组list转换成树形tree |
| | | const result = arrayToTree(res, { |
| | |
| | | }) |
| | | |
| | | this.treeCenter = [ |
| | | { menucode: '-1', menuname: '全部', children: result } |
| | | {menucode: '-1', menuname: '全部', children: result} |
| | | ] |
| | | |
| | | this.treeCenter[0].children.sort((a, b) => a.menu_seq - b.menu_seq) |
| | |
| | | this.$forceUpdate() |
| | | }, |
| | | // 处理中间树形勾选 |
| | | handleTreeCenterCheck(obj, { checkedNodes, checkedKeys, halfCheckedNodes, halfCheckedKeys }) { |
| | | handleTreeCenterCheck(obj, {checkedNodes, checkedKeys, halfCheckedNodes, halfCheckedKeys}) { |
| | | // console.log(obj, checkedNodes, checkedKeys, halfCheckedNodes, halfCheckedKeys, '加多宝') |
| | | |
| | | if (checkedKeys.length === 0) { // 树形菜单全不选的情况下 |
| | |
| | | this.$notify.success(rolename + '的角色权限提交成功!') |
| | | await this.getRolePermissionSearchRoleMenuButton(rolecode) |
| | | this.$store.state.app.buttonIsDisabled = false |
| | | |
| | | setTimeout(() => { |
| | | location.reload() |
| | | }, 2000) |
| | | } |
| | | }, |
| | | // 获取页面高度 |