Commit c5776489 authored by Administrator's avatar Administrator

超级管理员-用户设备管理

parent 0ec0d665
Pipeline #76 canceled with stages
<template>
<div v-if="!item.hidden&&item.children" class="menu-wrapper">
<div v-if="!item.hidden && item.children && adminHiddenItem(item.path)" class="menu-wrapper">
<template v-if="hasOneShowingChild(item.children,item) && (!onlyOneChild.children||onlyOneChild.noShowingChildren)&&!item.alwaysShow">
<app-link :to="resolvePath(onlyOneChild.path)">
<el-menu-item :index="resolvePath(onlyOneChild.path)" :class="{'submenu-title-noDropdown':!isNest}">
......@@ -68,6 +68,16 @@ export default {
},
},
methods: {
// 用户设备管理在超级管理员中不显示
adminHiddenItem(path) {
let show = true;
if (localStorage.getItem('userOrAdmin') === '2') {
if (path === '/userdevice') {
show = false;
}
}
return show;
},
hasOneShowingChild(children, parent) {
const showingChildren = children.filter(item => {
if (item.hidden) {
......
......@@ -8,6 +8,7 @@ const userdeviceRoutes = {
meta: {
title: '用户设备管理',
icon: 'device',
permissions: ['view menu userdevice'],
},
children: [
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment