import { createRouter, createWebHashHistory } from 'vue-router'
// import mineRouter from "./mineRouter";
// import JsBridge from "../utils/jsbridge";
const routerHistory = createWebHashHistory(process.env.BASE_URL);

let routes = [
    // ming router start
    // 大屏首页看板
    //登录页面
    {
        path: '/',
        name: 'login',
        meta: { title: '登录', name: "登录 ", type: "" },
        component: () =>
            import('../views/login.vue'),
        hidden: true,
    },
    {
        path: '/home',
        name: 'home',
        meta: { title: '首页', name: "智慧用电监控平台", type: "index" },
        component: () =>
            import('../views/home/index.vue'),
    },

    // ming router end

    //数据管理页面
    // {
    //     path: '/Data_mage',
    //     name: 'data_mage',
    //     meta: { title: '数据管理', name: "智慧用电监控平台 ", type: "index" },
    //     component: () =>
    //         import ('../views/index/Data_mage.vue'),
    // },
    // //电能质量页面
    // {
    //     path: '/Power_quality',
    //     name: 'power_quality',
    //     meta: { title: '电能质量', name: "智慧用电监控平台  ", type: "index" },
    //     component: () =>
    //         import ('../views/index/Power_quality.vue'),
    // },
    // //系统管理页面
    // {
    //     path: '/System_mage',
    //     name: 'system_mage',
    //     meta: { title: '系统管理', name: "智慧用电监控平台   ", type: "index" },
    //     component: () =>
    //         import ('../views/index/System_mage.vue'),
    // },
    //概览页面站点详情页面
    {
        path: '/Overview',
        name: 'overview',
        meta: { title: '概览', name: "测试站点一", type: "menu" },
        component: () =>
            import('../views/site/Overview.vue'),
    },
    //配电系统图页面
    {
        path: '/Power_diagram',
        name: 'power_diagram',
        meta: { title: '配电系统图', name: "测试站点一", type: "menu" },
        component: () =>
            import('../views/site/Power_diagram.vue'),
        // import ('../views/site/CircuitEdit.vue'),
    },
    //配电系统图页面
    {
        path: '/CircuitEdit',
        name: 'CircuitEdit',
        meta: { title: '配电系统图', name: "测试站点一", type: "menu" },
        component: () =>
            import('../views/site/CircuitEdit.vue'),
    },

    //设备监控页面
    {
        path: '/Device_motore',
        name: 'device_motore',
        meta: { title: '设备监控', name: "测试站点一", type: "menu" },
        component: () =>
            import('../views/site/Device_motore.vue'),
    },
    //事件告警页面
    {
        path: '/Event_alarm',
        name: 'event_alarm',
        meta: { title: '事件告警', name: "测试站点一", type: "menu" },
        component: () =>
            import('../views/site/Event_alarm.vue'),
    },



    // 编辑器页面
    {
        path: '/CircuitEdit1',
        name: 'CircuitEdit1',
        meta: { title: '编辑器', name: "测试站点一", type: "" },
        component: () =>
            import('../views/CircuitEdit1.vue'),
    },
    // 预览页页面
    {
        path: '/CircuitPreview',
        name: 'CircuitPreview',
        meta: { title: '预览', name: "测试站点一", type: "" },
        component: () =>
            // import('../views/CircuitPreview.vue'),
            import('../views/CircuitPreview.vue'),
        // import('../views/site/Power_diagram.vue'),
    },

]

// routes = routes.concat(mineRouter)

const router = createRouter({
    history: routerHistory,
    // base: '/vuefiv/',
    // mode: 'history',
    routes
});



export default router