// 视图组件
const view = {
    tabs: () => import('@/layouts/tabs'),
    blank: () => import('@/layouts/BlankView'),
    page: () => import('@/layouts/PageView')
  }
  
  // 路由组件注册
  const BaseRouterMap = {
    login: {
      authority: '*',
      path: '/login',
      component: () => import('@/pages/login')
    },
    root: {
      path: '/',
      name: '首页',
      redirect: '/login',
      component: view.tabs
    }, 
    touch: {
      path: '/touch',
      name: '首页', 
      component: view.blank
    }, 
    dashboard: {
      name: '仪表盘',
      redirect: '/dashboard/workplace',
      component: view.blank
    },
    workplace: {
      name: '工作台',
      path:'/dashboard/workplace',
      icon: 'idcard',
      component: () => import('@/pages/dashboard/workplace')
    },
    Middle: {
      name: '中台管理',
      icon: 'idcard',
      component: view.blank
    },
    analysis: {
      name: '分析页',
      component: () => import('@/pages/dashboard/analysis')
    },
    form: {
      name: '表单页',
      icon: 'form',
      component: view.page
    },
    basicForm: {
      path: 'basic',
      name: '基础表单',
      component: () => import('@/pages/base/form/basic')
    },
    stepForm: {
      path: 'step',
      name: '分步表单',
      component: () => import('@/pages/base/form/step')
    },
    advanceForm: {
      path: 'advance',
      name: '高级表单',
      component: () => import('@/pages/base/form/advance')
    },
    list: {
      name: '列表页',
      icon: 'table',
      component: view.page
    },
    queryList: {
      path: 'query',
      name: '查询表格',
      component: () => import('@/pages/base/list/QueryList')
    },
    primaryList: {
      path: 'primary',
      name: '标准列表',
      component: () => import('@/pages/base/list/StandardList')
    },
    cardList: {
      path: 'card',
      name: '卡片列表',
      component: () => import('@/pages/base/list/CardList')
    },
    searchList: {
      path: 'search',
      name: '搜索列表',
      component: () => import('@/pages/base/list/search/SearchLayout')
    },
    article: {
      name: '文章',
      component: () => import('@/pages/base/list/search/ArticleList')
    },
    application: {
      name: '应用',
      component: () => import('@/pages/base/list/search/ApplicationList')
    },
    project: {
      name: '项目',
      component: () => import('@/pages/base/list/search/ProjectList')
    },
    details: {
      name: '详情页',
      icon: 'profile',
      component: view.blank
    },
    basicDetails: {
      path: 'basic',
      name: '基础详情页',
      component: () => import('@/pages/base/detail/BasicDetail')
    },
    advanceDetails: {
      path: 'advance',
      name: '高级详情页',
      component: () => import('@/pages/base/detail/AdvancedDetail')
    },
    result: {
      name: '结果页',
      icon: 'check-circle-o',
      component: view.page
    },
    success: {
      name: '成功',
      component: () => import('@/pages/base/result/Success')
    },
    error: {
      name: '失败',
      component: () => import('@/pages/base/result/Error')
    },
    exception: {
      name: '异常页',
      icon: 'warning',
      component: view.blank
    },
    TouchMesReporting : { 
      name: '报工',
      path: '/touch/mesreporting',
      component: () => import('@/pages/Middle/Mes/MesReporting/MesReporting')
    },
    TouchMoldHome : { 
      name: '触摸屏首页',
      path: '/touch/moldhome',
      component: () => import('@/pages/Middle/Mold/Touch/Reporting')
    }, 
    TouchMoldReporting : { 
      name: '报工',
      path: '/touch/moldreporting',
      component: () => import('@/pages/Middle/Mold/Touch/Reporting')
    },
    TouchMoldSend : { 
      name: '发料',
      path: '/touch/moldsend',
      component: () => import('@/pages/Middle/Mold/Touch/Reporting')
    },

    exp403: {
      authority: '*',
      name: 'exp403',
      path: '403',
      component: () => import('@/pages/base/exception/403')
    },
    exp404: {
      name: 'exp404',
      path: '404',
      component: () => import('@/pages/base/exception/404')
    },
    exp500: {
      name: 'exp500',
      path: '500',
      component: () => import('@/pages/base/exception/500')
    },
    components: {
      name: '小组件',
      icon: 'appstore-o',
      component: view.page
    },
    taskCard: {
      name: '任务卡片',
      component: () => import('@/pages/base/components/TaskCard')
    },
    palette: {
      name: '颜色复选框',
      component: () => import('@/pages/base/components/Palette')
    },
  
  
    //================================================================================================================================
    // 以上为自动生成的路由，以下为手动添加的路由
    //================================================================================================================================
  
  
  
  
  
  
    //================================================================================================================================
    // 以下为项目的路由
    //================================================================================================================================
  
  
    WorkReport:{
      name: '报工管理',
      icon: 'idcard',
      component: view.page,
      authority: {
        permission:['']
      }
    },
    WorkReporList:{
      name: '报工列表',
      component: () => import('@/pages/base/plan/WorkReporList'),
      authority: {
        permission:[''],
      }
    },
    Payroll:{
      name: '工资管理',
      icon: 'idcard',
      component: view.page,
      authority: {
        permission: ['Payroll-All'],
      }
    },
    PayrollList:{
      name: '工资列表',
      component: () => import('@/pages/base/plan/PayrollList'),
      authority: {
        permission:['Payroll-All','Payroll-List'],
      }
  
    },
    PayrollSettings:{
      name: '工资设置',
      component: () => import('@/pages/base/plan/PayrollSettings'),
      authority: {
        permission:['Payroll-All','Payroll-Settings'],
      }
    },
  
  }

console.log(BaseRouterMap)

  export default BaseRouterMap  