import Layout from '~src/layout/index.vue'

//路由菜单系统内置页面配置
export default [
    {
        path: '/',
        redirect: '/home/index',
    },
    {
        path: '/login',
        name: 'login',
        meta: { title: '登录' },
        component: () => import('~src/views/login/index.vue'),
    },
    {
        path: '/auth',
        name: 'auth',
        meta: { title: '授权登录' },
        component: () => import('~src/views/user/auth.vue'),
    },
    {
        path: '/home',
        name: 'home',
        redirect: '/home/index',
        meta: { title: '首页' },
        component: Layout,
        children: [
            {
                path: '/home/index',
                name: 'home-index',
                meta: { title: '首页' },
                component: () => import('~src/views/home/index.vue'),
            },
            {
                path: '/home/config',
                name: 'home-config',
                meta: { title: '系统设置' },
                component: () => import('~src/views/home/config.vue'),
            },
        ],
    },
    {
        path: '/project',
        name: 'project-top',
        redirect: '/project/debit/project',
        meta: { title: '项目管理' },
        component: Layout,
        children: [
            {
                path: '/project/debit/project',
                name: 'project-debit-project',
                redirect: '/project/debit/project/unit',
                meta: { title: '计量项目基础数据' },
                children: [
                    {
                        path: '/project/debit/project/unit',
                        name: 'project-debit-project-unit',
                        meta: { title: '项目计量单元' },
                        component: () => import('~src/views/project/debit/project/unit.vue'),
                    },
                    {
                        path: '/project/debit/project/affix',
                        name: 'project-debit-project-affix',
                        meta: { title: '变更附件' },
                        component: () => import('~src/views/project/debit/project/affix.vue'),
                    },
                    {
                        path: '/project/debit/project/pay',
                        name: 'project-debit-project-pay',
                        meta: { title: '项目支付项' },
                        component: () => import('~src/views/project/debit/project/pay.vue'),
                    },
                    {
                        path: '/project/debit/project/report',
                        name: 'project-debit-project-report',
                        meta: { title: '项目报表' },
                        component: () => import('~src/views/project/debit/project/report.vue'),
                    },
                ],
            },
            {
                path: '/project/debit/contract',
                name: 'project-debit-contract',
                redirect: '/project/debit/contract/list',
                meta: { title: '计量合同基础数据' },
                children: [
                    {
                        path: '/project/debit/contract/list',
                        name: 'project-debit-contract-list',
                        meta: { title: '合同工程清单' },
                        component: () => import('~src/views/project/debit/contract/check-list.vue'),
                    },
                    {
                        path: '/project/debit/contract/unit',
                        name: 'project-debit-contract-unit',
                        meta: { title: '合同计量单元' },
                        component: () => import('~src/views/project/debit/contract/unit.vue'),
                    },
                    {
                        path: '/project/debit/contract/pay',
                        name: 'project-debit-contract-pay',
                        meta: { title: '合同中期支付项' },
                        component: () => import('~src/views/project/debit/contract/pay.vue'),
                    },
                ],
            },
            {
                path: '/project/periods/project',
                name: 'project-periods-project',
                redirect: '/project/periods/project/unit',
                meta: { title: '工区计量项目配置' },
                children: [
                    {
                        path: '/project/periods/project/unit',
                        name: 'project-periods-project-unit',
                        meta: { title: '项目计量单元' },
                        component: () => import('~src/views/project/periods/project/unit.vue'),
                    },
                    {
                        path: '/project/periods/project/affix',
                        name: 'project-periods-project-affix',
                        meta: { title: '变更附件' },
                        component: () => import('~src/views/project/periods/project/affix.vue'),
                    },
                    {
                        path: '/project/periods/project/pay',
                        name: 'project-periods-project-pay',
                        meta: { title: '项目支付项' },
                        component: () => import('~src/views/project/periods/project/pay.vue'),
                    },
                    {
                        path: '/project/periods/project/report',
                        name: 'project-periods-project-report',
                        meta: { title: '项目报表' },
                        component: () => import('~src/views/project/periods/project/report.vue'),
                    },
                ],
            },
            {
                path: '/project/periods/base',
                name: 'project-periods-base',
                redirect: '/project/periods/base/list',
                meta: { title: '工区计量基础数据' },
                children: [
                    {
                        path: '/project/periods/base/list',
                        name: 'project-periods-base-list',
                        meta: { title: '工区工程清单' },
                        component: () => import('~src/views/project/periods/base/check-list.vue'),
                    },
                    {
                        path: '/project/periods/base/unit',
                        name: 'project-periods-base-unit',
                        meta: { title: '工区计量单元' },
                        component: () => import('~src/views/project/periods/base/unit.vue'),
                    },
                    {
                        path: '/project/periods/base/pay',
                        name: 'project-periods-base-pay',
                        meta: { title: '工区中期支付项' },
                        component: () => import('~src/views/project/periods/base/pay.vue'),
                    },
                    {
                        path: '/project/periods/base/list1',
                        name: 'project-periods-base-list1',
                        meta: { title: '合同工程清单' },
                        component: () => import('~src/views/project/periods/base/check-list1.vue'),
                    },
                    {
                        path: '/project/periods/base/unit1',
                        name: 'project-periods-base-unit1',
                        meta: { title: '合同计量单元' },
                        component: () => import('~src/views/project/periods/base/unit1.vue'),
                    },
                    {
                        path: '/project/periods/base/pay1',
                        name: 'project-periods-base-pay1',
                        meta: { title: '合同中期支付项' },
                        component: () => import('~src/views/project/periods/base/pay1.vue'),
                    },
                ],
            },
        ],
    },
    {
        path: '/debit-pay',
        name: 'debit-pay-top',
        redirect: '/debit-pay/admin/apply',
        meta: { title: '计量支付' },
        component: Layout,
        children: [
            {
                path: '/debit-pay/admin',
                name: 'debit-pay-admin',
                redirect: '/debit-pay/admin/apply',
                meta: { title: '计量支付管理' },
                children: [
                    {
                        path: '/debit-pay/admin/apply',
                        name: 'debit-pay-admin-apply',
                        meta: { title: '收方申请' },
                        component: () => import('~src/views/debit-pay/admin/apply.vue'),
                    },
                    {
                        path: '/debit-pay/admin/periods',
                        name: 'debit-pay-admin-periods',
                        meta: { title: '合同计量期' },
                        component: () => import('~src/views/debit-pay/admin/periods.vue'),
                    },
                    {
                        path: '/debit-pay/admin/middlepay',
                        name: 'debit-pay-admin-middlepay',
                        meta: { title: '中间计量申请' },
                        component: () => import('~src/views/debit-pay/admin/middlepay.vue'),
                    },
                    {
                        path: '/debit-pay/admin/certificate',
                        name: 'debit-pay-admin-certificate',
                        meta: { title: '中期支付证书' },
                        component: () => import('~src/views/debit-pay/admin/certificate.vue'),
                    },
                    {
                        path: '/debit-pay/admin/book',
                        name: 'debit-pay-admin-book',
                        meta: { title: '开工预付款报表册' },
                        component: () => import('~src/views/debit-pay/admin/book.vue'),
                    },
                ],
            },
            {
                path: '/debit-pay/material',
                name: 'debit-pay-material',
                redirect: '/debit-pay/material/contract',
                meta: { title: '材料计量申请' },
                children: [
                    {
                        path: '/debit-pay/material/contract',
                        name: 'debit-pay-material-contract',
                        meta: { title: '合同材料' },
                        component: () => import('~src/views/debit-pay/material/contract.vue'),
                    },
                    {
                        path: '/debit-pay/material/periods',
                        name: 'debit-pay-material-periods',
                        meta: { title: '材料预付款计量期' },
                        component: () => import('~src/views/debit-pay/material/periods.vue'),
                    },
                    {
                        path: '/debit-pay/material/order',
                        name: 'debit-pay-material-order',
                        meta: { title: '材料计量单' },
                        component: () => import('~src/views/debit-pay/material/order.vue'),
                    },
                    {
                        path: '/debit-pay/material/book',
                        name: 'debit-pay-material-book',
                        meta: { title: '材料预付款报表手册' },
                        component: () => import('~src/views/debit-pay/material/book.vue'),
                    },
                ],
            },
            {
                path: '/debit-pay/start-work',
                name: 'debit-pay-start-work',
                redirect: '/debit-pay/start-work/period',
                meta: { title: '开工预付款计量申请' },
                children: [
                    {
                        path: '/debit-pay/start-work/period',
                        name: 'debit-pay-start-work-period',
                        meta: { title: '开工预付款计量期' },
                        component: () => import('~src/views/debit-pay/start-work/period.vue'),
                    },
                    {
                        path: '/debit-pay/start-work/order',
                        name: 'debit-pay-start-work-order',
                        meta: { title: '开工预付款计量单' },
                        component: () => import('~src/views/debit-pay/start-work/order.vue'),
                    },
                    {
                        path: '/debit-pay/start-work/book',
                        name: 'debit-pay-start-work-book',
                        meta: { title: '开工预付款报表手册' },
                        component: () => import('~src/views/debit-pay/start-work/book.vue'),
                    },
                ],
            },
            {
                path: '/debit-pay/ledgers',
                name: 'debit-pay-ledgers',
                redirect: '/debit-pay/ledgers/debit',
                meta: { title: '计量支付台账' },
                children: [
                    {
                        path: '/debit-pay/ledgers/debit',
                        name: 'debit-pay-ledgers-debit',
                        meta: { title: '计量支付台账' },
                        component: () => import('~src/views/debit-pay/ledgers/debit.vue'),
                    },
                    {
                        path: '/debit-pay/ledgers/collect',
                        name: 'debit-pay-ledgers-collect',
                        meta: { title: '合同段计量支付汇总' },
                        component: () => import('~src/views/debit-pay/ledgers/collect.vue'),
                    },
                    {
                        path: '/debit-pay/ledgers/detail',
                        name: 'debit-pay-ledgers-detail',
                        meta: { title: '各期计量支付明细' },
                        component: () => import('~src/views/debit-pay/ledgers/detail.vue'),
                    },
                    {
                        path: '/debit-pay/ledgers/standards',
                        name: 'debit-pay-ledgers-standards',
                        meta: { title: '各标完成投资柱状图' },
                        component: () => import('~src/views/debit-pay/ledgers/standards.vue'),
                    },
                    {
                        path: '/debit-pay/ledgers/section',
                        name: 'debit-pay-ledgers-section',
                        meta: { title: '章节完成投资柱状图' },
                        component: () => import('~src/views/debit-pay/ledgers/section.vue'),
                    },
                    {
                        path: '/debit-pay/ledgers/payment',
                        name: 'debit-pay-ledgers-payment',
                        meta: { title: '各期章节计量支付明细' },
                        component: () => import('~src/views/debit-pay/ledgers/payment.vue'),
                    },
                ],
            },
            {
                path: '/debit-pay/project',
                name: 'debit-pay-project',
                redirect: '/debit-pay/project/pay',
                meta: { title: '工程结算' },
                children: [
                    {
                        path: '/debit-pay/project/pay',
                        name: 'debit-pay-project-pay',
                        meta: { title: '结算支付' },
                        component: () => import('~src/views/debit-pay/project/pay.vue'),
                    },
                    {
                        path: '/debit-pay/project/certificate',
                        name: 'debit-pay-project-certificate',
                        meta: { title: '结算支付证书' },
                        component: () => import('~src/views/debit-pay/project/certificate.vue'),
                    },
                ],
            },
        ],
    },
    {
        path: '/periods',
        name: 'periods-top',
        redirect: '/periods/admin/measure',
        meta: { title: '工区计量' },
        component: Layout,
        children: [
            {
                path: '/periods/admin',
                name: 'periods-admin',
                redirect: '/periods/admin/measure',
                meta: { title: '工区计量支付管理' },
                children: [
                    {
                        path: '/periods/admin/measure',
                        name: 'periods-admin-measure',
                        meta: { title: '工区计量期' },
                        component: () => import('~src/views/periods/admin/measure.vue'),
                    },
                    {
                        path: '/periods/admin/middle',
                        name: 'periods-admin-middle',
                        meta: { title: '中间计量申请' },
                        component: () => import('~src/views/periods/admin/middle.vue'),
                    },
                    {
                        path: '/periods/admin/certificate',
                        name: 'periods-admin-certificate',
                        meta: { title: '中期支付证书' },
                        component: () => import('~src/views/periods/admin/certificate.vue'),
                    },
                ],
            },
            {
                path: '/periods/ledgers',
                name: 'periods-ledgers',
                redirect: '/periods/ledgers/pay',
                meta: { title: '工区计量支付台账' },
                children: [
                    {
                        path: '/periods/ledgers/pay',
                        name: 'periods-ledgers-pay',
                        meta: { title: '计量支付台账' },
                        component: () => import('~src/views/periods/ledgers/pay.vue'),
                    },
                    {
                        path: '/periods/ledgers/summary',
                        name: 'periods-ledgers-summary',
                        meta: { title: '工区计量支付汇总' },
                        component: () => import('~src/views/periods/ledgers/summary.vue'),
                    },
                    {
                        path: '/periods/ledgers/details',
                        name: 'periods-ledgers-details',
                        meta: { title: '各期计量支付明细' },
                        component: () => import('~src/views/periods/ledgers/details.vue'),
                    },
                    {
                        path: '/periods/ledgers/standards',
                        name: 'periods-ledgers-standards',
                        meta: { title: '各标完成投资柱状图' },
                        component: () => import('~src/views/periods/ledgers/standards.vue'),
                    },
                    {
                        path: '/periods/ledgers/section',
                        name: 'periods-ledgers-section',
                        meta: { title: '章节完成投资柱状图' },
                        component: () => import('~src/views/periods/ledgers/section.vue'),
                    },
                    {
                        path: '/periods/ledgers/payment',
                        name: 'periods-ledgers-payment',
                        meta: { title: '各期章节计量支付明细' },
                        component: () => import('~src/views/periods/ledgers/payment.vue'),
                    },
                ],
            },
            {
                path: '/periods/project',
                name: 'periods-project',
                redirect: '/periods/project/pay',
                meta: { title: '工区工程结算' },
                children: [
                    {
                        path: '/periods/project/pay',
                        name: 'periods-project-pay',
                        meta: { title: '工区结算支付' },
                        component: () => import('~src/views/periods/project/pay.vue'),
                    },
                    {
                        path: '/periods/project/certificate',
                        name: 'periods-project-certificate',
                        meta: { title: '结算支付证书' },
                        component: () => import('~src/views/periods/project/certificate.vue'),
                    },
                ],
            },
            {
                path: '/periods/start-work',
                name: 'periods-start-work',
                redirect: '/periods/start-work/phase',
                meta: { title: '开工预付款计量申请' },
                children: [
                    {
                        path: '/periods/start-work/phase',
                        name: 'periods-start-work-phase',
                        meta: { title: '开工预付款计量期' },
                        component: () => import('~src/views/periods/start-work/phase.vue'),
                    },
                    {
                        path: '/periods/start-work/order',
                        name: 'periods-start-work-order',
                        meta: { title: '开工预付款计量单' },
                        component: () => import('~src/views/periods/start-work/order.vue'),
                    },
                    {
                        path: '/periods/start-work/book',
                        name: 'periods-start-work-book',
                        meta: { title: '开工预付款报表手册' },
                        component: () => import('~src/views/periods/start-work/book.vue'),
                    },
                ],
            },
            {
                path: '/periods/material',
                name: 'periods-material',
                redirect: '/periods/material/contract',
                meta: { title: '材料计量申请' },
                children: [
                    {
                        path: '/periods/material/contract',
                        name: 'periods-material-contract',
                        meta: { title: '合同材料' },
                        component: () => import('~src/views/periods/material/contract.vue'),
                    },
                    {
                        path: '/periods/material/phase',
                        name: 'periods-material-phase',
                        meta: { title: '材料预付款计量期' },
                        component: () => import('~src/views/periods/material/phase.vue'),
                    },
                    {
                        path: '/periods/material/order',
                        name: 'periods-material-order',
                        meta: { title: '材料计量单' },
                        component: () => import('~src/views/periods/material/order.vue'),
                    },
                    {
                        path: '/periods/material/book',
                        name: 'periods-material-book',
                        meta: { title: '材料预付款报表手册' },
                        component: () => import('~src/views/periods/material/book.vue'),
                    },
                ],
            },
            {
                path: '/periods/contract-admin',
                name: 'periods-contract-admin',
                redirect: '/periods/contract-admin/phase',
                meta: { title: '合同计量支付管理' },
                children: [
                    {
                        path: '/periods/contract-admin/phase',
                        name: 'periods-contract-admin-phase',
                        meta: { title: '合同计量期' },
                        component: () => import('~src/views/periods/contract-admin/phase.vue'),
                    },
                    {
                        path: '/periods/contract-admin/apply',
                        name: 'periods-contract-admin-apply',
                        meta: { title: '合同中间计量申请' },
                        component: () => import('~src/views/periods/contract-admin/apply.vue'),
                    },
                    {
                        path: '/periods/contract-admin/certificate',
                        name: 'periods-contract-admin-certificate',
                        meta: { title: '合同中期支付证书' },
                        component: () => import('~src/views/periods/contract-admin/certificate.vue'),
                    },
                ],
            },
            {
                path: '/periods/contract-book',
                name: 'periods-contract-book',
                redirect: '/periods/contract-book/ledgers',
                meta: { title: '合同计量支付台账' },
                children: [
                    {
                        path: '/periods/contract-book/ledgers',
                        name: 'periods-contract-book-ledgers',
                        meta: { title: '合同计量支付台账' },
                        component: () => import('~src/views/periods/contract-book/ledgers.vue'),
                    },
                ],
            },
        ],
    },
    {
        path: '/alter',
        name: 'alter-top',
        redirect: '/alter/admin/zero',
        meta: { title: '变更管理' },
        component: Layout,
        children: [
            {
                path: '/alter/admin',
                name: 'alter-admin',
                redirect: '/alter/admin/zero',
                meta: { title: '变更管理' },
                children: [
                    {
                        path: '/alter/admin/zero',
                        name: 'alter-admin-zero',
                        meta: { title: '零号变更' },
                        component: () => import('~src/views/alter/admin/zero.vue'),
                    },
                    {
                        path: '/alter/admin/pre',
                        name: 'alter-admin-pre',
                        meta: { title: '预变更' },
                        component: () => import('~src/views/alter/admin/pre.vue'),
                    },
                    {
                        path: '/alter/admin/plan',
                        name: 'alter-admin-plan',
                        meta: { title: '变更方案' },
                        component: () => import('~src/views/alter/admin/plan.vue'),
                    },
                    {
                        path: '/alter/admin/order',
                        name: 'alter-admin-order',
                        meta: { title: '变更令' },
                        component: () => import('~src/views/alter/admin/order.vue'),
                    },
                ],
            },
            {
                path: '/alter/ledgers',
                name: 'alter-ledgers',
                redirect: '/alter/ledgers/cover',
                meta: { title: '工程变更台账' },
                children: [
                    {
                        path: '/alter/ledgers/cover',
                        name: 'alter-ledgers-cover',
                        meta: { title: '封面' },
                        component: () => import('~src/views/alter/ledgers/cover.vue'),
                    },
                    {
                        path: '/alter/ledgers/pre-ledger',
                        name: 'alter-ledgers-pre-ledger',
                        meta: { title: '预变更台账' },
                        component: () => import('~src/views/alter/ledgers/pre-ledger.vue'),
                    },
                    {
                        path: '/alter/ledgers/ledger',
                        name: 'alter-ledgers-ledger',
                        meta: { title: '变更令台帐' },
                        component: () => import('~src/views/alter/ledgers/ledger.vue'),
                    },
                    {
                        path: '/alter/ledgers/table',
                        name: 'alter-ledgers-table',
                        meta: { title: '变更统计表1' },
                        component: () => import('~src/views/alter/ledgers/table.vue'),
                    },
                    {
                        path: '/alter/ledgers/table2',
                        name: 'alter-ledgers-table2',
                        meta: { title: '变更统计表2' },
                        component: () => import('~src/views/alter/ledgers/table2.vue'),
                    },
                    {
                        path: '/alter/ledgers/count',
                        name: 'alter-ledgers-count',
                        meta: { title: '变更令统计表' },
                        component: () => import('~src/views/alter/ledgers/count.vue'),
                    },
                ],
            },
            {
                path: '/alter/collection',
                name: 'alter-collection',
                redirect: '/alter/collection/scan',
                meta: { title: '变更资料归集' },
                children: [
                    {
                        path: '/alter/collection/scan',
                        name: 'alter-collection-scan',
                        meta: { title: '变更扫描资料' },
                        component: () => import('~src/views/alter/collection/scan.vue'),
                    },
                ],
            },
        ],
    },
    {
        path: '/tasks',
        name: 'tasks',
        redirect: '/tasks/data',
        meta: { title: '任务管理' },
        component: Layout,
        children: [
            {
                path: '/tasks/hc-data',
                name: 'tasks-data',
                meta: { title: '任务查看' },
                component: () => import('~src/views/tasks/hc-data.vue'),
            },
            {
                path: '/tasks/flow',
                name: 'tasks-flow',
                meta: { title: '任务流程设置' },
                component: () => import('~src/views/tasks/flow.vue'),
            },
            {
                path: '/tasks/message',
                name: 'tasks-message',
                meta: { title: '消息提醒' },
                component: () => import('~src/views/tasks/message.vue'),
            },
        ],
    },
    {
        path: '/user',
        name: 'user',
        redirect: '/user/index',
        meta: { title: '个人中心' },
        component: Layout,
        children: [
            {
                path: '/user/index',
                name: 'user-index',
                meta: { title: '个人中心' },
                component: () => import('~src/views/user/index.vue'),
            },
        ],
    },
    {
        path: '/hc-test',
        name: 'hc-test',
        redirect: '/test/index',
        meta: { title: '测试页面' },
        component: Layout,
        children: [
            {
                path: '/test/index',
                name: 'test-index',
                meta: { title: '测试' },
                component: () => import('~src/test/index.vue'),
            },
        ],
    },
    {
        path: '/403',
        name: '403',
        meta: { title: '403' },
        component: () => import('~src/views/error/403.vue'),
    },
    {
        path: '/404',
        name: '404',
        meta: { title: '404' },
        component: () => import('~src/views/error/404.vue'),
    },
    {
        path: '/500',
        name: '500',
        meta: { title: '500' },
        component: () => import('~src/views/error/500.vue'),
    },
    {
        path: '/:path(.*)*',
        redirect: '/404',
    },
]
