From 3617eaade88054a87896809f88b51714b6525fb2 Mon Sep 17 00:00:00 2001 From: 梁保满 Date: Thu, 9 Mar 2023 16:39:59 +0800 Subject: [PATCH] 长水账号设置 --- src/router/index.js | 267 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-- src/store/index.js | 27 ++++++++++++++++----------- src/utils/index.js | 2 ++ src/views/examinationPaper/add.vue | 6 +++--- src/views/examinationPaper/edit.vue | 2 +- src/views/personal/ask/analysis.vue | 26 ++++++++++++++++++++++++-- src/views/personal/setUp/student.vue | 1 + src/views/personal/test/index.vue | 5 ++--- src/views/portrait/detail.vue | 10 +++++----- src/views/portrait/index.vue | 2 +- src/views/standard/ask/analysis.vue | 45 ++++++++++++++++++++++++--------------------- src/views/standard/ask/index.vue | 1 + src/views/standard/examinationPaper/add.vue | 5 ++++- src/views/standard/examinationPaper/edit.vue | 133 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------------------- src/views/standard/examinationPaper/index.vue | 4 ++-- src/views/standard/portrait/index.vue | 22 ---------------------- src/views/standard/test/analysis.vue | 1 + src/views/standard/test/index.vue | 19 ++++++++++++++----- 18 files changed, 468 insertions(+), 110 deletions(-) delete mode 100644 src/views/standard/portrait/index.vue diff --git a/src/router/index.js b/src/router/index.js index 30890b8..82d69e2 100755 --- a/src/router/index.js +++ b/src/router/index.js @@ -14,6 +14,10 @@ const ExaminationPaperEdit = () => import("@/views/examinationPaper/edit") const ExaminationPaperRecycle = () => import("@/views/examinationPaper/recycle") const Portrait = () => import("@/views/portrait/index") const PortraitDetail = () => import("@/views/portrait/detail") +const CSExaminationPaper = () => import("@/views/examinationPaper/index") +const CSExaminationPaperAdd = () => import("@/views/standard/examinationPaper/add") +const CSExaminationPaperEdit = () => import("@/views/standard/examinationPaper/edit") +const CSExaminationPaperRecycle = () => import("@/views/standard/examinationPaper/recycle") const Ask = () => import("@/views/standard/ask/index") @@ -111,7 +115,7 @@ let defaultRouter = [ } ] -let addrouters = [ //测试用,后续后端获取 +let addrouters = [ { path: "/examinationPaper", iconCls: "fa fa-file-text", // 图标样式class @@ -397,6 +401,265 @@ let addrouters = [ //测试用,后续后端获取 ] }, ] +let csAddrouters = [ + { + path: "/examinationPaper", + iconCls: "fa fa-file-text", // 图标样式class + name: "备题组卷", + component: Layout, + alone: true, + children: [ + { + path: "/examinationPaper", + iconCls: "fa fa-file-text", // 图标样式class + name: "examinationPaper", + component: CSExaminationPaper, + children: [] + }, + { + path: "/examinationPaperAdd", + iconCls: "", // 图标样式class + name: "examinationPaperAdd", + component: CSExaminationPaperAdd, + parent: "examinationPaper", + children: [] + }, + { + path: "/examinationPaperEdit", + iconCls: "", // 图标样式class + name: "修改答题卡", + component: CSExaminationPaperEdit, + parent: "examinationPaper", + children: [] + }, + { + path: "/examinationPaperRecycle", + iconCls: "", // 图标样式class + name: "已归档答题卡", + component: CSExaminationPaperRecycle, + parent: "examinationPaper", + children: [] + }, + ] + }, + { + path: "/ask", + iconCls: "fa fa-bar-chart", // 图标样式class + name: "随堂问报表", + component: Layout, + alone: true, + children: [ + { + path: "/ask", + iconCls: "fa fa-bar-chart", // 图标样式class + name: "ask", + name: "随堂问报表", + component: Ask, + meta: { + keepAlive: true, + }, + children: [] + + }, + { + path: "/askAnalysis", + iconCls: "", // 图标样式class + name: "随堂问报表分析", + component: AskAnalysis, + parent: "ask", + children: [] + } + ] + }, + { + path: "/test", + iconCls: "fa fa-pie-chart", // 图标样式class + name: "即时测报表", + component: Layout, + alone: true, + children: [ + { + path: "/test", + iconCls: "fa fa-pie-chart", // 图标样式class + name: "", + component: Test, + meta: { + keepAlive: true, + }, + children: [] + }, + { + path: "/testAnalysis", + iconCls: "", // 图标样式class + name: "即时测报表分析", + component: TestAnalysis, + parent: "test", + children: [] + } + + ] + }, + { + path: "/setUpConglomerate", + iconCls: "fa fa-building", // 图标样式class + name: "学校管理", + component: Layout, + alone: true, + children: [ + { + path: "/setUpConglomerate", + iconCls: "fa fa-building", + name: '集团管理', + component: SetUpConglomerate, + children: [] + }, + ] + }, + { + path: "/setUpAccount", + iconCls: "fa fa-id-card-o", // 图标样式class + name: "账号管理", + component: Layout, + alone: true, + children: [ + { + path: "/setUpAccount", + iconCls: "fa fa-id-card-o", + name: '', + component: SetUpAccount, + children: [] + }, + ] + }, + { + path: "/", + iconCls: "fa fa-cog", + name: '学校管理', + component: Layout, + children: [ + { + path: "/setUpSchool", + iconCls: "fa fa-calculator", + name: '学校设置', + component: SetUpSchool, + children: [] + }, + { + path: "/setUpTeacher", + iconCls: "fa fa-male", + name: '教师管理', + component: SetUpTeacher, + children: [] + }, + { + path: "/setUpStudent", + iconCls: "fa fa-mortar-board", + name: '学生管理', + component: SetUpStudent, + children: [] + }, + ] + }, + { + path: "/card", + iconCls: "fa fa-id-card", // 图标样式class + name: "发卡记录", + component: Layout, + alone: true, + children: [ + { + path: "/card", + iconCls: "fa fa-id-card", // 图标样式class + name: "", + component: Card, + children: [] + } + ] + }, + { + path: "/device", + iconCls: "fa fa-dashboard", // 图标样式class + name: "设备状态", + component: Layout, + alone: true, + children: [ + { + path: "/device", + iconCls: "fa fa-dashboard", // 图标样式class + name: "", + component: Device, + meta: { + keepAlive: true, + }, + children: [] + }, + { + path: "/deviceLog", + iconCls: "fa fa-list-alt", // 图标样式class + name: "", + component: DeviceLog, + parent: "device", + children: [] + } + ] + }, + { + path: "/analysis", + iconCls: "fa fa-area-chart", // 图标样式class + name: "使用分析", + component: Layout, + alone: true, + children: [ + { + path: "/analysis", + iconCls: "fa fa-area-chart", // 图标样式class + name: "", + component: Analysis, + children: [] + } + ] + }, + { + path: "/down", + iconCls: "fa fa-download", // 图标样式class + name: "软件下载", + component: Layout, + alone: true, + children: [ + { + path: "/down", + iconCls: "fa fa-download", // 图标样式class + name: "发卡软件", + component: Down, + children: [] + }, + { + path: "/downClient", + iconCls: "", // 图标样式class + name: "授课端软件", + component: DownClient, + parent: "down", + children: [] + } + ] + }, + { + path: "/dataSync", + iconCls: "fa fa-random", // 图标样式class + name: "数据同步", + component: Layout, + alone: true, + children: [ + { + path: "/dataSync", + iconCls: "fa fa-random", // 图标样式class + name: "", + component: DataSync, + children: [] + } + ] + }, +] const addroutersPersonal = [ { @@ -638,4 +901,4 @@ const addRoutersAdmin = [ export default new Router({ routes: defaultRouter }) -export { defaultRouter, addrouters,addroutersPersonal,addRoutersAdmin } +export { defaultRouter, addrouters,addroutersPersonal,addRoutersAdmin ,csAddrouters} diff --git a/src/store/index.js b/src/store/index.js index 7bef70d..b3d3e25 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -8,7 +8,7 @@ import { Message } from "element-ui"; import request from "@/api/index"; import router from "@/router/index"; -import { addrouters,addRoutersAdmin ,addroutersPersonal} from "@/router/index"; +import { addrouters, addRoutersAdmin, addroutersPersonal, csAddrouters } from "@/router/index"; Vue.use(Vuex); const store = new Vuex.Store({ @@ -21,7 +21,7 @@ const store = new Vuex.Store({ routers: [], //左侧菜单 addRouters: localStorage.getItem("addRouters") && - localStorage.getItem("addRouters") != "undefined" + localStorage.getItem("addRouters") != "undefined" ? JSON.parse(localStorage.getItem("addRouters")) : [], //动态路由 tokenSources: new Map(), //正在请求接口(切换取消请求) @@ -40,12 +40,17 @@ const store = new Vuex.Store({ }, setRouters: (state, routers) => { let addrouterList = [] - if(state.info.showRole == 'ROLE_PERSONAL'){ + if (state.info.showRole == 'ROLE_PERSONAL') { addrouterList = [...addroutersPersonal] - }else if(state.info.showRole == 'ROLE_PINGTAI'){ + } else if (state.info.showRole == 'ROLE_PINGTAI') { addrouterList = [...addRoutersAdmin] - }else{ - addrouterList = [...addrouters] + } else { + if (state.csCode) { + addrouterList = [...csAddrouters] + } else { + addrouterList = [...addrouters] + } + } let aRouters = addrouterList.filter((item) => { let path = item.children[0]?.path.replace("/", ""); @@ -115,11 +120,11 @@ const store = new Vuex.Store({ }); } }) - .catch(() => {}); + .catch(() => { }); }, CSLogin({ state, commit }, code) { request - .ssoLogin({ code:code}) + .ssoLogin({ code: code }) .then((res) => { let response = res; if (response.status == 0) { @@ -142,8 +147,8 @@ const store = new Vuex.Store({ hidden: true, children: [], }); - router.push({ path: "/" }); - + router.push({ path: "/" }); + } else { Message({ message: "该账号暂无权限,请联系管理员~", @@ -159,7 +164,7 @@ const store = new Vuex.Store({ }); } }) - .catch(() => {}); + .catch(() => { }); }, permissions({ state, commit }, role) { commit("setToken", "isLogin"); diff --git a/src/utils/index.js b/src/utils/index.js index f76c88b..4454612 100644 --- a/src/utils/index.js +++ b/src/utils/index.js @@ -778,6 +778,8 @@ export function tablePrint(id) { .hui-s.s1{width: 87.5px;} .hui-s.s2{ width: 97.5px;} .hui-s.s3{width: 108px;} + .info { display: flex;flex-wrap: wrap;border-left: 1px solid #e2e2e2;border-top: 1px solid #e2e2e2;margin-bottom: 12px;} + .info-item {width: 25%;height: 50px;box-sizing: border-box;flex-shrink: 0;background: #f8f8f8;border-right: 1px solid #e2e2e2;border-bottom: 1px solid #e2e2e2;line-height: 50px;text-align: center;} `; let aDom = divs.cloneNode(true); let aTbody = aDom diff --git a/src/views/examinationPaper/add.vue b/src/views/examinationPaper/add.vue index bf5ee03..96709bf 100644 --- a/src/views/examinationPaper/add.vue +++ b/src/views/examinationPaper/add.vue @@ -536,8 +536,8 @@
@@ -1094,7 +1094,7 @@ export default { this.stem.type = type; this.stem.index = index; this.stem.indexs = indexs; - this.stem.knowledge = obj.knowledge?.split(",") || []; + this.stem.knowledge = obj.knowledge?.split("") || []; this.stem.difficultyFactor = obj.difficultyFactor || ""; this.dialogTag = true; }, diff --git a/src/views/examinationPaper/edit.vue b/src/views/examinationPaper/edit.vue index faf0866..f0b69f8 100644 --- a/src/views/examinationPaper/edit.vue +++ b/src/views/examinationPaper/edit.vue @@ -582,7 +582,7 @@ export default { this.stem.type = type; this.stem.index = index; this.stem.indexs = indexs; - this.stem.knowledge = obj.knowledge?.split(",") || []; + this.stem.knowledge = obj.knowledge?.split("") || []; this.stem.difficultyFactor = obj.difficultyFactor || ""; this.dialogTag = true; }, diff --git a/src/views/personal/ask/analysis.vue b/src/views/personal/ask/analysis.vue index e2c0112..b082b24 100644 --- a/src/views/personal/ask/analysis.vue +++ b/src/views/personal/ask/analysis.vue @@ -54,6 +54,28 @@