


const FunName = 'MesProductionOrder';
const FunTitle = '布产单';
const InvisibleRouters = 'Detail,Delete,BatchDelete,BatchUpdate,BatchCreate,ExportExcel,LogDetail,LogList,Settings,SettingsUpdate,ImportExcel'.split(',')
const InvisibleRouters2 = ''.split(',')
// 视图组件
const view = {
  tabs: () => import('@/layouts/tabs'),
  blank: () => import('@/layouts/BlankView'),
  page: () => import('@/layouts/PageView')
}

// 路由组件注册
const routerMap = {
};
routerMap[FunName] = {
  name: FunTitle,
  icon: 'idcard',
  component: view.blank,
  meta: {
  },
  authority: {
    permission: [],
  }
};

routerMap[FunName + 'List'] = {
  name: FunTitle,
  icon: 'idcard',
  path: `/${FunName}/${FunName}List`,
  meta: {
    invisible: true,
    page: { cacheAble: false }
  },
  component: () => import(`@/pages/Middle/Mes/MesProductionOrder/MesProductionOrder/List`),
  authority: {
    permission: [],
  }
};

routerMap[FunName + 'Create'] = {
  name: '布产单',
  icon: 'idcard',
  path: `/${FunName}/${FunName}Voucher`,
  component: () => import(`@/pages/Middle/Mes/MesProductionOrder/MesProductionOrder/voucher`),
  meta: {
  },
  authority: {
    permission: [],
  }
};
routerMap[FunName + 'Update'] = {
  name: FunTitle,
  icon: 'idcard',
  path: `/${FunName}/${FunName}Update/:id`,
  component: () => import(`@/pages/Middle/Mes/MesProductionOrder/MesProductionOrder/Edit`),
  meta: {
    invisible: true,
  },
  authority: {
    permission: [],
  }
};


routerMap['MesProductionOrderBatch'] = {
  name: '随车联',
  icon: 'idcard',
  path: `/MesProductionOrder/MesProductionOrderBatch`,
  component: () => import(`@/pages/Middle/Mes/MesProductionOrder/Batch/List`),

  authority: {
    permission: [],
  }
};

routerMap['MesProductionOrderBatchDetail'] = {
  name: '随车联详情',
  icon: 'idcard',
  meta: {
    invisible: true,
  },
  path: `/MesProductionOrder/MesProductionOrderBatchDetail/:id`,
  component: () => import(`@/pages/Middle/Mes/MesProductionOrder/Batch/Detail`),

  authority: {
    permission: [],
  }
};
routerMap['MesProductionOrderReport'] = {
  name: '报工',
  icon: 'idcard',
  meta: {
    invisible: true,
  },
  path: `/MesProductionOrder/Report/:id`,
  component: () => import(`@/pages/Middle/Mes/MesProductionOrder/Reporting/index`),

  authority: {
    permission: [],
  }
};
InvisibleRouters.forEach(item => {
  let name = FunName + item;
  if (!(name in routerMap)) {
    routerMap[name] = {
      meta: {
        invisible: true
      }
    }
  }
})
InvisibleRouters2.forEach(item => {
  let name = item;
  if (!(name in routerMap)) {
    routerMap[name] = {
      meta: {
        invisible: true
      }
    }
  }
})

export default routerMap
