import Vue from 'vue'
import Router from 'vue-router'
import HelloWorld from '@/components/HelloWorld'

// *****************登录页**********************
import Login from '@/page/login/login'

// *****************首页**********************
import Index from '@/page/home/index'
import facilitydistribute from '@/page/homepage/facilitydistribute' //设备分布
// import facilitydistribute from '@/page/homepage/home'//设备分布

import pestdistribute from '@/page/homepage/pestdistribute' //有害生物分布
//---------------------------------------系统管理----------------------------------------------------
const customsManger = () => import('@/Page/systemmanger/customsManger') //隶属海关
const role = () => import('@/Page/systemmanger/role') // 角色管理
const motif = () => import('@/Page/systemmanger/motif') // 主题定制
const harmfulBiology = () => import('@/Page/systemmanger/harmfulBiology') // 有害生物维护
const userManger = () => import('@/Page/systemmanger/userManger') // 用户管理
const dayRecord = () => import('@/Page/systemmanger/dayRecord') // 用户管理

//---------------------------------------指挥中心----------------------------------------------------
const realTime = () => import('@/Page/commandCenter/realTime') //实时通信
const laboratory = () => import('@/Page/commandCenter/laboratory') //实验室识别
const taskRegulator = () => import('@/Page/commandCenter/taskRegulator') //任务管理
const taskRegulatorDetails = () => import('@/Page/commandCenter/taskRegulatorDetails') //任务管理 - 详情
const superviseAdmin = () => import('@/Page/commandCenter/superviseAdmin') //监督管理
const superviseAdminDetails = () => import('@/Page/commandCenter/superviseAdminDetails') //监督管理 - 详情
const supervise = () => import('@/Page/commandCenter/supervise') //监督记录
const superviseDetails = () => import('@/Page/commandCenter/superviseDetails') //监督记录 - 详情
const superviseLog = () => import('@/Page/commandCenter/superviseLog') //监测日志
const superviseLogDetails = () => import('@/Page/commandCenter/superviseLogDetails') //监测日志 - 详情

//---------------------------------------监督记录----------------------------------------------------
const superviseModule = () => import('@/Page/superviseModule/superviseModule') //监督记录 

// *****************测报系统**********************
import cbd from '@/page/forecasting/cbd/Cbd' //首页
import DataDetails from '@/page/forecasting/cbd/DataDetails' //数据详情
import DataPhotos from '@/page/forecasting/cbd/cbdDataPhotos' //图片详情
import PestsStats from '@/page/forecasting/cbd/pestsStats' //害虫统计
import tongji from '@/page/forecasting/cbd/tongji' //害虫分析
import deviceTongji from '@/page/forecasting/cbd/deviceTongji' //害虫排行
// ********************监控**************************
import monitor from '@/page/monitor/Monitor'
import photoView from '@/page/monitor/PhotoView'
//*********************诱捕器系统********************
import maintain from '@/page/forecasting/maintain/maintain' //监测点维护
import trap from '@/page/forecasting/trap/trap' //诱捕器
import fillinrecord from '@/page/forecasting/trap/fillinrecord' //填报记录
import bait from '@/page/forecasting/trap/bait' //诱剂维护

Vue.use(Router)

export default new Router({
  routes: [{
      path: '/',
      name: 'Login',
      component: Login
    },
    {
      path: '/Login',
      name: 'Login',
      component: Login
    },
    {
      path: '/Index',
      name: 'Index',
      component: Index,
      children: [
        //------------------首页--------------------------
        {
          path: '/',
          component: facilitydistribute,
          meta: {
            title: '设备分布'
          }
        },
        {
          path: 'facilitydistribute',
          component: facilitydistribute,
          meta: {
            title: '设备分布'
          }
        }, {
          path: 'pestdistribute',
          component: pestdistribute,
          meta: {
            title: '有害生物分布'
          }
        },
        //------------------系统管理--------------------------
        {
          path: 'customsManger',
          component: customsManger,
          meta: {
            title: '隶属海关管理'
          }
        },
        {
          path: 'role',
          component: role,
          meta: {
            title: '角色管理'
          }
        },
        {
          path: 'motif',
          component: motif,
          meta: {
            title: '主题管理'
          }
        },
        {
          path: 'harmfulBiology',
          component: harmfulBiology,
          meta: {
            title: '有害生物维护'
          }
        },
        {
          path: 'userManger',
          component: userManger,
          meta: {
            title: '用户管理'
          }
        },
        {
          path: 'dayRecord',
          component: dayRecord,
          meta: {
            title: '日志管理'
          }
        },
        //------------------系统管理--------------------------
        //------------------指挥中心--------------------------
        {
          path: 'realTime',
          component: realTime,
          meta: {
            title: '实时通信'
          }
        },
        {
          path: 'laboratory',
          component: laboratory,
          meta: {
            title: '实验室识别'
          }
        },
        {
          path: 'taskRegulator',
          component: taskRegulator,
          meta: {
            title: '任务管理'
          }
        },
        {
          path: 'taskRegulatorDetails',
          component: taskRegulatorDetails,
          meta: {
            title: '任务管理详情'
          }
        },
        {
          path: 'superviseAdmin',
          component: superviseAdmin,
          meta: {
            title: '监督管理'
          }
        },
        {
          path: 'superviseAdminDetails',
          component: superviseAdminDetails,
          meta: {
            title: '监督管理详情'
          }
        },
        {
          path: 'supervise',
          component: supervise,
          meta: {
            title: '监督记录'
          }
        },
        {
          path: 'superviseDetails',
          component: superviseDetails,
          meta: {
            title: '监督记录详情'
          }
        },
        {
          path: 'superviseLog',
          component: superviseLog,
          meta: {
            title: '监测日志'
          }
        },
        {
          path: 'superviseLogDetails',
          component: superviseLogDetails,
          meta: {
            title: '监测日志详情'
          }
        },
        //------------------指挥中心--------------------------
        //------------------监督记录--------------------------
        {
          path: 'superviseModule',
          component: superviseModule,
          meta: {
            title: '监督记录'
          }
        },
        //------------------监督记录--------------------------
        {
          path: 'cbd',
          component: cbd
        },
        {
          path: 'DataDetails/:e_id/:d_id',
          component: DataDetails
        },
        {
          path: 'DataPhotos/:id',
          component: DataPhotos
        },
        {
          path: 'pestsStats/:d_id/:id',
          component: PestsStats
        },
        {
          path: 'tongji',
          component: tongji
        },
        {
          path: 'deviceTongji',
          component: deviceTongji
        },
        {
          path: 'monitor',
          component: monitor
        },
        {
          path: 'photoView/:id',
          component: photoView
        },
        // ------------------诱捕器管理-------------------
        {
          path: 'trap',
          component: trap
        },
        {
          path: 'fillinrecord',
          component: fillinrecord
        },
        {
          path: 'bait',
          component: bait
        },
        // ------------------监测点维护-------------------
        {
          path: 'maintain',
          component: maintain
        },
      ]
    },
  ]
})
