import Layout from '@/page/index/'
import dataView from "../../views/grid/dataView";
import myLayout from "../../views/grid/myLayout";
export default [

  {
    path: '/grid',
    component: dataView,
    redirect: '/grid/dataPage',
    children: [
      //数据大屏
      {
        path: 'dataPage',
        name: '数据大屏',
        component: () =>
          import( /* webpackChunkName: "views" */ '@/views/grid/dataPage'),
        meta: {
          keepAlive: true,
          isAuth: true,
        }
      },
      {
        path: 'divide',
        name: '网格划分',
        component: () =>
          import( /* webpackChunkName: "views" */ '@/views/grid/divide'),
        meta: {
          keepAlive: true,
          isAuth: true,
        }
      },

      {
        path: 'myLayout',
        name: '容器',
        component: () =>
          import( /* webpackChunkName: "views" */ '@/views/grid/myLayout'),
        meta: {
          keepAlive: false,
        },
        children: [],
      },
      {
        path: '/work/process/leave',
        component: myLayout,
        redirect: '/work/process/leave/form',
        children: [{
          path: 'form/:processDefinitionId',
          name: '请假流程',
          meta: {
            i18n: 'work'
          },
          component: () =>
            import( /* webpackChunkName: "views" */ '@/views/work/process/leave/form')
        }, {
          path: 'handle/:taskId/:processInstanceId/:businessId',
          name: '处理请假流程',
          meta: {
            i18n: 'work'
          },
          component: () =>
            import( /* webpackChunkName: "views" */ '@/views/work/process/leave/handle')
        }, {
          path: 'detail/:processInstanceId/:businessId',
          name: '请假流程详情',
          meta: {
            i18n: 'work'
          },
          component: () =>
            import( /* webpackChunkName: "views" */ '@/views/work/process/leave/detail')
        }]
      },
      {
        path: '/work/process/publicEvent',
        component: myLayout,
        redirect: '/work/process/publicEvent/form',
        children: [{
          path: 'form/:processDefinitionId',
          name: '报事工单',
          meta: {
            i18n: 'work'
          },
          component: () =>
            import( /* webpackChunkName: "views" */ '@/views/work/process/publicEvent/form')
        }, {
          path: 'handle/:taskId/:processInstanceId/:businessId',
          name: '处理报事工单',
          meta: {
            i18n: 'work'
          },
          component: () =>
            import( /* webpackChunkName: "views" */ '@/views/work/process/publicEvent/handle')
        }, {
          path: 'detail/:processInstanceId/:businessId',
          name: '报事工单详情',
          meta: {
            i18n: 'work'
          },
          component: () =>
            import( /* webpackChunkName: "views" */ '@/views/work/process/publicEvent/detail')
        }]
      },
      {
        path: '/work/process/deviceOrder',
        component: myLayout,
        redirect: '/work/process/deviceOrder/form',
        children: [{
          path: 'form/:processDefinitionId',
          name: '设备工单',
          meta: {
            i18n: 'work'
          },
          component: () =>
            import( /* webpackChunkName: "views" */ '@/views/work/process/deviceOrder/form')
        }, {
          path: 'detail/:processInstanceId/:businessId',
          name: '设备工单详情',
          meta: {
            i18n: 'work'
          },
          component: () =>
            import( /* webpackChunkName: "views" */ '@/views/work/process/deviceOrder/detail')
        }
        ]
      },
    ]
  }, {
    path: '/test',
    component: Layout,
    redirect: '/test/index',
    children: [{
      path: 'index',
      name: '测试页',
      meta: {
        i18n: 'test'
      },
      component: () =>
        import( /* webpackChunkName: "views" */ '@/views/util/test')
    }]
  }, {
    path: '/dict-horizontal',
    component: Layout,
    redirect: '/dict-horizontal/index',
    children: [{
      path: 'index',
      name: '字典管理',
      meta: {
        i18n: 'dict'
      },
      component: () =>
        import( /* webpackChunkName: "views" */ '@/views/util/demo/dict-horizontal')
    }]
  }, {
    path: '/dict-vertical',
    component: Layout,
    redirect: '/dict-vertical/index',
    children: [{
      path: 'index',
      name: '字典管理',
      meta: {
        i18n: 'dict'
      },
      component: () =>
        import( /* webpackChunkName: "views" */ '@/views/util/demo/dict-vertical')
    }]
  }, {
    path: '/info',
    component: Layout,
    redirect: '/info/index',
    children: [{
      path: 'index',
      name: '个人信息',
      meta: {
        i18n: 'info'
      },
      component: () =>
        import( /* webpackChunkName: "views" */ '@/views/system/userinfo')
    }]
  }
]
