Initial commit

This commit is contained in:
2025-08-18 16:50:57 +08:00
commit 4fc95516d6
350 changed files with 175555 additions and 0 deletions

63
src/router/index.js Normal file
View File

@ -0,0 +1,63 @@
import { createRouter,createWebHashHistory } from "vue-router";
import store from "@/store";
// import Home from '../views/Home.vue'
/**
* 关于路由配置描述
* 1.meta && meta.title && meta.icon 则在菜单栏显示
* 2.如果存在children , 则以el-sub-menu子菜单显示
* 否则不在menu菜单显示
* 如果只展示单级别菜单 需要像developer这样配置
*/
/**
* 私有路由表
*/
export const privateRoutes = [];
/**
* 公开路由表
*/
export const publicRoutes = [
{
path: "/",
name: "/home",
component: () => import("@/views/largeScreen/index"),
meta: {},
},
{
path: "/industry",
name: "/industry",
component: () => import("@/views/portraitScreen/index"),
meta: {},
},
{
path: "/cpp",
name: "/cpp",
component: () => import("@/views/cpp/index"),
meta: {},
},
{
path: "/mapCount",
name: "/mapCount",
component: () => import("@/views/mapCount/index"),
meta: {},
},
];
const router = createRouter({
history: createWebHashHistory(),
routes: publicRoutes
});
//初始化路由表
export function resetRouter() {
if (store.getters ?.routeReady && store.getters ?.userInfo ?.permission ?.menus) {
const menus = store.getters.userInfo.permission.menus;
menus.forEach((menu) => {
router.removeRoute(menu);
});
}
}
export default router;