import Vue from 'vue'
import Router from 'vue-router'
Vue.use(Router)

const pathUrl = '/financial'


import Layout from '@/components/Layout/layout.vue'
import dashboard from '@/views/dashboard/index'
// import menuList from '@/components/Layout/menuList/menuList.vue'
// import menuItem from '@/components/Layout/menuList/menuItem.vue'

import apply from '@/views/financialManagement/budgetSubmission/apply'
import applyAdd from '@/views/financialManagement/budgetSubmission/applyAdd'
import examine from '@/views/financialManagement/budgetSubmission/examine'
import examineAdd from '@/views/financialManagement/budgetSubmission/examineAdd'
import applyPop from '@/views/financialManagement/budgetPerformanceManagement/apply'
import applyAddPop from '@/views/financialManagement/budgetPerformanceManagement/applyAdd'
import applyShowPop from '@/views/financialManagement/budgetPerformanceManagement/applyShow'
import examinePop from '@/views/financialManagement/budgetPerformanceManagement/examine'
import examineAddPop from '@/views/financialManagement/budgetPerformanceManagement/examineAdd'
import examineShowPop from '@/views/financialManagement/budgetPerformanceManagement/examineShow'
import financialDataPresentation from '@/views/financialDataPresentation/financialDataPresentationIndex'
import enterpriseStatement from '@/views/financialDataPresentation/enterpriseStatement'
import summaryTable from '@/views/financialDataPresentation/summaryTable'
import ndczysbgIndex from '@/views/departmentBudget/budgetFilling/ndczysbg/index'
import ndczysbgDetail from '@/views/departmentBudget/budgetFilling/ndczysbg/detail'
import ysxmpsbgIndex from '@/views/departmentBudget/budgetFilling/ysxmpsbg/index'
import ysxmpsbgDetail from '@/views/departmentBudget/budgetFilling/ysxmpsbg/detail'
import xmjfsyfaIndex from '@/views/departmentBudget/budgetFilling/xmjfsyfa/index'
import xmjfsyfaDetail from '@/views/departmentBudget/budgetFilling/xmjfsyfa/detail'

import departmentBudget from '@/views/departmentBudget/department/index'
import departmentBudgetTb from '@/views/departmentBudget/department/detail'


const login = () =>
    import('@/views/login.vue')
export default new Router({
    history: true,
    routes: [{
        path: '/login',
        component: login,
        hidden: true
    },
    {
        path: '/financial',
        component: Layout,
        // redirect: '/dashboard',
        name: '首页',
        hidden: true,
        meta: {
            // title: '内蒙自治区企业管理平台',
            icon: 'example'
        },
        children: [{
            path: `${pathUrl}/dashboard`,
            component: dashboard,
            // component: () =>
            //     import('@/views/dashboard/index'),
            name: '首页',
            meta: {
                // title: '内蒙自治区企业管理平台',
                icon: 'example'
            }
        },
        // 粮食财务管理开始
        {
            path: `${pathUrl}/financialManagement`,
            component: Layout,
            name: '粮食财务管理',
            meta: {
                // title: '粮食财务管理',
                icon: 'example'
            },
            component: {
                render(c) {
                    return c('router-view')
                }
            },
            children: [{
                path: 'budgetSubmission',
                name: '预算填报',
                meta: {
                    title: '预算填报',
                    icon: 'form'
                },
                component: {
                    render(c) {
                        return c('router-view')
                    }
                },
                children: [{
                    path: 'apply',
                    component: apply,
                    name: '申请',
                    meta: {
                        title: '申请',
                        icon: 'form'
                    },
                    // component: () =>
                    //     import('@/views/financialManagement/budgetSubmission/apply')
                },
                {
                    path: 'applyAdd',
                    component: applyAdd,
                    name: '申请',
                    // component: () =>
                    //     import('@/views/financialManagement/budgetSubmission/applyAdd'),
                },
                {
                    path: 'examine',
                    component: examine,
                    name: '审核',
                    meta: {
                        title: '审核',
                        icon: 'form'
                    },
                    // component: () =>
                    //     import('@/views/financialManagement/budgetSubmission/examine')
                },
                {
                    path: 'examineAdd',
                    component: examineAdd,
                    name: '审核',
                    // component: () =>
                    //     import('@/views/financialManagement/budgetSubmission/examineAdd')
                }
                ]
            }, {
                path: 'budgetPerformanceManagement',
                name: '预算绩效管理',
                meta: {
                    title: '预算绩效管理',
                    icon: 'form'
                },
                component: {
                    render(c) {
                        return c('router-view')
                    }
                },
                children: [{
                    path: 'apply',
                    component: applyPop,
                    name: '申请',
                    meta: {
                        title: '申请',
                        icon: 'form'
                    },
                    // component: () =>
                    //     import('@/views/financialManagement/budgetPerformanceManagement/apply')
                },
                {
                    path: 'applyAdd',
                    component: applyAddPop,
                    name: '申请',
                    // component: () =>
                    //     import('@/views/financialManagement/budgetPerformanceManagement/applyAdd'),
                },
                {
                    path: 'applyShow',
                    component: applyShowPop,
                    name: '申请',
                    // component: () =>
                    //     import('@/views/financialManagement/budgetPerformanceManagement/applyShow'),
                },
                {
                    path: 'examine',
                    component: examinePop,
                    name: '审核',
                    meta: {
                        title: '审核',
                        icon: 'form'
                    },
                    // component: () =>
                    //     import('@/views/financialManagement/budgetPerformanceManagement/examine')
                },
                {
                    path: 'examineAdd',
                    component: examineAddPop,
                    name: '审核',
                    // component: () =>
                    //     import('@/views/financialManagement/budgetPerformanceManagement/examineAdd')
                },
                {
                    path: 'examineShow',
                    component: examineShowPop,
                    name: '审核',
                    // component: () =>
                    //     import('@/views/financialManagement/budgetPerformanceManagement/examineShow')
                }
                ]
            }]
        },
        // 粮食财务管理结束
        //财务数据提报开始
        {
            path: `${pathUrl}/financialDataPresentation`,
            component: Layout,
            name: '财务数据提报',
            meta: {
                title: '财务数据提报',
                icon: 'form'
            },
            component: {
                render(c) {
                    return c('router-view')
                }
            },
            children: [{
                path: 'financialDataPresentation',
                component: financialDataPresentation,
                name: '详情',
                meta: {
                    title: '',
                    icon: 'form'
                },
                // component: () =>
                //     import('@/views/financialDataPresentation/financialDataPresentationIndex')
            }, {
                path: 'enterpriseStatement',
                component: enterpriseStatement,
                name: '详情',
                meta: {
                    title: '详情',
                    icon: 'form'
                },
                // component: () =>
                //     import('@/views/financialDataPresentation/enterpriseStatement')
            }, {
                path: 'summaryTable',
                component: summaryTable,
                name: '详情',
                meta: {
                    title: '详情',
                    icon: 'form'
                },
                // component: () =>
                //     import('@/views/financialDataPresentation/summaryTable')
            }]
        },
        {
            path: `${pathUrl}/departmentBudget`,
            component: Layout,
            name: '部门预算',
            meta: {
                title: '部门预算',
                icon: 'form'
            },
            component: {
                render(c) {
                    return c('router-view')
                }
            },
            children: [{
                path: 'ndczysbgIndex',
                component: ndczysbgIndex,
                name: '年度财政预算项目事前绩效评估报告',
                meta: {
                    title: '年度财政预算项目事前绩效评估报告',
                    icon: 'form'
                },
                // component: () =>
                //     import('@/views/financialDataPresentation/financialDataPresentationIndex')
            },
            {
                path: 'ndczysbgDetail',
                component: ndczysbgDetail,
                name: '年度财政预算项目事前绩效评估报告详情',
                meta: {
                    title: '年度财政预算项目事前绩效评估报告详情',
                    icon: 'form'
                },
                // component: () =>
                //     import('@/views/financialDataPresentation/financialDataPresentationIndex')
            }, {
                path: 'ysxmpsbgIndex',
                component: ysxmpsbgIndex,
                name: '年度财政预算项目评审报告',
                meta: {
                    title: '年度财政预算项目评审报告',
                    icon: 'form'
                },
                // component: () =>
                //     import('@/views/financialDataPresentation/financialDataPresentationIndex')
            },
            {
                path: 'ysxmpsbgDetail',
                component: ysxmpsbgDetail,
                name: '年度财政预算项目评审报告详情',
                meta: {
                    title: '年度财政预算项目评审报告详情',
                    icon: 'form'
                },
                // component: () =>
                //     import('@/views/financialDataPresentation/financialDataPresentationIndex')
            },
            {
                path: 'xmjfsyfaIndex',
                component: xmjfsyfaIndex,
                name: '项目经费使用方案',
                meta: {
                    title: '项目经费使用方案',
                    icon: 'form'
                },
                // component: () =>
                //     import('@/views/financialDataPresentation/financialDataPresentationIndex')
            },
            {
                path: 'xmjfsyfaDetail',
                component: xmjfsyfaDetail,
                name: '项目经费使用方案详情',
                meta: {
                    title: '项目经费使用方案详情',
                    icon: 'form'
                },
                // component: () =>
                //     import('@/views/financialDataPresentation/financialDataPresentationIndex')
            },
            {
                path: 'cstb',
                component: departmentBudgetTb,
                name: '处室公用预算需求情况表填报',
                meta: {
                    title: '',
                    icon: 'form'
                },
                // component: () =>
                //     import('@/views/financialDataPresentation/financialDataPresentationIndex')
            },
            {
                path: 'cshz',
                component: departmentBudget,
                name: '处室公用预算需求情况表汇总',
                meta: {
                    title: '',
                    icon: 'form'
                },
                // component: () =>
                //     import('@/views/financialDataPresentation/financialDataPresentationIndex')
            },

            {
                path: 'csxmtb',
                component: departmentBudgetTb,
                name: '单位/处室项目预算需求情况表填报',
                meta: {
                    title: '',
                    icon: 'form'
                },
                // component: () =>
                //     import('@/views/financialDataPresentation/financialDataPresentationIndex')
            },
            {
                path: 'csxmhz',
                component: departmentBudget,
                name: '单位/处室项目预算需求情况表汇总',
                meta: {
                    title: '',
                    icon: 'form'
                },
                // component: () =>
                //     import('@/views/financialDataPresentation/financialDataPresentationIndex')
            },

            {
                path: 'xmzctb',
                component: departmentBudgetTb,
                name: '项目支出绩效目标表填报',
                meta: {
                    title: '',
                    icon: 'form'
                },
                // component: () =>
                //     import('@/views/financialDataPresentation/financialDataPresentationIndex')
            },
            {
                path: 'xmzchz',
                component: departmentBudget,
                name: '项目支出绩效目标表汇总',
                meta: {
                    title: '',
                    icon: 'form'
                },
                // component: () =>
                //     import('@/views/financialDataPresentation/financialDataPresentationIndex')
            },



            ]
        }
            // {
            //     path: `${pathUrl}/enterpriseStatement`,
            //     component: Layout,
            //     name: '财务数据提报',
            //     meta: {
            //         title: '财务数据提报',
            //         icon: 'form'
            //     },
            //     component: {
            //         render(c) {
            //             return c('router-view')
            //         }
            //     },
            //     children: [{
            //         path: 'enterpriseStatement',
            //         component: enterpriseStatement,
            //         name: '详情',
            //         meta: {
            //             title: '财务数据提报',
            //             icon: 'form'
            //         },
            //         // component: () =>
            //         //     import('@/views/financialDataPresentation/enterpriseStatement')
            //     }]
            // },
            // {
            //     path: `${pathUrl}/summaryTable`,
            //     component: Layout,
            //     name: '财务数据提报',
            //     meta: {
            //         title: '财务数据提报',
            //         icon: 'form'
            //     },
            //     component: {
            //         render(c) {
            //             return c('router-view')
            //         }
            //     },
            //     children: [{
            //         path: 'summaryTable',
            //         component: summaryTable,
            //         name: '详情',
            //         meta: {
            //             title: '财务数据提报',
            //             icon: 'form'
            //         },
            //         // component: () =>
            //         //     import('@/views/financialDataPresentation/summaryTable')
            //     }]
            // },
            //财务数据提报结束
        ]
    },


    ]
})