diff --git a/src/router/index.js b/src/router/index.js index 340ac50..756c8c3 100755 --- a/src/router/index.js +++ b/src/router/index.js @@ -242,7 +242,11 @@ let addrouters = [ component: AskArchiving, parent: "ask", hidden: true, + meta: { + keepAlive: true, + }, children: [] + } ] }, @@ -283,6 +287,9 @@ let addrouters = [ component: TestArchiving, parent: "test", hidden: true, + meta: { + keepAlive: true, + }, children: [] } @@ -787,23 +794,175 @@ const addroutersPersonal = [ }, ] }, + + // { + // path: "/examinationPaper", + // iconCls: "fa fa-file-text", + // name: "备题组卷", + // component: Layout, + // alone: true, + // children: [ + // { + // path: "/examinationPaper", + // iconCls: "fa fa-file-text", + // name: "examinationPaper", + // component: ExaminationPaper, + // children: [] + // }, + // { + // path: "/examinationPaperAdd", + // iconCls: "", + // name: "examinationPaperAdd", + // component: ExaminationPaperAdd, + // parent: "examinationPaper", + // children: [] + // }, + // { + // path: "/examinationPaperAddQs", + // iconCls: "", + // name: "examinationPaperAddQs", + // component: ExaminationPaperAddQs, + // parent: "examinationPaper", + // children: [] + // }, + // { + // path: "/examinationPaperEdit", + // iconCls: "", + // name: "修改答题卡", + // component: ExaminationPaperEdit, + // parent: "examinationPaper", + // children: [] + // }, + // { + // path: "/examinationPaperRecycle", + // iconCls: "", + // name: "回收站答题卡", + // component: ExaminationPaperRecycle, + // parent: "examinationPaper", + // children: [] + // }, + // { + // path: "/examinationPaperArchiving", + // iconCls: "", + // name: "已归档答题卡", + // component: ExaminationPaperArchiving, + // parent: "examinationPaper", + // hidden: true, + // children: [] + // }, + // ] + // }, + // { + // path: "/ask", + // iconCls: "fa fa-bar-chart", + // name: "随堂问报表", + // component: Layout, + // alone: true, + // children: [ + // { + // path: "/ask", + // iconCls: "fa fa-bar-chart", + // name: "ask", + // name: "随堂问报表", + // component: Ask, + // meta: { + // keepAlive: false, + // }, + // children: [] + + // }, + // { + // path: "/askList", + // iconCls: "fa fa-bar-chart", // 图标样式class + // name: "ask", + // name: "随堂问报表", + // component: AskList, + // meta: { + // keepAlive: true, + // }, + // children: [ + // { + // path: "/askAnalysis", + // iconCls: "", + // name: "随堂问报表分析", + // component: AskAnalysis, + // parent: "ask", + // children: [] + // }, + // { + // path: "/askArchiving", + // iconCls: "", + // name: "随堂问已归档报表分析", + // component: AskArchiving, + // parent: "ask", + // hidden: true, + // meta: { + // keepAlive: true, + // }, + // children: [] + // } + // ] + // }, + // ] + // }, + // { + // path: "/test", + // iconCls: "fa fa-pie-chart", + // name: "即时测报表", + // component: Layout, + // alone: true, + // children: [ + // { + // path: "/test", + // iconCls: "fa fa-pie-chart", + // name: "", + // component: Test, + // meta: { + // keepAlive: true, + // }, + // children: [] + // }, + // { + // path: "/testAnalysis", + // iconCls: "", + // name: "即时测报表分析", + // component: TestAnalysis, + // parent: "test", + // children: [] + // }, + // { + // path: "/testArchiving", + // iconCls: "", + // name: "即时测已归档报表分析", + // component: TestArchiving, + // parent: "test", + // hidden: true, + // meta: { + // keepAlive: true, + // }, + // children: [] + // } + + // ] + // }, + { path: "/examinationPaper", - iconCls: "fa fa-file-text", + iconCls: "fa fa-file-text", // 图标样式class name: "备题组卷", component: Layout, alone: true, children: [ { path: "/examinationPaper", - iconCls: "fa fa-file-text", + iconCls: "fa fa-file-text", // 图标样式class name: "examinationPaper", component: ExaminationPaper, children: [] }, { path: "/examinationPaperAdd", - iconCls: "", + iconCls: "", // 图标样式class name: "examinationPaperAdd", component: ExaminationPaperAdd, parent: "examinationPaper", @@ -811,7 +970,7 @@ const addroutersPersonal = [ }, { path: "/examinationPaperAddQs", - iconCls: "", + iconCls: "", // 图标样式class name: "examinationPaperAddQs", component: ExaminationPaperAddQs, parent: "examinationPaper", @@ -819,7 +978,7 @@ const addroutersPersonal = [ }, { path: "/examinationPaperEdit", - iconCls: "", + iconCls: "", // 图标样式class name: "修改答题卡", component: ExaminationPaperEdit, parent: "examinationPaper", @@ -827,7 +986,7 @@ const addroutersPersonal = [ }, { path: "/examinationPaperRecycle", - iconCls: "", + iconCls: "", // 图标样式class name: "回收站答题卡", component: ExaminationPaperRecycle, parent: "examinationPaper", @@ -835,7 +994,7 @@ const addroutersPersonal = [ }, { path: "/examinationPaperArchiving", - iconCls: "", + iconCls: "", // 图标样式class name: "已归档答题卡", component: ExaminationPaperArchiving, parent: "examinationPaper", @@ -846,91 +1005,97 @@ const addroutersPersonal = [ }, { path: "/ask", - iconCls: "fa fa-bar-chart", + iconCls: "fa fa-bar-chart", // 图标样式class name: "随堂问报表", component: Layout, alone: true, children: [ { path: "/ask", - iconCls: "fa fa-bar-chart", - name: "ask", + iconCls: "fa fa-bar-chart", // 图标样式class name: "随堂问报表", component: Ask, - meta: { - keepAlive: false, - }, children: [] }, { path: "/askList", iconCls: "fa fa-bar-chart", // 图标样式class - name: "ask", name: "随堂问报表", component: AskList, - meta: { - keepAlive: true, - }, children: [ { path: "/askAnalysis", - iconCls: "", + iconCls: "", // 图标样式class name: "随堂问报表分析", component: AskAnalysis, - parent: "ask", + parent: "askList", children: [] }, - { - path: "/askArchiving", - iconCls: "", - name: "随堂问已归档报表分析", - component: AskArchiving, - parent: "ask", - hidden: true, - children: [] - } - ] + + ], }, + { + path: "/askArchiving", + iconCls: "", // 图标样式class + name: "随堂问已归档报表分析", + component: AskArchiving, + parent: "ask", + hidden: true, + meta: { + keepAlive: true, + }, + children: [] + + } ] }, { path: "/test", - iconCls: "fa fa-pie-chart", + iconCls: "fa fa-pie-chart", // 图标样式class name: "即时测报表", component: Layout, alone: true, children: [ { path: "/test", - iconCls: "fa fa-pie-chart", + iconCls: "fa fa-pie-chart", // 图标样式class name: "", component: Test, - meta: { - keepAlive: true, - }, children: [] }, { - path: "/testAnalysis", - iconCls: "", - name: "即时测报表分析", - component: TestAnalysis, - parent: "test", - children: [] + path: "/testList", + name: "", + component: TestList, + + children: [ + { + path: "/testAnalysis", + iconCls: "", // 图标样式class + name: "即时测报表分析", + component: TestAnalysis, + parent: "test", + children: [] + }, + ] }, { path: "/testArchiving", - iconCls: "", + iconCls: "", // 图标样式class name: "即时测已归档报表分析", component: TestArchiving, parent: "test", hidden: true, + meta: { + keepAlive: true, + }, children: [] } ] }, + { path: "/portrait", iconCls: "fa fa-users", diff --git a/src/views/basic/ask/archiving.vue b/src/views/basic/ask/archiving.vue index 028d4f0..e9d28b4 100644 --- a/src/views/basic/ask/archiving.vue +++ b/src/views/basic/ask/archiving.vue @@ -88,7 +88,7 @@
{{ item.studentName }}
-+
+ {{ clazz.gradeName }}﹒{{ clazz.className }} -
{{ @@ -181,7 +186,7 @@ : "" }} - +答题器:{{ item.clickerSn || "--" }}
长学号:{{ item.studentCode }}
短学号:{{ item.shortNumber || "--" }}
@@ -218,7 +223,26 @@@@ -379,7 +410,7 @@ export default { diaChangeClassTrack: false, formClassTrack: { studentName: "", - className: "", + className: [], classList: [], }, clazzDetail: { stationSn: "", pairingCode: "", frequency: "" }, @@ -413,6 +444,7 @@ export default { oldClassId: "", className: "", classId: "", + classList: "", studentCode: "", }, rulesStuCla: { @@ -491,7 +523,7 @@ export default { }); //导入成功 this.diaUp = false; - await this._QueryClazz(this.query.grade); + await this._QueryClazz(this.query.grade, this.query.classType); this._QueryData(); }, //添加学生 @@ -523,7 +555,7 @@ export default { if (status === 0) { this.$message.success(info); this.diaStu = false; - await this._QueryClazz(this.query.grade); + await this._QueryClazz(this.query.grade, this.query.classType); this._QueryData(); } else { this.$message.error(info); @@ -542,16 +574,17 @@ export default { //学生调班弹窗 openChangeClazz(obj) { console.log(obj); - if (this.query.grade == 80 || !this.query.grade) { - this._QueryClazz(obj.grade); - } this.formStuCla.classId = ""; this.formStuCla.studentId = obj.id; + this.formStuCla.classList = obj.classList || []; this.formStuCla.className = obj.classList && obj.classList[0]?.className; this.formStuCla.studentName = obj.studentName; this.formStuCla.studentCode = obj.studentCode; this.formStuCla.oldClassId = obj.classList && obj.classList[0]?.id; this.diaChangeClass = true; + if (this.query.grade == 80 || !this.query.grade) { + this.changeClazz(); + } }, //学生调班 changeStu: _.throttle( @@ -573,7 +606,7 @@ export default { if (status == 0) { this.diaChangeClass = false; this.$message.success(info); - await this._QueryClazz(this.query.grade); + await this._QueryClazz(this.query.grade, this.query.classType); this._QueryData(); } else { this.$message.error(info); @@ -595,8 +628,7 @@ export default { }); this.loadingClassLogs = false; if (status == 0) { - this.formClassTrack.className = - (obj.classList && obj.classList[0]?.className) || ""; + this.formClassTrack.className = obj.classList || {}; this.formClassTrack.studentName = obj.studentName; this.formClassTrack.classList = (data.list && [...data.list]) || []; } else { @@ -605,7 +637,7 @@ export default { }, async removeStu(obj, index, $event) { let query = {}; - if (obj.classList && obj.classList.length) { + if (obj.classList && obj.classList.length == 1) { query.classId = obj.classList[0].id; } const { data, status, info } = await this.$request.delStudent({ @@ -615,7 +647,7 @@ export default { }); if (status === 0) { this.$message.success("删除成功"); - await this._QueryClazz(this.query.grade); + await this._QueryClazz(this.query.grade, this.query.classType); // this._QueryData(); this.studentList.splice(index, 1); } else { @@ -731,11 +763,25 @@ export default { this.$message.error(info); } }, - async _QueryClazz(value) { + changeClazz() { + let grade = ""; + let classType = ""; + this.formStuCla.classList.map((item) => { + if (this.formStuCla.oldClassId == item.id) { + console.log(item); + classType = item.classType; + grade = item.grade; + } + }); + this._QueryClazz(grade, classType); + }, + async _QueryClazz(value, classType) { this.classList = []; + let query = {}; + value !== "" ? (query.grade = value) : ""; + classType !== "" ? (query.type = classType) : ""; const { data, status, info } = await this.$request.schoolClassList({ - grade: value, - type: this.query.classType, + ...query, }); if (status === 0) { this.classList = (data.list && [...data?.list]) || []; diff --git a/src/views/basic/test/archiving.vue b/src/views/basic/test/archiving.vue index 9c51c60..4dd9d93 100644 --- a/src/views/basic/test/archiving.vue +++ b/src/views/basic/test/archiving.vue @@ -88,7 +88,7 @@