> 文章列表 > vite+vue3+pinia+vuex4动态路由解决刷新页面丢失

vite+vue3+pinia+vuex4动态路由解决刷新页面丢失

vite+vue3+pinia+vuex4动态路由解决刷新页面丢失

目录

了解如何添加动态路由

 使用pinia持久化数据

解决方案

 404找不页面问题

目前解决思路

完整路由配置 

动态路由使用的数据 


  • 了解如何添加动态路由

vue官网-动态添加路由

  •  使用pinia持久化数据

pinia的使用

  • 解决方案

  1. asyncRoutes()方法从pinia获取到动态菜单数据
  2. 登陆成功后先加载一次动态路由
    1. import { firstAsyncRoutes } from '@/router';getMenu()
      function getMenu() {menusAPI().then(({ data }) => {if (data.code == 500) {router.push("/login")}if (data.menus && data.menus.length > 0) {homeSt.setMenus(data.menus)firstAsyncRoutes()}})
      }
      
  3. 后续路由跳转丢失操作
router.beforeEach((to, from, next) => {if (!loginStore().getToken) {//1.没有登陆,则进入登陆界面if (to.path !== '/login') next('/login')} else if (loginStore().getToken) {//2.登陆后console.info("上一个路由:", from.path, "-->跳转至路由:", to.path)if (to.path === '/login') {//3.如果登陆后不允许进入登陆界面->跳转至左则菜单页面(点击菜单跳转路由)next('/home')} else {// console.info("路由注册标记:", registerFlag.value)if (!registerFlag.value) {//4.刷新页面重新加载路由asyncRoutes()//5.第一次添加路由registerFlag.value = true//6.不让重复添加router.replace({ ...to })//再次找一次路由} else {next()}}}next()
})
  •  404找不页面问题

    1. 目前解决思路

      1.     //由于动态路由有可能找不到组件,目前没有好的处理方式。统一跳转到首页{path: '/:pathMatch(.*)',redirect: '/home',},
  • 完整路由配置 

import { RouteRecordRaw, createRouter, createWebHistory } from 'vue-router'import { homeStore } from '@/pinia/home'
import { loginStore } from '@/pinia/login'
import { ref } from 'vue'const modules = import.meta.glob(['../components/system/*/*.vue'])const routes: Array<RouteRecordRaw> = [{path: '/',redirect: '/login'},{path: '/login',component: () => import("@/components/login/index.vue")},{path: '/:pathMatch(.*)',redirect: '/home',},{path: '/home',name: "首页",component: () => import("@/components/home/index.vue"),redirect: '/welcome',children: [{path: '/welcome',name: "欢迎界面",component: () => import("@/components/home/Welcome.vue")}]}
]//路由对象
const router = createRouter({history: createWebHistory(),routes
})const asyncRoutes = () => {homeStore().menus.forEach((element: any) => {router.addRoute({ path: '/home', name: element.menuName, component: () => import("@/components/home/index.vue") })if (element && element.children.length > 0) {element.children.forEach((item: any) => {if (item.isFrame === 0) {//router.addRoute(element.menuName, { name: item.menuName, path: `/${item.path}`, redirect: item.path })} else {if (item.isFrame === 1) {// router.addRoute(element.menuName, { name: item.menuName, path: `/${item.path}`, component: () => import(`@/components/${item.component}.vue`) })router.addRoute(element.menuName, { name: item.menuName, path: `/${item.path}`, component: modules[`../components/${item.component}.vue`] })}}});}})// console.log(router.getRoutes(), '查看现有路由')
}export function firstAsyncRoutes() {asyncRoutes();
}const registerFlag = ref(false)  //默认路由没有注册router.beforeEach((to, from, next) => {if (!loginStore().getToken) {//1.没有登陆,则进入登陆界面if (to.path !== '/login') next('/login')} else if (loginStore().getToken) {//2.登陆后console.info("上一个路由:", from.path, "-->跳转至路由:", to.path)if (to.path === '/login') {//3.如果登陆后不允许进入登陆界面->跳转至左则菜单页面(点击菜单跳转路由)next('/home')} else {// console.info("路由注册标记:", registerFlag.value)if (!registerFlag.value) {//4.刷新页面重新加载路由asyncRoutes()//5.第一次添加路由registerFlag.value = true//6.不让重复添加router.replace({ ...to })//再次找一次路由} else {next()}}}next()
})
//导出路由对象,在main.js中引用
export default router
  • 动态路由使用的数据 

[{"menuId": 1,"menuName": "系统管理","parentId": 0,"orderNum": 1,"path": "system","component": null,"query": "","isFrame": 1,"isCache": 0,"menuType": "M","visible": "0","status": "0","perms": "","icon": "Tools","createBy": "admin","createTime": "2023-04-01T12:17:22.000+00:00","updateBy": "","updateTime": null,"remark": "系统管理目录","children": [{"menuId": 100,"menuName": "用户管理","parentId": 1,"orderNum": 1,"path": "user","component": "system/user/index","query": "","isFrame": 1,"isCache": 0,"menuType": "C","visible": "0","status": "0","perms": "system:user:list","icon": "user","createBy": "admin","createTime": "2023-04-01T12:17:22.000+00:00","updateBy": "","updateTime": null,"remark": "用户管理菜单","children": [{"menuId": 1000,"menuName": "用户查询","parentId": 100,"orderNum": 1,"path": "","component": "","query": "","isFrame": 1,"isCache": 0,"menuType": "F","visible": "0","status": "0","perms": "system:user:query","icon": "#","createBy": "admin","createTime": "2023-04-01T12:17:22.000+00:00","updateBy": "","updateTime": null,"remark": "","children": []},{"menuId": 1001,"menuName": "用户新增","parentId": 100,"orderNum": 2,"path": "","component": "","query": "","isFrame": 1,"isCache": 0,"menuType": "F","visible": "0","status": "0","perms": "system:user:add","icon": "#","createBy": "admin","createTime": "2023-04-01T12:17:22.000+00:00","updateBy": "","updateTime": null,"remark": "","children": []},{"menuId": 1002,"menuName": "用户修改","parentId": 100,"orderNum": 3,"path": "","component": "","query": "","isFrame": 1,"isCache": 0,"menuType": "F","visible": "0","status": "0","perms": "system:user:edit","icon": "#","createBy": "admin","createTime": "2023-04-01T12:17:22.000+00:00","updateBy": "","updateTime": null,"remark": "","children": []},{"menuId": 1003,"menuName": "用户删除","parentId": 100,"orderNum": 4,"path": "","component": "","query": "","isFrame": 1,"isCache": 0,"menuType": "F","visible": "0","status": "0","perms": "system:user:remove","icon": "#","createBy": "admin","createTime": "2023-04-01T12:17:22.000+00:00","updateBy": "","updateTime": null,"remark": "","children": []},{"menuId": 1004,"menuName": "用户导出","parentId": 100,"orderNum": 5,"path": "","component": "","query": "","isFrame": 1,"isCache": 0,"menuType": "F","visible": "0","status": "0","perms": "system:user:export","icon": "#","createBy": "admin","createTime": "2023-04-01T12:17:22.000+00:00","updateBy": "","updateTime": null,"remark": "","children": []},{"menuId": 1005,"menuName": "用户导入","parentId": 100,"orderNum": 6,"path": "","component": "","query": "","isFrame": 1,"isCache": 0,"menuType": "F","visible": "0","status": "0","perms": "system:user:import","icon": "#","createBy": "admin","createTime": "2023-04-01T12:17:22.000+00:00","updateBy": "","updateTime": null,"remark": "","children": []},{"menuId": 1006,"menuName": "重置密码","parentId": 100,"orderNum": 7,"path": "","component": "","query": "","isFrame": 1,"isCache": 0,"menuType": "F","visible": "0","status": "0","perms": "system:user:resetPwd","icon": "#","createBy": "admin","createTime": "2023-04-01T12:17:22.000+00:00","updateBy": "","updateTime": null,"remark": "","children": []}]},{"menuId": 101,"menuName": "角色管理","parentId": 1,"orderNum": 2,"path": "role","component": "system/role/index","query": "","isFrame": 1,"isCache": 0,"menuType": "C","visible": "0","status": "0","perms": "system:role:list","icon": "Rank","createBy": "admin","createTime": "2023-04-01T12:17:22.000+00:00","updateBy": "","updateTime": null,"remark": "角色管理菜单","children": [{"menuId": 1007,"menuName": "角色查询","parentId": 101,"orderNum": 1,"path": "","component": "","query": "","isFrame": 1,"isCache": 0,"menuType": "F","visible": "0","status": "0","perms": "system:role:query","icon": "#","createBy": "admin","createTime": "2023-04-01T12:17:22.000+00:00","updateBy": "","updateTime": null,"remark": "","children": []},{"menuId": 1008,"menuName": "角色新增","parentId": 101,"orderNum": 2,"path": "","component": "","query": "","isFrame": 1,"isCache": 0,"menuType": "F","visible": "0","status": "0","perms": "system:role:add","icon": "#","createBy": "admin","createTime": "2023-04-01T12:17:22.000+00:00","updateBy": "","updateTime": null,"remark": "","children": []},{"menuId": 1009,"menuName": "角色修改","parentId": 101,"orderNum": 3,"path": "","component": "","query": "","isFrame": 1,"isCache": 0,"menuType": "F","visible": "0","status": "0","perms": "system:role:edit","icon": "#","createBy": "admin","createTime": "2023-04-01T12:17:22.000+00:00","updateBy": "","updateTime": null,"remark": "","children": []},{"menuId": 1010,"menuName": "角色删除","parentId": 101,"orderNum": 4,"path": "","component": "","query": "","isFrame": 1,"isCache": 0,"menuType": "F","visible": "0","status": "0","perms": "system:role:remove","icon": "#","createBy": "admin","createTime": "2023-04-01T12:17:22.000+00:00","updateBy": "","updateTime": null,"remark": "","children": []},{"menuId": 1011,"menuName": "角色导出","parentId": 101,"orderNum": 5,"path": "","component": "","query": "","isFrame": 1,"isCache": 0,"menuType": "F","visible": "0","status": "0","perms": "system:role:export","icon": "#","createBy": "admin","createTime": "2023-04-01T12:17:22.000+00:00","updateBy": "","updateTime": null,"remark": "","children": []}]},{"menuId": 102,"menuName": "菜单管理","parentId": 1,"orderNum": 3,"path": "menu","component": "system/menu/index","query": "","isFrame": 1,"isCache": 0,"menuType": "C","visible": "0","status": "0","perms": "system:menu:list","icon": "Menu","createBy": "admin","createTime": "2023-04-01T12:17:22.000+00:00","updateBy": "","updateTime": null,"remark": "菜单管理菜单","children": [{"menuId": 1012,"menuName": "菜单查询","parentId": 102,"orderNum": 1,"path": "","component": "","query": "","isFrame": 1,"isCache": 0,"menuType": "F","visible": "0","status": "0","perms": "system:menu:query","icon": "#","createBy": "admin","createTime": "2023-04-01T12:17:22.000+00:00","updateBy": "","updateTime": null,"remark": "","children": []},{"menuId": 1013,"menuName": "菜单新增","parentId": 102,"orderNum": 2,"path": "","component": "","query": "","isFrame": 1,"isCache": 0,"menuType": "F","visible": "0","status": "0","perms": "system:menu:add","icon": "#","createBy": "admin","createTime": "2023-04-01T12:17:22.000+00:00","updateBy": "","updateTime": null,"remark": "","children": []},{"menuId": 1014,"menuName": "菜单修改","parentId": 102,"orderNum": 3,"path": "","component": "","query": "","isFrame": 1,"isCache": 0,"menuType": "F","visible": "0","status": "0","perms": "system:menu:edit","icon": "#","createBy": "admin","createTime": "2023-04-01T12:17:22.000+00:00","updateBy": "","updateTime": null,"remark": "","children": []},{"menuId": 1015,"menuName": "菜单删除","parentId": 102,"orderNum": 4,"path": "","component": "","query": "","isFrame": 1,"isCache": 0,"menuType": "F","visible": "0","status": "0","perms": "system:menu:remove","icon": "#","createBy": "admin","createTime": "2023-04-01T12:17:22.000+00:00","updateBy": "","updateTime": null,"remark": "","children": []}]},{"menuId": 103,"menuName": "部门管理","parentId": 1,"orderNum": 4,"path": "dept","component": "system/dept/index","query": "","isFrame": 1,"isCache": 0,"menuType": "C","visible": "0","status": "0","perms": "system:dept:list","icon": "List","createBy": "admin","createTime": "2023-04-01T12:17:22.000+00:00","updateBy": "","updateTime": null,"remark": "部门管理菜单","children": [{"menuId": 1016,"menuName": "部门查询","parentId": 103,"orderNum": 1,"path": "","component": "","query": "","isFrame": 1,"isCache": 0,"menuType": "F","visible": "0","status": "0","perms": "system:dept:query","icon": "#","createBy": "admin","createTime": "2023-04-01T12:17:22.000+00:00","updateBy": "","updateTime": null,"remark": "","children": []},{"menuId": 1017,"menuName": "部门新增","parentId": 103,"orderNum": 2,"path": "","component": "","query": "","isFrame": 1,"isCache": 0,"menuType": "F","visible": "0","status": "0","perms": "system:dept:add","icon": "#","createBy": "admin","createTime": "2023-04-01T12:17:22.000+00:00","updateBy": "","updateTime": null,"remark": "","children": []},{"menuId": 1018,"menuName": "部门修改","parentId": 103,"orderNum": 3,"path": "","component": "","query": "","isFrame": 1,"isCache": 0,"menuType": "F","visible": "0","status": "0","perms": "system:dept:edit","icon": "#","createBy": "admin","createTime": "2023-04-01T12:17:22.000+00:00","updateBy": "","updateTime": null,"remark": "","children": []},{"menuId": 1019,"menuName": "部门删除","parentId": 103,"orderNum": 4,"path": "","component": "","query": "","isFrame": 1,"isCache": 0,"menuType": "F","visible": "0","status": "0","perms": "system:dept:remove","icon": "#","createBy": "admin","createTime": "2023-04-01T12:17:22.000+00:00","updateBy": "","updateTime": null,"remark": "","children": []}]},{"menuId": 104,"menuName": "岗位管理","parentId": 1,"orderNum": 5,"path": "post","component": "system/post/index","query": "","isFrame": 1,"isCache": 0,"menuType": "C","visible": "0","status": "0","perms": "system:post:list","icon": "post","createBy": "admin","createTime": "2023-04-01T12:17:22.000+00:00","updateBy": "","updateTime": null,"remark": "岗位管理菜单","children": [{"menuId": 1020,"menuName": "岗位查询","parentId": 104,"orderNum": 1,"path": "","component": "","query": "","isFrame": 1,"isCache": 0,"menuType": "F","visible": "0","status": "0","perms": "system:post:query","icon": "#","createBy": "admin","createTime": "2023-04-01T12:17:22.000+00:00","updateBy": "","updateTime": null,"remark": "","children": []},{"menuId": 1021,"menuName": "岗位新增","parentId": 104,"orderNum": 2,"path": "","component": "","query": "","isFrame": 1,"isCache": 0,"menuType": "F","visible": "0","status": "0","perms": "system:post:add","icon": "#","createBy": "admin","createTime": "2023-04-01T12:17:22.000+00:00","updateBy": "","updateTime": null,"remark": "","children": []},{"menuId": 1022,"menuName": "岗位修改","parentId": 104,"orderNum": 3,"path": "","component": "","query": "","isFrame": 1,"isCache": 0,"menuType": "F","visible": "0","status": "0","perms": "system:post:edit","icon": "#","createBy": "admin","createTime": "2023-04-01T12:17:22.000+00:00","updateBy": "","updateTime": null,"remark": "","children": []},{"menuId": 1023,"menuName": "岗位删除","parentId": 104,"orderNum": 4,"path": "","component": "","query": "","isFrame": 1,"isCache": 0,"menuType": "F","visible": "0","status": "0","perms": "system:post:remove","icon": "#","createBy": "admin","createTime": "2023-04-01T12:17:22.000+00:00","updateBy": "","updateTime": null,"remark": "","children": []},{"menuId": 1024,"menuName": "岗位导出","parentId": 104,"orderNum": 5,"path": "","component": "","query": "","isFrame": 1,"isCache": 0,"menuType": "F","visible": "0","status": "0","perms": "system:post:export","icon": "#","createBy": "admin","createTime": "2023-04-01T12:17:22.000+00:00","updateBy": "","updateTime": null,"remark": "","children": []}]},{"menuId": 105,"menuName": "字典管理","parentId": 1,"orderNum": 6,"path": "dict","component": "system/dict/index","query": "","isFrame": 1,"isCache": 0,"menuType": "C","visible": "0","status": "0","perms": "system:dict:list","icon": "dict","createBy": "admin","createTime": "2023-04-01T12:17:22.000+00:00","updateBy": "","updateTime": null,"remark": "字典管理菜单","children": [{"menuId": 1025,"menuName": "字典查询","parentId": 105,"orderNum": 1,"path": "#","component": "","query": "","isFrame": 1,"isCache": 0,"menuType": "F","visible": "0","status": "0","perms": "system:dict:query","icon": "#","createBy": "admin","createTime": "2023-04-01T12:17:22.000+00:00","updateBy": "","updateTime": null,"remark": "","children": []},{"menuId": 1026,"menuName": "字典新增","parentId": 105,"orderNum": 2,"path": "#","component": "","query": "","isFrame": 1,"isCache": 0,"menuType": "F","visible": "0","status": "0","perms": "system:dict:add","icon": "#","createBy": "admin","createTime": "2023-04-01T12:17:22.000+00:00","updateBy": "","updateTime": null,"remark": "","children": []},{"menuId": 1027,"menuName": "字典修改","parentId": 105,"orderNum": 3,"path": "#","component": "","query": "","isFrame": 1,"isCache": 0,"menuType": "F","visible": "0","status": "0","perms": "system:dict:edit","icon": "#","createBy": "admin","createTime": "2023-04-01T12:17:22.000+00:00","updateBy": "","updateTime": null,"remark": "","children": []},{"menuId": 1028,"menuName": "字典删除","parentId": 105,"orderNum": 4,"path": "#","component": "","query": "","isFrame": 1,"isCache": 0,"menuType": "F","visible": "0","status": "0","perms": "system:dict:remove","icon": "#","createBy": "admin","createTime": "2023-04-01T12:17:22.000+00:00","updateBy": "","updateTime": null,"remark": "","children": []},{"menuId": 1029,"menuName": "字典导出","parentId": 105,"orderNum": 5,"path": "#","component": "","query": "","isFrame": 1,"isCache": 0,"menuType": "F","visible": "0","status": "0","perms": "system:dict:export","icon": "#","createBy": "admin","createTime": "2023-04-01T12:17:22.000+00:00","updateBy": "","updateTime": null,"remark": "","children": []}]},{"menuId": 106,"menuName": "参数设置","parentId": 1,"orderNum": 7,"path": "config","component": "system/config/index","query": "","isFrame": 1,"isCache": 0,"menuType": "C","visible": "0","status": "0","perms": "system:config:list","icon": "edit","createBy": "admin","createTime": "2023-04-01T12:17:22.000+00:00","updateBy": "","updateTime": null,"remark": "参数设置菜单","children": [{"menuId": 1030,"menuName": "参数查询","parentId": 106,"orderNum": 1,"path": "#","component": "","query": "","isFrame": 1,"isCache": 0,"menuType": "F","visible": "0","status": "0","perms": "system:config:query","icon": "#","createBy": "admin","createTime": "2023-04-01T12:17:22.000+00:00","updateBy": "","updateTime": null,"remark": "","children": []},{"menuId": 1031,"menuName": "参数新增","parentId": 106,"orderNum": 2,"path": "#","component": "","query": "","isFrame": 1,"isCache": 0,"menuType": "F","visible": "0","status": "0","perms": "system:config:add","icon": "#","createBy": "admin","createTime": "2023-04-01T12:17:22.000+00:00","updateBy": "","updateTime": null,"remark": "","children": []},{"menuId": 1032,"menuName": "参数修改","parentId": 106,"orderNum": 3,"path": "#","component": "","query": "","isFrame": 1,"isCache": 0,"menuType": "F","visible": "0","status": "0","perms": "system:config:edit","icon": "#","createBy": "admin","createTime": "2023-04-01T12:17:22.000+00:00","updateBy": "","updateTime": null,"remark": "","children": []},{"menuId": 1033,"menuName": "参数删除","parentId": 106,"orderNum": 4,"path": "#","component": "","query": "","isFrame": 1,"isCache": 0,"menuType": "F","visible": "0","status": "0","perms": "system:config:remove","icon": "#","createBy": "admin","createTime": "2023-04-01T12:17:22.000+00:00","updateBy": "","updateTime": null,"remark": "","children": []},{"menuId": 1034,"menuName": "参数导出","parentId": 106,"orderNum": 5,"path": "#","component": "","query": "","isFrame": 1,"isCache": 0,"menuType": "F","visible": "0","status": "0","perms": "system:config:export","icon": "#","createBy": "admin","createTime": "2023-04-01T12:17:22.000+00:00","updateBy": "","updateTime": null,"remark": "","children": []}]},{"menuId": 107,"menuName": "通知公告","parentId": 1,"orderNum": 8,"path": "notice","component": "system/notice/index","query": "","isFrame": 1,"isCache": 0,"menuType": "C","visible": "0","status": "0","perms": "system:notice:list","icon": "message","createBy": "admin","createTime": "2023-04-01T12:17:22.000+00:00","updateBy": "","updateTime": null,"remark": "通知公告菜单","children": [{"menuId": 1035,"menuName": "公告查询","parentId": 107,"orderNum": 1,"path": "#","component": "","query": "","isFrame": 1,"isCache": 0,"menuType": "F","visible": "0","status": "0","perms": "system:notice:query","icon": "#","createBy": "admin","createTime": "2023-04-01T12:17:22.000+00:00","updateBy": "","updateTime": null,"remark": "","children": []},{"menuId": 1036,"menuName": "公告新增","parentId": 107,"orderNum": 2,"path": "#","component": "","query": "","isFrame": 1,"isCache": 0,"menuType": "F","visible": "0","status": "0","perms": "system:notice:add","icon": "#","createBy": "admin","createTime": "2023-04-01T12:17:22.000+00:00","updateBy": "","updateTime": null,"remark": "","children": []},{"menuId": 1037,"menuName": "公告修改","parentId": 107,"orderNum": 3,"path": "#","component": "","query": "","isFrame": 1,"isCache": 0,"menuType": "F","visible": "0","status": "0","perms": "system:notice:edit","icon": "#","createBy": "admin","createTime": "2023-04-01T12:17:22.000+00:00","updateBy": "","updateTime": null,"remark": "","children": []},{"menuId": 1038,"menuName": "公告删除","parentId": 107,"orderNum": 4,"path": "#","component": "","query": "","isFrame": 1,"isCache": 0,"menuType": "F","visible": "0","status": "0","perms": "system:notice:remove","icon": "#","createBy": "admin","createTime": "2023-04-01T12:17:22.000+00:00","updateBy": "","updateTime": null,"remark": "","children": []}]},{"menuId": 108,"menuName": "日志管理","parentId": 1,"orderNum": 9,"path": "log","component": "","query": "","isFrame": 1,"isCache": 0,"menuType": "M","visible": "0","status": "0","perms": "","icon": "log","createBy": "admin","createTime": "2023-04-01T12:17:22.000+00:00","updateBy": "","updateTime": null,"remark": "日志管理菜单","children": [{"menuId": 500,"menuName": "操作日志","parentId": 108,"orderNum": 1,"path": "operlog","component": "system/operlog/index","query": "","isFrame": 1,"isCache": 0,"menuType": "C","visible": "0","status": "0","perms": "system:operlog:list","icon": "form","createBy": "admin","createTime": "2023-04-01T12:17:22.000+00:00","updateBy": "","updateTime": null,"remark": "操作日志菜单","children": []},{"menuId": 501,"menuName": "登录日志","parentId": 108,"orderNum": 2,"path": "logininfor","component": "system/logininfor/index","query": "","isFrame": 1,"isCache": 0,"menuType": "C","visible": "0","status": "0","perms": "system:logininfor:list","icon": "logininfor","createBy": "admin","createTime": "2023-04-01T12:17:22.000+00:00","updateBy": "","updateTime": null,"remark": "登录日志菜单","children": []}]}]},{"menuId": 2,"menuName": "系统监控","parentId": 0,"orderNum": 2,"path": "monitor","component": null,"query": "","isFrame": 1,"isCache": 0,"menuType": "M","visible": "0","status": "0","perms": "","icon": "HelpFilled","createBy": "admin","createTime": "2023-04-01T12:17:22.000+00:00","updateBy": "","updateTime": null,"remark": "系统监控目录","children": [{"menuId": 109,"menuName": "在线用户","parentId": 2,"orderNum": 1,"path": "online","component": "monitor/online/index","query": "","isFrame": 1,"isCache": 0,"menuType": "C","visible": "0","status": "0","perms": "monitor:online:list","icon": "online","createBy": "admin","createTime": "2023-04-01T12:17:22.000+00:00","updateBy": "","updateTime": null,"remark": "在线用户菜单","children": [{"menuId": 1046,"menuName": "在线查询","parentId": 109,"orderNum": 1,"path": "#","component": "","query": "","isFrame": 1,"isCache": 0,"menuType": "F","visible": "0","status": "0","perms": "monitor:online:query","icon": "#","createBy": "admin","createTime": "2023-04-01T12:17:22.000+00:00","updateBy": "","updateTime": null,"remark": "","children": []},{"menuId": 1047,"menuName": "批量强退","parentId": 109,"orderNum": 2,"path": "#","component": "","query": "","isFrame": 1,"isCache": 0,"menuType": "F","visible": "0","status": "0","perms": "monitor:online:batchLogout","icon": "#","createBy": "admin","createTime": "2023-04-01T12:17:22.000+00:00","updateBy": "","updateTime": null,"remark": "","children": []},{"menuId": 1048,"menuName": "单条强退","parentId": 109,"orderNum": 3,"path": "#","component": "","query": "","isFrame": 1,"isCache": 0,"menuType": "F","visible": "0","status": "0","perms": "monitor:online:forceLogout","icon": "#","createBy": "admin","createTime": "2023-04-01T12:17:22.000+00:00","updateBy": "","updateTime": null,"remark": "","children": []}]},{"menuId": 110,"menuName": "定时任务","parentId": 2,"orderNum": 2,"path": "job","component": "monitor/job/index","query": "","isFrame": 1,"isCache": 0,"menuType": "C","visible": "0","status": "0","perms": "monitor:job:list","icon": "job","createBy": "admin","createTime": "2023-04-01T12:17:22.000+00:00","updateBy": "","updateTime": null,"remark": "定时任务菜单","children": [{"menuId": 1049,"menuName": "任务查询","parentId": 110,"orderNum": 1,"path": "#","component": "","query": "","isFrame": 1,"isCache": 0,"menuType": "F","visible": "0","status": "0","perms": "monitor:job:query","icon": "#","createBy": "admin","createTime": "2023-04-01T12:17:22.000+00:00","updateBy": "","updateTime": null,"remark": "","children": []},{"menuId": 1050,"menuName": "任务新增","parentId": 110,"orderNum": 2,"path": "#","component": "","query": "","isFrame": 1,"isCache": 0,"menuType": "F","visible": "0","status": "0","perms": "monitor:job:add","icon": "#","createBy": "admin","createTime": "2023-04-01T12:17:22.000+00:00","updateBy": "","updateTime": null,"remark": "","children": []},{"menuId": 1051,"menuName": "任务修改","parentId": 110,"orderNum": 3,"path": "#","component": "","query": "","isFrame": 1,"isCache": 0,"menuType": "F","visible": "0","status": "0","perms": "monitor:job:edit","icon": "#","createBy": "admin","createTime": "2023-04-01T12:17:22.000+00:00","updateBy": "","updateTime": null,"remark": "","children": []},{"menuId": 1052,"menuName": "任务删除","parentId": 110,"orderNum": 4,"path": "#","component": "","query": "","isFrame": 1,"isCache": 0,"menuType": "F","visible": "0","status": "0","perms": "monitor:job:remove","icon": "#","createBy": "admin","createTime": "2023-04-01T12:17:22.000+00:00","updateBy": "","updateTime": null,"remark": "","children": []},{"menuId": 1053,"menuName": "状态修改","parentId": 110,"orderNum": 5,"path": "#","component": "","query": "","isFrame": 1,"isCache": 0,"menuType": "F","visible": "0","status": "0","perms": "monitor:job:changeStatus","icon": "#","createBy": "admin","createTime": "2023-04-01T12:17:22.000+00:00","updateBy": "","updateTime": null,"remark": "","children": []},{"menuId": 1054,"menuName": "任务导出","parentId": 110,"orderNum": 6,"path": "#","component": "","query": "","isFrame": 1,"isCache": 0,"menuType": "F","visible": "0","status": "0","perms": "monitor:job:export","icon": "#","createBy": "admin","createTime": "2023-04-01T12:17:22.000+00:00","updateBy": "","updateTime": null,"remark": "","children": []}]},{"menuId": 111,"menuName": "Sentinel控制台","parentId": 2,"orderNum": 3,"path": "http://localhost:8718","component": "","query": "","isFrame": 0,"isCache": 0,"menuType": "C","visible": "0","status": "0","perms": "monitor:sentinel:list","icon": "sentinel","createBy": "admin","createTime": "2023-04-01T12:17:22.000+00:00","updateBy": "","updateTime": null,"remark": "流量控制菜单","children": []},{"menuId": 112,"menuName": "Nacos控制台","parentId": 2,"orderNum": 4,"path": "http://localhost:8848/nacos","component": "","query": "","isFrame": 0,"isCache": 0,"menuType": "C","visible": "0","status": "0","perms": "monitor:nacos:list","icon": "nacos","createBy": "admin","createTime": "2023-04-01T12:17:22.000+00:00","updateBy": "","updateTime": null,"remark": "服务治理菜单","children": []},{"menuId": 113,"menuName": "Admin控制台","parentId": 2,"orderNum": 5,"path": "http://localhost:9100/login","component": "","query": "","isFrame": 0,"isCache": 0,"menuType": "C","visible": "0","status": "0","perms": "monitor:server:list","icon": "server","createBy": "admin","createTime": "2023-04-01T12:17:22.000+00:00","updateBy": "","updateTime": null,"remark": "服务监控菜单","children": []}]},{"menuId": 3,"menuName": "系统工具","parentId": 0,"orderNum": 3,"path": "tool","component": null,"query": "","isFrame": 1,"isCache": 0,"menuType": "M","visible": "0","status": "0","perms": "","icon": "Briefcase","createBy": "admin","createTime": "2023-04-01T12:17:22.000+00:00","updateBy": "","updateTime": null,"remark": "系统工具目录","children": [{"menuId": 114,"menuName": "表单构建","parentId": 3,"orderNum": 1,"path": "build","component": "tool/build/index","query": "","isFrame": 1,"isCache": 0,"menuType": "C","visible": "0","status": "0","perms": "tool:build:list","icon": "build","createBy": "admin","createTime": "2023-04-01T12:17:22.000+00:00","updateBy": "","updateTime": null,"remark": "表单构建菜单","children": []},{"menuId": 115,"menuName": "代码生成","parentId": 3,"orderNum": 2,"path": "gen","component": "tool/gen/index","query": "","isFrame": 1,"isCache": 0,"menuType": "C","visible": "0","status": "0","perms": "tool:gen:list","icon": "code","createBy": "admin","createTime": "2023-04-01T12:17:22.000+00:00","updateBy": "","updateTime": null,"remark": "代码生成菜单","children": [{"menuId": 1055,"menuName": "生成查询","parentId": 115,"orderNum": 1,"path": "#","component": "","query": "","isFrame": 1,"isCache": 0,"menuType": "F","visible": "0","status": "0","perms": "tool:gen:query","icon": "#","createBy": "admin","createTime": "2023-04-01T12:17:22.000+00:00","updateBy": "","updateTime": null,"remark": "","children": []},{"menuId": 1056,"menuName": "生成修改","parentId": 115,"orderNum": 2,"path": "#","component": "","query": "","isFrame": 1,"isCache": 0,"menuType": "F","visible": "0","status": "0","perms": "tool:gen:edit","icon": "#","createBy": "admin","createTime": "2023-04-01T12:17:22.000+00:00","updateBy": "","updateTime": null,"remark": "","children": []},{"menuId": 1058,"menuName": "导入代码","parentId": 115,"orderNum": 2,"path": "#","component": "","query": "","isFrame": 1,"isCache": 0,"menuType": "F","visible": "0","status": "0","perms": "tool:gen:import","icon": "#","createBy": "admin","createTime": "2023-04-01T12:17:22.000+00:00","updateBy": "","updateTime": null,"remark": "","children": []},{"menuId": 1057,"menuName": "生成删除","parentId": 115,"orderNum": 3,"path": "#","component": "","query": "","isFrame": 1,"isCache": 0,"menuType": "F","visible": "0","status": "0","perms": "tool:gen:remove","icon": "#","createBy": "admin","createTime": "2023-04-01T12:17:22.000+00:00","updateBy": "","updateTime": null,"remark": "","children": []},{"menuId": 1059,"menuName": "预览代码","parentId": 115,"orderNum": 4,"path": "#","component": "","query": "","isFrame": 1,"isCache": 0,"menuType": "F","visible": "0","status": "0","perms": "tool:gen:preview","icon": "#","createBy": "admin","createTime": "2023-04-01T12:17:22.000+00:00","updateBy": "","updateTime": null,"remark": "","children": []},{"menuId": 1060,"menuName": "生成代码","parentId": 115,"orderNum": 5,"path": "#","component": "","query": "","isFrame": 1,"isCache": 0,"menuType": "F","visible": "0","status": "0","perms": "tool:gen:code","icon": "#","createBy": "admin","createTime": "2023-04-01T12:17:22.000+00:00","updateBy": "","updateTime": null,"remark": "","children": []}]},{"menuId": 116,"menuName": "系统接口","parentId": 3,"orderNum": 3,"path": "http://localhost:8080/swagger-ui/index.html","component": "","query": "","isFrame": 0,"isCache": 0,"menuType": "C","visible": "0","status": "0","perms": "tool:swagger:list","icon": "swagger","createBy": "admin","createTime": "2023-04-01T12:17:22.000+00:00","updateBy": "","updateTime": null,"remark": "系统接口菜单","children": []}]},{"menuId": 4,"menuName": "博客网站","parentId": 0,"orderNum": 4,"path": "http://www.gytlv.com/blog","component": null,"query": "","isFrame": 0,"isCache": 0,"menuType": "M","visible": "0","status": "0","perms": "","icon": "guide","createBy": "admin","createTime": "2023-04-09T05:53:27.000+00:00","updateBy": "","updateTime": null,"remark": "官网地址","children": []}
]