import Vue from 'vue'
import Router from 'vue-router'
import governRouter from './govern.js'
/* Layout */
import Layout from '@/layout'
Vue.use(Router)

/**
 * hidden: true                  当设置 true 的时候该路由不会在菜单中出现 如401，login等页面，或者如一些编辑页面/edit/1  (默认 false)
 * name:'router-name'            设定路由的名字，一定要填写不然使用<keep-alive>时会出现页面操作无法记录的问题
 *                               如果name是 foo.xxx 那么该路由将会作为 name 是 foo 的路由的下一级页面，并自动提供提供前进加载后退缓存功能
 * meta : {
    title: 'title'               设置该路由在菜单和面包屑中展示的名字
    icon: 'svg-name'             设置该路由的菜单图标
    affix: true                  如果设置为true该路由对应的标签将一直显示在标签页中
    breadcrumb: false            如果设置为false该路由将不会显示在面包屑中（默认true）
    activeMenu: '/foo'           如果设置对应路由地址,访问本路由时菜单栏会高亮你设置路由对应的菜单
    activeTag: '/foo'			       如果设置对应路由地址,访问本路由时标签页会高亮你设置路由对应的标签
    role: 'admin'			           设置该路由的权限，未设置则代表所有角色均可访问
  }
 */

/**
 * 如果当前路由未配置component属性，且存在children属性，
 * 则将children放到到其父级的children中
 * 用于多级路由配置
 */
var menus = window.sessionStorage.getItem('menus')
menus = eval('(' + menus + ')')
console.log('🚀 ~ menus:', menus)

export const constantRoutes = [
    ...governRouter,

    {
        path: '/agreement',
        name: 'Agreement',
        component: () => import('@/views/h5/agreement')
    },
    {
        path: '/policy',
        name: 'Policy',
        component: () => import('@/views/h5/policy'),
        hidden: true
    },
    {
        path: '/',
        redirect: '/login',
        //redirect: '/Statistical-analysis/indicatorClassification',
        component: () => import('@/views/login/index'),
        hidden: true
    },
    {
        path: '/login',
        component: () => import('@/views/login/index'),
        //component: () => import('@/views/harmonic-boot/area/powerassessment'),
        hidden: true
    },
    {
        path: '/harmonic-boot/line/pointmonitoring',
        name: 'pointmonitoring',
        component: () => import('@/views/cgy-harmonic-boot/line/pointmonitoring'),
        meta: { title: '详细数据', icon: '' }
    },
    {
        path: '/harmonic-boot/region/regionalmonitoring',
        name: 'regionalmonitoring',
        component: () => import('@/views/cgy-harmonic-boot/region/regionalmonitoring'),
        meta: { title: '告警统计', icon: '' }
    },
    {
        path: '/harmonic-boot/comper/comprehensiveanalysis',
        name: 'comprehensiveanalysis',
        component: () => import('@/views/cgy-harmonic-boot/comper/comprehensiveanalysis'),
        meta: { title: '综合分析', icon: '' }
    },
    {
        path: '/harmonic-boot/comper/CVT',
        name: 'CVT',
        component: () => import('@/views/cgy-harmonic-boot/CVT'),
        meta: { title: 'CVT台账管理', icon: '' }
    },
    {
        path: '/Distributedphotovoltaic/homePage',
        name: 'homePage',
        component: () => import('@/views/cgy-harmonic-boot/UPHomePage'),
        meta: { title: '信息概览', icon: 'user' }
    },

    // 冀北嵌入
    {
        path: '/harmonic-boot/detailedAnalysis/responsibilityqr',
        name: 'responsibility',
        component: () => import('@/views/harmonic-boot/detailed/responsibility'),
        meta: { title: '谐波责任划分', icon: '' }
    },
    {
        path: '/harmonic-boot/harmonic/getIntegrityDataqr',
        name: 'dataintegritydd',
        component: () => import('@/views/harmonic-boot/area/integralitytable'),
        meta: { title: '数据完整性统计', icon: '' }
    },
    {
        path: '/harmonic-boot/area/OnlineRateqr',
        name: 'terminalonlinerate',
        component: () => import('@/views/harmonic-boot/area/onlinerate'),
        meta: { title: '终端在线率', icon: '' }
    },

    // {
    //     path: "/algorithm/algorithmnew",
    //     name: "algorithm1",
    //     component: () =>
    //         import ("@/views/harmonic-boot/algorithm1"),
    //     meta: { title: "算法预览", icon: "user" },
    // },
    // {
    //   path: "/center1/view/homePage",
    //   name: "homePage",
    //   component: () => import("@/views/center1/homePage"),
    //   meta: { title: "数据中心", icon: "user" },
    // },
    {
        path: '/center/homePage',
        name: 'centerhomePage',
        component: () => import('@/views/center/homePage'),
        meta: { title: '南京灿能监控数据中心', icon: 'user' }
    },

    {
        path: '/redirect',
        component: Layout,
        hidden: true,
        children: [
            {
                path: '/redirect/:path*',
                component: () => import('@/views/redirect/index')
            }
        ]
    }
    // {
    //   path: '/dashboard',
    //   component: Layout,
    //   name: 'dashboard',
    //   meta: { title: '驾驶舱', icon: 'excel' },
    //   children: [{
    //       path: '/dashboard',
    //       name: 'dashboard',
    //       component: () => import('@/views/dashboard/index'),
    //       meta: { title: '默认首页', icon: '', affix: true },
    //     }]
    //   }
]
let flag = true

if (process.env.VUE_APP_USE_LOGIN !== 'false') {
    constantRoutes.push({
        path: '/login',
        component: () => import('@/views/login/index'),
        hidden: true
    })
}

function tree2List(list) {
    //存储结果的数组
    let arr = []
    // 遍历 tree 数组
    list.forEach(item => {
        // 判断item是否存在children
        if (!item.children) return arr.push(item)
        // 函数递归，对children数组进行tree2List的转换
        const children = tree2List(item.children)
        // 删除item的children属性
        delete item.children
        // 把item和children数组添加至结果数组
        //..children: 意思是把children数组展开
        arr.push(item, ...children)
    })
    // 返回结果数组
    return arr
}

export const asyncRoutes = [
    {
        path: '/dashboard',
        component: Layout,
        name: 'dashboard',
        redirect: '/dashboard/index',
        meta: { title: '驾驶舱', icon: 'excel' },
        children: [
            {
                path: '/dashboard/index',
                name: 'index',
                component: () =>
                    // import ("@/views/dashboard/index"),
                    import('@/views/harmonic-boot/detailed/qypowerpollutionzs'),
                //import('@/views/energy-system/operationalCenter/airManageReadOnly.vue'),
                meta: { title: '首页概览', icon: '', affix: true }
            },
            {
                path: '/dashboard/index404',
                name: 'dashboard',
                component: () => import('@/views/dashboard/index404'),
                meta: { title: '管理员默认首页', icon: '', affix: true }
            },
            {
                path: '/home/screen1/home1',
                component: () => import('@/views/home/screen1/home1'),
                name: 'home-screen1-home1',
                meta: { title: '大屏模式测试' }
            },
            {
                path: '/home/screen1/home2',
                component: () => import('@/views/home/screen1/home2'),
                name: 'home-screen1-home2',
                meta: { title: '大屏模式1' }
            },
            {
                path: '/home/screen1/home3',
                component: () => import('@/views/home/screen1/home3'),
                name: 'home-screen1-home3',
                meta: { title: '大屏模式1' }
            },
            {
                path: '/home/screen2/home1',
                component: () => import('@/views/home/screen2/home1'),
                name: 'home-screen2-home1',
                meta: { title: '大屏模式2' }
            },
            {
                path: '/home/screen2/home2',
                component: () => import('@/views/home/screen2/home2'),
                name: 'home-screen2-home2',
                meta: { title: '大屏模式2' }
            },
            {
                path: '/home/screen2/home3',
                component: () => import('@/views/home/screen2/home3'),
                name: 'home-screen2-home3',
                meta: { title: '大屏模式2' }
            },
            {
                path: '/home/buju1/home1',
                component: () => import('@/views/home/buju1/home1'),
                name: 'home-buju1-home1',
                meta: { title: '常规模式1' }
            },
            {
                path: '/home/buju1/home2',
                component: () => import('@/views/home/buju1/home2'),
                name: 'home-buju1-home2',
                meta: { title: '常规模式1' }
            },
            {
                path: '/home/buju1/home3',
                component: () => import('@/views/home/buju1/home3'),
                name: 'home-buju1-home3',
                meta: { title: '常规模式1' }
            },
            {
                path: '/home/buju2/home1',
                component: () => import('@/views/home/buju2/home1'),
                name: 'home-buju2-home1',
                meta: { title: '常规模式2' }
            },
            {
                path: '/home/buju2/home2',
                component: () => import('@/views/home/buju2/home2'),
                name: 'home-buju2-home2',
                meta: { title: '常规模式2' }
            },
            {
                path: '/home/buju2/home3',
                component: () => import('@/views/home/buju2/home3'),
                name: 'home-buju2-home3',
                meta: { title: '常规模式2' }
            },
            {
                path: '/home/buju3/home1',
                component: () => import('@/views/home/buju3/home1'),
                name: 'home-buju3-home1',
                meta: { title: '常规模式3' }
            },
            {
                path: '/home/buju3/home2',
                component: () => import('@/views/home/buju3/home2'),
                name: 'home-buju3-home2',
                meta: { title: '常规模式3' }
            },
            {
                path: '/home/buju3/home3',
                component: () => import('@/views/home/buju3/home3'),
                name: 'home-buju3-home3',
                meta: { title: '常规模式3' }
            },
            {
                path: '/home/buju4/home1',
                component: () => import('@/views/home/buju4/home1'),
                name: 'home-buju4-home1',
                meta: { title: '常规模式4' }
            },
            {
                path: '/home/buju4/home2',
                component: () => import('@/views/home/buju4/home2'),
                name: 'home-buju4-home2',
                meta: { title: '常规模式4' }
            },
            {
                path: '/home/buju4/home3',
                component: () => import('@/views/home/buju4/home3'),
                name: 'home-buju4-home3',
                meta: { title: '常规模式4' }
            },
            {
                path: '/home/buju5/home1',
                component: () => import('@/views/home/buju5/home1'),
                name: 'home-buju5-home1',
                meta: { title: '常规模式5' }
            },
            {
                path: '/home/buju5/home2',
                component: () => import('@/views/home/buju5/home2'),
                name: 'home-buju5-home2',
                meta: { title: '常规模式5' }
            },
            {
                path: '/home/buju5/home3',
                component: () => import('@/views/home/buju5/home3'),
                name: 'home-buju5-home3',
                meta: { title: '常规模式5' }
            }
        ]
    },
    {
        path: '/harmonic-boot',
        component: Layout,
        name: 'harmonic-boot',
        redirect: '/harmonic-boot/monitor/online',
        meta: { title: '谐波监测系统', icon: 'excel' },
        children: [
            {
                path: '/harmonic-boot/yanshi',
                name: 'overview',
                component: () => import('@/views/test/ancestor'),
                // component: () =>
                //     import ("@/views/harmonic-boot/view/yanshi"),
                meta: { title: '演示引用', icon: '' }
            },
            {
                path: '/harmonic-boot/yanshi2',
                name: 'overview',
                component: () => import('@/views/harmonic-boot/view/yanshi2'),

                meta: { title: '演示引用', icon: '' }
            },
            {
                path: '/harmonic-boot/views',
                name: 'overview',
                component: () => import('@/views/harmonic-boot/view/overview'),
                meta: { title: '谐波监测概览', icon: '' }
            },
            {
                path: '/harmonic-boot/monitor/online',
                name: 'nowmonitoring',
                component: () => import('@/views/harmonic-boot/monitor/onlineData'),
                meta: { title: '在线监测点', icon: '' }
            },
            {
                path: '/harmonic-boot/area/qualifiedRate',
                name: 'qualificationratestatistics',
                component: () => import('@/views/harmonic-boot/area/qualifiedRate'),
                meta: { title: '稳态合格率统计', icon: '' }
            },
            {
                path: '/harmonic-boot/xieboReport',
                name: 'reportsview',
                component: () => import('@/views/harmonic-boot/staeyreport/CustomReport'),
                meta: { title: '谐波稳态报表', icon: '' }
            },
            {
                path: '/harmonic-boot/harmonic/getIntegrityData',
                name: 'dataintegritydd',
                component: () => import('@/views/harmonic-boot/area/integralitytable'),
                meta: { title: '数据完整性统计', icon: '' }
            },
            {
                path: '/harmonic-boot/area/powerAssessment',
                name: 'qualityzhilestimate',
                component: () => import('@/views/harmonic-boot/area/qypowerment'),
                meta: { title: '电能质量综合评估', icon: '' }
            },
            {
                path: '/harmonic-boot/area/harmonicDistortionRate',
                name: 'distortionratestatistics',
                component: () => import('@/views/harmonic-boot/area/harmonicdistortionrate'),
                meta: { title: '谐波总畸变率统计', icon: '' }
            },
            {
                path: '/harmonic-boot/area/SteadyState',
                name: 'exceedingstandards',
                component: () => import('@/views/harmonic-boot/area/steadystate'),
                meta: { title: '稳态符合性占比', icon: '' }
            },
            {
                path: '/harmonic-boot/area/TerminalOnlineRate',
                name: 'terminalstatusstatistics',
                component: () => import('@/views/harmonic-boot/area/terminalonlinerate'),
                meta: { title: '终端状态在线统计', icon: '' }
            },
            {
                path: '/harmonic-boot/area/OnlineRate',
                name: 'terminalonlinerate',
                component: () => import('@/views/harmonic-boot/area/onlinerate'),
                meta: { title: '终端在线率', icon: '' }
            },
            {
                path: '/harmonic-boot/area/TransientEventList',
                name: 'transienteventlist',
                component: () => import('@/views/harmonic-boot/area/transienteventlist'),
                meta: { title: '暂态事件列表', icon: '' }
            },
            {
                path: '/harmonic-boot/detailedAnalysis/contrast',
                name: 'steadystate',
                component: () => import('@/views/harmonic-boot/detailed/regionalsteadystate'),
                meta: { title: '区域稳态超标统计', icon: '' }
            },
            {
                path: '/harmonic-boot/detailedAnalysis/responsibility',
                name: 'responsibility',
                component: () => import('@/views/harmonic-boot/detailed/responsibility'),
                meta: { title: '谐波责任划分', icon: '' }
            },
            {
                path: '/harmonic-boot/detailedAnalysis/station',
                name: 'alarmstatistics',
                component: () => import('@/views/harmonic-boot/detailed/alarmstation'),
                meta: { title: '告警电站统计', icon: '' }
            },
            {
                path: '/harmonic-boot/detailedAnalysis/pollution',
                name: 'assessmentpollution',
                component: () => import('@/views/harmonic-boot/detailed/powerpollution'),
                meta: { title: '电能质量污染区图', icon: '' }
            },
            {
                path: '/harmonic-boot/qydetailedAnalysis/pollutionqy',
                name: 'pollutionareamap',
                component: () => import('@/views/harmonic-boot/detailed/qypowerpollution'),
                meta: { title: '企业污染区', icon: '' }
            },
            {
                path: '/harmonic-boot/qydetailedAnalysis/pollutionqyzs',
                name: 'pollutionqyzs',
                component: () => import('@/views/harmonic-boot/detailed/qypowerpollutionzs'),
                meta: { title: '谐波污染指数展示', icon: '' }
            },
            {
                path: '/harmonic-boot/detailedAnalysis/harmonictj',
                name: 'harmonicstatistics',
                component: () => import('@/views/harmonic-boot/detailed/harmonictj'),
                meta: { title: '谐波统计', icon: '' }
            },
            {
                path: '/harmonic-boot/detailedAnalysis/details',
                name: 'exceedancedetails',
                component: () => import('@/views/harmonic-boot/detailed/exceedancedetails'),
                meta: { title: '稳态指标超标明细', icon: '' }
            },
            {
                path: '/harmonic-boot/run/devicemessage',
                name: 'monitoringledger',
                component: () => import('@/views/harmonic-boot/runmange/devicemessage'),
                meta: { title: '监测点台账信息', icon: '' }
            },
            {
                path: '/harmonic-boot/run/terminalmessage',
                name: 'terminalledger',
                component: () => import('@/views/harmonic-boot/runmange/terminalmessage'),
                meta: { title: '终端台账信息', icon: '' }
            },
            {
                path: '/harmonic-boot/run/terminalconts',
                name: 'counting',
                component: () => import('@/views/harmonic-boot/runmange/terminalconst'),
                meta: { title: '终端数量统计', icon: '' }
            },
            {
                path: '/harmonic-boot/Statisticalanalysis/cutmreport',
                name: 'excel',
                component: () => import('@/views/harmonic-boot/staeyreport/CustomReport'),
                meta: { title: '统计分析报表', icon: '' }
            },
            {
                path: '/harmonic-boot/report/excel',
                name: 'excel',
                component: () => import('@/views/harmonic-boot/staeyreport/excel'),
                meta: { title: 'Excel报表', icon: '' }
            },
            {
                path: '/harmonic-boot/report/word',
                name: 'worldview',
                component: () => import('@/views/harmonic-boot/staeyreport/word'),
                meta: { title: 'word报告', icon: '' }
            },
            // {
            //     path: "/harmonic-boot/algorithm",
            //     name: "algorithm",
            //     component: () =>
            //         import ("@/views/harmonic-boot/algorithmc"),
            //     meta: { title: "算法帮助", icon: "" },
            // },
            {
                path: '/harmonic-boot/reate/word',
                name: 'word',
                component: () => import('@/views/harmonic-boot/staeyreport/reateword'),
                meta: { title: '合格率报告', icon: '' }
            },
            {
                path: '/harmonic-boot/algorithm/bus-bar',
                name: 'BusBar',
                component: () => import('@/views/harmonic-boot/algoorithm/bus-bar'),
                meta: { title: '母线算法', icon: '' }
            },
            {
                path: '/Statistical-analysis/stations',
                name: 'stations',
                component: () => import('@/views/Statistical-analysis/stations.vue'),
                meta: { title: '新能源电厂', icon: '' }
            },
            {
                path: '/harmonic-boot/algorithm/main-network',
                name: 'MainNetwork',
                component: () => import('@/views/harmonic-boot/algoorithm/main-network'),
                meta: { title: '主网质量', icon: '' }
            },
            {
                path: '/harmonic-boot/algorithm/source-load',
                name: 'SourceLoad',
                component: () => import('@/views/harmonic-boot/algoorithm/source-load'),
                meta: { title: '源荷', icon: '' }
            },
            {
                path: '/harmonic-boot/algorithm/substation',
                name: 'Substation',
                component: () => import('@/views/harmonic-boot/algoorithm/substation'),
                meta: { title: '变电站算法', icon: '' }
            },
            {
                path: '/harmonic-boot/data-feed',
                name: 'Substation',
                component: () => import('@/views/harmonic-boot/data-feed'),
                meta: { title: '数据上送', icon: '' }
            }
        ]
    },
    {
        path: '/event-boot',
        component: Layout,
        name: 'event-boot',
        meta: { title: '电压暂降系统', icon: 'excel' },
        children: [
            {
                path: '/Descentsystem/monitoringpoint',
                name: 'temporarydroponline',
                component: () => import('@/views/Event-boot/Descent-system/monitoringpoint'),
                meta: { title: '在线监测点', icon: '' }
            },
            {
                path: '/Descentsystem/overview',
                name: 'mapview',
                component: () => import('@/views/Event-boot/Descent-system/overview'),
                meta: { title: '地理信息图概览', icon: 'user' }
            },
            {
                path: '/Region/overview',
                name: 'areaview',
                component: () => import('@/views/Event-boot/Region/overview'),
                meta: { title: '区域概览', icon: 'user' }
            },
            {
                path: '/harmonic-boot/area/powerAssessment',
                name: 'powerAssessment',
                component: () => import('@/views/harmonic-boot/area/qypowerment'),
                meta: { title: '电能质量综合评估', icon: '' }
            },
            {
                path: '/Region/statistics',
                name: 'areastatic',
                component: () => import('@/views/Event-boot/Region/statistics'),
                meta: { title: '区域统计', icon: 'user' }
            },
            {
                path: '/Region/transientlist',
                name: 'droplist',
                component: () => import('@/views/Event-boot/Region/transientlist'),
                meta: { title: '区域暂态列表', icon: 'user' }
            },
            {
                path: '/Region/transientassessment',
                name: 'transientassessment',
                component: () => import('@/views/Event-boot/Region/transientassessment'),
                meta: { title: '区域暂态评估', icon: 'user' }
            },
            {
                path: '/map/test',
                name: 'test',
                component: () => import('@/views/Event-boot/Region/test'),
                meta: { title: '地图矢量图测试', icon: 'user' }
            },
            {
                path: '/Region/topologicalDiagram',
                name: 'topologicalDiagram',
                component: () => import('@/views/Event-boot/Region/topologicalDiagram'),
                meta: { title: '地理信息拓扑图', icon: 'user' }
            },
            {
                path: '/Region/distribution',
                name: 'monitoringnetwork',
                component: () => import('@/views/Event-boot/Region/distribution'),
                meta: { title: '监测网分布', icon: 'user' }
            },
            {
                path: '/Region/thermodynamicDiagram',
                name: 'hotmap',
                component: () => import('@/views/Event-boot/Region/thermodynamicDiagram'),
                meta: { title: '暂降热力图', icon: 'user' }
            },
            {
                path: '/Region/sagSeverity',
                name: 'severityassessment',
                component: () => import('@/views/Event-boot/Region/sagSeverity'),
                meta: { title: '暂降严重度', icon: 'user' }
            },
            {
                path: '/Advancedanalysis/eventcorrelation',
                name: 'eventcorrelation',
                component: () => import('@/views/Event-boot/Advanced-analysis/eventcorrelation'),
                meta: { title: '事件关联分析', icon: 'user' }
            },
            {
                path: '/Advancedanalysis/impactscope',
                name: 'impactscope',
                component: () => import('@/views/Event-boot/Advanced-analysis/impactscope'),
                meta: { title: '影响范围分析', icon: 'user' }
            },
            {
                path: '/Advancedanalysis/eventwaveform',
                name: 'eventwaveform',
                component: () => import('@/views/Event-boot/Advanced-analysis/eventwaveform'),
                meta: { title: '事件波形分析', icon: 'user' }
            },
            {
                path: '/Operationmanagement/terminalmanagement',
                name: 'descentoperation',
                component: () => import('@/views/Event-boot/Operation-management/terminalmanagement'),
                meta: { title: '终端运行管理', icon: 'user' }
            },
            {
                path: '/Operationmanagement/terminalstatistics',
                name: 'dropstatisticsrun',
                component: () => import('@/views/Event-boot/Operation-management/terminalstatistics'),
                meta: { title: '终端运行统计', icon: 'user' }
            },
            {
                path: '/Operationmanagement/accountinformation',
                name: 'reductionledger',
                component: () => import('@/views/Event-boot/Operation-management/accountinformation'),
                meta: { title: '监测点台账信息', icon: 'user' }
            },
            {
                path: '/TransientReport/weekly',
                name: 'weekly',
                component: () => import('@/views/Event-boot/Transient-Report/weekly'),
                meta: { title: '周报', icon: 'user' }
            },
            {
                path: '/TransientReport/monitoringpointReport',
                name: 'monitoringpointreport',
                component: () => import('@/views/Event-boot/Transient-Report/monitoringpointReport'),
                meta: { title: '监测点报告', icon: 'user' }
            },
            {
                path: '/TransientReport/regionalreports',
                name: 'areareport',
                component: () => import('@/views/Event-boot/Transient-Report/regionalreports'),
                meta: { title: '区域报告', icon: 'user' }
            },
            {
                path: '/TransientReport/eventreports',
                name: 'listreport',
                component: () => import('@/views/Event-boot/Transient-Report/eventreports'),
                meta: { title: '事件报告', icon: 'user' }
            }
        ]
    },
    {
        path: '/sys',
        component: Layout,
        routeName: 'sys',
        meta: { title: '系统管理员', icon: 'user' },
        children: [
            {
                path: '/user-boot',
                name: 'user-boot',
                //redirect: '/sys/user-boot',
                meta: { title: '权限分配' },
                children: [
                    {
                        path: '/user-boot/user/list',
                        name: 'uesrmanagement',
                        component: () => import('@/views/sys/user-boot/user/index'),
                        meta: { title: '用户管理', icon: 'user' }
                    },
                    {
                        path: '/iframe',
                        name: 'Iframe',
                        component: () => import('@/views/iframe/index')
                    },
                    {
                        path: '/user/checkUserListview',
                        name: 'sys-user-boot-check',
                        component: () => import('@/views/sys/user-boot/user/audit'),
                        meta: { title: '审核管理', icon: 'user' }
                    },
                    {
                        path: '/algorithm/algorithm1',
                        name: 'algorithmview',
                        component: () => import('@/views/harmonic-boot/algorithm1'),
                        meta: { title: '算法预览', icon: 'user' }
                    },
                    {
                        path: '/user-boot/role/list',
                        name: 'rolesmanagement',
                        component: () => import('@/views/sys/user-boot/role/index'),
                        meta: { title: '角色管理', icon: 'user' }
                    },
                    {
                        path: '/user-boot/function/functionTree',
                        name: 'menumanagement',
                        component: () => import('@/views/sys/user-boot/menu/index'),
                        meta: { title: '菜单管理', icon: 'user' }
                    },
                    {
                        path: '/user-boot/dept/deptTreeview',
                        name: 'deptmanagement',
                        component: () => import('@/views/sys/user-boot/dept/index'),
                        meta: { title: '部门管理', icon: 'user' }
                    },
                    {
                        path: '/system-boot/theme/getAllThemes',
                        name: 'themeanagement',
                        component: () => import('@/views/sys/user-boot/palt/index'),
                        meta: { title: '主题配置管理', icon: 'user' }
                    },
                    {
                        path: '/system-boot/dictType/list',
                        name: 'dictanagement',
                        component: () => import('@/views/sys/user-boot/dictype/dic'),
                        meta: { title: '字典管理', icon: 'user' }
                    },
                    {
                        path: '/system-boot/sysConfig/map',
                        name: 'mapmanagement',
                        component: () => import('@/views/sys/user-boot/palt/mapconfig'),
                        meta: { title: '地图类型配置', icon: 'user' }
                    },
                    {
                        path: '/system-boot/sysConfig/config',
                        name: 'sysmanage',
                        component: () => import('@/views/sys/user-boot/palt/sysonfig'),
                        meta: { title: '系统相关配置', icon: 'user' }
                    },
                    {
                        path: '/system-boot/sysConfig/timer',
                        name: 'sysmanage',
                        component: () => import('@/views/sys/timer'),
                        meta: { title: '定时任务配置', icon: 'user' }
                    },
                    {
                        path: '/system-boot/area/areaTree',
                        name: 'areaanagement',
                        component: () => import('@/views/sys/user-boot/area/areamange'),
                        meta: { title: '区域配置', icon: 'user' }
                    },
                    {
                        path: '/component',
                        name: 'componentmanage',
                        component: () => import('@/views/sys/user-boot/palt/commentpalt'),
                        meta: { title: '组件管理', icon: 'user' }
                    },
                    {
                        path: '/system-boot/dict/Tree',
                        name: 'dictreemanage',
                        component: () => import('@/views/sys/user-boot/dictype/treetable'),
                        meta: { title: '字典树配置', icon: 'user' }
                    },
                    {
                        path: '/system-boot/lockoutPolicy',
                        name: 'dictreemanage',
                        component: () => import('@/views/sys/user-boot/lockoutPolicy/index.vue'),
                        meta: { title: '锁定策略', icon: 'user' }
                    },
                    {
                        path: '/Distributedphotovoltaic/templateConfiguration',
                        name: 'reportingmanagerdd',
                        component: () => import('@/views/sys/user-boot/report/templateConfiguration'),
                        meta: { title: '报表模板配置', icon: 'user' }
                    },
                    {
                        path: '/BusinessAdministrator/ReportTemplate/ReportConfiguration',
                        name: 'reportingmanager',
                        component: () => import('@/views/BusinessAdministrator/ReportTemplate/ReportConfiguration'),
                        meta: { title: '报告模板配置', icon: 'user' }
                    },
                    {
                        path: '/system/resource/management',
                        name: 'resourcemage',
                        component: () => import('@/views/sys/user-boot/palt/management'),
                        meta: { title: '资源管理', icon: 'user' }
                    },
                    {
                        path: '/system/resource/document',
                        name: 'resourceDocument',
                        component: () => import('@/views/sys/user-boot/palt/document'),
                        meta: { title: '文档维护', icon: 'user' }
                    },
                    {
                        path: '/sys/ff/dd',
                        name: 'resourcemagess',
                        component: () => import('@/views/sys/user-boot/palt/test'),
                        meta: { title: '测试', icon: 'user' }
                    },
                    {
                        path: '/sys/pale/test2',
                        name: 'test2',
                        component: () => import('@/views/sys/user-boot/palt/test2'),
                        meta: { title: '测试二', icon: 'user' }
                    }
                ]
            }
        ]
    },
    {
        path: '/device',
        component: Layout,
        routeName: 'device-boot',
        meta: { title: '业务管理员', icon: 'user' },
        children: [
            {
                path: '/device-boot',
                name: 'device-boot',
                // redirect: "/device-boot/device",
                meta: { title: '终端台账管理' },
                children: [
                    {
                        path: '/device-boot/deviceter',
                        name: 'terminalmage',
                        component: () => import('@/views/device-boot/device/diviceindex'),
                        meta: { title: '终端台账管理', icon: 'user' }
                    },
                    {
                        path: '/business/nuitmange',
                        name: 'nuitmange',
                        component: () => import('@/views/device-boot/device/dataunitmange'),
                        meta: { title: '数据单位管理', icon: 'user' }
                    },
                    {
                        path: '/hbbusiness/nuitmange',
                        name: 'nuitmange',
                        component: () => import('@/views/device-boot/device/hbdataunitmange'),
                        meta: { title: '数据单位管理', icon: 'user' }
                    },
                    {
                        path: '/device-boot/linepingfen',
                        name: 'linepingfen',
                        component: () => import('@/views/device-boot/device/linepingfen'),
                        meta: { title: '评分管理', icon: 'user' }
                    },
                    {
                        path: '/device-boot/programmage',
                        name: 'programmage',
                        component: () => import('@/views/device-boot/device/programmange'),
                        meta: { title: '程序升级管理', icon: 'user' }
                    },
                    {
                        path: '/BusinessAdministrator/Audit/Operations/Management',
                        name: 'Management',
                        component: () => import('@/views/BusinessAdministrator/setup/management'),
                        meta: { title: '审计列表管理', icon: 'user' }
                    },
                    {
                        path: '/BusinessAdministrator/Audit/Operations/onlineUsers',
                        name: 'onlineUsers',
                        component: () => import('@/views/BusinessAdministrator/setup/onlineUsers'),
                        meta: { title: '在线用户', icon: 'user' }
                    },
                    {
                        path: '/BusinessAdministrator/Audit/Operations/userLoginInformation',
                        name: 'userLoginInformation',
                        component: () => import('@/views/BusinessAdministrator/setup/userLoginInformation'),
                        meta: { title: '用户登录信息', icon: 'user' }
                    },
                    {
                        path: '/device-boot/alarmcelvmage',
                        name: 'alarmcelvmage',
                        component: () => import('@/views/device-boot/alarm/alarammage'),
                        meta: { title: '告警策略管理', icon: 'user' }
                    },
                    {
                        path: '/device-boot/alarmmessage',
                        name: 'alarmmessage',
                        component: () => import('@/views/device-boot/alarm/alarmmessage'),
                        meta: { title: '告警信息', icon: 'user' }
                    },
                    {
                        path: '/device-boot/terminalcontrol',
                        name: 'controlcenter',
                        component: () => import('@/views/device-boot/contorller/terminalcontor'),
                        meta: { title: '终端控制', icon: 'user' }
                    },
                    {
                        path: '/device-boot/terminalywlogs',
                        name: 'terminalywlogs',
                        component: () => import('@/views/device-boot/journalmange/terminaljourna'),
                        meta: { title: '终端运维日志', icon: 'user' }
                    },
                    {
                        path: '/device-boot/eventsetlogs',
                        name: 'eventsetlogs',
                        component: () => import('@/views/device-boot/journalmange/eventlogs'),
                        meta: { title: '暂降推送日志', icon: 'user' }
                    },
                    {
                        path: '/device-boot/shujuwzxtj',
                        name: 'integritystatistics',
                        component: () => import('@/views/device-boot/operationcenter/datawzxtj'),
                        meta: { title: '数据完整性统计', icon: 'user' }
                    },
                    {
                        path: '/device-boot/linetj',
                        name: 'linetj',
                        component: () => import('@/views/device-boot/operationcenter/linecounttj'),
                        meta: { title: '监测点统计', icon: 'user' }
                    },
                    {
                        path: '/device-boot/linefb',
                        name: 'linefb',
                        component: () => import('@/views/device-boot/operationcenter/linemoitorfb'),
                        meta: { title: '监测点分布', icon: 'user' }
                    },
                    {
                        path: '/device-boot/lineruntj',
                        name: 'lineruntj',
                        component: () => import('@/views/device-boot/operationcenter/lineruntj'),
                        meta: { title: '监测点运行统计', icon: 'user' }
                    },
                    {
                        path: '/device-boot/terminalonliereate',
                        name: 'onlineratestatistics',
                        component: () => import('@/views/device-boot/operationcenter/teriminaloniletj'),
                        meta: { title: '终端在线率统计', icon: 'user' }
                    },
                    {
                        path: '/device-boot/terminalerrortj',
                        name: 'terminalerrortj',
                        component: () => import('@/views/device-boot/operationcenter/terminalerrortj'),
                        meta: { title: '终端异常统计', icon: 'user' }
                    },
                    {
                        path: '/device-boot/terminalbbwh',
                        name: 'terminalbbwh',
                        component: () => import('@/views/device-boot/device/terminalbbwh'),
                        meta: { title: '终端版本维护', icon: 'user' }
                    },
                    {
                        path: '/device-boot/basicpackage',
                        name: 'basicpackage',
                        component: () =>
                            // import ("@/views/device-boot/setconfig/basicpackage"),
                            import('@/views/device-boot/setconfig/basicpackage'),
                        meta: { title: '基础套餐', icon: 'user' }
                    },
                    {
                        path: '/device-boot/extendedpackage',
                        name: 'extendedpackage',
                        component: () => import('@/views/device-boot/setconfig/extendedpackage'),
                        meta: { title: '扩展套餐', icon: 'user' }
                    },
                    {
                        path: '/device-boot/Trafficpolicy',
                        name: 'Trafficpolicy',
                        component: () => import('@/views/device-boot/setconfig/trafficpolicy'),
                        meta: { title: '流量策略管理', icon: 'user' }
                    },

                    {
                        path: '/BusinessAdministrator/transport/AbnormalStatistics',
                        name: 'abnormalstatistics',
                        component: () => import('@/views/BusinessAdministrator/transport/AbnormalStatistics'),
                        meta: { title: '终端异常统计', icon: 'user' }
                    },
                    // {
                    //     path: "/BusinessAdministrator/management/Extension",
                    //     name: "Extension",
                    //     component: () =>
                    //         import ("@/views/BusinessAdministrator/management/Extension"),
                    //     meta: { title: "扩展套餐", icon: "user" },
                    // },
                    {
                        path: '/BusinessAdministrator/management/PlanTraffic',
                        name: 'packagemanage',
                        component: () => import('@/views/device-boot/setconfig/basicpackage'),
                        meta: { title: '套餐流量管理', icon: 'user' }
                    },
                    {
                        path: '/BusinessAdministrator/management/Policy',
                        name: 'flowmage',
                        component: () => import('@/views/device-boot/setconfig/trafficpolicy'),
                        meta: { title: '流量策略管理', icon: 'user' }
                    },

                    {
                        path: '/BusinessAdministrator/LogManagement/TerminalLog',
                        name: 'operationlogs',
                        component: () => import('@/views/BusinessAdministrator/LogManagement/TerminalLog'),
                        meta: { title: '终端运维管理日志', icon: 'user' }
                    },

                    {
                        path: '/BusinessAdministrator/alarManagement/AlarmInformation',
                        name: 'alarminformation',
                        component: () => import('@/views/BusinessAdministrator/alarManagement/AlarmInformation'),
                        meta: { title: '告警信息', icon: 'user' }
                    },
                    {
                        path: '/BusinessAdministrator/alarManagement/PolicyManagement',
                        name: 'alarmstrategy',
                        component: () => import('@/views/BusinessAdministrator/alarManagement/PolicyManagement'),
                        meta: { title: '告警策略管理', icon: 'user' }
                    },
                    {
                        path: '/BusinessAdministrator/alarManagement/AlarmCenter',
                        name: 'AlarmCenter',
                        component: () => import('@/views/BusinessAdministrator/alarManagement/AlarmCenter'),
                        meta: { title: '告警中心', icon: 'user' }
                    },
                    {
                        path: '/BusinessAdministrator/TerminalManagement/FrontManagement',
                        name: 'premage',
                        component: () => import('@/views/BusinessAdministrator/TerminalManagement/FrontManagement'),
                        meta: { title: '前置管理', icon: 'user' }
                    },
                    {
                        path: '/BusinessAdministrator/TerminalManagement/ProgramManagement',
                        name: 'ProgramManagement',
                        component: () => import('@/views/BusinessAdministrator/TerminalManagement/ProgramManagement'),
                        meta: { title: '程序升级管理', icon: 'user' }
                    },
                    {
                        path: '/BusinessAdministrator/TerminalManagement/pl-table',
                        name: 'programmanage',
                        component: () =>
                            import(
                                //"@/views/BusinessAdministrator/TerminalManagement/ProgramManagement"
                                '@/views/BusinessAdministrator/TerminalManagement/index'
                            ),
                        meta: { title: '程序升级管理', icon: 'user' }
                    },
                    {
                        path: '/BusinessAdministrator/TerminalManagement/TerminalManagement',
                        name: 'operationmage',
                        component: () => import('@/views/BusinessAdministrator/TerminalManagement/TerminalManagement'),
                        meta: { title: '终端运维管理', icon: 'user' }
                    },
                    {
                        path: '/BusinessAdministrator/TerminalManagement/TerminalMaintenance',
                        name: 'versioningmage',
                        component: () => import('@/views/BusinessAdministrator/TerminalManagement/TerminalMaintenance'),
                        meta: { title: '终端版本维护', icon: 'user' }
                    },
                    {
                        path: '/BusinessAdministrator/TerminalManagement/ScoringManagement',
                        name: 'scoringmage',
                        component: () => import('@/views/BusinessAdministrator/TerminalManagement/ScoringManagement'),
                        meta: { title: '评分管理', icon: 'user' }
                    },
                    {
                        path: '/BusinessAdministrator/TerminalManagement/OperationManagement',
                        name: 'OperationManagement',
                        component: () => import('@/views/BusinessAdministrator/TerminalManagement/OperationManagement'),
                        meta: { title: '运维管理', icon: 'user' }
                    },

                    {
                        path: '/BusinessAdministrator/ReportTemplate/ReportConfiguration',
                        name: 'dataQuality',
                        component: () => import('@/views/BusinessAdministrator/ReportTemplate/ReportConfiguration'),
                        meta: { title: '报告模板配置', icon: 'user' }
                    },
                    {
                        path: '/BusinessAdministrator/transport/complete',
                        name: 'integritystatistics',
                        component: () => import('@/views/BusinessAdministrator/transport/complete'),
                        meta: { title: '数据完整性统计', icon: 'user' }
                    },
                    {
                        path: '/BusinessAdministrator/transport/distribution',
                        name: 'monitoringdistribution',
                        component: () => import('@/views/BusinessAdministrator/transport/distribution'),
                        meta: { title: '监测点分布', icon: 'user' }
                    },
                    {
                        path: '/BusinessAdministrator/transport/transformerStrategy',
                        name: 'transformerStrategy',
                        component: () => import('@/views/BusinessAdministrator/transport/transformerStrategy'),
                        meta: { title: '变压器策略', icon: 'user' }
                    },
                    {
                        path: '/BusinessAdministrator/transport/powerweight',
                        name: 'powerweight',
                        component: () => import('@/views/BusinessAdministrator/transport/powerweight'),
                        meta: { title: '监测点评分权重', icon: 'user' }
                    },
                    {
                        path: '/BusinessAdministrator/transport/monthreport',
                        name: 'monthreport',
                        component: () => import('@/views/BusinessAdministrator/transport/monthreport'),
                        meta: { title: '半月报功能', icon: 'user' }
                    },
                    {
                        path: '/BusinessAdministrator/transport/OperationStatistics',
                        name: 'operatingstatistic',
                        component: () => import('@/views/BusinessAdministrator/transport/OperationStatistics'),
                        meta: { title: '终端运行统计', icon: 'user' }
                    },
                    {
                        path: '/BusinessAdministrator/transport/Statistics',
                        name: 'monitoringstatistics',
                        component: () => import('@/views/BusinessAdministrator/transport/Statistics'),
                        meta: { title: '监测点统计', icon: 'user' }
                    },
                    {
                        path: '/BusinessAdministrator/transport/OfflineViewing',
                        name: 'offlinewaveform',
                        component: () => import('@/views/BusinessAdministrator/transport/OfflineViewing'),
                        meta: { title: '离线波形查看', icon: 'user' }
                    },
                    {
                        path: '/BusinessAdministrator/transport/onlinerate',
                        name: 'ddda',
                        component: () => import('@/views/BusinessAdministrator/transport/onlinerate/Onlinerate'),
                        meta: { title: '终端在线率统计', icon: 'user' }
                    },
                    {
                        path: '/BusinessAdministrator/LogManagement/DropPush',
                        name: 'suspensionlog',
                        component: () => import('@/views/BusinessAdministrator/LogManagement/DropPush'),
                        meta: { title: '暂降推送日志', icon: 'user' }
                    },

                    {
                        path: '/webzuta/2deditor',
                        name: 'CircuitEdit',
                        component: () => import('@/views/CircuitEdit.vue')
                    },
                    // 预览页页面
                    {
                        path: '/CircuitPreview',
                        name: 'CircuitPreview',
                        component: () => import('@/views/CircuitPreview.vue')
                    },
                    {
                        path: '/timeline/test',
                        name: 'fiexdtable',
                        component: () => import('../views/test/index2.vue')
                    }
                ]
            }
        ]
    },
    {
        path: '/Distributed-photovoltaic',
        component: Layout,
        routeName: 'Distributed-photovoltaic',
        meta: { title: '分布式光伏管理系统', icon: 'user' },
        children: [
            {
                path: '/Distributed-photovoltaic',
                name: 'Distributed-photovoltaic',
                redirect: '/Distributedphotovoltaic/overview',
                meta: { title: '光伏全景概览' },
                children: [
                    {
                        path: '/Distributedphotovoltaic/overview',
                        name: 'gffbqj',
                        //component: () => import("@/views/Photovoltaic-system/PVoverview"),
                        component: () => import('@/views/Photovoltaic-system/HbPVoverview'),
                        meta: { title: '光伏全景概览', icon: 'user' }
                    },
                    // {
                    //     path: "/device-boot/frontmanagement",
                    //     name: "frontmanagement",
                    //     component: () =>
                    //         import ("@/views/device-boot/device/frontmange"),
                    //     meta: { title: "前置管理", icon: "user" },
                    // },
                    {
                        path: '/jbei/test/map',
                        name: 'test',
                        component: () => import('@/views/Distributed-management/test'),
                        meta: { title: '冀北测试', icon: 'user' }
                    },
                    {
                        path: '/jbei/QualityOverview',
                        name: 'test',
                        component: () => import('@/views/Distributed-management/QualityOverview'),
                        meta: { title: '电能质量概览', icon: 'user' }
                    },
                    {
                        path: '/Distributedmanagement/Monitoring',
                        name: 'overview',
                        component: () => import('@/views/Distributed-management/Monitoring'),
                        meta: { title: '冀北监控总览', icon: 'user' }
                    },
                    {
                        path: '/device-boot/linepingfen',
                        name: 'linepingfen',
                        component: () => import('@/views/device-boot/device/linepingfen'),
                        meta: { title: '评分管理', icon: 'user' }
                    },
                    {
                        path: '/device-boot/programmage',
                        name: 'programmage',
                        component: () => import('@/views/device-boot/device/programmange'),
                        meta: { title: '程序升级管理', icon: 'user' }
                    },
                    {
                        path: '/device-boot/terminalmage',
                        name: 'terminalmagef',
                        component: () => import('@/views/device-boot/device/terminalaccount'),
                        meta: { title: '终端运维管理', icon: 'user' }
                    },
                    {
                        path: '/device-boot/alarmcelvmage',
                        name: 'disalarmcelvmage',
                        component: () => import('@/views/device-boot/alarm/alarammage'),
                        meta: { title: '告警策略管理', icon: 'user' }
                    },

                    {
                        path: '/algorithm/FuCkEditor/index',
                        name: 'algorithmmanage',
                        component: () => import('@/views/harmonic-boot/index'),
                        meta: { title: '自定算法编辑器', icon: 'user' }
                    },

                    {
                        path: '/Statistical-analysis/indicatorClassification',
                        name: 'zhuwanggailan',
                        component: () => import('@/views/Statistical-analysis/indicatorClassification'),
                        meta: { title: '指标分类概览', icon: 'user', affix: true }
                    },

                    {
                        path: '/Statistical-analysis/IndicatorAlarmStatistics',
                        name: 'zhuwanzhibtj',
                        component: () => import('@/views/Statistical-analysis/IndicatorAlarmStatistics'),
                        meta: { title: '指标告警统计', icon: 'user' }
                    },
                    {
                        path: '/Statistical-analysis/baselineLevelAssessment',
                        name: 'zhuwanjzsppg',
                        component: () => import('@/views/Statistical-analysis/baselineLevelAssessment'),
                        meta: { title: '基准水平评估', icon: 'user' }
                    },
                    {
                        path: '/Statistical-analysis/substationBackgroundHarmonic',
                        name: 'zwbjxb',
                        component: () => import('@/views/Statistical-analysis/substationBackgroundHarmonic'),
                        meta: { title: '变电站背景谐波', icon: 'user' }
                    },
                    {
                        path: '/Statistical-analysis/statisticalReport',
                        name: 'zwtjbb',
                        component: () => import('@/views/Statistical-analysis/statisticalReport'),
                        meta: { title: '统计报表报告', icon: 'user' }
                    },
                    {
                        path: '/Statistical-analysis/steadyStateIndicators',
                        name: 'zwwtzb',
                        component: () => import('@/views/Statistical-analysis/steadyStateIndicators'),
                        meta: { title: '稳态指标', icon: 'user' }
                    },
                    {
                        path: '/Statistical-analysis/transientIndicators',
                        name: 'zwztzb',
                        component: () => import('@/views/Statistical-analysis/transientIndicators'),
                        meta: { title: '暂态指标', icon: 'user' }
                    },
                    {
                        path: '/Distributionnetwork-analysis/IndicatorClassification',
                        name: 'pwzbflgl',
                        component: () => import('@/views/Distributionnetwork-analysis/IndicatorClassification'),
                        meta: { title: '指标分类概览', icon: 'user' }
                    },
                    {
                        path: '/Distributionnetwork-analysis/IndicatorAlarmStatistics',
                        name: 'pwzbgjtj',
                        component: () => import('@/views/Distributionnetwork-analysis/IndicatorAlarmStatistics'),
                        meta: { title: '指标告警统计', icon: 'user' }
                    },
                    {
                        path: '/Distributionnetwork-analysis/BaselineLevelAssessment',
                        name: 'pwjzsppg',
                        component: () => import('@/views/Distributionnetwork-analysis/BaselineLevelAssessment'),
                        meta: { title: '基准水平评估', icon: 'user' }
                    },
                    {
                        path: '/Distributionnetwork-analysis/StatisticalReport',
                        name: 'pwtjbb',
                        component: () => import('@/views/Distributionnetwork-analysis/StatisticalReport'),
                        meta: { title: '统计报表报告', icon: 'user' }
                    },
                    {
                        path: '/Distributionnetwork-analysis/SteadyStateIndicators',
                        name: 'pwwtzb',
                        component: () => import('@/views/Distributionnetwork-analysis/SteadyStateIndicators'),
                        meta: { title: '稳态指标', icon: 'user' }
                    },
                    {
                        path: '/Distributionnetwork-analysis/TransientIndicators',
                        name: 'pwztzb',
                        component: () => import('@/views/Distributionnetwork-analysis/TransientIndicators'),
                        meta: { title: '暂态指标', icon: 'user' }
                    },
                    {
                        path: '/Distributionnetwork-analysis/historicalTrendChart',
                        name: 'historicalTrendChart',
                        component: () => import('@/views/Distributionnetwork-analysis/historicalTrendChart'),
                        meta: { title: '无线历史趋势', icon: 'user' }
                    },
                    {
                        path: '/SpecialAnalysisModuleDesign/DistributedPhotovoltaic',
                        name: 'fbsgf',
                        component: () => import('@/views/SpecialAnalysisModuleDesign/DistributedPhotovoltaic'),
                        meta: { title: '分布式光伏', icon: 'user' }
                    },
                    {
                        path: '/SpecialAnalysisModuleDesign/WindFarm',
                        name: 'fdcck',
                        component: () => import('@/views/SpecialAnalysisModuleDesign/WindFarm'),
                        meta: { title: '风电场', icon: 'user' }
                    },
                    {
                        path: '/SpecialAnalysisModuleDesign/PhotovoltaicPowerDrill',
                        name: 'gfdzck',
                        component: () => import('@/views/SpecialAnalysisModuleDesign/PhotovoltaicPowerDrill'),
                        meta: { title: '光伏电站', icon: 'user' }
                    },
                    {
                        path: '/SpecialAnalysisModuleDesign/ElectricRailwayLine',
                        name: 'dqhtlck',
                        component: () => import('@/views/SpecialAnalysisModuleDesign/ElectricRailwayLine'),
                        meta: { title: '电气化铁路', icon: 'user' }
                    },
                    {
                        path: '/SpecialAnalysisModuleDesign/SmeltingLoad',
                        name: 'zlfhck',
                        component: () => import('@/views/SpecialAnalysisModuleDesign/SmeltingLoad'),
                        meta: { title: '冶炼负荷', icon: 'user' }
                    },
                    {
                        path: '/Processsupervision/harmonicmanagement',
                        name: 'xbpbgl',
                        component: () => import('@/views/Process-supervision/harmonicmanagement'),
                        meta: { title: '谐波普测管理', icon: 'user' }
                    },
                    {
                        path: '/Processsupervision/interferencemanagement',
                        name: 'gryyhgl',
                        component: () => import('@/views/Process-supervision/interferencemanagement'),
                        meta: { title: '干扰源用户管理', icon: 'user' }
                    },
                    {
                        path: '/Processsupervision/electricitymanagement',
                        name: 'dnzlwtgl',
                        component: () => import('@/views/Process-supervision/electricitymanagement'),
                        meta: { title: '电能质量问题管理', icon: 'user' }
                    },
                    {
                        path: '/Processsupervision/Terminaldetection',
                        name: 'zdjcgl',
                        component: () => import('@/views/Process-supervision/Terminaldetection'),
                        meta: { title: '终端检测管理', icon: 'user' }
                    },
                    {
                        path: '/Processsupervision/supervision/manage',
                        name: 'jsjdgl',
                        component: () => import('@/views/Process-supervision/Supervisionmanage'),
                        meta: { title: '技术监督管理', icon: 'user' }
                    },
                    {
                        path: '/Processsupervision/supervision/manage2',
                        name: 'jsjdgl2',
                        // component: () =>
                        //     import ("@/views/Process-supervision/Supervisionmanage2"),
                        meta: { title: '技术监督管理2', icon: 'user' }
                    },
                    {
                        path: '/Process-supervision/Supervisionmanage2/Workplan',
                        name: 'jsplan',
                        component: () => import('@/views/Process-supervision/Supervisionmanage2/Workplan'),
                        meta: { title: '技术监督工作计划', icon: 'user' }
                    },
                    {
                        path: '/Process-supervision/Supervisionmanage2/Workstatistics',
                        name: 'statistics',
                        component: () => import('@/views/Process-supervision/Supervisionmanage2/Workstatistics'),
                        meta: { title: '技术监督工作统计', icon: 'user' }
                    },
                    {
                        path: '/Process-supervision/Supervisionmanage2/historyData',
                        name: 'historyData',
                        component: () => import('@/views/Process-supervision/Supervisionmanage2/historyData'),
                        meta: { title: '监督计划变更历史数据', icon: 'user' }
                    },
                    {
                        path: '/Process-supervision/Supervisionmanage2/prealarmData',
                        name: 'prealarmData',
                        component: () => import('@/views/Process-supervision/Supervisionmanage2/prealarmData'),
                        meta: { title: '技术监督预告警单数据', icon: 'user' }
                    },
                    {
                        path: '/Process-supervision/Supervisionmanage2/feedbackdata',
                        name: 'feedbackdata',
                        component: () => import('@/views/Process-supervision/Supervisionmanage2/feedbackdata'),
                        meta: { title: '技术监督预告警单反馈数据', icon: 'user' }
                    },

                    {
                        path: '/Processsupervision/WorkOrder',
                        name: 'Terminaldetection',
                        component: () => import('@/views/Process-supervision/WorkOrder'),
                        meta: { title: '工单管理', icon: 'user' }
                    },
                    {
                        path: '/Managementoperation/operationIndex',
                        name: 'yxzhgl',
                        component: () => import('@/views/Management-operation/operationIndex'),
                        meta: { title: '运行指标', icon: 'user' }
                    },
                    {
                        path: '/Managementoperation/mochaITOM',
                        name: 'zdywglck',
                        component: () => import('@/views/Management-operation/mochaITOM'),
                        meta: { title: '终端运维管理', icon: 'user' }
                    },
                    {
                        path: '/Managementoperation/mainnetwork',
                        name: 'zwsjzlck',
                        component: () => import('@/views/Management-operation/mainnetwork'),
                        meta: { title: '主网数据质量', icon: 'user' }
                    },
                    {
                        path: '/Managementoperation/distributionnetwork',
                        name: 'pwsjzlck',
                        component: () => import('@/views/Management-operation/distributionnetwork'),
                        meta: { title: '配网数据质量', icon: 'user' }
                    },
                    {
                        path: '/Accountmanagement/hbaccountoperation',
                        name: 'tzzdgl',
                        component: () => import('@/views/Account-management/hbaccountoperation'),
                        meta: { title: '台账字典维护', icon: 'user' }
                    },
                    {
                        path: '/Accountmanagement/accountstatistics',
                        name: 'tzhztj',
                        component: () => import('@/views/Account-management/accountstatistics'),
                        meta: { title: '台账汇总统计', icon: 'user' }
                    },
                    {
                        path: '/Accountmanagement/Accountreview',
                        name: 'tzshck',
                        component: () => import('@/views/Account-management/Accountreview'),
                        meta: { title: '台账审核', icon: 'user' }
                    },
                    {
                        path: '/Accountmanagement/accountoperation',
                        name: 'tzczcl',
                        component: () => import('@/views/Account-management/accountoperation'),
                        meta: { title: '台账操作', icon: 'user' }
                    },
                    {
                        path: '/Accountmanagement/operation/record',
                        name: 'tzczjlck',
                        component: () => import('@/views/Account-management/record'),
                        meta: { title: '台账操作记录', icon: 'user' }
                    },
                    {
                        path: '/Accountmanagement/pmsPark',
                        name: 'pmsParkIndex',
                        component: () => import('@/views/Account-management/components/pmsPark/index'),
                        meta: { title: '园区台账管理', icon: 'user' }
                    },
                    {
                        path: '/Accountmanagement/uploadGw',
                        name: 'pmsUploadGw',
                        component: () => import('@/views/Account-management/components/uploadGw/index'),
                        meta: { title: '主网用户台账', icon: 'user' }
                    },
                    {
                        path: '/pw/user/pwMonitorOnline',
                        name: 'pwMonitorOnline',
                        component: () => import('@/views/pwUser/online/index'),
                        meta: { title: '用户侧装置在线率', icon: 'user' }
                    },
                    {
                        path: '/pw/user/pwMonitorIntegrity',
                        name: 'pwMonitorIntegrity',
                        component: () => import('@/views/pwUser/integrity/index'),
                        meta: { title: '用户侧数据完整性', icon: 'user' }
                    },
                    {
                        path: '/pw/user/pwMonitorLimitQualified',
                        name: 'pwMonitorIntegrity',
                        component: () => import('@/views/pwUser/limitQualified/index'),
                        meta: { title: '用户侧数据超标情况', icon: 'user' }
                    }
                ]
            }
        ]
    },
    { path: '*', redirect: '/dashboard' },
    {
        path: '/energy-system',
        component: Layout,
        name: 'energy-system',
        redirect: '/energy-system/electricenergy',
        meta: { title: '用能管理系统', icon: 'excel' },
        children: [
            {
                path: '/energy-system/electricenergy',
                name: 'energy-system-electricenergy',
                component: () => import('@/views/energy-system/electricenergy'),
                meta: { title: '用采管理', icon: '' }
            },
            {
                path: '/energy-system/device',
                name: 'energy-system-device',
                meta: { title: '设备中心', icon: '' },
                children: [
                    {
                        path: '/energy-system/device/manger',
                        name: 'deviceManger',
                        meta: { title: '设备管理' },
                        component: () => import('@/views/energy-system/deviceCenter/device')
                    },
                    {
                        path: '/energy-system/device/devicejk',
                        name: 'energy-system-devicejk',
                        component: () => import('@/views/energy-system/deviceCenter/devicejk'),
                        meta: { title: '设备监控', icon: '' }
                    },
                    {
                        path: '/energy-system/device/netdev',
                        name: 'energy-system-netdev',
                        component: () => import('@/views/energy-system/deviceCenter/netDev'),
                        meta: { title: '联网设备管理', icon: '' }
                    },
                    {
                        path: '/energy-system/device/dictManage',
                        name: 'energy-system-dictManage',
                        component: () => import('@/views/energy-system/deviceCenter/dictManage'),
                        meta: { title: '用能字典管理', icon: '' }
                    },
                    {
                        path: '/energy-system/advancedanalysis/integrity',
                        name: 'energy-system-advancedanalysis-integrity',
                        meta: { title: '数据完整性' },
                        component: () => import('@/views/energy-system/advancedanalysis/dataintegrity')
                    },
                    {
                        path: '/energy-system/advancedanalysis/onlinerate',
                        name: 'energy-system-advancedanalysis-onlinerate',
                        meta: { title: '在线率' },
                        component: () => import('@/views/energy-system/advancedanalysis/onlinerate')
                    },
                    //123456
                    {
                        path: '/energy-system/advancedanalysis/loadanalysis',
                        name: 'energy-system-advancedanalysis-loadanalysis',
                        meta: { title: '负荷分析' },
                        component: () => import('@/views/energy-system/advancedanalysis/loadanalysis')
                    },
                    {
                        path: '/energy-system/advancedanalysis/costloadanalysis',
                        name: 'energy-system-advancedanalysis-costloadanalysis',
                        meta: { title: '负荷分析统计' },
                        component: () => import('@/views/energy-system/advancedanalysis/costloadanalysis')
                    },
                    {
                        path: '/energy-system/advancedanalysis/photovoltaicanalysis',
                        name: 'energy-system-advancedanalysis-photovoltaicanalysis',
                        meta: { title: '光伏分析' },
                        component: () => import('@/views/energy-system/advancedanalysis/photovoltaicanalysis')
                    },
                    {
                        path: '/energy-system/advancedanalysis/electricenergy',
                        name: 'energy-system-advancedanalysis-electricenergy',
                        meta: { title: '电度分析' },
                        component: () => import('@/views/energy-system/advancedanalysis/electricenergy')
                    },
                    // 123456
                    {
                        path: '/energy-system/advancedanalysis/electricalcontrast',
                        name: 'energy-system-advancedanalysis-electricalcontrast',
                        meta: { title: '电度对比分析' },
                        component: () => import('@/views/energy-system/advancedanalysis/electricalcontrast')
                    },
                    {
                        path: '/energy-system/advancedanalysis/electricitystatistics',
                        name: 'energy-system-advancedanalysis-electricitystatistics',
                        meta: { title: '电度统计分析' },
                        component: () => import('@/views/energy-system/advancedanalysis/electricitystatistics')
                    },
                    {
                        path: '/energy-system/advancedanalysis/airanalysis',
                        name: 'energy-system-advancedanalysis-electairanalysisricenergy',
                        meta: { title: '空调趋势分析' },
                        component: () => import('@/views/energy-system/advancedanalysis/airanalysis')
                    },
                    {
                        path: '/energy-system/advancedanalysis/airanalysisstrategy',
                        name: 'energy-system-advancedanalysis-airanalysisstrategy',
                        meta: { title: '空调趋势分析' },
                        component: () => import('@/views/energy-system/advancedanalysis/airanalysisstrategy')
                    },
                    {
                        path: '/energy-system/system/typeconfiguration',
                        name: 'energy-system-system-typeconfiguration',
                        meta: { title: '用能类型配置' },
                        component: () => import('@/views/energy-system/system/typeconfiguration')
                    },
                    {
                        path: '/energy-system/system/loadconfiguration',
                        name: 'energy-system-system-loadconfiguration',
                        meta: { title: '用能负荷配置' },
                        component: () => import('@/views/energy-system/system/loadconfiguration')
                    },
                    {
                        path: '/energy-system/system/rateconfiguration',
                        name: 'energy-system-system-rateconfiguration',
                        meta: { title: '电度费率配置' },
                        component: () => import('@/views/energy-system/system/rateconfiguration')
                    },
                    //123456
                    {
                        path: '/energy-system/operate/yunCai',
                        name: 'energy-system-operate-yunCai',
                        meta: { title: '用采系统' },
                        component: () => import('@/views/energy-system/operationalCenter/yunCaiManage')
                    },
                    //123456
                    {
                        path: '/energy-system/operate/airCentre',
                        name: 'energy-system-operate-airManage',
                        meta: { title: '空调中心' },
                        component: () => import('@/views/energy-system/operationalCenter/airManage')
                    },
                    {
                        path: '/energy-system/operate/yunCaiReadOnly',
                        name: 'energy-system-operate-yunCaiReadOnly',
                        meta: { title: '用采中心' },
                        component: () => import('@/views/energy-system/operationalCenter/yunCaiManageReadOnly')
                    },
                    {
                        path: '/energy-system/operate/airCentreReadOnly',
                        name: 'energy-system-operate-airCentreReadOnly',
                        meta: { title: '空调中心' },
                        component: () => import('@/views/energy-system/operationalCenter/airManageReadOnly')
                    },
                    //123456
                    {
                        path: '/energy-system/operate/oneFloor',
                        name: 'energy-system-operate-oneFloor',
                        meta: { title: '一楼' },
                        component: () => import('@/views/energy-system/operationalCenter/oneFloor')
                    },
                    {
                        path: '/energy-system/operate/twoFloor',
                        name: 'energy-system-operate-twoFloor',
                        meta: { title: '二楼' },
                        component: () => import('@/views/energy-system/operationalCenter/twoFloor')
                    },
                    {
                        path: '/energy-system/operate/threeFloor',
                        name: 'energy-system-operate-threeFloor',
                        meta: { title: '三楼' },
                        component: () => import('@/views/energy-system/operationalCenter/threeFloor')
                    },
                    {
                        path: '/energy-system/operate/fourFloor',
                        name: 'energy-system-operate-fourFloor',
                        meta: { title: '四楼' },
                        component: () => import('@/views/energy-system/operationalCenter/fourFloor')
                    },
                    //123456
                    {
                        path: '/energy-system/operate/dataBind',
                        name: 'energy-system-operate-dataBind',
                        meta: { title: '数据绑定' },
                        component: () => import('@/views/energy-system/operationalCenter/dataBind')
                    }
                ]
            },
            {
                path: '/energy-system/operate',
                name: 'energy-system-operate',
                meta: { title: '运行中心', icon: '' },
                children: []
            }
        ]
    },

    {
        path: '/estimate',
        component: Layout,
        name: 'harmonic-boot',
        redirect: '/harmonic-boot/monitor/online',
        meta: { title: '承载能力评估', icon: 'excel' },
        children: [
            {
                path: '/estimate/photovoltaic',
                name: 'photovoltaic',
                component: () => import('@/views/tropic/estimate/photovoltaic.vue'),
                // component: () =>
                //     import ("@/views/harmonic-boot/view/yanshi"),
                meta: { title: '光伏电站', icon: '' }
            }
        ]
    },

    {
        path: '/dashboard3',
        component: Layout,
        name: 'dashboard3',
        redirect: '/Distributedphotovoltaic/overview',
        meta: { title: '河北分布式概览', icon: 'excel' },
        children: [
            {
                path: '/Distributedphotovoltaic/overview',
                name: 'Distributedphotovoltaic',
                component: () => import('@/views/Photovoltaic-system/PVoverview'),
                meta: { title: '分布式概览全景', icon: 'user' }
            },
            {
                path: '/Distributionnetwork-analysis/IndicatorClassificationb',
                name: 'IndicatorClassificationb',
                component: () => import('@/views/Distributionnetwork-analysis/IndicatorClassification'),
                meta: { title: '指标分类概览', icon: 'user' }
            },
            {
                path: '/Distributionnetwork-analysis/IndicatorAlarmStatistics1',
                name: 'IndicatorAlarmStatistics1',
                component: () => import('@/views/Distributionnetwork-analysis/IndicatorAlarmStatistics'),
                meta: { title: '指标告警统计', icon: 'user' }
            },
            {
                path: '/Distributionnetwork-analysis/BaselineLevelAssessment1',
                name: 'BaselineLevelAssessment1',
                component: () => import('@/views/Distributionnetwork-analysis/BaselineLevelAssessment'),
                meta: { title: '基准水平评估', icon: 'user' }
            },
            {
                path: '/Distributionnetwork-analysis/StatisticalReport1',
                name: 'StatisticalReport1',
                component: () => import('@/views/Distributionnetwork-analysis/StatisticalReport'),
                meta: { title: '统计报表报告', icon: 'user' }
            },
            {
                path: '/Distributionnetwork-analysis/SteadyStateIndicators1',
                name: 'SteadyStateIndicators1',
                component: () => import('@/views/Distributionnetwork-analysis/SteadyStateIndicators'),
                meta: { title: '稳态指标', icon: 'user' }
            },
            {
                path: '/Distributionnetwork-analysis/TransientIndicators1',
                name: 'TransientIndicators1',
                component: () => import('@/views/Distributionnetwork-analysis/TransientIndicators'),
                meta: { title: '暂态指标', icon: 'user' }
            }
        ]
    },

    {
        path: '/flowManage',
        component: Layout,
        routeName: 'flowManage',
        meta: { title: '流程管理', icon: 'user' },
        children: [
            {
                path: '/flowable/definition/model',
                name: 'definitionmodel',
                component: () => import('@/views/flow_task/definition/model'),
                meta: { title: '工作流程设计器', icon: 'user' }
            },
            {
                path: '/flowable/definition/index',
                name: 'definitionindex',
                component: () => import('@/views/flow_task/definition/index'),
                meta: { title: '流程定义', icon: 'user' }
            }
        ]
    },

    {
        path: '/flowTask',
        component: Layout,
        routeName: 'flowTask',
        meta: { title: '任务管理', icon: 'user' },
        children: [
            {
                path: '/flowTask/mytask',
                name: 'mytask',
                component: () => import('@/views/flow_task/myProcess/index'),
                meta: { title: '我的流程', icon: 'user' }
            },
            {
                path: '/flow_task/myProcess/detail/index',
                name: 'mytaskDetail',
                component: () => import('@/views/flow_task/myProcess/detail/index'),
                meta: { title: '流程处理', icon: 'user' }
            },
            {
                path: '/flowTask/myAudit',
                name: 'myAudit',
                component: () => import('@/views/flow_task/todo/index'),
                meta: { title: '待办任务', icon: 'user' }
            },
            {
                path: '/flowTask/finishedTask',
                name: 'finishedTask',
                component: () => import('@/views/flow_task/finished/index'),
                meta: { title: '已办任务', icon: 'user' }
            }
        ]
    },

    {
        path: '/workOrder',
        component: Layout,
        routeName: 'workOrder',
        meta: { title: '工单管理', icon: 'user' },
        children: [
            {
                path: '/workOrder/index',
                name: 'workOrder',
                component: () => import('@/views/workOrder/index'),
                meta: { title: '工单服务', icon: 'user' }
            }
        ]
    },
    {
        path: '/gwPush',
        component: Layout,
        routeName: 'gwPush',
        meta: { title: '网公司上送', icon: 'user' },
        children: [
            {
                path: '/gwPush/reportPush',
                name: 'reportPush',
                component: () => import('@/views/gwPush/report/index'),
                meta: { title: '电能质量报表', icon: 'user' }
            },
            {
                path: '/gwPush/commPoint',
                name: 'commPoint',
                component: () => import('@/views/gwPush/commPoint/index'),
                meta: { title: '公共连接点', icon: 'user' }
            },
            {
                path: '/gwPush/mainMonitor',
                name: 'mainMonitor',
                component: () => import('@/views/gwPush/mainMonitor/index'),
                meta: { title: '主网测点数据', icon: 'user' }
            },
            {
                path: '/gwPush/processTemUser',
                name: 'processTemUser',
                component: () => import('@/views/gwPush/processFollow/index'),
                meta: { title: '全过程用户', icon: 'user' }
            }
        ]
    }
]

if (process.env.VUE_APP_MODE === 'cgyqr') {
    if (flag) {
        let list = tree2List(asyncRoutes)
        // console.log('🚀 ~ list:', list)
        constantRoutes.push(
            ...list

        )
    }
    flag = false
}
const createRouter = () =>
    new Router({
        // mode: 'history', // require service support
        scrollBehavior: () => ({ y: 0 }),
        routes: constantRoutes
    })
const router = createRouter()
// Detail see: https://github.com/vuejs/vue-router/issues/1234#issuecomment-357941465
export function resetRouter() {
    const newRouter = createRouter()
    router.matcher = newRouter.matcher // reset router
}
export default router
