TheLayoutHeader1.vue 30.1 KB
Newer Older
YazhouChen's avatar
YazhouChen committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
<template>
  <div>
    <el-menu :uniqueOpened="true" :router="true"  mode="horizontal" class="menuNav"
             backgroundColor="#273238" textColor="white" activeTextColor="#409EFF">
<!--    <el-menu :uniqueOpened="true" :router="true"  mode="horizontal" class="menuNav"-->
<!--             backgroundColor="#409EFF"   textColor="#fff" activeTextColor="#ffd04b">-->
      <el-submenu v-if="submenuShow1" index="1">
        <template slot="title" class="el-menu-item">{{$t('TheLayoutHeader.resourceManagement')}}</template>
        <el-menu-item index="/TheLayout/SubnetConfigurationManagement" v-if="submenu102show">{{$t('TheLayoutHeader.subnetConfigurationManagement')}}</el-menu-item>
<!--        <el-menu-item index="/TheLayout/LocationConfigurationManagement" v-if="submenu103show">{{$t('TheLayoutHeader.locationConfigurationManagement')}}</el-menu-item>-->
<!--        <el-menu-item index="/TheLayout/CabinetConfigurationManagement" v-if="submenu104show">{{$t('TheLayoutHeader.cabinetConfigurationManagement')}}</el-menu-item>-->
        <el-menu-item index="/TheLayout/ElementDiscoveryTemplateManagement" v-if="ElementDiscoveryTemplateManagementShow">{{$t('TheLayoutHeader.elementDiscoveryTemplateManagement')}}</el-menu-item>
        <el-menu-item index="/TheLayout/ElementDiscoveryManagement" v-if="ElementDiscoveryManagementShow">{{$t('TheLayoutHeader.elementDiscoveryManagement')}}</el-menu-item>
        <el-menu-item index="/TheLayout/DeviceManagement" v-if="DeviceManagementShow">{{$t('TheLayoutHeader.elementManagement')}}</el-menu-item>
        <el-menu-item index="/TheLayout/BookManagement" v-if="BookManagementShow">{{$t('TheLayoutHeader.BookManagement')}}</el-menu-item>
        <el-menu-item index="/TheLayout/ManualStartDeviceConfiguration" v-if="ManualStartDeviceConfigurationShow">{{$t('TheLayoutHeader.manualStartDeviceConfiguration')}}</el-menu-item>
        <el-menu-item index="/TheLayout/LinkConfigurationManagement" v-if="LinkConfigurationManagementShow">{{$t('TheLayoutHeader.linkConfigurationManagement')}}</el-menu-item>
        <el-menu-item index="/TheLayout/DeviceCreatPort" v-if="DeviceCreatPortShow">{{$t('TheLayoutHeader.deviceCreatPort')}}</el-menu-item>
19 20 21
        <el-menu-item index="/TheLayout/shuxing">g区域管理</el-menu-item>
        <el-menu-item index="/TheLayout/tuoputu" >g拓扑图</el-menu-item>
        <el-menu-item index="/TheLayout/lianlu" >g链路管理</el-menu-item>
YazhouChen's avatar
YazhouChen committed
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229
      </el-submenu>

      <el-submenu v-if="submenuShow2" index="2">
        <template slot="title">{{$t('TheLayoutHeader.topologyManagement')}}</template>
        <el-menu-item index="/TheLayout/DeviceConfigurationManagement" v-if="submenu201show">{{$t('TheLayoutHeader.deviceConfigurationManagement')}}</el-menu-item>
        <el-menu-item index="/TheLayout/FirmWareConfigurationManagement" v-if="submenu205show">{{$t('TheLayoutHeader.firmWareConfigurationManagement')}}</el-menu-item>
      </el-submenu>

<!--      <el-submenu v-if="submenu3show" index="3">-->
<!--        <template slot="title">{{ $t("TheLayoutHeader.businessManagement") }}</template>-->
<!--        <el-menu-item index="/TheLayout/EthernetELineServiceConfigurationManagementFather" v-if="submenu301show">{{$t('TheLayoutHeader.ethernetELineServiceConfigurationManagement')}}</el-menu-item>-->
<!--        <el-menu-item index="/TheLayout/EveModelConfigurationManagementFather" v-if="submenu302show">{{$t('TheLayoutHeader.serviceTemplateConfiguration')}}</el-menu-item>-->
<!--        <el-menu-item index="/TheLayout/ServiceTypeConfigurationManagement" v-if="submenu303show">{{$t('TheLayoutHeader.serviceTypeConfigurationManagement')}}</el-menu-item>-->
<!--        <el-menu-item index="/TheLayout/EveSubnetConfigurationManagementFather" v-if="submenu304show">{{$t('TheLayoutHeader.EveSubnetConfigurationManagement')}}</el-menu-item>-->
<!--        <el-menu-item index="/TheLayout/CDPProfile" v-if="submenu305show">{{$t('TheLayoutHeader.CDPProfile')}}</el-menu-item>-->
<!--        <el-menu-item index="/TheLayout/NetworkPhysicsLinkConfigurationManagement" v-if="submenu306show">{{$t('TheLayoutHeader.NetworkPhysicsLinkConfigurationManagement')}}</el-menu-item>-->
<!--        <el-menu-item index="/TheLayout/TopologicalDynamicConfiguration" v-if="submenu307show">{{$t('TheLayoutHeader.topologicalDynamicConfiguration')}}</el-menu-item>-->
<!--      </el-submenu>-->

      <el-submenu v-if="submenuShow3" index="alarm">
        <template slot="title">{{ $t("TheLayoutHeader.alarmManagement") }}</template>
        <el-menu-item index="/TheLayout/AlarmLevelManagement" v-if="AlarmLevelManagementShow">{{$t('TheLayoutHeader.alarmTypeConfiguration')}}</el-menu-item>
        <el-menu-item index="/TheLayout/AlarmConfigManagement" v-if="AlarmConfigManagementShow">{{$t('TheLayoutHeader.alarmLevelConfiguration')}}</el-menu-item>
        <el-menu-item index="/TheLayout/AlarmFilerManagement" v-if="AlarmFilerManagementShow">{{$t('TheLayoutHeader.alarmFilterConfiguration')}}</el-menu-item>
        <el-menu-item index="/TheLayout/AlarmQuery" v-if="AlarmQueryShow">{{$t('TheLayoutHeader.alarmQuery')}}</el-menu-item>
        <el-menu-item index="/TheLayout/AlarmStatistics" v-if="AlarmStatisticsShow">{{$t('TheLayoutHeader.alarmStatistics')}}</el-menu-item>
        <el-menu-item index="/TheLayout/AlarmReports" v-if="AlarmReportsShow">{{$t('TheLayoutHeader.alarmReports')}}</el-menu-item>
        <el-menu-item index="/TheLayout/AlarmMangExp" v-if="AlarmMangExp">{{$t('TheLayoutHeader.AlarmMangExp')}}</el-menu-item>
      </el-submenu>

      <el-submenu v-if="submenuShow4" index="perform">
        <template slot="title">{{ $t("TheLayoutHeader.performanceManagement") }}</template>
        <el-menu-item index="/TheLayout/IndexTemplate" v-if="IndexTemplateShow">{{$t('TheLayoutHeader.IndexTemplate')}}</el-menu-item>
        <el-menu-item index="/TheLayout/PerformanceThreshold" v-if="PerformanceThresholdShow">{{$t('TheLayoutHeader.performanceThreshold')}}</el-menu-item>
        <el-menu-item index="/TheLayout/PerformanceDataQuery" v-if="PerformanceDataQueryShow">{{$t('TheLayoutHeader.performanceQuery')}}</el-menu-item>
        <el-menu-item index="/TheLayout/CollectTask" v-if="CollectTaskShow">{{$t('TheLayoutHeader.CollectTask')}}</el-menu-item>
        <el-menu-item index="/TheLayout/TaskDetail" v-if="TaskDetailShow">{{$t('TheLayoutHeader.TaskDetail')}}</el-menu-item>
        <el-menu-item index="/TheLayout/TopNPerformanceReport" v-if="TopNPerformanceReport">{{$t('TheLayoutHeader.TopNPerformanceReport')}}</el-menu-item>
      </el-submenu>

      <el-submenu v-if="submenuShowStatement" index="statement">
        <template slot="title">{{ $t("TheLayoutHeader.reportManagement") }}</template>
        <el-menu-item index="/TheLayout/ReportTemplateManagement" v-if="ReportTemplateManagementShow">{{$t('TheLayoutHeader.ReportTemplateManagement')}}</el-menu-item>
        <el-menu-item index="/TheLayout/AlarmDistributionStatisticReport" v-if="submenuShowAlarmDistributionStatisticReport">{{$t('TheLayoutHeader.AlarmDistributionStatisticReport')}}</el-menu-item>
        <el-menu-item index="/TheLayout/AlarmTrendStatisticReport" v-if="submenuShowAlarmTrendStatisticReport">{{$t('TheLayoutHeader.AlarmTrendStatisticReport')}}</el-menu-item>
        <el-menu-item index="/TheLayout/AlarmTopBottomStatisticReport" v-if="AlarmTopBottomStatisticReport">{{$t('TheLayoutHeader.AlarmTopBottomStatisticReport')}}</el-menu-item>
        <el-menu-item index="/TheLayout/PerformDistributionStatisticReport" v-if="PerformDistributionStatisticReport">{{$t('TheLayoutHeader.PerformDistributionStatisticReport')}}</el-menu-item>
        <el-menu-item index="/TheLayout/PerformTrendStatisticReport" v-if="PerformTrendStatisticReport">{{$t('TheLayoutHeader.PerformTrendStatisticReport')}}</el-menu-item>
        <el-menu-item index="/TheLayout/PerformTopBottomStatisticReport" v-if="PerformTopBottomStatisticReport">{{$t('TheLayoutHeader.PerformTopBottomStatisticReport')}}</el-menu-item>
        <el-menu-item index="/TheLayout/ReportTask" v-if="ReportTask">{{$t('TheLayoutHeader.ReportTask')}}</el-menu-item>
        <el-menu-item index="/TheLayout/PeriodReport" v-if="PeriodReport">{{$t('TheLayoutHeader.PeriodReport')}}</el-menu-item>
      </el-submenu>

      <el-submenu v-if="submenu6show" index="systemManagement">
        <template slot="title">{{ $t("TheLayoutHeader.systemManagement") }}</template>
        <el-menu-item index="/TheLayout/AuthorityManagement" v-if="submenu601show">{{$t('TheLayoutHeader.userGroupAuthorityConfiguration')}}</el-menu-item>
        <el-menu-item index="/TheLayout/UserManagement" v-if="submenu602show">{{$t('TheLayoutHeader.userConfiguration')}}</el-menu-item>
        <el-menu-item index="/TheLayout/LoginLogManagement" v-if="submenu603show">{{$t('TheLayoutHeader.loginLogQuery')}}</el-menu-item>
        <el-menu-item index="/TheLayout/OperationLogManagement" v-if="submenu604show">{{$t('TheLayoutHeader.optionLogQuery')}}</el-menu-item>
        <el-menu-item index="/TheLayout/ModifyPersonalInfo" v-if="submenu605show">{{$t('TheLayoutHeader.modifyUserInfo')}}</el-menu-item>
<!--        <el-menu-item index="/TheLayout/DataSafeGuard" v-if="submenu801show">{{$t('TheLayoutHeader.safeDataGuard1')}}</el-menu-item>-->
        <el-submenu index="7-3" v-if="systemConfigshow">
          <template slot="title">{{$t('TheLayoutHeader.systemConfig')}}</template>
          <el-menu-item @click="handleImport">{{$t('SystemConfig.import')}}</el-menu-item>
          <el-menu-item @click="handleExport">{{$t('SystemConfig.export')}}</el-menu-item>
        </el-submenu>
      </el-submenu>

<!--      <el-submenu v-if="submenu8show" index="dataSafe">-->
<!--        <template slot="title">{{ $t("TheLayoutHeader.safeDataGuard") }}</template>-->
<!--        <el-menu-item index="/TheLayout/DataSafeGuard" v-if="submenu801show">{{$t('TheLayoutHeader.safeDataGuard1')}}</el-menu-item>-->
<!--        <el-menu-item index="/TheLayout/SnapShot" v-if="submenu802show">{{$t('TheLayoutHeader.snapShot')}}</el-menu-item>-->
<!--        <el-submenu index="7-3" v-if="submenu803show">-->
<!--          <template slot="title">{{$t('TheLayoutHeader.systemConfig')}}</template>-->
<!--          <el-menu-item @click="handleImport">{{$t('SystemConfig.import')}}</el-menu-item>-->
<!--          <el-menu-item @click="handleExport">{{$t('SystemConfig.export')}}</el-menu-item>-->
<!--        </el-submenu>-->
<!--      </el-submenu>-->

      <el-submenu v-if="monitorHelperShow" index="MonitorHelperIndex">
        <template slot="title">{{$t('TheLayoutHeader.monitorHelper')}}</template>
        <el-menu-item v-if="DatabaseMonitorShow" index="/TheLayout/DatabaseMonitor">{{$t('TheLayoutHeader.databaseMonitor')}}</el-menu-item>
        <el-menu-item v-if="RabbitMQShow" @click='handleRabbitMQMonitor'>{{$t('TheLayoutHeader.rabbitMQMonitor')}}</el-menu-item>
      </el-submenu>
<!--      <el-submenu  index="8">-->
<!--        <template slot="title">{{ $t("TheLayoutHeader.theOnlineHelpManager") }}</template>-->
<!--        <el-menu-item index="/TheLayout/TheOnlineHelp" >{{$t('TheLayoutHeader.theOnlineHelpPage')}}</el-menu-item>-->
<!--        <el-menu-item  @click="handleAboutInformation">{{$t('TheLayoutHeader.aboutInformation')}}</el-menu-item>-->
<!--      </el-submenu>-->

    </el-menu>

    <AboutInformation :aboutViewDialogVisible.sync = 'aboutViewDialogShow'>
    </AboutInformation>
    <ImportSystem :systemImportDialogVisibel.sync='systemConfigImport'>
    </ImportSystem>
    <ExportSystem :systemExportDialogVisibel.sync='systemConfigExport'>
    </ExportSystem>
  </div>

</template>

<script>
import UserService from '@/domain/services/UserService'
import AuthorityManager from '@/domain/models/AuthorityManager'
import AboutInformation from '../../components/TheOnlineHelp/AboutInformation'
import ImportSystem from '../../components/DataSafe/ImportSystem'
import ExportSystem from '../../components/DataSafe/ExportSystem'
import {SYSTEM_MODE_SDNC} from '../../utils/constantCollection'
import HelperUtil from "../../utils/HelperUtil";

export default {
  components: {
    AboutInformation,
    ExportSystem,
    ImportSystem
  },
  beforeCreate () {
  },
  // vue加载初始化函数,加载数据
  created: function () {
    let _this = this
    if (Object.keys(this.$store.state.authorityList).length === 0) {
      UserService.getAllUserAuthority().then((result) => {
        let authorityManager = AuthorityManager(result)
        let authorityList = authorityManager.getEditFlag(result)
        this.$store.commit('setAuthorityList', authorityList)
        this.menuAuthority()
      }).catch((err) => {
        this.InfoTip.errorTip(_this, err)
      })
    }
    else {
      this.menuAuthority()
    }
    // TODO:全部权限
    // this.allMenuAuthority()
  },
  mounted () {
    // 刷新时以当前路由做为tab加入tabs
    // 当前路由不是首页时,添加首页以及另一页到store里,并设置激活状态
    // 当当前路由是首页时,添加首页到store,并设置激活状态
    var path = this.$route.path
    var vueNameList = path.split('/')
    var vueName = vueNameList[2]
    // url刷新进入时,openTab和keepAliveRouter都为空;项目代码变化导致自动刷新时,openTab和keepAliveRouter内有数据,不需要进行一下操作
    if (this.$store.state.openTab.length === 0 && this.$store.state.keepAliveRouter.length === 0) {
      if (this.$store.state.systemMode === SYSTEM_MODE_SDNC) {
        if (this.$route.path !== '/TheLayout' && this.$route.path !== '/TheLayout/main' && this.$route.path !== '/TheLayout/ServiceStatusUpdate') {
          this.$store.commit('add_tabs', {route: '/TheLayout/main', name: '拓扑图', title: 'TheLayoutHeader.topologyShow'})
          this.$store.commit('add_tabs', {route: '/TheLayout/ServiceStatusUpdate', name: '业务状态更新', title: 'TheLayoutHeader.serviceStatusUpdate'})
          this.$store.commit('add_keepAliveRouter', 'TopologicalGraphShow')
          this.$store.commit('add_keepAliveRouter', 'ServiceStatusUpdate')
          this.$store.commit('add_tabs', {route: this.$route.path, name: this.$route.name, title: this.$route.meta.title})
          this.$store.commit('add_keepAliveRouter', vueName)
          this.$store.commit('set_active_index', this.$route.path)
        } else {
          this.$store.commit('add_tabs', {route: '/TheLayout/main', name: '拓扑图', title: 'TheLayoutHeader.topologyShow'})
          this.$store.commit('add_keepAliveRouter', 'TopologicalGraphShow')
          this.$store.commit('add_tabs', {route: '/TheLayout/ServiceStatusUpdate', name: '业务状态更新', title: 'TheLayoutHeader.serviceStatusUpdate'})
          this.$store.commit('add_keepAliveRouter', 'ServiceStatusUpdate')
          if (this.$route.path === '/TheLayout' || this.$route.path === '/TheLayout/main') {
            this.$store.commit('set_active_index', '/TheLayout/main')
            this.$router.push({path: '/TheLayout/main'})
          }
          if (this.$route.path === '/TheLayout/ServiceStatusUpdate') {
            this.$store.commit('set_active_index', this.$route.path)
            this.$router.push({path: this.$route.path})
          }
        }
      } else { // 传统模式
        if (this.$route.path !== '/TheLayout' && this.$route.path !== '/TheLayout/main') {
          this.$store.commit('add_tabs', {route: '/TheLayout/main', name: '拓扑图', title: 'TheLayoutHeader.topologyShow'})
          this.$store.commit('add_keepAliveRouter', 'TopologicalGraphShow')
          this.$store.commit('add_tabs', {route: this.$route.path, name: this.$route.name, title: this.$route.meta.title})
          this.$store.commit('add_keepAliveRouter', vueName)
          this.$store.commit('set_active_index', this.$route.path)
        } else {
          this.$store.commit('add_tabs', {route: '/TheLayout/main', name: '拓扑图', title: 'TheLayoutHeader.topologyShow'})
          this.$store.commit('add_keepAliveRouter', 'TopologicalGraphShow')
          if (this.$route.path === '/TheLayout' || this.$route.path === '/TheLayout/main') {
            this.$store.commit('set_active_index', '/TheLayout/main')
            this.$router.push({path: '/TheLayout/main'})
          }
        }
      }
    }
  },
  data: function () {
    return {
      aboutViewDialogShow: false, // 关于对话框的显示标识
      systemConfigImport: false,
      systemConfigExport: false,
      submenu1show: false, // 010000	配置管理
      submenu2show: false, // 020000	设备管理
      submenu3show: false, // 030000	业务管理
      submenu4show: false, // 040000	告警管理
      submenu5show: false, // 050000	性能管理
      submenu6show: false, // 060000	系统管理
      monitorHelperShow: false, // 070000	监控助手
      DatabaseMonitorShow: false,
      RabbitMQShow: false,

      submenu101show: false, // 010101	服务器配置
      submenu102show: false, // 010201	子网配置
      submenu103show: false, // 010301	机房配置
      submenu104show: false, // 010401	机架配置
      DeviceCreatPortShow: false, // 010501	接入业务配置
230 231 232
      shuxing: false, // 010501	接入业务配置
      tuoputu: false, // 010501	接入业务配置
      lianlu: false, // 010501	接入业务配置
YazhouChen's avatar
YazhouChen committed
233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373

      submenu201show: false, // 020101	设备配置
      LinkConfigurationManagementShow: false, // 020201	链路配置
      ManualStartDeviceConfigurationShow: false, // 020301	设备配置文件管理
      submenu204show: false, // 020400  设备发现
      submenu205show: false, // 020501  固件配置

      submenu301show: false, // 030101	eline业务配置
      submenu302show: false, // 030201	业务模板配置
      submenu303show: false, // 030301	业务类型配置
      submenu304show: false, // 030401	业务子网配置
      submenu305show: false, // 030501	QoS配置
      submenu306show: false, // 030601	网络物理连接配置
      submenu307show: false, // 030701 动态拓扑配置

      AlarmLevelManagementShow: false, // 040101	告警类型配置
      AlarmConfigManagementShow: false, // 040201	告警等级配置
      AlarmFilerManagementShow: false, // 040301	告警过滤配置
      AlarmQueryShow: false, // 040400	告警查询
      AlarmStatisticsShow: false, // 040500	告警统计
      AlarmReportsShow: false, // 040601	告警报表
      AlarmMangExp: true, // 040701	告警经验维护管理

      PerformanceMonitorShow: false, // 050101	性能配置
      PerformanceDataQueryShow: false, // 050200	性能查询
      PerformanceStatisticsShow: false, // 050300	性能统计
      PerformanceReportsShow: false, // 050400	性能报表

      submenu601show: false, // 060101	用户组权限配置
      submenu602show: false, // 060201	用户配置
      submenu603show: false, // 060300	登录日志查询
      submenu604show: false, // 060400	操作日志查询
      submenu605show: false, // 060501 用户个人信息修改
      systemConfigshow: false, // 060501 系统配置

      submenu801show: false, // 080101 数据安全维护
      submenu802show: false, // 080201 快照管理
      submenu803show: false, // 080201 系统配置

      submenuShow1: false, // 资源管理
      submenuShow2: false, // 网元配置
      submenuShow3: false, // 告警管理
      submenuShow4: false, // 性能管理
      submenuShowStatement: false, // 报表管理

      ElementDiscoveryTemplateManagementShow: false, // 网元发现模板管理
      ElementDiscoveryManagementShow: false, // 网元发现管理
      DeviceManagementShow: false, // 网元管理
      BookManagementShow: false, // 网元台账管理

      PerformanceThresholdShow: false, // 性能门限管理
      IndexTemplateShow: false, // 指标模板管理
      CollectTaskShow: false, // 采集任务管理
      TaskDetailShow: false, // 任务详情
      TopNPerformanceReport: true, // TopN性能查询

      ReportTemplateManagementShow: false, // 报表模板管理
      submenuShowAlarmDistributionStatisticReport: false, // 告警分布统计报表
      submenuShowAlarmTrendStatisticReport: false, // 告警趋势统计报表
      AlarmTopBottomStatisticReport: false, // 告警TopBottom统计报表
      PerformDistributionStatisticReport: false, // 性能分布统计报表
      PerformTrendStatisticReport: false, // 性能趋势统计报表
      PerformTopBottomStatisticReport: false, // 性能TopBottom统计报表
      ReportTask: false, // 报表任务
      PeriodReport: true // 周期报表
    }
  },
  methods: {
    /**
       * @Author      : lS
       * @Date        : 20:03 2019/11/17
       * @Description : 处理导入
       **/
    handleImport () {
      this.systemConfigImport = true
    },
    /**
       * @Author      : lS
       * @Date        : 20:03 2019/11/17
       * @Description : 处理导出
       **/
    handleExport () {
      this.systemConfigExport = true
    },
    /***
       * @Description  : 判断菜单权限
       * @author       : zf
       * @date         : 2019/03/21 16:10
       */
    menuAuthority: function () {
      let obj = Object.keys(this.$store.state.authorityList)
      for (let i = 0; i < obj.length; i++) {
        switch (obj[i]) {
          case '000000' :
            this.allMenuAuthority()
            break
            // 一级菜单显示
          case '010000':
            this.submenuShow1 = true
            break
          case '020000':
            this.submenuShow2 = true
            break
          case '030000':
            this.submenuShow3 = true
            break
          case '040000':
            this.submenuShow4 = true
            break
          case '050000':
            this.submenuShowStatement = true
            break
          case '060000':
            this.submenu6show = true
            break
          case '080000':
            this.monitorHelperShow = true
            break

            // 二级菜单显示
          case '010101':
            this.submenu102show = true
            break
          case '010201':
            this.ElementDiscoveryTemplateManagementShow = true
            break
          case '010301':
            this.DeviceManagementShow = true
            break
          case '010401':
            this.BookManagementShow = true
            break
          case '010501':
            this.ManualStartDeviceConfigurationShow = true
            break
          case '010601':
            this.LinkConfigurationManagementShow = true
            break
          case '010701':
            this.DeviceCreatPortShow = true
            break
374 375 376 377 378 379 380 381 382
             case '010702':
            this.shuxing = true
            break
             case '010703':
            this.tuoputu = true
            break
              case '010704':
            this.lianlu = true
            break
YazhouChen's avatar
YazhouChen committed
383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505
          case '010800':
            this.ElementDiscoveryManagementShow = true
            break

            // 告警管理
          case '030101' :
            this.AlarmLevelManagementShow = true
            break
          case '030201' :
            this.AlarmConfigManagementShow = true
            break
          case '030301' :
            this.AlarmFilerManagementShow = true
            break
          case '030401' :
            this.AlarmQueryShow = true
            break
          case '030501' :
            this.AlarmMangExp = true
            break
          case '030601' :
            this.AlarmReportsShow = true
            break
          case '030701' :
            this.AlarmStatisticsShow = true
            break

            // 性能管理
          case '040101' :
            this.IndexTemplateShow = true
            break
          case '040201' :
            this.CollectTaskShow = true
            break
          case '040301' :
            this.PerformanceThresholdShow = true
            break
          case '040400' :
            this.PerformanceDataQueryShow = true
            break
          case '040500' :
            this.TopNPerformanceReport = true
            break

          // 告警性能统计
          case '050101':
            this.ReportTemplateManagementShow = true
            break
          case '050200':
            this.submenuShowAlarmDistributionStatisticReport = true
            break
          case '050300':
            this.submenuShowAlarmTrendStatisticReport = true
            break
          case '050400':
            this.AlarmTopBottomStatisticReport = true
            break
          case '050500':
            this.PerformDistributionStatisticReport = true
            break
          case '050600':
            this.PerformTrendStatisticReport = true
            break
          case '050700':
            this.PerformTopBottomStatisticReport = true
            break
          case '050801':
            this.ReportTask = true
            break
          case '050901':
            this.PeriodReport = true
            break

          // index6 二级菜单管理
          case '060101' :
            this.submenu601show = true
            break
          case '060201' :
            this.submenu602show = true
            break
          case '060300' :
            this.submenu603show = true
            break
          case '060400' :
            this.submenu604show = true
            break
          case '060501' :
            this.submenu605show = true
            break
          case '060600' :
            this.systemConfigshow = true
            break

            // index 二级菜单管理
          case '080100' :
            this.DatabaseMonitorShow = true
            break
          case '080200' :
            this.RabbitMQShow = true
            break
        }
      }
    },

    /***
       * @Description  : 前台菜单全部权限
       * @author       : zf
       * @date         : 2019/03/21 16:20
       */
    allMenuAuthority: function () {
      // this.submenu1show = true; //010000	配置管理
      this.submenu2show = true // 020000	设备管理
      this.submenu3show = true // 030000	业务管理
      this.submenu4show = true // 040000	告警管理
      this.submenu5show = true // 050000	性能管理
      this.submenu6show = true // 060000 安全管理
      this.monitorHelperShow = true // 080000 数据安全维护

      // this.submenu101show = true;  //010101	服务器配置
      this.submenu102show = true // 010201	子网配置
      this.submenu103show = true // 010301	机房配置
      this.submenu104show = true // 010401	机架配置
      this.DeviceCreatPortShow = true // 010501	接入业务配置
506 507 508
      this.shuxing = true // 010501	g区域管理
      this.tuoputu = true // 010501	g拓扑图
      this.lianlu = true // 010501	g拓扑图
YazhouChen's avatar
YazhouChen committed
509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604

      this.submenu201show = true // 020101	设备配置
      this.LinkConfigurationManagementShow = true // 020201	链路配置
      this.ManualStartDeviceConfigurationShow = true // 020301	设备配置文件管理
      this.submenu204show = true // 020400 设备发现
      this.submenu205show = true // 020501 固件配置

      this.submenu301show = true // 030101	eline业务配置
      this.submenu302show = true // 030201	业务模板配置
      this.submenu303show = true // 030301	业务类型配置
      this.submenu304show = true // 030401	业务子网配置
      this.submenu305show = true // 030501	QoS配置
      this.submenu306show = true // 030601	网络物理连接配置
      this.submenu307show = true // 030701 固件配置

      this.AlarmLevelManagementShow = true // 040101	告警类型配置
      this.AlarmConfigManagementShow = true // 040201	告警等级配置
      this.AlarmFilerManagementShow = true // 040301	告警过滤配置
      this.AlarmQueryShow = true // 040400	告警查询
      this.AlarmStatisticsShow = true // 040500	告警统计
      this.AlarmReportsShow = true // 040601	告警报表
      this.AlarmMangExp = true // 040701	告警经验维护

      this.PerformanceMonitorShow = true // 050101	性能配置
      this.PerformanceDataQueryShow = true // 050200	性能查询
      this.PerformanceStatisticsShow = true // 050300	性能统计
      this.PerformanceReportsShow = true // 050400	性能报表

      this.submenu601show = true // 060101	用户组权限配置
      this.submenu602show = true // 060201	用户配置
      this.submenu603show = true // 060300	登录日志查询
      this.submenu604show = true // 060400	操作日志查询
      this.submenu605show = true // 060501 用户个人信息修改
      this.submenu606show = true // 060601 系统配置

      this.submenu801show = true // 080101 数据安全维护
      this.submenu802show = true // 080201 快照管理
      this.submenu803show = true // 080301 系统配置

      this.submenuShow1 = true // 资源管理
      this.submenuShow2 = true // 网元配置管理
      this.submenuShow3 = true // 告警管理
      this.submenuShow4 = true // 性能管理
      this.submenuShowStatement = true // 报表管理

      this.ElementDiscoveryTemplateManagementShow = true // 网元发现模板管理
      this.DeviceManagementShow = true // 网元管理
      this.BookManagementShow = true // 网元台账管理

      this.PerformanceThresholdShow = true // 性能门限
      this.IndexTemplateShow = true // 指标模板
      this.CollectTaskShow = true // 采集任务
      this.TopNPerformanceReport = true // TopN性能查询

      this.ReportTemplateManagementShow = true // 报表模板管理
      this.submenuShowAlarmDistributionStatisticReport = true // 告警分布统计报表
      this.submenuShowAlarmTrendStatisticReport = true // 告警趋势统计报表
      this.AlarmTopBottomStatisticReport = true // 告警TopBottom统计报表
      this.PerformDistributionStatisticReport = true // 性能分布统计报表
      this.PerformTrendStatisticReport = true // 性能趋势统计报表
      this.PerformTopBottomStatisticReport = true // 性能TopBottom统计报表
      this.ReportTask = true // 报表任务
      this.PeriodReport = true // 周期报表
    },

    /***
       * @Description  : 关于信息的显示
       * @author       :
       * @date         : 2019/03/21 16:20
       */
    handleAboutInformation () {
      this.aboutViewDialogShow = true
    },
    /**
     * @Description  : RabbitMQMonitor监控
     * @author       : ls
     * @date         : 2020/9/17 10:42
     * @param        :
     * @return       :
     */
    handleRabbitMQMonitor () {
      // window.open(HelperUtil.getSystemParams('RabbitMQ'), '_blank')
      window.open(configSelf.RabbitMQ, '_blank')
    }
  }
}
</script>

<style scoped lang="scss">
  .el-menu-item {
    font-size: 15px !important;
  }
  .el-menu {
    font-size: 10px !important;
  }
</style>