import Vue from 'vue'
import Router from 'vue-router'

import routerBefore from '@/config/routerBefore.js'
// 主要
import main from '@/components/main.vue'
// 系统配置管理
const addqueueFCancel = () => import( '../components/qmsEnFacotory/addqueueFCancel.vue')
const addqueueFJumpLine = () => import( '../components/qmsEnFacotory/addqueueFJumpLine.vue')
const addqueueFTransfer = () => import( '../components/qmsEnFacotory/addqueueFTransfer.vue')
const queueFApply = () => import( '../components/qmsEnFacotory/queueFApply.vue')
const queueFCancel = () => import( '../components/qmsEnFacotory/queueFCancel.vue')
const queueFDetails = () => import( '../components/qmsEnFacotory/queueFDetails.vue')
const queueFEnd = () => import( '../components/qmsEnFacotory/queueFEnd.vue')
const queueFInstructionReceive = () => import( '../components/qmsEnFacotory/queueFInstructionReceive.vue')
const queueFIssue = () => import( '../components/qmsEnFacotory/queueFIssue.vue')
const queueFJumpLine = () => import( '../components/qmsEnFacotory/queueFJumpLine.vue')
const queueFListMonitor = () => import( '../components/qmsEnFacotory/queueFListMonitor.vue')
const queueFStart = () => import( '../components/qmsEnFacotory/queueFStart.vue')
const queueFTransfer = () => import( '../components/qmsEnFacotory/queueFTransfer.vue')
const queueFTruckMonitor = () => import( '../components/qmsEnFacotory/queueFTruckMonitor.vue')
const addqueueWTransfer = () => import( '../components/qmsWarehouse/addqueueWTransfer.vue')
const queueWApply = () => import( '../components/qmsWarehouse/queueWApply.vue')
const queueWDetails = () => import( '../components/qmsWarehouse/queueWDetails.vue')
const queueWEnd = () => import( '../components/qmsWarehouse/queueWEnd.vue')
const queueWInstructionReceive = () => import( '../components/qmsWarehouse/queueWInstructionReceive.vue')
const queueWIssue = () => import( '../components/qmsWarehouse/queueWIssue.vue')
const queueWListMonitor = () => import( '../components/qmsWarehouse/queueWListMonitor.vue')
const queueWStart = () => import( '../components/qmsWarehouse/queueWStart.vue')
const queueWTransfer = () => import( '../components/qmsWarehouse/queueWTransfer.vue')
const queueWTruckMonitor = () => import( '../components/qmsWarehouse/queueWTruckMonitor.vue')
const editBill = () => import( '../components/qmsEnFacotory/updateBill.vue')
const model = () => import( '../components/qmsEnFacotory/model.vue')
const addModel = () => import( '../components/qmsEnFacotory/addModel.vue')
const editModel = () => import( '../components/qmsEnFacotory/editModel.vue')
Vue.use(Router)
const constantRouterMap = [
	{
	  path: '/',
	  name: 'main',
	  meta: {title: '首页', code: 'xtpzgl'},
	  component: main,
	  redirect: {name: 'addqueueFCancel'},
	  children: [
		{path: 'addqueueFCancel', name: 'addqueueFCancel', meta: {code: 'xtpzgl-jggl'}, component: addqueueFCancel},
		{path: 'addqueueFJumpLine', name: 'addqueueFJumpLine', meta: {code: 'xtpzgl-yhgl'}, component: addqueueFJumpLine},
		{path: 'addqueueFTransfer', name: 'addqueueFTransfer', meta: {code: 'xtpzgl-yhgl'}, component: addqueueFTransfer},
		{path: 'queueFApply', name: 'queueFApply', meta: {code: 'xtpzgl-yhgl'}, component: queueFApply},
		{path: 'queueFCancel', name: 'queueFCancel', meta: {code: 'xtpzgl-yhgl'}, component: queueFCancel},
		{path: 'queueFDetails', name: 'queueFDetails', meta: {code: 'xtpzgl-yhgl'}, component: queueFDetails},
		{path: 'queueFEnd', name: 'queueFEnd', meta: {code: 'xtpzgl-yhgl'}, component: queueFEnd},
		{path: 'queueFInstructionReceive', name: 'queueFInstructionReceive', meta: {code: 'xtpzgl-yhgl'}, component: queueFInstructionReceive},
		{path: 'queueFIssue', name: 'queueFIssue', meta: {code: 'xtpzgl-yhgl'}, component: queueFIssue},
		{path: 'queueFJumpLine', name: 'queueFJumpLine', meta: {code: 'xtpzgl-yhgl'}, component: queueFJumpLine},
		{path: 'queueFListMonitor', name: 'queueFListMonitor', meta: {code: 'xtpzgl-yhgl'}, component: queueFListMonitor},
		{path: 'queueFStart', name: 'queueFStart', meta: {code: 'xtpzgl-yhgl'}, component: queueFStart},
		{path: 'queueFTransfer', name: 'queueFTransfer', meta: {code: 'xtpzgl-yhgl'}, component: queueFTransfer},
		{path: 'queueFTruckMonitor', name: 'queueFTruckMonitor', meta: {code: 'xtpzgl-yhgl'}, component: queueFTruckMonitor},
		{path: 'addqueueWTransfer', name: 'addqueueWTransfer', meta: {code: 'xtpzgl-yhgl'}, component: addqueueWTransfer},
		{path: 'queueWApply', name: 'queueWApply', meta: {code: 'xtpzgl-yhgl'}, component: queueWApply},
		{path: 'queueWDetails', name: 'queueWDetails', meta: {code: 'xtpzgl-yhgl'}, component: queueWDetails},
		{path: 'queueWEnd', name: 'queueWEnd', meta: {code: 'xtpzgl-yhgl'}, component: queueWEnd},
		{path: 'queueWInstructionReceive', name: 'queueWInstructionReceive', meta: {code: 'xtpzgl-yhgl'}, component: queueWInstructionReceive},
		{path: 'queueWIssue', name: 'queueWIssue', meta: {code: 'xtpzgl-yhgl'}, component: queueWIssue},
		{path: 'queueWListMonitor', name: 'queueWListMonitor', meta: {code: 'xtpzgl-yhgl'}, component: queueWListMonitor},
		{path: 'queueWStart', name: 'queueWStart', meta: {code: 'xtpzgl-yhgl'}, component: queueWStart},
		{path: 'queueWTransfer', name: 'queueWTransfer', meta: {code: 'xtpzgl-yhgl'}, component: queueWTransfer},
		{path: 'queueWTruckMonitor', name: 'queueWTruckMonitor', meta: {code: 'xtpzgl-yhgl'}, component: queueWTruckMonitor},
		{path:'editBill/:capacityId/:capacityNumber',name:'editBill', meta: {code: 'xtpzgl-yhgl'}, component: editBill},
		{path: 'model', name: 'model', meta: {code: 'xtpzgl-yhgl'}, component: model},
		{path: 'addModel', name: 'addModel', meta: {code: 'xtpzgl-yhgl'}, component: addModel},
		{path:'editModel/:resultId/:spectionsModel',name:'editModel', meta: {code: 'xtpzgl-yhgl'}, component: editModel}
	]
	}
  ];
  
  const router = new Router({
	routes: constantRouterMap
  })
  //  before
  routerBefore(router, constantRouterMap);
  
  export default router;
  //  constantRouterMap
  export const routes = constantRouterMap;
  