diff --git a/src/api/index.js b/src/api/index.js index 8aef1db..e88b982 100644 --- a/src/api/index.js +++ b/src/api/index.js @@ -10,6 +10,11 @@ export default { verification: `${host}users/users/user/captcha`,// 验证码图片 isClient: `${host}users/users/user/isClient`,// 是否为客户 getUserAllRoleByToken : `${host}users/role/getUserAllRoleByToken`, + + //实验台 + curriculumDetail: `${host}nakadai/nakadai/curriculum/curriculumDetail`, // 课程详情 + curriculumChapter: `${host}nakadai/curriculum/chapter/queryChaptersAndSubsections`, // 根据课程id查询章节小节,树状结构 + curriculumGetSubsection: `${host}nakadai/curriculum/subsection/getSubsection`, // 根据小节id获取预览文件地址 // 权限管理 getUserRolesPermissionMenu: `${host}users/user-role/getUserRolesPermissionMenu`, diff --git a/src/layouts/navbar/index.vue b/src/layouts/navbar/index.vue index 3298561..bcedd22 100644 --- a/src/layouts/navbar/index.vue +++ b/src/layouts/navbar/index.vue @@ -36,6 +36,11 @@ export default { return { active: this.$route.path, defaultMenus: [ + { + icon: "el-icon-s-platform", + index: "/station/list", + title: "实验台" + }, { icon: "el-icon-user", index: "/student/list", @@ -119,7 +124,8 @@ export default { this.defaultMenus.map(e => { this.routers.find(n => n == e.index) && menus.push(e); }); - this.menus = menus; + // this.menus = menus; + this.menus = this.defaultMenus // } else { // this.menus = this.defaultMenus; // } diff --git a/src/pages/station/list/index.vue b/src/pages/station/list/index.vue new file mode 100644 index 0000000..893978a --- /dev/null +++ b/src/pages/station/list/index.vue @@ -0,0 +1,121 @@ + + + + + + 搜索 + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/pages/station/preview/index.vue b/src/pages/station/preview/index.vue new file mode 100644 index 0000000..c124ede --- /dev/null +++ b/src/pages/station/preview/index.vue @@ -0,0 +1,533 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{ currentPage }} / {{ pageCount }} + + + + + + + + + + + + + 进 入 实 验 + + + {{ courseName }} + + + + {{ item.name }} + + + {{ section.name }} + + + + + + + + + + + + 课程简介 + {{ briefIntroduction }} + + + 课程目标 + {{ teachingObjectives }} + + + + + + + + \ No newline at end of file diff --git a/src/router/index.js b/src/router/index.js index f0c8967..1a95288 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -57,7 +57,30 @@ function getPermission() { // 该项目的路由实际上做了两层处理,一层指向了默认的路由,对应模块,用于基础布局的nav,下面一层才是实际上的路由跳转, // 所以需要默认进行赋值,实际操作时根据path去禁用掉对应的nav即可。 const arr = ['achievement','assessment','course',"evaluation",'information','match','project','setting','student','system']; - let permissionRouters = []; // 最后处理好的路由数组 + let permissionRouters = [ + { + path: "/station", + name: "station", + redirect: { + name: `stationlist` + }, + component: BasicLayout, + children: [ + { + name: `stationlist`, + path: `/station/list`, + component: () => import("@/pages/station/list"), + meta: { title: "实验台" } + }, + { + name: `stationPreview`, + path: `/station/preview`, + component: () => import("@/pages/station/preview"), + meta: { title: "实验台" } + } + ] + } + ]; // 最后处理好的路由数组 let data = res.permissionMenu[0].children; if (data.length > 0) { @@ -227,7 +250,7 @@ function getPermission() { } } }); - // console.log(permissionRouters, "处理好的"); + console.log(permissionRouters, "处理好的"); // 把处理完成的路由,add到router里 // 记录一下路由的名称,用于nav let nav = data.map(e => e.path); diff --git a/src/setting.js b/src/setting.js index 9736ae2..25c21c5 100644 --- a/src/setting.js +++ b/src/setting.js @@ -9,6 +9,7 @@ const isBeta = url.includes("120.78.198.231"); //是否职站测试 const isPro = url.includes("occupationlab.com"); //是否职站生产 const isTest = url.includes('39.108.250.202'); //是否中台测试服 +let bankPath = '' // 银行系统地址 let jumpPath = ""; let host = ""; let title = ""; @@ -28,17 +29,19 @@ if (isHh) { } else if (isPro) { // 职站生产 host = "http://www.occupationlab.com:9000/"; + bankPath = `http://www.huorantech.cn/banksystem` title = "职站服务端管理系统"; } else if (isTest){ jumpPath = "http://39.108.250.202/judgmentPoint/"; host = "http://39.108.250.202:9000/"; + bankPath = `${bankPath}/banksystem` title = "职站服务端管理系统"; } else if (isDev) { jumpPath = "http://192.168.31.154:8087/"; + bankPath = `http://192.168.31.125:8093` // host = "http://www.occupationlab.com:9000/";//线上 host = "http://39.108.250.202:9000/"; // 中台测试服 // host = "http://192.168.31.151:9000/"; // 榕 - // host = "http://192.168.31.125:9000/"; // 坤 // host = 'http://192.168.31.137:9000/'; // 赓 title = "职站服务端管理系统"; } else {
+ + {{ currentPage }} / {{ pageCount }} + +
{{ section.name }}
{{ briefIntroduction }}
{{ teachingObjectives }}