import Vue from 'vue'
import store from '../store.js'
import Vuex from 'vuex'
Vue.use(Vuex)

class AuthorityFilter {
  // 资源管理-010201	网元发现模板管理
  static elementDiscoveryAuthorityFilter (command) {
    if (store.state.authorityList['010201'] === 1) {
      command.visible = false
    } else {
      command.visible = true
    }
    return command
  }
  // 040101	指标模板管理
  static indexTemplateAuthorityFilter (command) {
    if (store.state.authorityList['040101'] === 1) {
      command.visible = false
    } else {
      command.visible = true
    }
    return command
  }
  // 050101	报表模板管理
  static reportTemplateAuthorityFilter (command) {
    if (store.state.authorityList['050101'] === 1) {
      command.visible = false
    } else {
      command.visible = true
    }
    return command
  }
  // 配置管理-010101	服务器配置
  static serverAuthorityFilter (command) {
    if (store.state.authorityList['010101'] === 1) {
      command.visible = false
    } else {
      command.visible = true
    }
    return command
  }

  // ls配置数据安全080101
  static performanceAuthorityFilter (command) {
    if (store.state.authorityList['080101'] === 1) {
      command.visible = false
    } else {
      command.visible = true
    }
    return command
  }

  // ls配置数据安全080201
  static snapshotAuthorityFilter (command) {
    if (store.state.authorityList['080201'] === 1) {
      command.visible = false
    } else {
      command.visible = true
    }
    return command
  }

  // ls固件配置020501
  static firmWareAuthorityFilter (command) {
    if (store.state.authorityList['020501'] === 1) {
      command.visible = false
    } else {
      command.visible = true
    }
    return command
  }

  // 配置管理-010201	子网配置
  static subnetAuthorityFilter (command) {
    if (store.state.authorityList['010201'] === 1) {
      command.visible = false
    } else {
      command.visible = true
    }
    return command
  }
  // 配置管理-010301	机房配置
  static locationsAuthorityFilter (command) {
    if (store.state.authorityList['010301'] === 1) {
      command.visible = false
    } else {
      command.visible = true
    }
    return command
  }
  // 网元台账管理 010401
  static bookAuthorityFilter (command) {
    if (store.state.authorityList['010401'] === 1) {
      command.visible = false
    } else {
      command.visible = true
    }
    return command
  }
  // 接入业务配置 010701
  static accessServiceAuthorityFilter (command) {
    if (store.state.authorityList['010701'] === 1) {
      command.visible = false
    } else {
      command.visible = true
    }
    return command
  }

  // 设备管理-010300	网元配置
  static deviceAuthorityFilter (command) {
    if (store.state.authorityList['010301'] === 1) {
      command.visible = false
    } else {
      command.visible = true
    }
    return command
  }
  // 链路配置-010601	链路配置
  static linkAuthorityFilter (command) {
    if (store.state.authorityList['010601'] === 1) {
      command.visible = false
    } else {
      command.visible = true
    }
    return command
  }
  // 设备管理-010501	设备配置文件管理
  static configurationFileAuthorityFilter (command) {
    if (store.state.authorityList['010501'] === 1) {
      command.visible = false
    } else {
      command.visible = true
    }
    return command
  }
  // 设备管理-020400	设备发现
  static deviceDiscAuthorityFilter (command) {
    if (store.state.authorityList['020400'] === 1) {
      command.visible = false
    } else {
      command.visible = true
    }
    return command
  }

  // 业务管理-030101	eline业务配置
  static elineServiceAuthorityFilter (command) {
    if (store.state.authorityList['030101'] === 1) {
      command.visible = false
    } else {
      command.visible = true
    }
    return command
  }
  // 业务管理-030201	业务模板配置
  static serviceTemplateAuthorityFilter (command) {
    if (store.state.authorityList['030201'] === 1) {
      command.visible = false
    } else {
      command.visible = true
    }
    return command
  }
  // 业务管理-030301	业务类型配置
  static serviceTypeAuthorityFilter (command) {
    if (store.state.authorityList['030301'] === 1) {
      command.visible = false
    } else {
      command.visible = true
    }
    return command
  }
  // 业务管理-030401	业务子网配置
  static serviceSubnetAuthorityFilter (command) {
    if (store.state.authorityList['030401'] === 1) {
      command.visible = false
    } else {
      command.visible = true
    }
    return command
  }
  // 业务管理-030501	QoS配置
  static QOSAuthorityFilter (command) {
    if (store.state.authorityList['030501'] === 1) {
      command.visible = false
    } else {
      command.visible = true
    }
    return command
  }
  // 业务管理-030601	网络物理连接配置
  static networkPhysicsAuthorityFilter (command) {
    if (store.state.authorityList['030601'] === 1) {
      command.visible = false
    } else {
      command.visible = true
    }
    return command
  }
  // 业务管理-030701	动态拓扑配置
  static topologicalAuthorityFilter (command) {
    if (store.state.authorityList['030701'] === 1) {
      command.visible = false
    } else {
      command.visible = true
    }
    return command
  }

  // 告警管理-040101	告警类型配置
  static faultTypeAuthorityFilter (command) {
    if (store.state.authorityList['040101'] === 1) {
      command.visible = false
    } else {
      command.visible = true
    }
    return command
  }
  // 告警管理-040201	告警等级配置
  static faultLevelTemplateAuthorityFilter (command) {
    if (store.state.authorityList['040201'] === 1) {
      command.visible = false
    } else {
      command.visible = true
    }
    return command
  }
  // 告警管理-030301	告警过滤配置
  static faultFilteringAuthorityFilter (command) {
    if (store.state.authorityList['030301'] === 1) {
      command.visible = false
    } else {
      command.visible = true
    }
    return command
  }
  // 告警管理-040400	告警查询
  static faultQueryAuthorityFilter (command) {
    if (store.state.authorityList['040400'] === 1) {
      command.visible = false
    } else {
      command.visible = true
    }
    return command
  }
  // 告警管理-040500	告警统计
  static faultStatisticsAuthorityFilter (command) {
    if (store.state.authorityList['040500'] === 1) {
      command.visible = false
    } else {
      command.visible = true
    }
    return command
  }
  // 告警管理-040600	事件查询
  static faultManagementAuthorityFilter (command) {
    if (store.state.authorityList['040600'] === 1) {
      command.visible = false
    } else {
      command.visible = true
    }
    return command
  }
  // 告警经验维护 030501
  static alarmMangExpAuthorityFilter (command) {
    if (store.state.authorityList['030501'] === 1) {
      command.visible = false
    } else {
      command.visible = true
    }
    return command
  }
  // 告警查询中创建告警经验维护 030401
  static alarmQueryAlarmMangExpAuthorityFilter (command) {
    if (store.state.authorityList['030401'] === 1) {
      command.visible = false
    } else {
      command.visible = true
    }
    return command
  }

  // 性能管理-050101	性能配置
  static performanceConfigurationAuthorityFilter (command) {
    if (store.state.authorityList['050101'] === 1) {
      command.visible = false
    } else {
      command.visible = true
    }
    return command
  }

  // 040301  性能门限
  static performanceThresholdrationAuthorityFilter (command) {
    if (store.state.authorityList['040301'] === 1) {
      command.visible = false
    } else {
      command.visible = true
    }
    return command
  }
  // 采集任务 040201
  static collectTaskAuthorityFilter (command) {
    if (store.state.authorityList['040201'] === 1) {
      command.visible = false
    } else {
      command.visible = true
    }
    return command
  }
  // 报表任务  050801
  static reportTaskAuthorityFilter (command) {
    if (store.state.authorityList['050801'] === 1) {
      command.visible = false
    } else {
      command.visible = true
    }
    return command
  }
  // 周期报表  050901
  static periodReportAuthorityFilter (command) {
    if (store.state.authorityList['050901'] === 1) {
      command.visible = false
    } else {
      command.visible = true
    }
    return command
  }
  // 性能管理-050200	性能查询
  static performanceQueryAuthorityFilter (command) {
    if (store.state.authorityList['050200'] === 1) {
      command.visible = false
    } else {
      command.visible = true
    }
    return command
  }
  // 性能管理-050300	性能统计
  static performanceStatisticsAuthorityFilter (command) {
    if (store.state.authorityList['050300'] === 1) {
      command.visible = false
    } else {
      command.visible = true
    }
    return command
  }

  // 安全管理-060101	用户组权限配置
  static usergroupAuthorityAuthorityFilter (command) {
    if (store.state.authorityList['060101'] === 1) {
      command.visible = false
    } else {
      command.visible = true
    }
    return command
  }
  // 安全管理-060201	用户配置
  static userAuthorityFilter (command) {
    if (store.state.authorityList['060201'] === 1) {
      command.visible = false
    } else {
      command.visible = true
    }
    return command
  }
  // 安全管理-060300	登录日志查询
  static loginLogsAuthorityFilter (command) {
    if (store.state.authorityList['060300'] === 1) {
      command.visible = false
    } else {
      command.visible = true
    }
    return command
  }
  // 安全管理-060400	操作日志查询
  static operationLogsAuthorityFilter (command) {
    if (store.state.authorityList['060400'] === 1) {
      command.visible = false
    } else {
      command.visible = true
    }
    return command
  }
  // 安全管理-060501	登录用户配置
  static loginUserAuthorityFilter (command) {
    if (store.state.authorityList['060501'] === 1) {
      command.visible = false
    } else {
      command.visible = true
    }
    return command
  }
}
export default AuthorityFilter
