import Vue from 'vue';
import VueRouter from 'vue-router';
import store from '@/store/index';
const jwt = require('jsonwebtoken');
const originalPush = VueRouter.prototype.push;
VueRouter.prototype.push = function push(location) {
  return originalPush.call(this, location).catch((err) => err);
};
Vue.use(VueRouter);

const officer = [
  {
    path: '/officer',
    name: 'officer',
    meta: { title: '人员管理' },
    component: () => import('../views/officer/index.vue'),
  },
];
// 公安端-保安员管理
const security = [
  // 报名考试管理
  {
    path: '/adminPolice/security/baybm',
    meta: { title: '保安员报名' },
    component: () => import('../views/adminPolice/security/baybm/index.vue'),
  },
  {
    path: '/adminPolice/security/baybm/add',
    meta: { title: '保安员报名-添加&修改' },
    component: () => import('../views/adminPolice/security/baybm/add.vue'),
  },
  {
    path: '/adminPolice/security/baybm/info',
    meta: { title: '保安员报名-详细信息' },
    component: () => import('../views/adminPolice/security/baybm/info.vue'),
  },
  {
    path: '/adminPolice/security/bayzs',
    meta: { title: '保安员资料政审' },
    component: () => import('../views/adminPolice/security/bayzs/index.vue'),
  },
  {
    path: '/adminPolice/security/bayzs/info',
    meta: { title: '保安员资料政审-详细信息' },
    component: () => import('../views/adminPolice/security/bayzs/info.vue'),
  },
  {
    path: '/adminPolice/security/bayzs/check',
    meta: { title: '保安员资料政审-政审' },
    component: () => import('../views/adminPolice/security/bayzs/check.vue'),
  },
  {
    path: '/adminPolice/security/zwzpcj',
    meta: { title: '指纹与照片采集' },
    component: () => import('../views/adminPolice/security/zwzpcj/index.vue'),
  },
  {
    path: '/adminPolice/security/zwzpcj/info',
    meta: { title: '指纹与照片采集-详细信息' },
    component: () => import('../views/adminPolice/security/zwzpcj/info.vue'),
  },
  {
    path: '/adminPolice/security/baybk',
    meta: { title: '保安员补考' },
    component: () => import('../views/adminPolice/security/baybk/index.vue'),
  },
  // 保安员资格审核
  {
    path: '/adminPolice/security/bmzgsh',
    meta: { title: '报名资格审核' },
    component: () => import('../views/adminPolice/security/bmzgsh/index.vue'),
  },
  {
    path: '/adminPolice/security/bmzgsh/info',
    meta: { title: '报名资格审核-详细信息' },
    component: () => import('../views/adminPolice/security/bmzgsh/info.vue'),
  },
  {
    path: '/adminPolice/security/bmzgsh/check',
    meta: { title: '报名资格审核-资格审核' },
    component: () => import('../views/adminPolice/security/bmzgsh/check.vue'),
  },
  {
    path: '/adminPolice/security/zgsh',
    meta: { title: '报名资格审批' },
    component: () => import('../views/adminPolice/security/zgsh/index.vue'),
  },
  {
    path: '/adminPolice/security/zgsh/info',
    meta: { title: '报名资格审批-详细信息' },
    component: () => import('../views/adminPolice/security/zgsh/info.vue'),
  },
  {
    path: '/adminPolice/security/zgsh/check',
    meta: { title: '报名资格审批-资格审批' },
    component: () => import('../views/adminPolice/security/zgsh/check.vue'),
  },
  // 准考证管理
  {
    path: '/adminPolice/security/bmjf',
    meta: { title: '报名缴费' },
    component: () => import('../views/adminPolice/security/bmjf/index.vue'),
  },
  {
    path: '/adminPolice/security/kcbp',
    meta: { title: '考场编排' },
    component: () => import('../views/adminPolice/security/kcbp/index.vue'),
  },
  {
    path: '/adminPolice/security/kcbp/add',
    meta: { title: '考场编排-添加' },
    component: () => import('../views/adminPolice/security/kcbp/add.vue'),
  },
  {
    path: '/adminPolice/security/zkzdy',
    meta: { title: '准考证打印' },
    component: () => import('../views/adminPolice/security/zkzdy/index.vue'),
  },
  {
    path: '/adminPolice/security/zkzfmdy',
    meta: { title: '准考证封面打印' },
    component: () => import('../views/adminPolice/security/zkzfmdy/index.vue'),
  },
  {
    path: '/adminPolice/security/zkzcx',
    meta: { title: '准考证查询' },
    component: () => import('../views/adminPolice/security/zkzcx/index.vue'),
  },
  {
    path: '/adminPolice/security/ksxxdc',
    meta: { title: '考生信息导出' },
    component: () => import('../views/adminPolice/security/ksxxdc/index.vue'),
  },
  {
    path: '/adminPolice/security/ksqkdj',
    meta: { title: '考试情况登记' },
    component: () => import('../views/adminPolice/security/ksqkdj/index.vue'),
  },
  {
    path: '/adminPolice/security/kscjcx',
    meta: { title: '考试成绩查询' },
    component: () => import('../views/adminPolice/security/kscjcx/index.vue'),
  },
  {
    path: '/adminPolice/security/zkzdyrz',
    meta: { title: '准考证打印日志' },
    component: () => import('../views/adminPolice/security/zkzdyrz/index.vue'),
  },
  // 保安员证管理
  {
    path: '/adminPolice/security/bayxxcx',
    meta: { title: '保安员信息查询' },
    component: () => import('../views/adminPolice/security/bayxxcx/index.vue'),
  },
  {
    path: '/adminPolice/security/bayxxcx/info',
    meta: { title: '保安员信息查询-详细信息' },
    component: () => import('../views/adminPolice/security/bayxxcx/info.vue'),
  },
  {
    path: '/adminPolice/security/bayzzz',
    meta: { title: '保安员证制作' },
    component: () => import('../views/adminPolice/security/bayzzz/index.vue'),
  },
  {
    path: '/adminPolice/security/workCard',
    meta: { title: '保安员工牌管理' },
    component: () => import('../views/adminPolice/security/workCard/index.vue'),
  },
  {
    path: '/adminPolice/security/bayffdj',
    meta: { title: '保安员证发放登记' },
    component: () => import('../views/adminPolice/security/bayffdj/index.vue'),
  },
  {
    path: '/adminPolice/security/ysbdsq',
    meta: { title: '遗失补打申请' },
    component: () => import('../views/adminPolice/security/ysbdsq/index.vue'),
  },
  {
    path: '/adminPolice/security/ysbdsh',
    meta: { title: '遗失补打审核' },
    component: () => import('../views/adminPolice/security/ysbdsh/index.vue'),
  },
  {
    path: '/adminPolice/security/ysbd',
    meta: { title: '遗失补打' },
    component: () => import('../views/adminPolice/security/ysbd/index.vue'),
  },
  {
    path: '/adminPolice/security/dyrz',
    meta: { title: '打印日志' },
    component: () => import('../views/adminPolice/security/dyrz/index.vue'),
  },
  {
    path: '/adminPolice/security/qbbayxxcx',
    meta: { title: '全部保安员信息查询' },
    component: () => import('../views/adminPolice/security/qbbayxxcx/index.vue'),
  },
  {
    path: '/adminPolice/security/qbbayxxcx/info',
    meta: { title: '全部保安员信息查询-详细信息' },
    component: () => import('../views/adminPolice/security/qbbayxxcx/info.vue'),
  },
  {
    path: '/adminPolice/security/baoanbash',
    meta: { title: '保安员证备案（绑定）审核' },
    component: () => import('../views/adminPolice/security/baoanbash/index.vue'),
  },
  {
    path: '/adminPolice/security/baoanbash/info',
    meta: { title: '保安员证备案-详细信息' },
    component: () => import('../views/adminPolice/security/baoanbash/info.vue'),
  },

  // 统计分析
  {
    path: '/adminPolice/security/hjpcshctj',
    meta: { title: '户籍派出所核查统计' },
    component: () => import('../views/adminPolice/security/hjpcshctj/index.vue'),
  },
  {
    path: '/adminPolice/security/bmzstj',
    meta: { title: '报名政审统计' },
    component: () => import('../views/adminPolice/security/bmzstj/index.vue'),
  },
  {
    path: '/adminPolice/security/bmqktj',
    meta: { title: '报名情况统计' },
    component: () => import('../views/adminPolice/security/bmqktj/index.vue'),
  },
  {
    path: '/adminPolice/security/ksqktj',
    meta: { title: '考试情况统计' },
    component: () => import('../views/adminPolice/security/ksqktj/index.vue'),
  },
  // 保安员信息导入
  {
    path: '/adminPolice/security/baybmxxpldr',
    meta: { title: '保安员报名信息导入' },
    component: () => import('../views/adminPolice/security/baybmxxpldr/index.vue'),
  },
  {
    path: '/adminPolice/security/bayxxpldr',
    meta: { title: '保安员信息导入' },
    component: () => import('../views/adminPolice/security/bayxxpldr/index.vue'),
  },
  // 虹膜采集
  {
    path: '/adminPolice/security/b_info',
    meta: { title: '生物信息补采' },
    component: () => import('../views/adminPolice/security/b_info/index.vue'),
  },
];
// 公安端-许可审核审批管理
const permit = [
  {
    path: '/adminPolice/permit/slsqsl',
    meta: { title: '设立申请受理' },
    component: () => import('../views/adminPolice/permit/slsqsl/index.vue'),
  },
  {
    path: '/adminPolice/permit/slsqsl/info',
    meta: { title: '保安服务公司-详细信息' },
    component: () => import('../views/adminPolice/permit/slsqsl/info.vue'),
  },
  {
    path: '/adminPolice/permit/sjsh',
    meta: { title: '市级审核' },
    component: () => import('../views/adminPolice/permit/sjsh/index.vue'),
  },
  {
    path: '/adminPolice/permit/fwxkzgl',
    meta: { title: '服务许可证管理' },
    component: () => import('../views/adminPolice/permit/fwxkzgl/index.vue'),
  },
  {
    path: '/adminPolice/permit/fwxkzzz',
    meta: { title: '服务许可证制作' },
    component: () => import('../views/adminPolice/permit/fwxkzzz/index.vue'),
  },
  {
    path: '/adminPolice/permit/fwxkzffdj',
    meta: { title: '服务许可证发放登记' },
    component: () => import('../views/adminPolice/permit/fwxkzffdj/index.vue'),
  },
  {
    path: '/adminPolice/permit/frbgsjsh',
    meta: { title: '法人变更市级审核' },
    component: () => import('../views/adminPolice/permit/frbgsjsh/index.vue'),
  },
];
// 公安端-行政备案业务管理
const administration = [
  // 自行招用保安员单位
  // {
  //   path: '/adminPolice/administration/zxsjjgbmsh',
  //   meta: { title: '市级监管部门审核' },
  //   component: () => import('../views/adminPolice/administration/zxsjjgbmsh/index.vue'),
  // },
  {
    path: '/adminPolice/administration/zxsjsh',
    meta: { title: '自行招用保安员单位-市级审核' },
    component: () => import('../views/adminPolice/administration/zxsjsh/index.vue'),
  },
  {
    path: '/adminPolice/administration/zxbazmgl',
    meta: { title: '备案证明管理' },
    component: () => import('../views/adminPolice/administration/zxbazmgl/index.vue'),
  },
  {
    path: '/adminPolice/administration/zxbazmzz',
    meta: { title: '备案证明制作' },
    component: () => import('../views/adminPolice/administration/zxbazmzz/index.vue'),
  },
  {
    path: '/adminPolice/administration/zxbazmffdj',
    meta: { title: '备案证明发放登记' },
    component: () => import('../views/adminPolice/administration/zxbazmffdj/index.vue'),
  },
  // 跨区域保安服务公司
  // {
  //   path: '/adminPolice/administration/kqsjjgbmsh',
  //   meta: { title: '市级监管部门审核' },
  //   component: () => import('../views/adminPolice/administration/kqsjjgbmsh/index.vue'),
  // },
  {
    path: '/adminPolice/administration/kqsjsh',
    meta: { title: '跨区域保安服务公司-市级审核' },
    component: () => import('../views/adminPolice/administration/kqsjsh/index.vue'),
  },
  // 保安服务公司
  // {
  //   path: '/adminPolice/administration/basjjgbmsh',
  //   meta: { title: '市级监管部门审核' },
  //   component: () => import('../views/adminPolice/administration/basjjgbmsh/index.vue'),
  // },
  {
    path: '/adminPolice/administration/basjsh',
    meta: { title: '保安服务公司-市级审核' },
    component: () => import('../views/adminPolice/administration/basjsh/index.vue'),
  },
  // 保安培训单位
  {
    path: '/adminPolice/administration/pxsjsh',
    meta: { title: '保安培训单位-市级审核' },
    component: () => import('../views/adminPolice/administration/pxsjsh/index.vue'),
  },
];
// 公安端-综合信息管理
const information = [
  // 综合信息维护
  {
    path: '/adminPolice/information/bayxxwh',
    meta: { title: '保安员信息维护' },
    component: () => import('../views/adminPolice/information/bayxxwh/index.vue'),
  },
  {
    path: '/adminPolice/information/bayxxwh/info',
    meta: { title: '保安员信息维护-详细信息' },
    component: () => import('../views/adminPolice/information/bayxxwh/info.vue'),
  },
  {
    path: '/adminPolice/information/bayxxwh/edit',
    meta: { title: '保安员信息维护-信息维护' },
    component: () => import('../views/adminPolice/information/bayxxwh/edit.vue'),
  },
  {
    path: '/adminPolice/information/fwgsxxwh',
    meta: { title: '服务公司信息维护' },
    component: () => import('../views/adminPolice/information/fwgsxxwh/index.vue'),
  },
  // {
  //   path: '/adminPolice/information/fwgsxxwh/info',
  //   meta: { title: '服务公司信息维护-详细信息' },
  //   component: () => import('../views/adminPolice/information/fwgsxxwh/info.vue'),
  // },
  // {
  //   path: '/adminPolice/information/fwgsxxwh/edit',
  //   meta: { title: '服务公司信息维护-信息维护' },
  //   component: () => import('../views/adminPolice/information/fwgsxxwh/edit.vue'),
  // },
  {
    path: '/adminPolice/information/zxzydwxxwh',
    meta: { title: '自行招用单位信息维护' },
    component: () => import('../views/adminPolice/information/zxzydwxxwh/index.vue'),
  },
  {
    path: '/adminPolice/information/kqyfwgsxxwh',
    meta: { title: '跨区域服务公司信息维护' },
    component: () => import('../views/adminPolice/information/kqyfwgsxxwh/index.vue'),
  },
  {
    path: '/adminPolice/information/bafwgsxxwh',
    meta: { title: '保安服务分公司信息维护' },
    component: () => import('../views/adminPolice/information/bafwgsxxwh/index.vue'),
  },
  // 综合信息查询
  {
    path: '/adminPolice/information/zbqccc',
    meta: { title: '装备器材查询' },
    component: () => import('../views/adminPolice/information/zbqccc/index.vue'),
  },
  {
    path: '/adminPolice/information/clxxcx',
    meta: { title: '车辆信息查询' },
    component: () => import('../views/adminPolice/information/clxxcx/index.vue'),
  },
  {
    path: '/adminPolice/information/qzxxcx',
    meta: { title: '枪证信息查询' },
    component: () => import('../views/adminPolice/information/qzxxcx/index.vue'),
  },
  {
    path: '/adminPolice/information/qxxcx',
    meta: { title: '枪支信息查询' },
    component: () => import('../views/adminPolice/information/qxxcx/index.vue'),
  },
  {
    path: '/adminPolice/information/bapxrycx',
    meta: { title: '保安培训人员查询' },
    component: () => import('../views/adminPolice/information/bapxrycx/index.vue'),
  },
  {
    path: '/adminPolice/information/babafwqycx',
    meta: { title: '备案保安服务区域查询' },
    component: () => import('../views/adminPolice/information/babafwqycx/index.vue'),
  },
  {
    path: '/adminPolice/information/bayzhcx',
    meta: { title: '保安员综合查询' },
    component: () => import('../views/adminPolice/information/bayzhcx/index.vue'),
  },
  {
    path: '/adminPolice/information/bayzhcx/info',
    meta: { title: '保安员综合查询-详细信息' },
    component: () => import('../views/adminPolice/information/bayzhcx/info.vue'),
  },
  {
    path: '/adminPolice/information/qyzhxxcx',
    meta: { title: '企业综合信息查询' },
    component: () => import('../views/adminPolice/information/qyzhxxcx/index.vue'),
  },
  {
    path: '/adminPolice/information/baoannews',
    meta: { title: '保安资讯信息查询' },
    component: () => import('../views/adminPolice/information/baoannews/index.vue'),
  },

  // {
  //   path: '/adminPolice/information/zdbdwtrycx',
  //   meta: { title: '自动比对问题人员查询' },
  //   component: () => import('../views/adminPolice/information/zdbdwtrycx/index.vue'),
  // },
  // {
  //   path: '/adminPolice/information/zdbdwtrycx/info',
  //   meta: { title: '自动比对问题人员-详细信息' },
  //   component: () => import('../views/adminPolice/information/zdbdwtrycx/info.vue'),
  // },
];
// 公安端-位置监控
const location = [
  {
    path: '/adminPolice/location/locamonitor',
    meta: { title: '保安员实时位置监控' },
    component: () => import('../views/adminPolice/location/locamonitor/index.vue'),
  },
  {
    path: '/adminPolice/location/trajectory',
    meta: { title: '保安员行动轨迹查询' },
    component: () => import('../views/adminPolice/location/trajectory/index.vue'),
  },
];
// 公安端-投诉管理
const complaint = [
  // 投诉管理
  {
    path: '/adminPolice/complaint/tsxxcx',
    meta: { title: '投诉信息查询' },
    component: () => import('../views/adminPolice/complaint/tsxxcx/index.vue'),
  },
  {
    path: '/adminPolice/complaint/tsxxcx/add',
    meta: { title: '投诉信息查询' },
    component: () => import('../views/adminPolice/complaint/tsxxcx/add.vue'),
  },
  {
    path: '/adminPolice/complaint/tsxxclcx',
    meta: { title: '投诉信息处理查询' },
    component: () => import('../views/adminPolice/complaint/tsxxclcx/index.vue'),
  },
];
// 公安端-协查通报
const notification = [
  // 协查通报
  {
    path: '/adminPolice/notification/xctbgl',
    meta: { title: '协查通报管理' },
    component: () => import('../views/adminPolice/notification/xctbgl/index.vue'),
  },
  {
    path: '/adminPolice/notification/xctbgl/add',
    meta: { title: '协查通报管理-添加' },
    component: () => import('../views/adminPolice/notification/xctbgl/add.vue'),
  },
  {
    path: '/adminPolice/notification/xctbcx',
    meta: { title: '协查通报查询' },
    component: () => import('../views/adminPolice/notification/xctbcx/index.vue'),
  },
  {
    path: '/adminPolice/notification/xctbhfqkck',
    meta: { title: '协查通报回复情况查看' },
    component: () => import('../views/adminPolice/notification/xctbhfqkck/index.vue'),
  },
  {
    path: '/adminPolice/notification/xctbcxgl',
    meta: { title: '协查通报撤销管理' },
    component: () => import('../views/adminPolice/notification/xctbcxgl/index.vue'),
  },
];
// 公安端-企业奖励
const reward = [
  // 企业奖励
  {
    path: '/adminPolice/reward/qyjlgl',
    meta: { title: '企业奖励管理' },
    component: () => import('../views/adminPolice/reward/qyjlgl/index.vue'),
  },
  {
    path: '/adminPolice/reward/qyjlgl/add',
    meta: { title: '企业奖励管理-添加' },
    component: () => import('../views/adminPolice/reward/qyjlgl/add.vue'),
  },
  {
    path: '/adminPolice/reward/qyjlcx',
    meta: { title: '企业奖励查询' },
    component: () => import('../views/adminPolice/reward/qyjlcx/index.vue'),
  },
];
// 公安端-日常审查
const daily = [
  // 日常审查
  {
    path: '/adminPolice/daily/rcjccx',
    meta: { title: '日常检查查询' },
    component: () => import('../views/adminPolice/daily/rcjccx/index.vue'),
  },
  {
    path: '/adminPolice/daily/rcjcgl',
    meta: { title: '日常检查管理' },
    component: () => import('../views/adminPolice/daily/rcjcgl/index.vue'),
  },
  {
    path: '/adminPolice/daily/rcjcgl/add',
    meta: { title: '日常检查管理-添加' },
    component: () => import('../views/adminPolice/daily/rcjcgl/add.vue'),
  },
];
// 公安端-系统管理
const system = [
  // 系统管理
  {
    path: '/adminPolice/system/securityaccount',
    meta: { title: '公安端账号管理' },
    component: () => import('../views/adminPolice/system/securityaccount/index.vue'),
  },
  {
    path: '/adminPolice/system/securityrole',
    meta: { title: '公安端角色管理' },
    component: () => import('../views/adminPolice/system/securityrole/index.vue'),
  },
  {
    path: '/adminPolice/system/securitydepart',
    meta: { title: '公安端部门管理' },
    component: () => import('../views/adminPolice/system/securitydepart/index.vue'),
  },
  {
    path: '/adminPolice/system/baoanaccount',
    meta: { title: '保安员账号管理' },
    component: () => import('../views/adminPolice/system/baoanaccount/index.vue'),
  },
  {
    path: '/adminPolice/system/societyaccount',
    meta: { title: '协会端账号管理' },
    component: () => import('../views/adminPolice/system/societyaccount/index.vue'),
  },
  {
    path: '/adminPolice/system/examaccount',
    meta: { title: '考试端账号管理' },
    component: () => import('../views/adminPolice/system/examaccount/index.vue'),
  },
  {
    path: '/adminPolice/system/companyaccount',
    meta: { title: '企业账号管理' },
    component: () => import('../views/adminPolice/system/companyaccount/index.vue'),
  },
  {
    path: '/adminPolice/system/comapnytype',
    meta: { title: '企业类型管理-类型管理' },
    component: () => import('../views/adminPolice/system/comapnytype/index.vue'),
  },
  {
    path: '/adminPolice/system/companypower',
    meta: { title: '企业类型管理-权限分配' },
    component: () => import('../views/adminPolice/system/companypower/index.vue'),
  },
  {
    path: '/adminPolice/system/reserve',
    meta: { title: '系统管理-信息采集预约安排' },
    component: () => import('../views/adminPolice/system/reserve/index.vue'),
  },
];
// 公安端-其他页面
const other = [
  {
    path: '/adminPolice/video',
    meta: { title: '视频管理接入' },
    component: () => import('../views/adminPolice/video/index.vue'),
  },
];
// 保安服务公司
const companyone = [
  {
    path: '/adminPolice/companyone/one',
    meta: { title: '派出所审核' },
    component: () => import('../views/adminPolice/companyone/one/index.vue'),
  },
  {
    path: '/adminPolice/companyone/two',
    meta: { title: '分局审核' },
    component: () => import('../views/adminPolice/companyone/two/index.vue'),
  },
  {
    path: '/adminPolice/companyone/thr',
    meta: { title: '市局审核' },
    component: () => import('../views/adminPolice/companyone/thr/index.vue'),
  },
  {
    path: '/adminPolice/companyone/four',
    meta: { title: '服务许可证管理' },
    component: () => import('../views/adminPolice/companyone/four/index.vue'),
  },
  {
    path: '/adminPolice/companyone/five',
    meta: { title: '服务许可证制作' },
    component: () => import('../views/adminPolice/companyone/five/index.vue'),
  },
  {
    path: '/adminPolice/companyone/six',
    meta: { title: '服务许可证发放登记' },
    component: () => import('../views/adminPolice/companyone/six/index.vue'),
  },
  {
    path: '/adminPolice/companyone/seven',
    meta: { title: '法人变更市级审核' },
    component: () => import('../views/adminPolice/companyone/seven/index.vue'),
  },
];
// 自行招用
const companytwo = [
  {
    path: '/adminPolice/companytwo/one',
    meta: { title: '派出所审核' },
    component: () => import('../views/adminPolice/companytwo/one/index.vue'),
  },
  {
    path: '/adminPolice/companytwo/two',
    meta: { title: '分局审核' },
    component: () => import('../views/adminPolice/companytwo/two/index.vue'),
  },
  {
    path: '/adminPolice/companytwo/thr',
    meta: { title: '市局审核' },
    component: () => import('../views/adminPolice/companytwo/thr/index.vue'),
  },
  {
    path: '/adminPolice/companytwo/four',
    meta: { title: '备案证明管理' },
    component: () => import('../views/adminPolice/companytwo/four/index.vue'),
  },
  {
    path: '/adminPolice/companytwo/five',
    meta: { title: '备案证明制作' },
    component: () => import('../views/adminPolice/companytwo/five/index.vue'),
  },
  {
    path: '/adminPolice/companytwo/six',
    meta: { title: '备案证明发放登记' },
    component: () => import('../views/adminPolice/companytwo/six/index.vue'),
  },
];
// 跨区域
const companythr = [
  {
    path: '/adminPolice/companythr/one',
    meta: { title: '派出所审核' },
    component: () => import('../views/adminPolice/companythr/one/index.vue'),
  },
  {
    path: '/adminPolice/companythr/two',
    meta: { title: '分局审核' },
    component: () => import('../views/adminPolice/companythr/two/index.vue'),
  },
  {
    path: '/adminPolice/companythr/thr',
    meta: { title: '市局审核' },
    component: () => import('../views/adminPolice/companythr/thr/index.vue'),
  },
];
// 分公司
const companyfour = [
  {
    path: '/adminPolice/companyfour/one',
    meta: { title: '派出所审核' },
    component: () => import('../views/adminPolice/companyfour/one/index.vue'),
  },
  {
    path: '/adminPolice/companyfour/two',
    meta: { title: '分局审核' },
    component: () => import('../views/adminPolice/companyfour/two/index.vue'),
  },
  {
    path: '/adminPolice/companyfour/thr',
    meta: { title: '市局审核' },
    component: () => import('../views/adminPolice/companyfour/thr/index.vue'),
  },
];
// 培训单位
const companyfive = [
  {
    path: '/adminPolice/companyfive/one',
    meta: { title: '派出所审核' },
    component: () => import('../views/adminPolice/companyfive/one/index.vue'),
  },
  {
    path: '/adminPolice/companyfive/two',
    meta: { title: '分局审核' },
    component: () => import('../views/adminPolice/companyfive/two/index.vue'),
  },
  {
    path: '/adminPolice/companyfive/thr',
    meta: { title: '市局审核' },
    component: () => import('../views/adminPolice/companyfive/thr/index.vue'),
  },
];
// 公安端
const adminPolice = [
  ...security,
  ...permit,
  ...administration,
  ...information,
  ...location,
  ...complaint,
  ...notification,
  ...reward,
  ...daily,
  ...system,
  ...other,
  ...companyone,
  ...companytwo,
  ...companythr,
  ...companyfour,
  ...companyfive,
];
const web = [
  {
    path: '/',
    redirect: '/adminCenter/homeIndex',
  },
  {
    path: '/test',
    name: 'test',
    meta: { title: 'test', noCheck: true },
    component: () => import('../views/test.vue'),
  },

  // 管理登录
  {
    path: '/login',
    name: 'login',
    meta: { title: '管理登录', noCheck: true },
    component: () => import('../views/login.vue'),
  },
  {
    path: '/printA4/index',
    meta: { title: '信息打印' },
    component: () => import('../components/printA4/index.vue'),
  },
  // 管理中心
  {
    path: '/',
    name: 'adminCenter',
    component: () => import('@common/src/components/admin-frame/Home.vue'),
    children: [
      {
        path: '/adminCenter/homeIndex',
        name: 'admin_homeIndex',
        meta: { title: '首页' },
        component: () => import('../views/homeIndex/index.vue'),
      },
      // 企业受理/审核 的 详情/审核/受理
      // {
      //   path: '/adminPolice/company/:type',
      //   meta: { title: '企业注册审核' },
      //   component: () => import('../components/company/index.vue'),
      // },
      // 2022-03-08+企业详情，维护
      {
        path: '/adminPolice/companyInfo',
        meta: { title: '企业详细信息' },
        component: () => import('../components/companyInfo/index.vue'),
      },
      // 维护
      {
        path: '/adminPolice/companyEdit',
        meta: { title: '企业信息维护' },
        component: () => import('../components/companyEdit/index.vue'),
      },
      ...adminPolice,
      ...officer,
    ],
  },
];
// 大屏统计
const statis = [
  {
    path: '/header/statis/index',
    meta: { title: '统计', noCheck: true },
    component: () => import('../views/header/statis/index.vue'),
  },
  {
    path: '/header/statis-two/index',
    meta: { title: '统计', noCheck: true },
    component: () => import('../views/header/statis-two/index.vue'),
  },
  {
    path: '/header/statis-thr/index',
    meta: { title: '统计', noCheck: true },
    component: () => import('../views/header/statis-thr/index.vue'),
  },
  {
    path: '/header/statis-four/index',
    meta: { title: '统计', noCheck: true },
    component: () => import('../views/header/statis-four/index.vue'),
  },
];
const routes = [...web, ...statis];
const router = new VueRouter({
  mode: 'history',
  base: process.env.VUE_APP_ROUTER,
  routes,
});
router.beforeEach((to, from, next) => {
  document.title = `${to.meta.title} `;
  const noCheck = _.get(to, 'meta.noCheck', false);
  if (noCheck) next();
  else {
    const token = localStorage.getItem('token');
    if (!token) next('/login');
    else {
      store.commit('setToken', token, { root: true });
      next();
    }
  }
});

export default router;
