import { createRouter, createWebHashHistory } from 'vue-router'
const routes = [
    {
        path: '/login',
        name: 'Loginpage',
        meta: {
            title: '登录',
        },
        component: () =>
            import(
                /* webpackChunkName: "login" */
                '../views/Login.vue'
            ),
    },

    {
        path: '/index',
        name: 'homePageNoMap',
        meta: {
            title: '首页',
        },
        component: () =>
            import(
                '../views/homePageNoMap.vue'
            ),
    },
    {
        path: '/panoramicPower',
        name: 'panoramicPower',
        meta: {
            title: '全景功率',
        },
        component: () =>
            import(
                '../views/panoramicPower.vue'
            ),
    },
    {
        path: '/powerPrediction',
        name: 'powerPrediction',
        meta: {
            title: '功率预测',
        },
        component: () =>
            import(
                '../views/powerPredictionPage.vue'
            ),
    },
    {
        path: '/batteryDiviner',
        name: 'batteryDiviner',
        meta: {
            title: '电量预测',
        },
        component: () =>
            import(
                '../views/batteryDivinerPage.vue'
            ),
    },
    {
        path: '/powerControl',
        name: 'powerControl',
        meta: {
            title: '功率管控',
        },
        component: () =>
            import(
                '../views/powerControlPage.vue'
            ),
    },
    {
        path: '/weather',
        name: 'weatherPage',
        meta: {
            title: '天气预报',
        },
        component: () =>
            import(
                '../views/weatherPage.vue'
            ),
    },
    {
        path: '/statisticalSummary',
        name: 'statisticalSummary',
        meta: {
            title: '统计汇总',
        },
        component: () =>
            import(
                '../views/statisticalSummaryPage.vue'
            ),
    },
    {
        path: '/datasExport',
        name: 'datasExport',
        meta: {
            title: '数据导出',
        },
        component: () =>
            import(
                '../views/datasExportPage.vue'
            ),
    },
    {
        path: '/draggableTest',
        name: 'draggableTest',
        meta: {
            title: '拖拽测试',
        },
        component: () =>
            import(
                '../views/draggableTest.vue'
            ),
    },
    // 系统设置
    {
        path: '/systemSettings',
        name: 'systemSettings',
        meta: {
            title: '系统设置',
        },
        component: () =>
                import(
                    '../views/configPage.vue'
                ),
        children:[
            { // 总览
                path: '/systemSettings/Overview',
                name:'Overview',
                component: () =>
                    import(
                        '../components/configPage/Overview.vue'
                    ),
            },
            { // 区域管理
                path: '/systemSettings/regionalManagement',
                name:'regionalManagement',
                component: () =>
                    import(
                        '../components/configPage/regionalManagement'
                    ),
            },
            { // 场站总管理
                path: '/systemSettings/allStationSettingPage',
                name:'allStationSettingPage',
                component: () =>
                    import(
                        '../components/configPage/stationFlode/allStationSettingPage'
                    ),
            },
            // { // 场站管理
            //   path: '/systemSettings/stationManagement',
            //   name:'stationManagement',
            //   component: stationManagement
            // },
            { // 期次管理
                path: '/systemSettings/periodManagement',
                name:'periodManagement',
                component: () =>
                    import(
                        '../components/configPage/stationFlode/periodManagement'
                    ),
            },
            { // 集电线管理
                path: '/systemSettings/collectionLineManagement',
                name:'collectionLineManagement',
                component: () =>
                    import(
                        '../components/configPage/stationFlode/collectionLineManagement'
                    ),
            },
            { // 机组管理
                path: '/systemSettings/unitManagement',
                name:'unitManagement',
                component: () =>
                    import(
                        '../components/configPage/unitManagement'
                    ),
            },
            { // 组态设计
                path: '/systemSettings/configurationDesign',
                name:'configurationDesign',
                component: () =>
                    import(
                        '../components/configPage/configurationDesign'
                    ),
            },
            { // 机组测点管理
                path: '/systemSettings/unitMeasurementPoint',
                name:'unitMeasurementPoint',
                component: () =>
                    import(
                        '../components/configPage/unitMeasurementPoint'
                    ),
            },
            { // 场站功率测点管理
                path: '/systemSettings/stationPowerMeasurementPoint',
                name:'stationPowerMeasurementPoint',
                component: () =>
                    import(
                        '../components/configPage/stationPowerMeasurementPoint'
                    ),
            },
            { // 规范测点管理
                path: '/systemSettings/standardizeTheManagement',
                name:'standardizeTheManagement',
                component: () =>
                    import(
                        '../components/configPage/standardizeTheManagement'
                    ),
            },
            { // 计算模型配置
                path: '/systemSettings/calculationModelConfiguration',
                name:'calculationModelConfiguration',
                component: () =>
                    import(
                        '../components/configPage/calculationModelConfiguration'
                    ),
            },
            { // 数值天气预报管理
                path: '/systemSettings/numericalWeatherForecast',
                name:'numericalWeatherForecast',
                component: () =>
                    import(
                        '../components/configPage/numericalWeatherForecast'
                    ),
            },
            { // 发电计划管理
                path: '/systemSettings/generationPlan',
                name:'generationPlan',
                component: () =>
                    import(
                        '../components/configPage/generationPlan'
                    ),
            },
            { // 预测上报管理
                path: '/systemSettings/forecastReporting',
                name:'forecastReporting',
                component: () =>
                    import(
                        '../components/configPage/forecastReporting'
                    ),
            },
            { // 用户管理
                path: '/systemSettings/personManagement',
                name:'personManagement',
                component: () =>
                    import(
                        '../components/configPage/personManagement'
                    ),
            },
            { // 角色管理
                path: '/systemSettings/roleManagement',
                name:'roleManagement',
                component: () =>
                    import(
                        '../components/configPage/roleManagement'
                    ),
            },
            { // 菜单管理
                path: '/systemSettings/menuManagement',
                name:'menuManagement',
                component: () =>
                    import(
                        '../components/configPage/menuManagement'
                    ),
            }
        ]
    },
    //人员管理
    {
        path: '/personnelRole',
        name: 'personnelRole',
        meta: {
            title: '人员管控',
        },
        component: () =>
            import(
                '../components/configPage/personnelRole.vue'
            ),
    },
]

const router = createRouter({
    history: createWebHashHistory(''),
    // history: '',
    routes,
})

export default router