import Vue from 'vue'
import Vuex from 'vuex'
import getters from './getter'
import user from './modules/user'

Vue.use(Vuex)

export default new Vuex.Store({
  modules: {
    getters,
    modules: {
      user
    }
  },
  state: {
    routerMenuMessage: [
      {
        name:'首页',
        path:'/home'
      }
    ],
    menus: [
      {
        url: require('@/assets/images/userManagement@3x.png'),
        name: '用户管理',
        path: '/home/user',
        submenus: [
          {
            name: '人员管理',
            path: '/home/user/person'
          },
          {
            name: '组织管理',
            path: '/home/user/group'
          },
        ]
      },
      {
        url: require('@/assets/images/roleManagement@3x.png'),
        name: '角色管理',
        path: '/home/role'
      },
      {
        url: require('@/assets/images/permissionManagement@3x.png'),
        name: '权限管理',
        path: '/home/permission'
      },
      {
        url: require('@/assets/images/systemConfiguration@3x.png'),
        name: '系统配置',
        path: '/home/system',
        submenus: [
          {
            name: '策略配置',
            path: '/home/system/strategy'
          },
          {
            name: '消息配置',
            path: '/home/system/message'
          },
          {
            name: '信息配置',
            path: '/home/system/info'
          },
          {
            name: '指标配置',
            path: '/home/system/index'
          }
        ]
      },
      {
        url: require('@/assets/images/deviceManagement@3x.png'),
        name: '设备管理',
        path: '/home/device',
        submenus: [
          {
            name: '设备配置',
            path: '/home/device/config'
          },
          {
            name: '设备告警',
            path: '/home/device/warning'
          }
        ]
      },
      {
        url: require('@/assets/images/dataManagement@3x.png'),
        name: '数据管理',
        path: '/home/data',
        submenus: [
          {
            name: '报表配置',
            path: '/home/data/statement'
          },
          {
            name: '报告配置',
            path: '/home/data/report'
          },
          {
            name: '基础信息',
            path: '/home/data/basicInfo'
          }
        ]
      },
      {
        url: require('@/assets/images/serviceManagement@3x.png'),
        name: '服务管理',
        path: '/home/service',
        submenus: [
          {
            name: '全部服务',
            path: '/home/service/all'
          },
          {
            name: '已安装服务',
            path: '/home/service/installed'
          },
          {
            name: '未安装服务',
            path: '/home/service/uninstall'
          },
        ]
      },
      {
        url: require('@/assets/images/securityManagement@3x.png'),
        name: '安全管理',
        path: '/home/security',
        submenus: [
          {
            name: '日志监控',
            path: '/home/security/logMonitor'
          },
          {
            name: '系统监控',
            path: '/home/security/systemMonitor'
          },
        ]
      }
    ],
  }
})
