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

// 引入一级组件
import DashBoard from './../views/dashboard/DashBoard'
const Home = () => import('./../views/home/Home.vue');
const WorkHome =()=>import('../views/workBench/workHome')
const WorkHomeNew =()=>import('../views/workBench/workHomeNew')
const WorkHomeOther =()=>import('../views/workBench/workHomeOther')
const WarningProcessing =()=>import('../views/workBench/warningProcessing')
const indexcharts =()=>import('../views/details/indexcharts')
const commercial =()=>import('../views/details/commercial')
const firm =()=>import('../views/details/firm')
const customerHome =()=>import('../views/customer/customerHome')
const customerFirmDetails =()=>import('../views/customer/customerFirmDetails')
const customePersonDetail =()=>import('../views/customer/customePersonDetail')
const customeCommercialDetail =()=>import('../views/customer/customeCommercialDetail')
const history =()=>import('../views/customer/history')
const products =()=>import('../views/customer/products')
const productNext =()=>import('../views/customer/productNext')
const relationShip =()=>import('../views/customer/relationShip')
const address =()=>import('../views/customer/address')
const gridHome =()=>import('../views/grid/gridHome')
const remark =()=>import('../views/customer/remark')
const remarkCustom =()=>import('../views/customer/remarkCustom')
const family =()=>import('../views/customer/family')
const gridDetails =()=>import('../views/grid/gridDetails')
const mapCustom =()=>import('../views/map/mapCustom')
const dataCenter =()=>import('../views/dataCenter/dataHome')
const gridTableDetail =()=>import('../views/dataCenter/component/gridTableDetail')
const gridCustomTable =()=>import('../views/dataCenter/component/gridCustomTable')
const listStatisHome =()=>import('../views/listStatistics/listHome')
const listStatisBranchDetail =()=>import('../views/listStatistics/listBranchDetails')
const listStatisOutletDetail =()=>import('../views/listStatistics/listOutletDetails')
const listStatisCustomDetail =()=>import('../views/listStatistics/listCustomDetails')
const filingHome =()=>import('../views/filing/filingHome')
const filingqkHome =()=>import('../views/filingqk/filingHome')
const addFiling =()=>import('../views/filing/addFiling')
const addFilingqk =()=>import('../views/filingqk/addFiling')
const personFiling =()=>import('../views/filing/personFiling')
const firmFiling =()=>import('../views/filing/firmFiling')
const commercialFiling =()=>import('../views/filing/commercialFiling')
const commercialFilingqk =()=>import('../views/filingqk/commercialFiling')
const filingDetail =()=>import('../views/filing/filingDetail')
const filingqkDetail =()=>import('../views/filingqk/filingDetail')
const personBaseInfo =()=>import('../views/filing/personBaseInfo')
const firmBaseInfo =()=>import('../views/filing/firmBaseInfo')
const relatedParty =()=>import('../views/filing/relatedParty')
const association =()=>import('../views/filing/association')
const filingFamily =()=>import('../views/filing/filingFamily')
const visitingTaskHome =()=>import('../views/visitingTask/visitingTaskHome')
const visitingTaskDetails =()=>import('../views/visitingTask/visitingTaskDetails')
const signIn =()=>import('../views/visitingTask/signIn')
const nonOnSiteSignIn =()=>import('../views/visitingTask/nonOnSiteSignIn')
const signOut =()=>import('../views/visitingTask/signOut')
const visitingHistory =()=>import('../views/visitingTask/visitingHistory')
const historyDetail =()=>import('../views/visitingTask/historyDetail')
const historyHome =()=>import('../views/historyVisit/historyHome')
const collectionVisit =()=>import('../views/visitingTask/collectionVisit')
const personalVisit =()=>import('../views/visitingTask/personalVisit')
const firmVisit =()=>import('../views/visitingTask/firmVisit')
const customVisit =()=>import('../views/visitingTask/customVisit')
const commericalImage = ()=>import('../views/customer/commericalImage')
const workmngdaytaskindex = ()=>import('../views/workmng/daytask/index')
const workmngdaytaskedit = ()=>import('../views/workmng/daytask/edit')
const workmngmarkettaskindex = ()=>import('../views/workmng/markettask/index')
const workmngmarkettaskedit = ()=>import('../views/workmng/markettask/edit')
const workmngwarningtask = ()=>import('../views/workmng/warningtask/index')
const workmngwarningtaskedit = ()=>import('../views/workmng/warningtask/edit')
const recordTest = ()=>import('../views/home/record/index')
Vue.use(Router);

const router = new Router({
    routes: [
        { path: '/', redirect: '/dashboard' },
        {
            path: '/dashboard',
            name: 'dashboard',
            component: DashBoard,
            children: [
                { path: '/dashboard', redirect: '/dashboard/home' },
                { path: 'home', name: 'home', component: Home },
            ]
        }, 
        { path: '/WorkHome', name: 'WorkHome', component: WorkHome },
        { path: '/WorkHomeNew', name: 'WorkHomeNew', component: WorkHomeNew },
        { path: '/WorkHomeOther', name: 'WorkHomeOther', component: WorkHomeOther },
        { path: '/WarningProcessing', name: 'WarningProcessing', component: WarningProcessing },
        { path: '/indexcharts', name: 'indexcharts', component: indexcharts },
        { path: '/commercial', name: 'commercial', component: commercial },
        { path: '/firm', name: 'firm', component: firm },
        { path: '/customerHome', name: 'customerHome', component: customerHome },
        { path: '/customerFirmDetails', name: 'customerFirmDetails', component: customerFirmDetails },
        { path: '/customePersonDetail', name: 'customePersonDetail', component: customePersonDetail },
        { path: '/customeCommercialDetail', name: 'customeCommercialDetail', component: customeCommercialDetail },
        { path: '/address', name: 'address', component: address },
        { path: '/gridHome', name: 'gridHome', component: gridHome },
        { path: '/gridDetails', name: 'gridDetails', component: gridDetails },
        { path: '/history', name: 'history', component: history },
        { path: '/products', name: 'products', component: products },
        { path: '/productNext', name: 'productNext', component: productNext },
        { path: '/relationShip', name: 'relationShip', component: relationShip },
        { path: '/remark', name: 'remark', component: remark },
        { path: '/remarkCustom', name: 'remarkCustom', component: remarkCustom },
        { path: '/family', name: 'family', component: family },
        { path: '/mapCustom', name: 'mapCustom', component: mapCustom },
        { path: '/dataCenter', name: 'dataCenter', component: dataCenter, meta: {keepAlive: true}  },
        { path: '/gridTableDetail', name: 'gridTableDetail', component: gridTableDetail },
        { path: '/gridCustomTable', name: 'gridCustomTable', component: gridCustomTable },
        { path: '/listStatisHome', name: 'listStatisHome', component: listStatisHome },
        { path: '/listStatisBranchDetail', name: 'listStatisBranchDetail', component: listStatisBranchDetail },
        { path: '/listStatisOutletDetail', name: 'listStatisOutletDetail', component: listStatisOutletDetail },
        { path: '/listStatisCustomDetail', name: 'listStatisCustomDetail', component: listStatisCustomDetail },
        { path: '/filingHome', name: 'filingHome', component: filingHome },
        { path: '/filingqkHome', name: 'filingqkHome', component: filingqkHome },
        { path: '/addFiling', name: 'addFiling', component: addFiling },
        { path: '/addFilingqk', name: 'addFilingqk', component: addFilingqk },
        { path: '/personFiling', name: 'personFiling', component: personFiling },
        { path: '/firmFiling', name: 'firmFiling', component: firmFiling },
        { path: '/commercialFiling', name: 'commercialFiling', component: commercialFiling },
        { path: '/commercialFilingqk', name: 'commercialFilingqk', component: commercialFilingqk },
        { path: '/filingDetail', name: 'filingDetail', component: filingDetail },
        { path: '/filingqkDetail', name: 'filingqkDetail', component: filingqkDetail },
        { path: '/personBaseInfo', name: 'personBaseInfo', component: personBaseInfo },
        { path: '/firmBaseInfo', name: 'firmBaseInfo', component: firmBaseInfo },
        { path: '/relatedParty', name: 'relatedParty', component: relatedParty },
        { path: '/association', name: 'association', component: association },
        { path: '/filingFamily', name: 'filingFamily', component: filingFamily },
        { path: '/visitingTaskHome', name: 'visitingTaskHome', component: visitingTaskHome },
        { path: '/visitingTaskDetails', name: 'visitingTaskDetails', component: visitingTaskDetails },
        { path: '/signIn', name: 'signIn', component: signIn },
        { path: '/nonOnSiteSignIn', name: 'nonOnSiteSignIn', component: nonOnSiteSignIn },
        { path: '/signOut', name: 'signOut', component: signOut },
        { path: '/visitingHistory', name: 'visitingHistory', component: visitingHistory },
        { path: '/historyDetail', name: 'historyDetail', component: historyDetail },
        { path: '/historyHome', name: 'historyHome', component: historyHome },
        { path: '/collectionVisit', name: 'collectionVisit', component: collectionVisit },
        { path: '/personalVisit', name: 'personalVisit', component: personalVisit, meta: {keepAlive: true} },
        { path: '/firmVisit', name: 'firmVisit', component: firmVisit, meta: {keepAlive: true} },
        { path: '/customVisit', name: 'customVisit', component: customVisit, meta: {keepAlive: true} },
        { path: '/commericalImage', name: 'commericalImage', component: commericalImage},
        { path: '/workmngdaytaskindex', name: 'workmngdaytaskindex', component: workmngdaytaskindex},
        { path: '/workmngdaytaskedit', name: 'workmngdaytaskedit', component: workmngdaytaskedit},
        { path: '/workmngmarkettaskindex', name: 'workmngmarkettaskindex', component: workmngmarkettaskindex},
        { path: '/workmngmarkettaskedit', name: 'workmngmarkettaskedit', component: workmngmarkettaskedit},
        { path: '/workmngwarningtask', name: 'workmngwarningtask', component: workmngwarningtask},
        { path: '/workmngwarningtaskedit', name: 'workmngwarningtaskedit', component: workmngwarningtaskedit},
        { path: '/record', name: 'record', component: recordTest},
    ]
})

export default router;

