|
@@ -1,8 +1,7 @@
|
|
|
/**
|
|
/**
|
|
|
* 1. 前端维护的完整路由表, 用于创建"菜单"
|
|
* 1. 前端维护的完整路由表, 用于创建"菜单"
|
|
|
- * 2. component 是 string,并不是 组件对象
|
|
|
|
|
|
|
+ * 2. component 是 string,并不是 组件对象。
|
|
|
* 3. 生成菜单,关注的 path,name,component,icon
|
|
* 3. 生成菜单,关注的 path,name,component,icon
|
|
|
- * 4. 以用户填写的数据为准
|
|
|
|
|
*/
|
|
*/
|
|
|
import { AppRouteRecordRaw } from './types';
|
|
import { AppRouteRecordRaw } from './types';
|
|
|
import { getTreeItem } from '@/utils';
|
|
import { getTreeItem } from '@/utils';
|
|
@@ -128,7 +127,7 @@ const fullRoutes: AppRouteRecordRaw[] = [
|
|
|
},
|
|
},
|
|
|
children: [
|
|
children: [
|
|
|
{
|
|
{
|
|
|
- // 场景布局
|
|
|
|
|
|
|
+ // 公司场景布局入口页,选择PC端还是手机端
|
|
|
path: 'scene',
|
|
path: 'scene',
|
|
|
name: 'LayoutScene',
|
|
name: 'LayoutScene',
|
|
|
component: '/page-config/PageConfig',
|
|
component: '/page-config/PageConfig',
|
|
@@ -137,6 +136,26 @@ const fullRoutes: AppRouteRecordRaw[] = [
|
|
|
title: '场景布局',
|
|
title: '场景布局',
|
|
|
},
|
|
},
|
|
|
},
|
|
},
|
|
|
|
|
+ {
|
|
|
|
|
+ // 公司场景布局卡片列表
|
|
|
|
|
+ path: 'scene-list',
|
|
|
|
|
+ name: 'LayoutSceneList',
|
|
|
|
|
+ component: '/page-config/PageSceneLayout',
|
|
|
|
|
+ meta: {
|
|
|
|
|
+ icon: '',
|
|
|
|
|
+ title: '场景布局列表'
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ // 公司场景配置页面(菜单不可见)
|
|
|
|
|
+ path: 'scene-config',
|
|
|
|
|
+ name: 'LayoutSceneConfig',
|
|
|
|
|
+ component: '/page-config/ConfigEdit',
|
|
|
|
|
+ meta: {
|
|
|
|
|
+ icon: '',
|
|
|
|
|
+ title: '场景布局配置(菜单不可见)'
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
{
|
|
{
|
|
|
// 相机布局
|
|
// 相机布局
|
|
|
path: 'camera',
|
|
path: 'camera',
|
|
@@ -226,6 +245,16 @@ const fullRoutes: AppRouteRecordRaw[] = [
|
|
|
icon: '',
|
|
icon: '',
|
|
|
title: '组织管理',
|
|
title: '组织管理',
|
|
|
}
|
|
}
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ // 岗位管理 (目前不需要)
|
|
|
|
|
+ path: 'post',
|
|
|
|
|
+ name: 'UserPost',
|
|
|
|
|
+ component: '/auth/post/post',
|
|
|
|
|
+ meta: {
|
|
|
|
|
+ icon: '',
|
|
|
|
|
+ title: '岗位管理'
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
]
|
|
]
|
|
|
},
|
|
},
|
|
@@ -478,6 +507,7 @@ const fullRoutes: AppRouteRecordRaw[] = [
|
|
|
path: '/exception',
|
|
path: '/exception',
|
|
|
name: 'Exception',
|
|
name: 'Exception',
|
|
|
component: 'LAYOUT',
|
|
component: 'LAYOUT',
|
|
|
|
|
+ redirect: '/exception/403',
|
|
|
meta: {
|
|
meta: {
|
|
|
icon: 'ExclamationCircleOutlined',
|
|
icon: 'ExclamationCircleOutlined',
|
|
|
title: '异常页面',
|
|
title: '异常页面',
|
|
@@ -492,35 +522,40 @@ const fullRoutes: AppRouteRecordRaw[] = [
|
|
|
icon: '',
|
|
icon: '',
|
|
|
title: '403',
|
|
title: '403',
|
|
|
},
|
|
},
|
|
|
- }
|
|
|
|
|
- ]
|
|
|
|
|
- },
|
|
|
|
|
-
|
|
|
|
|
- /**
|
|
|
|
|
- * 测试
|
|
|
|
|
- */
|
|
|
|
|
- {
|
|
|
|
|
- path: '/lf-test',
|
|
|
|
|
- name: 'LFTest',
|
|
|
|
|
- component: 'LAYOUT',
|
|
|
|
|
- meta: {
|
|
|
|
|
- icon: '',
|
|
|
|
|
- title: '测试菜单,可删除'
|
|
|
|
|
- },
|
|
|
|
|
- children: [
|
|
|
|
|
|
|
+ },
|
|
|
{
|
|
{
|
|
|
- path: 'test1',
|
|
|
|
|
- name: 'LFTest-1',
|
|
|
|
|
- component: '/exception/403',
|
|
|
|
|
|
|
+ path: '404',
|
|
|
|
|
+ name: '/exception/404',
|
|
|
|
|
+ component: '/exception/404',
|
|
|
meta: {
|
|
meta: {
|
|
|
icon: '',
|
|
icon: '',
|
|
|
- title: '403',
|
|
|
|
|
- },
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ title: '404',
|
|
|
|
|
+ },
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ path: '500',
|
|
|
|
|
+ name: 'Exception500',
|
|
|
|
|
+ component: '/exception/500',
|
|
|
|
|
+ meta: {
|
|
|
|
|
+ icon: '',
|
|
|
|
|
+ title: '500',
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ },
|
|
|
]
|
|
]
|
|
|
- }
|
|
|
|
|
|
|
+ },
|
|
|
] as const;
|
|
] as const;
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
|
+/**
|
|
|
|
|
+ * 仅超级管可见的路由。 一级路由 name
|
|
|
|
|
+ */
|
|
|
|
|
+export const ROUTE_ONLY_TO_SUPER_ADMIN: string[] = ['System', 'Exception'];
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+/**
|
|
|
|
|
+ * 类型定义。避免与已有的定义冲突,避免与 vue-router的类型定义冲突,前面加 _ 前缀
|
|
|
|
|
+ */
|
|
|
export interface _RouteViewItem {
|
|
export interface _RouteViewItem {
|
|
|
label: string;
|
|
label: string;
|
|
|
value: string;
|
|
value: string;
|