import Vue from 'vue'
import Router from 'vue-router'
/* Layout */
import Layout from '@/layout'

Vue.use(Router)

/**
 * Note: 路由配置项
 *
 * hidden: true                   // 当设置 true 的时候该路由不会再侧边栏出现 如401，login等页面，或者如一些编辑页面/edit/1
 * alwaysShow: true               // 当你一个路由下面的 children 声明的路由大于1个时，自动会变成嵌套的模式--如组件页面
 *                                // 只有一个时，会将那个子路由当做根路由显示在侧边栏--如引导页面
 *                                // 若你想不管路由下面的 children 声明的个数都显示你的根路由
 *                                // 你可以设置 alwaysShow: true，这样它就会忽略之前定义的规则，一直显示根路由
 * redirect: noRedirect           // 当设置 noRedirect 的时候该路由在面包屑导航中不可被点击
 * name:'router-name'             // 设定路由的名字，一定要填写不然使用<keep-alive>时会出现各种问题
 * meta : {
 noCache: true                // 如果设置为true，则不会被 <keep-alive> 缓存(默认 false)
 title: 'title'               // 设置该路由在侧边栏和面包屑中展示的名字
 icon: 'svg-name'             // 设置该路由的图标，对应路径src/assets/icons/svg
 breadcrumb: false            // 如果设置为false，则不会在breadcrumb面包屑中显示
 }
 */

// 公共路由
export const constantRoutes = [
  {
    path: '*',
    component: (resolve) => require(['@/views/error/404.vue'], resolve)
  },
  {
    path: '/redirect',
    component: Layout,
    hidden: true,
    children: [
      {
        path: '/redirect/:path(.*)',
        component: (resolve) => require(['@/views/redirect'], resolve)
      }
    ]
  },
  {
    path: '/login',
    component: (resolve) => require(['@/views/login'], resolve),
    hidden: true
  },
  {
    path: '/socialLogin',
    component: (resolve) => require(['@/views/socialLogin'], resolve),
    hidden: true
  },
  {
    path: '/azureLogin',
    component: (resolve) => require(['@/views/azureLogin'], resolve),
    hidden: true
  },
  {
    path: '/404',
    component: (resolve) => require(['@/views/error/404'], resolve),
    hidden: true
  },
  {
    path: '/401',
    component: (resolve) => require(['@/views/error/401'], resolve),
    hidden: true
  },
  {
    path: '/BCCdashboard',
    component: (resolve) => require(['@/views/monitor/elec/index'], resolve),
    hidden: true
  },
  {
    path: '/pptyulan',
    name: 'pptyulan',
    component: (resolve) => require(['@/views/components/yulan/index'], resolve),
    hidden: true
  },
  {
    path: '/elecDashboard',
    component: (resolve) => require(['@/views/monitor/elec/elecindex'], resolve),
    hidden: true
  },
  {
    path: '',
    component: Layout,
    redirect: 'index',
    children: [
      {
        path: 'index',
        component: (resolve) => require(['@/views/index'], resolve),
        name: '首页',
        meta: {title: '首页', icon: 'dashboard', noCache: true, affix: true}
      }
    ]
  },
  {
    path: '/user',
    component: Layout,
    hidden: true,
    redirect: 'noredirect',
    children: [
      {
        path: 'profile',
        component: (resolve) => require(['@/views/system/user/profile/index'], resolve),
        name: 'Profile',
        meta: {title: '个人中心', icon: 'user'}
      }
    ]
  },
  {
    path: '/system',
    component: Layout,
    hidden: true,
    redirect: 'noredirect',
    children: [
      {
        path: 'message',
        component: (resolve) => require(['@/views/system/message/index'], resolve),
        name: 'Profile',
        meta: {title: '系统消息', icon: ''}
      }
    ]
  },
  {
    path: '/process',
    component: Layout,
    hidden: true,
    redirect: 'noredirect',
    children: [
      {
        path: 'pfd',
        component: (resolve) => require(['@/views/process/pfd/index'], resolve),
        name: 'Profile',
        meta: {title: 'pfd', icon: ''}
      }
    ]
  },
  {
    path: '/dict',
    component: Layout,
    hidden: true,
    children: [
      {
        path: 'type/data/:dictId(\\d+)',
        component: (resolve) => require(['@/views/system/dict/data'], resolve),
        name: 'Data',
        meta: {title: '字典数据', icon: ''}
      }
    ]
  },
  {
    path: '/ehs',
    component: Layout,
    hidden: true,
    alwaysShow: true,
    children: [
      {
        path: 'rcaudit',
        component: (resolve) => require(['@/views/ehs/rcaudit/index'], resolve),
        name: 'Rcaudit',
        meta: {
          title: 'RC审计助手',
          keepAlive: true,
          scrollTop: 0,
        }
      }
    ]
  },
  {
    path: '/job',
    component: Layout,
    hidden: true,
    children: [
      {
        path: 'log',
        component: (resolve) => require(['@/views/monitor/job/log'], resolve),
        name: 'JobLog',
        meta: {title: '调度日志'}
      }
    ]
  },
  {
    path: '/gen',
    component: Layout,
    hidden: true,
    children: [
      {
        path: 'edit/:tableId(\\d+)',
        component: (resolve) => require(['@/views/tool/gen/editTable'], resolve),
        name: 'GenEdit',
        meta: {title: '修改生成配置'}
      }
    ]
  },
  {
    path: '/ehs',
    component: Layout,
    hidden: true,
    children: [
      {
        path: 'rcfile/:id(\\d+)',
        component: (resolve) => require(['@/views/ehs/rcfile'], resolve),
        name: 'rcfile',
        meta: {title: '附件'}
      }
    ]
  },
  {
    path: '/plant/meeting',
    component: Layout,
    hidden: true,
    children: [
      {
        path: 'detail/:id(\\d+)',
        component: (resolve) => require(['@/views/plant/dailyMeeting/detail'], resolve),
        name: 'dailyMeetingDetail',
        meta: {title: '调度会议详情'}
      },
      {
        path: 'dailyMeetingConfig',
        component: (resolve) => require(['@/views/plant/dailyMeetingConfig'], resolve),
        name: 'dailyMeetingConfig',
        meta: {title: '调度会议配置'}
      },
      {
        path: 'dailyMeetingEmail',
        component: (resolve) => require(['@/views/plant/dailyMeetingEmail'], resolve),
        name: 'dailyMeetingEmail',
        meta: {title: '邮件配置'}
      }
    ]
  },
  {
    path: '/plant',
    component: Layout,
    hidden: true,
    children: [
      {
        path: 'confInfoList',
        component: (resolve) => require(['@/views/plant/confInfo/list'], resolve),
        name: 'confInfoList',
        meta: {title: '会议预约记录'}
      },
    ]
  },
  {
    path: '/production',
    component: Layout,
    hidden: true,
    children: [
      {
        path: 'quality/report/:sampleDate',
        component: (resolve) => require(['@/views/production/quality/report'], resolve),
        name: 'report',
        meta: {title: '生成报告'}
      },
      {
        path: 'quality/history',
        component: (resolve) => require(['@/views/production/quality/history'], resolve),
        name: 'history',
        meta: {title: '历史报告查看'}
      },
      {
        path: 'matrix',
        component: (resolve) => require(['@/views/production/matrix'], resolve),
        name: 'matrix',
        meta: {title: 'PPE矩阵管理'}
      },
      {
        path: '/training/records',
        component: (resolve) => require(['@/views/training/records'], resolve),
        name: 'records',
        meta: {title: '装置级培训记录'}
      },
      {
        path: '/trainingbcc/records',
        component: (resolve) => require(['@/views/training/trainingbcc/record'], resolve),
        name: 'bccRecords',
        meta: {title: '装置培训记录'}
      },
      {
        path: '/trainingrecords/companyRecords',
        component: (resolve) => require(['@/views/training/trainingrecords/companyRecrods.vue'], resolve),
        name: 'companyRecords',
        meta: {title: '公司级培训记录'}
      }
    ]
  },
  {
    path: '/training/spec',
    component: Layout,
    hidden: true,
    children: [
      {
        path: 'successorPlan/:staffId(\\d+)',
        component: (resolve) => require(['@/views/training/spec/successor/successorPlan'], resolve),
        name: 'SuccessorPlan',
        meta: {title: '培训计划清单'}
      },
      {
        path: 'monthdata/:staffId(\\d+)',
        component: (resolve) => require(['@/views/training/spec/successor/monthdata'], resolve),
        name: 'monthdata',
        meta: {title: '月度数据'}
      },
      {
        path: 'seasondata/:staffId(\\d+)',
        component: (resolve) => require(['@/views/training/spec/successor/seasondata'], resolve),
        name: 'seasondata',
        meta: {title: '季度数据'}
      }
    ]
  },
  {
    path: '/training/spec',
    component: Layout,
    hidden: true,
    children: [
      {
        path: 'planItem/:yearId(\\d+)',
        component: (resolve) => require(['@/views/training/spec/plan/index'], resolve),
        name: 'PlanItem',
        meta: {title: '培训计划明细'}
      }
    ]
  },
  {
    path: '/training/newstaff',
    component: Layout,
    hidden: true,
    children: [
      {
        path: 'planList/:newId(\\d+)',
        component: (resolve) => require(['@/views/training/newstaff/planList'], resolve),
        name: 'planList',
        meta: {title: '新员工培训计划'}
      },
    ]
  },
  {
    path: '/training/bccnew',
    component: Layout,
    hidden: true,
    children: [
      {
        path: 'trainingPlan/:newId(\\d+)',
        component: (resolve) => require(['@/views/training/bccnew/tsnew/trainingPlan.vue'], resolve),
        name: 'trainingPlan',
        meta: {title: '导师带徒培训计划'}
      }, {
        path: 'trainingPlan_s/:newId(\\d+)',
        component: (resolve) => require(['@/views/training/bccnew/tsnew/trainingPlan_student.vue'], resolve),
        name: 'trainingPlans',
        meta: {title: '导师带徒培训计划'}
      }, {
        path: 'firstPlan_t/:newId(\\d+)',
        component: (resolve) => require(['@/views/training/bccnew/firstplan/index_t.vue'], resolve),
        name: 'firstPlanT',
        meta: {title: '导师带徒装置级培训计划'}
      },
    ]
  },
  {
    path: '/production',
    component: Layout,
    hidden: true,
    children: [
      {
        path: 'accident',
        component: (resolve) => require(['@/views/production/accident/index'], resolve),
        name: 'Accident',
        meta: {title: '隐患排查'}
      }
    ]
  },
  {
    path: '/document',
    component: Layout,
    hidden: true,
    children: [
      {
        path: 'publicdocmenu',
        component: (resolve) => require(['@/views/document/publicdocmenu/index'], resolve),
        name: 'PublicDocMenu',
        meta: {title: '公共文档目录管理'}
      }
    ]
  },
  {
    path: '/system',
    component: Layout,
    hidden: true,
    children: [
      {
        path: 'alarmprincipal/:tableId(\\d+)',
        component: (resolve) => require(['@/views/system/principal/index'], resolve),
        name: 'AlarmPrincipal',
        meta: {title: '预警管理负责人配置'}
      }
    ]
  },
  {
    path: '/ehs',
    component: Layout,
    hidden: true,
    children: [
      {
        path: 'rcauditmenu',
        component: (resolve) => require(['@/views/ehs/rcauditmenu/index'], resolve),
        name: 'RcauditMenu',
        meta: {title: 'RC审计助手目录管理'}
      }
    ]
  },
  {
    path: '/ehs',
    component: Layout,
    hidden: true,
    children: [
      {
        path: 'environapproval',
        component: (resolve) => require(['@/views/ehs/environapproval/index'], resolve),
        name: 'Environapproval',
        meta: {title: '环保批文清单'}
      }
    ]
  },
  {
    path: '/ehs',
    component: Layout,
    hidden: true,
    children: [
      {
        path: 'fireapproval',
        component: (resolve) => require(['@/views/ehs/fireapproval/index'], resolve),
        name: 'Fireapproval',
        meta: {title: '消防批文清单'}
      }
    ]
  },
  {
    path: '/ehs',
    component: Layout,
    hidden: true,
    children: [
      {
        path: 'safetyapproval',
        component: (resolve) => require(['@/views/ehs/safetyapproval/index'], resolve),
        name: 'Safetyapproval',
        meta: {title: '安全批文清单'}
      }
    ]
  },
  {
    path: '/ehs',
    component: Layout,
    hidden: true,
    children: [
      {
        path: 'msds',
        component: (resolve) => require(['@/views/ehs/msds/index'], resolve),
        name: 'Msds',
        meta: {title: 'MSDS管理'}
      }
    ]
  },
  {
    path: '/ehs',
    component: Layout,
    hidden: true,
    children: [
      {
        path: 'fireextinguisher',
        component: (resolve) => require(['@/views/ehs/fireextinguisher/index'], resolve),
        name: 'Fireextinguisher',
        meta: {title: '灭火器'}
      }
    ]
  },
  {
    path: '/ehs',
    component: Layout,
    hidden: true,
    children: [
      {
        path: 'eyewasher',
        component: (resolve) => require(['@/views/ehs/eyewasher/index'], resolve),
        name: 'Eyewasher',
        meta: {title: '洗眼器'}
      }
    ]
  },
  {
    path: '/ehs',
    component: Layout,
    hidden: true,
    children: [
      {
        path: 'firehose',
        component: (resolve) => require(['@/views/ehs/firehose/index'], resolve),
        name: 'Firehose',
        meta: {title: '消防水带箱'}
      }
    ]
  },
  {
    path: '/ehs',
    component: Layout,
    hidden: true,
    children: [
      {
        path: 'firehydrant',
        component: (resolve) => require(['@/views/ehs/firehydrant/index'], resolve),
        name: 'Firehydrant',
        meta: {title: '消防栓'}
      }
    ]
  },
  {
    path: '/ehs',
    component: Layout,
    hidden: true,
    children: [
      {
        path: 'highpresfire',
        component: (resolve) => require(['@/views/ehs/highpresfire/index'], resolve),
        name: 'Highpresfire',
        meta: {title: '高压消防炮'}
      }
    ]
  },
  {
    path: '/ehs',
    component: Layout,
    hidden: true,
    children: [
      {
        path: 'autosprinkler',
        component: (resolve) => require(['@/views/ehs/autosprinkler/index'], resolve),
        name: 'Autosprinkler',
        meta: {title: '自动喷淋系统'}
      }
    ]
  },
  {
    path: '/ehs',
    component: Layout,
    hidden: true,
    children: [
      {
        path: 'firestandpipe',
        component: (resolve) => require(['@/views/ehs/firestandpipe/index'], resolve),
        name: 'Firestandpipe',
        meta: {title: '消防竖管'}
      }
    ]
  },
  {
    path: '/document',
    component: Layout,
    hidden: true,
    children: [
      {
        path: 'plantproglist',
        component: (resolve) => require(['@/views/document/plantproglist/index'], resolve),
        name: 'Plantproglist',
        meta: {title: '装置程序清单'}
      }
    ]
  },
  {
    path: '/plant',
    component: Layout,
    hidden: true,
    children: [
      {
        path: 'confInfo',
        component: (resolve) => require(['@/views/plant/confInfo/index'], resolve),
        name: 'ConfInfo',
        meta: {title: '会议预约信息'}
      }
    ]
  },
  {
    path: '/affair',
    component: Layout,
    hidden: true,
    children: [
      {
        path: 'ppe',
        component: (resolve) => require(['@/views/affair/ppe/index'], resolve),
        name: 'Ppe',
        meta: {title: 'PPE发放登记'}
      }
    ]
  },
  {
    path: '/training',
    component: Layout,
    hidden: true,
    children: [
      {
        path: 'workcertificate',
        component: (resolve) => require(['@/views/training/workcertificate/index'], resolve),
        name: 'Workcertificate',
        meta: {title: '作业证书一览表'}
      }
    ]
  },
  {
    path: '/training',
    component: Layout,
    hidden: true,
    children: [
      {
        path: 'worklicense',
        component: (resolve) => require(['@/views/training/worklicense/index'], resolve),
        name: 'Worklicense',
        meta: {title: '上岗证一览表'}
      }
    ]
  },
  // 生产日报-查看月度数据
  {
    path: '/production',
    component: Layout,
    hidden: true,
    children: [
      {
        path: 'monthData',
        component: (resolve) => require(['@/views/production/monthData/index'], resolve),
        name: 'MonthData',
        meta: {title: '查看月度数据'}
      }
    ]
  },
  {
    path: '/training',
    component: Layout,
    hidden: true,
    children: [
      {
        path: 'deviceList/:id',
        component: (resolve) => require(['@/views/training/trainingbcc/deviceList'], resolve),
        name: 'deviceList',
        meta: {title: '装置培训详情'}
      }
    ]
  },
  {
    path: '/pssr',
    component: Layout,
    hidden: true,
    children: [
      {
        path: 'subcontent/:aboveallId',
        component: () => import('@/views/pssr/subcontent'),
        name: 'Subcontent',
        meta: {title: '开车条件检查内容', noCache: true},
        hidden: true
      },
      {
        path: 'subitem/:subId&:serialNumber',
        component: () => import('@/views/pssr/subitem'),
        name: 'Subitem',
        meta: {title: '开车条件检查项', noCache: true},
        hidden: true,
        beforeEnter: (to, from, next) => {
          console.log("to", to)
          console.log("from", from)
          console.log("next", next)
          if (to.fullPath.includes('jxxm')) {
            to.meta.title = '检修项目';
          } else if (to.fullPath.includes('kgfa')) {
            to.meta.title = '开工方案';
          } else if (to.fullPath.includes('sjbg')) {
            to.meta.title = '设计变更';
          } else if (to.fullPath.includes('mb')) {
            to.meta.title = '盲板';
          } else if (to.fullPath.includes('xcws')) {
            to.meta.title = '现场卫生';
          } else if (to.fullPath.includes('rsfh')) {
            to.meta.title = '人身防护';
          } else if (to.fullPath.includes('sbqjd')) {
            to.meta.title = '设备清洁度';
          } else if (to.fullPath.includes('qm')) {
            to.meta.title = '气密';
          } else if (to.fullPath.includes('sksgfmzt')) {
            to.meta.title = '锁开锁关阀门状态';
          } else if (to.fullPath.includes('sys')) {
            to.meta.title = '实验室';
          } else if (to.fullPath.includes('djsb')) {
            to.meta.title = '电机设备';
          } else if (to.fullPath.includes('jdjdkj')) {
            to.meta.title = '静电接地/跨接';
          } else if (to.fullPath.includes('zdj')) {
            to.meta.title = '支（吊）架';
          } else if (to.fullPath.includes('dj')) {
            to.meta.title = '短接';
          } else if (to.fullPath.includes('dqzh')) {
            to.meta.title = '氮气置换';
          } else if (to.fullPath.includes('xqf')) {
            to.meta.title = '消气防设施';
          } else if (to.fullPath.includes('aqss')) {
            to.meta.title = '安全设施';
          } else if (to.fullPath.includes('txjk')) {
            to.meta.title = '通讯监控';
          } else if (to.fullPath.includes('bxsjcy')) {
            to.meta.title = '便携式检测仪';
          } else if (to.fullPath.includes('gygc')) {
            to.meta.title = '公用工程';
          } else if (to.fullPath.includes('hbss')) {
            to.meta.title = '环保设施';
          } else if (to.fullPath.includes('yfl')) {
            to.meta.title = '原辅料';
          } else if (to.fullPath.includes('jb')) {
            to.meta.title = '机泵';
          } else if (to.fullPath.includes('tzsb')) {
            to.meta.title = '压力管道/压力容器';
          } else if (to.fullPath.includes('ybjy')) {
            to.meta.title = '仪表校验';
          } else if (to.fullPath.includes('yblscs')) {
            to.meta.title = '仪表联锁测试';
          } else if (to.fullPath.includes('bjlszqr')) {
            to.meta.title = '报警/联锁值确认';
          } else if (to.fullPath.includes('lsdy')) {
            to.meta.title = '临时电源';
          } else if (to.fullPath.includes('zmdbr')) {
            to.meta.title = '照明、电伴热';
          } else if (to.fullPath.includes('qtjcy')) {
            to.meta.title = '气体检测仪';
          } else if (to.fullPath.includes('zxfxy')) {
            to.meta.title = '在线分析仪';
          }
          next();
        },
      },
      {
        path: 'mgrApprove',
        component: (resolve) => require(['@/views/approve/approveDetail/pssrMgrApprove-detail.vue'], resolve),
        name: 'mgrApprove',
        meta: {title: '经理审批流程', noCache: true}
      }
    ]
  },
  {
    path: '/training/elearn',
    component: Layout,
    hidden: true,
    children: [
      {
        path: 'exam/prepare/:examId',
        component: () => import('@/views/training/elearn/paper/preview'),
        name: 'PreExam',
        meta: {title: '准备考试', noCache: true},
        hidden: true
      }, {
        path: 'paper/:examId',
        component: () => import('@/views/training/elearn/paper/list'),
        name: 'paper',
        meta: {title: '在线考试', noCache: true},
        hidden: true
      }, {
        path: 'exam/start/:paperId',
        component: () => import('@/views/training/elearn/paper/exam'),
        name: 'StartExam',
        meta: {title: '开始考试', noCache: true},
        hidden: true
      },
      {
        path: 'exam/result/:paperId',
        component: () => import('@/views/training/elearn/paper/result'),
        name: 'ShowExam',
        meta: {title: '考试结果', noCache: true},
        hidden: true
      },
      {
        path: 'userBook/training',
        component: () => import('@/views/training/elearn/userBook/train'),
        name: 'BookTraining',
        meta: {title: '错题训练', noCache: true},
        hidden: true
      },
      {
        path: 'repo/training/:repoId',
        component: () => import('@/views/training/elearn/userQu/train'),
        name: 'RepoTraining',
        meta: {title: '题库训练', noCache: true},
        hidden: true
      },
      {
        path: 'userQu/users/:examId',
        component: () => import('@/views/training/elearn/userExam/userList'),
        name: 'ListExamUser',
        meta: {title: '考试人员', noCache: true},
        hidden: true
      },
    ]
  },
  {
    path: '/reliability',
    component: Layout,
    hidden: true,
    children: [
      {
        path: 'safetyvavle',
        component: (resolve) => require(['@/views/reliability/safetyvavle/index'], resolve),
        name: 'Safetyvavle',
        meta: {title: '安全阀清单'}
      }
    ]
  },
  {
    path: '/reliability',
    component: Layout,
    hidden: true,
    children: [
      {
        path: 'pipe',
        component: (resolve) => require(['@/views/cui/pipe/index'], resolve),
        name: 'Pipe',
        meta: {title: '管线清单'}
      }
    ]
  },
  {
    path: '/list',
    component: Layout,
    hidden: true,
    children: [
      {
        path: 'list',
        component: (resolve) => require(['@/views/reliability/list/index'], resolve),
        name: 'List',
        meta: {title: '故障管理跟踪'}
      }
    ]
  },
  {
    path: '/safetyapproval',
    component: Layout,
    hidden: true,
    children: [
      {
        path: 'edit/:tableId(\\d+)',
        component: (resolve) => require(['@/views/ehs/safetyapprcont/index'], resolve),
        name: 'Safetyapprcont',
        meta: {title: '主要内容'}
      }
    ]
  },
  {
    path: '/environapproval',
    component: Layout,
    hidden: true,
    children: [
      {
        path: 'edit/:tableId(\\d+)',
        component: (resolve) => require(['@/views/ehs/environapprcont/index'], resolve),
        name: 'Environapprcont',
        meta: {title: '主要内容'}
      }
    ]
  },
  {
    path: '/hismeeting',
    component: Layout,
    hidden: true,
    children: [
      {
        path: 'edit/:tableId(\\d+)',
        component: (resolve) => require(['@/views/plant/weekmeeting/index'], resolve),
        name: 'hismeeting',
        meta: {title: '主要内容'}
      }
    ]
  },
  {
    path: '/notice',
    component: Layout,
    hidden: true,
    children: [
      {
        path: 'details',
        component: (resolve) => require(['@/views/system/notice/index.vue'], resolve),
        name: 'details',
        meta: {title: '通知公告'}
      }
    ]
  },
  {
    path: '/model',
    component: Layout,
    hidden: true,
    children: [
      {
        path: 'pfd',
        component: (resolve) => require(['@/views/monitor/pfd/index.vue'], resolve),
        name: 'pfd',
        meta: {title: 'pfd流程'}
      },
      {
        path: '/pfd/jlq',
        component: (resolve) => require(['@/views/monitor/pfd/JLQPage.vue'], resolve),
        name: 'jlq',
        meta: {title: '急冷区'}
      },
      {
        path: '/pfd/c2c3',
        component: (resolve) => require(['@/views/monitor/pfd/C2C3Page.vue'], resolve),
        name: 'c2c3',
        meta: {title: 'C2C3'}
      }
    ]
  },

  //生产运行子页面
  {
    path: '/materialChild1',
    component: (resolve) => require(['@/views/monitor/materialChild/materialChild1.vue'], resolve),
    name: 'materialChild1',
    hidden: true,
    meta: {title: '工艺流程图'}
  },
  {
    path: '/materialChild2',
    component: (resolve) => require(['@/views/monitor/materialChild/materialChild2.vue'], resolve),
    name: 'materialChild2',
    hidden: true,
    meta: {title: '工艺流程图'}
  },
  // 2023-02 首页重构
  {
    path: '/BCCdashboardNew',
    component: (resolve) => require(['@/views/monitor/bccHome'], resolve),
    hidden: true
  },

  {
    path: '/ylgdopen',
    component: (resolve) => require(['@/views/sems/reportYlgd/ylgdopen'], resolve),
    hidden: true
  },
  {
    path: '/ylrqopen',
    component: (resolve) => require(['@/views/sems/reportYlrq/ylrqopen'], resolve),
    hidden: true
  },
  //鸟瞰图-区域详情
  {
    path: '/aerial',
    component: Layout,
    hidden: true,
    children: [
      {
        path: 'detail',
        component: (resolve) => require(['@/views/aerial/detail/index.vue'], resolve),
        name: 'detail',
        meta: { title: '区域详情' }
      }
    ]
  },
]
export default new Router({
  base: '/cpms/',
  mode: 'hash', // 去掉url中的#
  scrollBehavior: () => ({y: 0}),
  routes: constantRoutes
})
