import Mock from 'mockjs'

const router = [{
  router: 'root',
  children: [
    {
      router: 'dashboard',
      icon: 'dashboard',
      name: '仪表盘',
      children: [
        {
          router: 'workplace',
          name: '工作台'
        },
        {
          router: 'analysis',
          name: '分析页'
        }
      ]
    },
    // {
    //   router: 'webmeter',
    //   children: ['userFilesManage', 'gasAnalysisManage', 'handAnalysisManage', 'exceptionManage']
    // },
    // {
    //   router: 'iot',
    //   children: ['iotDeviceType', 'iotDeviceBrand', 'iotDevice', 'iotSetDeviceParams', 'instructManage', 'reportedDataQuery', 'deviceException', 'deviceManage']
    // },
    // {
    //   router: 'dataAnalyze',
    //   children: ['DataAnalysisView']
    // },
    // {
    //   router: 'system',
    //   children: ['dictionaryManage', 'queryParamsManage', 'customerManage', 'safeguardSearchLog', 'runtime']
    // },
    {
      router: 'antdv',
      path: 'antdv',
      name: 'Ant Design Vue',
      icon: 'ant-design',
      link: 'https://www.antdv.com/docs/vue/introduce-cn/'
    },
    {
      router: 'document',
      path: 'document',
      name: '使用文档',
      icon: 'file-word',
      link: 'https://iczer.gitee.io/vue-antd-admin-docs/'
    }
  ]
}]

Mock.mock(`${process.env.VUE_APP_API_BASE_URL}/routes`, 'get', () => {
  const result = {}
  result.code = 0
  result.data = router
  return result
})

export { router }
