import Vue from 'vue'
import Router from 'vue-router'
import index from '@/page/index'
import layout from '@/page/Layout/layout.vue'
import earlyWarningHome from '@/page/earlyWarning/home/index.vue'
import overheadWarning from '@/page/earlyWarning/overheadWarning/index.vue'
import overheadWarninged from '@/page/earlyWarning/overheadWarning/indexed.vue'
import overheadWarningup from '@/page/earlyWarning/overheadWarning/indexup.vue'
import overheadWarningDetail from '@/page/earlyWarning/overheadWarning/detail.vue'

import overrunWarningup from '@/page/earlyWarning/overrunWarning/indexup.vue'
import overrunWarninged from '@/page/earlyWarning/overrunWarning/indexed.vue'
import violationWarningup from '@/page/earlyWarning/violationWarning/indexup.vue'
import violationWarninged from '@/page/earlyWarning/violationWarning/indexed.vue'
import shortPositionWarningup from '@/page/earlyWarning/shortPositionWarning/indexup.vue'
import shortPositionWarninged from '@/page/earlyWarning/shortPositionWarning/indexed.vue'
import storageOverrunWarningup from '@/page/earlyWarning/storageOverrunWarning/indexup.vue'
import storageOverrunWarninged from '@/page/earlyWarning/storageOverrunWarning/indexed.vue'

import alarmThreshold from '@/page/earlyWarning/alarmThreshold/index.vue'

import temp from '@/page/earlyWarning/humitureWarning/temp.vue'
import humidity from '@/page/earlyWarning/humitureWarning/humidity.vue'
import dewing from '@/page/earlyWarning/humitureWarning/dewing.vue'

import abnormalInventoryTime from '@/page/earlyWarning/internalControlWarning/abnormalInventoryTime.vue'
import abnormalTareWeight from '@/page/earlyWarning/internalControlWarning/abnormalTareWeight.vue'
import BadCustomerInformation from '@/page/earlyWarning/internalControlWarning/BadCustomerInformation.vue'
import measureTemp from '@/page/earlyWarning/deviceFault/measureTemp.vue'
import camera from '@/page/earlyWarning/deviceFault/camera.vue'
import lxList from '@/page/earlyWarning/deviceFault/lxList.vue'
import inspectionReportup from '@/page/earlyWarning/inspectionReport/indexup.vue'
import inspectionReported from '@/page/earlyWarning/inspectionReport/indexed.vue'

Vue.use(Router)
export default new Router({
  // mode:'history',
  //ssss
  routes: [
    {
      //预警
      path: '/earlyWarning',
      name: 'index',
      component: index,
      children: [
        {
          path: '/earlyWarning/home',
          name: 'layout',
          component: layout,
          children: [
            // {
            //   path: '/earlyWarning/home/index',
            //   name: 'earlyWarningHome',
            //   meta: {
            //     title: '主题风格设置'
            //   },
            //   component: earlyWarningHome
            // },
            //温湿度预警
            {
              path: '/earlyWarning/humitureWarning',
              name: 'humitureWarn',
              meta: {
                title: '温湿度预警'
              },
              component: {
                render(c) {
                  return c('router-view')
                }
              },
              children: [{
                path: '/earlyWarning/temp/index',
                name: 'temp',
                meta: {
                  title: '温度预警'
                },
                component: temp
              },
              {
                path: '/earlyWarning/humidity/index',
                name: 'humidity',
                meta: {
                  title: '湿度报警'
                },
                component: humidity
              },
              {
                path: '/earlyWarning/dewing/index',
                name: 'dewing',
                meta: {
                  title: '结露预警'
                },
                component: dewing
              },
              ]
            },
            //设备故障
            {
              path: '/earlyWarning/deviceFault',
              name: 'deviceFault',
              meta: {
                title: '设备故障'
              },
              component: {
                render(c) {
                  return c('router-view')
                }
              },
              children: [{
                path: '/earlyWarning/measureTemp/index',
                name: 'measureTemp',
                meta: {
                  title: '温度预警'
                },
                component: measureTemp
              },
              {
                path: '/earlyWarning/camera/index',
                name: 'camera',
                meta: {
                  title: '摄像头'
                },
                component: camera
              },
              {
                path: '/earlyWarning/lxList/index',
                name: 'lxList',
                meta: {
                  title: '摄像头'
                },
                component: lxList
              },
              ]
            },
            //库存超限报警
            {
              path: '/earlyWarning/overrunWarning',
              name: 'overrunWarn',
              meta: {
                title: '库存超限报警'
              },
              component: {
                render(c) {
                  return c('router-view')
                }
              },
              children: [{
                path: '/earlyWarning/overrunWarning/index',
                name: 'overrunWarningup',
                meta: {
                  title: '待处理'
                },
                component: overrunWarningup
              },
              {
                path: '/earlyWarning/overrunWarninged/index',
                name: 'overrunWarninged',
                meta: {
                  title: '已处理'
                },
                component: overrunWarninged
              },
              ]
            },
            //架空期预警
            {
              path: '/earlyWarning/overheadWarning',
              name: 'overheadWarn',
              meta: {
                title: '架空期预警'
              },
              component: {
                render(c) {
                  return c('router-view')
                }
              },
              children: [{
                path: '/earlyWarning/overheadWarning/index',
                name: 'overheadWarningup',
                meta: {
                  title: '待处理'
                },
                component: overheadWarningup
              },
              {
                path: '/earlyWarning/overheadWarninged/index',
                name: 'overheadWarninged',
                meta: {
                  title: '已处理'
                },
                component: overheadWarninged
              },
              {
                path: '/earlyWarning/overheadWarninged/detail',
                name: 'overheadWarningDetail',
                meta: {
                  title: '架空期详情'
                },
                component: overheadWarningDetail
              },
              ]
            },
            // 违规预警
            {
              path: '/earlyWarning/violationWarning',
              name: 'violationWarn',
              meta: {
                title: '违规预警'
              },
              component: {
                render(c) {
                  return c('router-view')
                }
              },
              children: [{
                path: '/earlyWarning/violationWarningup/index',
                name: 'violationWarningup',
                meta: {
                  title: '待处理'
                },
                component: violationWarningup
              },
              {
                path: '/earlyWarning/violationWarninged/index',
                name: 'violationWarninged',
                meta: {
                  title: '已处理'
                },
                component: violationWarninged
              },
              ]
            },
            //库存空仓报警
            {
              path: '/earlyWarning/shortPositionWarning',
              name: 'shortPositionWarn',
              meta: {
                title: '库存空仓报警'
              },
              component: {
                render(c) {
                  return c('router-view')
                }
              },
              children: [{
                path: '/earlyWarning/shortPositionWarningup/index',
                name: 'shortPositionup',
                meta: {
                  title: '待处理'
                },
                component: shortPositionWarningup
              },
              {
                path: '/earlyWarning/shortPositionWarninged/index',
                name: 'shortPositioned',
                meta: {
                  title: '已处理'
                },
                component: shortPositionWarninged
              },
              ]
            },
            //存储超限报警
            {
              path: '/earlyWarning/shortPositionWarning',
              name: 'storageOverrunWarn',
              meta: {
                title: '存储超限报警'
              },
              component: {
                render(c) {
                  return c('router-view')
                }
              },
              children: [{
                path: '/earlyWarning/storageOverrunWarningup/index',
                name: 'storageOverrunWarningup',
                meta: {
                  title: '待处理'
                },
                component: storageOverrunWarningup
              },
              {
                path: '/earlyWarning/storageOverrunWarninged/index',
                name: 'storageOverrunWarninged',
                meta: {
                  title: '已处理'
                },
                component: storageOverrunWarninged
              },
              ]
            },
            // 内控预警
            {
              path: '/earlyWarning/internalControlWarning/index',
              name: 'internalControlWarning',
              meta: {
                title: '内控预警'
              },
              component: {
                render(c) {
                  return c('router-view')
                }
              },
              children: [
                {
                  path: '/earlyWarning/internalControlWarning/abnormalInventoryTime',
                  name: 'abnormalInventoryTime',
                  meta: {
                    title: '在库时间异常提示'
                  },
                  component: abnormalInventoryTime
                },
                {
                  path: '/earlyWarning/internalControlWarning/abnormalTareWeight',
                  name: 'abnormalTareWeight',
                  meta: {
                    title: '皮重较大差异报警'
                  },
                  component: abnormalTareWeight
                },
                {
                  path: '/earlyWarning/internalControlWarning/BadCustomerInformation',
                  name: 'BadCustomerInformation',
                  meta: {
                    title: '客户不良信息记录提示'
                  },
                  component: BadCustomerInformation
                },
              ]
            },
            //检验报告超期预警
            {
              path: '/earlyWarning/inspectionReport',
              name: 'inspectionReport',
              meta: {
                title: '检验报告超期预警'
              },
              component: {
                render(c) {
                  return c('router-view')
                }
              },
              children: [{
                path: '/earlyWarning/inspectionReport/index',
                name: 'inspectionReportup',
                meta: {
                  title: '待处理'
                },
                component: inspectionReportup
              },
              {
                path: '/earlyWarning/inspectionReported/index',
                name: 'inspectionReported',
                meta: {
                  title: '已处理'
                },
                component: inspectionReported
              },
              ]
            },
            // 报警阈值设置
            {
              path: '/earlyWarning/alarmThreshold/index',
              name: 'alarmThreshold',
              meta: {
                title: '报警阈值设置'
              },
              component: alarmThreshold,
            },
          ]
        }
      ]
    }
  ]
})