|
@@ -12,12 +12,17 @@ const schoolRoutes: RouteRecordRaw[] = JSON.parse(
|
|
JSON.stringify([
|
|
JSON.stringify([
|
|
{
|
|
{
|
|
path: "/",
|
|
path: "/",
|
|
- component: "AdminIndex",
|
|
|
|
redirect: "/areaboard",
|
|
redirect: "/areaboard",
|
|
|
|
+ meta: { hidden: true },
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ path: "/areaboard",
|
|
|
|
+ component: "AdminIndex",
|
|
|
|
+ redirect: "/areaboard/index",
|
|
children: [
|
|
children: [
|
|
{
|
|
{
|
|
- path: "areaboard",
|
|
|
|
- component: "areaboard",
|
|
|
|
|
|
+ path: "index",
|
|
|
|
+ component: "areaboard/index",
|
|
meta: { title: "区域级数据看板", icon: "board", keepAlive: true },
|
|
meta: { title: "区域级数据看板", icon: "board", keepAlive: true },
|
|
},
|
|
},
|
|
],
|
|
],
|
|
@@ -29,14 +34,24 @@ const adminRoutes: RouteRecordRaw[] = JSON.parse(
|
|
JSON.stringify([
|
|
JSON.stringify([
|
|
{
|
|
{
|
|
path: "/",
|
|
path: "/",
|
|
- component: "SchoolIndex",
|
|
|
|
redirect: "/dashboard",
|
|
redirect: "/dashboard",
|
|
|
|
+ meta: { hidden: true },
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ path: "/dashboard",
|
|
|
|
+ component: "SchoolIndex",
|
|
|
|
+ redirect: "/dashboard/index",
|
|
children: [
|
|
children: [
|
|
{
|
|
{
|
|
- path: "dashboard",
|
|
|
|
- component: "dashboard",
|
|
|
|
|
|
+ path: "index",
|
|
|
|
+ component: "dashboard/index",
|
|
meta: { title: "数据看板", icon: "board", keepAlive: true },
|
|
meta: { title: "数据看板", icon: "board", keepAlive: true },
|
|
},
|
|
},
|
|
|
|
+ {
|
|
|
|
+ path: "example",
|
|
|
|
+ component: "dashboard/example",
|
|
|
|
+ meta: { title: "数据看板示例", hidden: true },
|
|
|
|
+ },
|
|
],
|
|
],
|
|
},
|
|
},
|
|
{
|
|
{
|
|
@@ -45,8 +60,8 @@ const adminRoutes: RouteRecordRaw[] = JSON.parse(
|
|
redirect: "/class/index",
|
|
redirect: "/class/index",
|
|
children: [
|
|
children: [
|
|
{
|
|
{
|
|
- path: "class",
|
|
|
|
- component: "class",
|
|
|
|
|
|
+ path: "index",
|
|
|
|
+ component: "class/index",
|
|
meta: { title: "班级管理", icon: "class", keepAlive: true },
|
|
meta: { title: "班级管理", icon: "class", keepAlive: true },
|
|
},
|
|
},
|
|
],
|
|
],
|
|
@@ -57,8 +72,8 @@ const adminRoutes: RouteRecordRaw[] = JSON.parse(
|
|
redirect: "/teacher/index",
|
|
redirect: "/teacher/index",
|
|
children: [
|
|
children: [
|
|
{
|
|
{
|
|
- path: "teacher",
|
|
|
|
- component: "teacher",
|
|
|
|
|
|
+ path: "index",
|
|
|
|
+ component: "teacher/index",
|
|
meta: { title: "教师管理", icon: "teacher", keepAlive: true },
|
|
meta: { title: "教师管理", icon: "teacher", keepAlive: true },
|
|
},
|
|
},
|
|
],
|
|
],
|
|
@@ -69,8 +84,8 @@ const adminRoutes: RouteRecordRaw[] = JSON.parse(
|
|
redirect: "/student/index",
|
|
redirect: "/student/index",
|
|
children: [
|
|
children: [
|
|
{
|
|
{
|
|
- path: "student",
|
|
|
|
- component: "student",
|
|
|
|
|
|
+ path: "index",
|
|
|
|
+ component: "student/index",
|
|
meta: { title: "学生管理", icon: "student", keepAlive: true },
|
|
meta: { title: "学生管理", icon: "student", keepAlive: true },
|
|
},
|
|
},
|
|
],
|
|
],
|
|
@@ -81,8 +96,8 @@ const adminRoutes: RouteRecordRaw[] = JSON.parse(
|
|
redirect: "/equipment/index",
|
|
redirect: "/equipment/index",
|
|
children: [
|
|
children: [
|
|
{
|
|
{
|
|
- path: "equipment",
|
|
|
|
- component: "equipment",
|
|
|
|
|
|
+ path: "index",
|
|
|
|
+ component: "equipment/index",
|
|
meta: { title: "设备管理", icon: "equipment", keepAlive: true },
|
|
meta: { title: "设备管理", icon: "equipment", keepAlive: true },
|
|
},
|
|
},
|
|
],
|
|
],
|
|
@@ -94,7 +109,7 @@ const adminRoutes: RouteRecordRaw[] = JSON.parse(
|
|
children: [
|
|
children: [
|
|
{
|
|
{
|
|
path: "inxdex",
|
|
path: "inxdex",
|
|
- component: "training",
|
|
|
|
|
|
+ component: "training/index",
|
|
meta: { title: "训练管理", icon: "training", keepAlive: true },
|
|
meta: { title: "训练管理", icon: "training", keepAlive: true },
|
|
},
|
|
},
|
|
],
|
|
],
|
|
@@ -106,7 +121,7 @@ const adminRoutes: RouteRecordRaw[] = JSON.parse(
|
|
children: [
|
|
children: [
|
|
{
|
|
{
|
|
path: "index",
|
|
path: "index",
|
|
- component: "evaluation",
|
|
|
|
|
|
+ component: "evaluation/index",
|
|
meta: { title: "测评数据看板", icon: "evaluation", keepAlive: true },
|
|
meta: { title: "测评数据看板", icon: "evaluation", keepAlive: true },
|
|
},
|
|
},
|
|
],
|
|
],
|
|
@@ -132,7 +147,7 @@ const filterAsyncRoutes = (routes: RouteRecordRaw[], roles: string[]) => {
|
|
} else if (tmpRoute.component?.toString() == "AdminIndex") {
|
|
} else if (tmpRoute.component?.toString() == "AdminIndex") {
|
|
console.log("AdminIndex");
|
|
console.log("AdminIndex");
|
|
} else {
|
|
} else {
|
|
- const component = modules[`../../views/${tmpRoute.component}/index.vue`];
|
|
|
|
|
|
+ const component = modules[`../../views/${tmpRoute.component}.vue`];
|
|
if (component) {
|
|
if (component) {
|
|
tmpRoute.component = component;
|
|
tmpRoute.component = component;
|
|
} else {
|
|
} else {
|