import { createRouter, createWebHistory } from 'vue-router' const constantRouterMap = [ { path: '/', name: 'Scrren', component: () => import('@/views/screen/ScreenView.vue'), meta: { title: "智慧总控" } }, { path: '/carbon', name: 'carbon', component: () => import('@/views/carbon/index.vue'), meta: { title: "碳排放" } }, // { // path: '/test', // name: 'TempTest', // component: () => import('@/views/screen/ScreenView2.vue'), // meta: { // title: "测试建模文件" // } // }, /** * 模版筛选使用 * 注释时间: 2024年08月05日15:03:02 * * */ // { // path: '/count1', // name: 'count1', // component: () => import('@/views/count/index1.vue'), // meta: { // title: "临时统计1" // } // }, // { // path: '/count2', // name: 'count2', // component: () => import('@/views/count/index2.vue'), // meta: { // title: "临时统计2" // } // }, // { // path: '/count3', // name: 'count3', // component: () => import('@/views/count/index3.vue'), // meta: { // title: "临时统计3" // } // }, { path: '/env', name: 'Env', component: () => import('@/views/env/index.vue'), meta: { title: "环境区分" } }, { path: '/login', name: 'Login', component: () => import('@/views/login/LoginView.vue'), meta: { title: "登录" } }, { path: '/', name: 'theBaseLayout', component: () => import('@/components/Layout/ThePublicLayout.vue'), children: [ { path: 'answer', name: 'Answer', component: () => import('@/views/answer/AnswerView.vue'), meta: { title: '专家问答' } }, { path: 'water-warn', name: 'WaterWarn', component: () => import('@/views/analyse/WaterView.vue'), meta: { title: '水质报警' } }, { path: 'pymol-warn', name: 'PymolWarn', component: () => import('@/views/analyse/PymolView.vue'), meta: { title: '生化报警' } }, { path: 'forecast-warn', name: 'ForecastView', component: () => import('@/views/analyse/ForecastView.vue'), meta: { title: '预测预警' } }, { path: 'work-order', name: 'WorKOrder', component: () => import('@/views/analyse/WorkOrder.vue'), meta: { title: '智慧工单' } }, { path: 'work', name: 'WorkView', component: () => import('@/views/work/WorkView.vue'), meta: { title: '智能办公' } }, { path: 'medicinal', name: 'MedicinalView', component: () => import('@/views/control/MedicinalView.vue'), meta: { title: '智适应碳源投加' } }, ] }, { path: '/', name: 'userLayout', component: () => import('@/components/Layout/ThePublicLayout.vue'), children: [ { path: 'user', name: 'User', component: () => import('@/views/user/index.vue'), meta: { title: '用户中心' } }, ] }, ] const router = createRouter({ history: createWebHistory(import.meta.env.BASE_URL), routes: constantRouterMap, scrollBehavior: () => ({ left: 0, top: 0 }) }) export default router;