Commit a0d493483597526a006db67549fd9bb5d1d5bf06
1 parent
bbc51d4b
授课端管理添加设备编码,随堂问、即时测缓存状态
Showing
8 changed files
with
69 additions
and
19 deletions
src/views/ask/analysis.vue
@@ -149,10 +149,10 @@ | @@ -149,10 +149,10 @@ | ||
149 | align="center" | 149 | align="center" |
150 | ></el-table-column> | 150 | ></el-table-column> |
151 | <el-table-column | 151 | <el-table-column |
152 | - prop="duration" | 152 | + prop="consumingDuration" |
153 | label="答题耗时" | 153 | label="答题耗时" |
154 | align="center" | 154 | align="center" |
155 | - ><template slot-scope="scoped">{{setDuration(scoped.row.duration)}}</template></el-table-column> | 155 | + ><template slot-scope="scoped">{{setDuration(scoped.row.consumingDuration)}}</template></el-table-column> |
156 | <el-table-column | 156 | <el-table-column |
157 | prop="correctAnswerTimes" | 157 | prop="correctAnswerTimes" |
158 | label="答对次数" | 158 | label="答对次数" |
src/views/ask/index.vue
@@ -375,7 +375,13 @@ | @@ -375,7 +375,13 @@ | ||
375 | align="center" | 375 | align="center" |
376 | ></el-table-column> | 376 | ></el-table-column> |
377 | </el-table> | 377 | </el-table> |
378 | - <el-table v-else :max-height="tableMaxHeight" :data="tableData" border style="width: 100%"> | 378 | + <el-table |
379 | + v-else | ||
380 | + :max-height="tableMaxHeight" | ||
381 | + :data="tableData" | ||
382 | + border | ||
383 | + style="width: 100%" | ||
384 | + > | ||
379 | <el-table-column | 385 | <el-table-column |
380 | prop="studentCode" | 386 | prop="studentCode" |
381 | label="学号" | 387 | label="学号" |
@@ -465,6 +471,7 @@ | @@ -465,6 +471,7 @@ | ||
465 | 471 | ||
466 | <script> | 472 | <script> |
467 | import { formatDate, deepClone, downloadFile } from "utils"; | 473 | import { formatDate, deepClone, downloadFile } from "utils"; |
474 | +import BusEvent from "@/utils/busEvent"; | ||
468 | export default { | 475 | export default { |
469 | data() { | 476 | data() { |
470 | return { | 477 | return { |
@@ -512,6 +519,20 @@ export default { | @@ -512,6 +519,20 @@ export default { | ||
512 | this.query.endDay = new Date(); | 519 | this.query.endDay = new Date(); |
513 | } | 520 | } |
514 | }, | 521 | }, |
522 | + activated() { | ||
523 | + const that = this; | ||
524 | + BusEvent.$on("keepAlive", async function () { | ||
525 | + that.query.subjectNames = that.role == "ROLE_BANZHUREN" ? [] : ""; | ||
526 | + await that._QueryClassList(); | ||
527 | + await that._QuerySubjectList(); | ||
528 | + await that.setDate(1); | ||
529 | + let startDay = that.query?.startDay; | ||
530 | + if (!startDay) { | ||
531 | + that.query.startDay = new Date(); | ||
532 | + that.query.endDay = new Date(); | ||
533 | + } | ||
534 | + }); | ||
535 | + }, | ||
515 | methods: { | 536 | methods: { |
516 | changeSub(val) { | 537 | changeSub(val) { |
517 | let sub; | 538 | let sub; |
src/views/device/index.vue
@@ -327,6 +327,11 @@ | @@ -327,6 +327,11 @@ | ||
327 | @selection-change="handleSelectionChange" | 327 | @selection-change="handleSelectionChange" |
328 | > | 328 | > |
329 | <el-table-column type="selection" width="55"></el-table-column> | 329 | <el-table-column type="selection" width="55"></el-table-column> |
330 | + <el-table-column | ||
331 | + prop="sn" | ||
332 | + label="设备编码" | ||
333 | + align="center" | ||
334 | + ></el-table-column> | ||
330 | <el-table-column prop="class" label="关联班级" align="center" | 335 | <el-table-column prop="class" label="关联班级" align="center" |
331 | ><template slot-scope="scoped"> | 336 | ><template slot-scope="scoped"> |
332 | <p v-for="(item, index) in scoped.row.classList" :key="index"> | 337 | <p v-for="(item, index) in scoped.row.classList" :key="index"> |
src/views/layout/aside/aside.vue
@@ -2,9 +2,14 @@ | @@ -2,9 +2,14 @@ | ||
2 | <div class="aside-box"> | 2 | <div class="aside-box"> |
3 | <el-aside id="asideNav"> | 3 | <el-aside id="asideNav"> |
4 | <div class="logo-name"> | 4 | <div class="logo-name"> |
5 | - <img v-if="$store.getters.logoShow" class="logo" :src="code?csLogo:logo" alt="" /> | 5 | + <img |
6 | + v-if="$store.getters.logoShow" | ||
7 | + class="logo" | ||
8 | + :src="code ? csLogo : logo" | ||
9 | + alt="" | ||
10 | + /> | ||
6 | <template v-else> | 11 | <template v-else> |
7 | - <img class="logo" :src="code?csLogo:logo" alt="" /> | 12 | + <img class="logo" :src="code ? csLogo : logo" alt="" /> |
8 | <p class="ellipsis"> | 13 | <p class="ellipsis"> |
9 | {{ code ? "331互动课堂云平台" : "中天易教云平台" }} | 14 | {{ code ? "331互动课堂云平台" : "中天易教云平台" }} |
10 | </p> | 15 | </p> |
@@ -56,8 +61,9 @@ | @@ -56,8 +61,9 @@ | ||
56 | <script> | 61 | <script> |
57 | import menuTree from "./menuTree"; | 62 | import menuTree from "./menuTree"; |
58 | import { getURLParams } from "@/utils"; | 63 | import { getURLParams } from "@/utils"; |
59 | -const logo = require('../../../assets/images/logo.png') | ||
60 | -const csLogo = require('../../../assets/images/331logo.png') | 64 | +import BusEvent from "@/utils/busEvent"; |
65 | +const logo = require("../../../assets/images/logo.png"); | ||
66 | +const csLogo = require("../../../assets/images/331logo.png"); | ||
61 | export default { | 67 | export default { |
62 | name: "asideNav", | 68 | name: "asideNav", |
63 | components: { | 69 | components: { |
@@ -68,14 +74,15 @@ export default { | @@ -68,14 +74,15 @@ export default { | ||
68 | "$route.path": function (val) { | 74 | "$route.path": function (val) { |
69 | // this.selectmenu(val); | 75 | // this.selectmenu(val); |
70 | this.path = val; | 76 | this.path = val; |
77 | + BusEvent.$off("keepAlive"); | ||
71 | }, | 78 | }, |
72 | }, | 79 | }, |
73 | data() { | 80 | data() { |
74 | return { | 81 | return { |
75 | path: "", | 82 | path: "", |
76 | code: "", | 83 | code: "", |
77 | - logo:logo, | ||
78 | - csLogo:csLogo, | 84 | + logo: logo, |
85 | + csLogo: csLogo, | ||
79 | }; | 86 | }; |
80 | }, | 87 | }, |
81 | created() { | 88 | created() { |
@@ -83,6 +90,9 @@ export default { | @@ -83,6 +90,9 @@ export default { | ||
83 | this.path = this.$route.path; | 90 | this.path = this.$route.path; |
84 | }, | 91 | }, |
85 | methods: { | 92 | methods: { |
93 | + isKeep() { | ||
94 | + BusEvent.$emit("keepAlive"); | ||
95 | + }, | ||
86 | selectmenu(key, indexpath) { | 96 | selectmenu(key, indexpath) { |
87 | // 如果不使用 elemenUI 菜单的 vue-router 的模式将用以下方式进行页面跳转 el-menu的router设置为false | 97 | // 如果不使用 elemenUI 菜单的 vue-router 的模式将用以下方式进行页面跳转 el-menu的router设置为false |
88 | // this.$router.push(indexpath.join("/")) | 98 | // this.$router.push(indexpath.join("/")) |
src/views/layout/layout.vue
@@ -5,17 +5,17 @@ | @@ -5,17 +5,17 @@ | ||
5 | <el-container> | 5 | <el-container> |
6 | <layoutHeader></layoutHeader> | 6 | <layoutHeader></layoutHeader> |
7 | <el-main id="elmain"> | 7 | <el-main id="elmain"> |
8 | - <!-- <transition name="main" mode="out-in"> | 8 | + <transition name="main" mode="out-in"> |
9 | <keep-alive key="keepAlive"> | 9 | <keep-alive key="keepAlive"> |
10 | <router-view v-if="$route.meta.keepAlive" ></router-view> | 10 | <router-view v-if="$route.meta.keepAlive" ></router-view> |
11 | </keep-alive> | 11 | </keep-alive> |
12 | </transition> | 12 | </transition> |
13 | <transition name="main" mode="out-in"> | 13 | <transition name="main" mode="out-in"> |
14 | <router-view v-if="!$route.meta.keepAlive" key="not-keepAlive"></router-view> | 14 | <router-view v-if="!$route.meta.keepAlive" key="not-keepAlive"></router-view> |
15 | - </transition> --> | ||
16 | - <transition name="main" mode="out-in"> | ||
17 | - <router-view key="not-keepAlive"></router-view> | ||
18 | </transition> | 15 | </transition> |
16 | + <!-- <transition name="main" mode="out-in"> | ||
17 | + <router-view key="not-keepAlive"></router-view> | ||
18 | + </transition> --> | ||
19 | </el-main> | 19 | </el-main> |
20 | <el-footer height="28px"> | 20 | <el-footer height="28px"> |
21 | <Bottom></Bottom> | 21 | <Bottom></Bottom> |
src/views/login/index.vue
@@ -95,14 +95,14 @@ export default { | @@ -95,14 +95,14 @@ export default { | ||
95 | loginForm: { | 95 | loginForm: { |
96 | // username: "15911715665", | 96 | // username: "15911715665", |
97 | // password: "715665", | 97 | // password: "715665", |
98 | - username: "18314340313", | ||
99 | - password: "Pw340313#", | 98 | + // username: "18314340313", |
99 | + // password: "Pw340313#", | ||
100 | // username: "18687826606", | 100 | // username: "18687826606", |
101 | // password: "Pw826606#", | 101 | // password: "Pw826606#", |
102 | // username: "18893712576", | 102 | // username: "18893712576", |
103 | // password: "712576", | 103 | // password: "712576", |
104 | - // username: "13247726488", | ||
105 | - // password: "726488", | 104 | + username: "13247726488", |
105 | + password: "726488", | ||
106 | }, | 106 | }, |
107 | loginRules: { | 107 | loginRules: { |
108 | username: [ | 108 | username: [ |
src/views/test/analysis.vue
@@ -341,7 +341,7 @@ | @@ -341,7 +341,7 @@ | ||
341 | > | 341 | > |
342 | <template slot-scope="scope"> | 342 | <template slot-scope="scope"> |
343 | <span | 343 | <span |
344 | - v-if="tableData[index].questionType==5" | 344 | + v-if="tableData[index]?.questionType==5" |
345 | >*</span> | 345 | >*</span> |
346 | <span | 346 | <span |
347 | v-else-if="scope.row['answer' + item.id]" | 347 | v-else-if="scope.row['answer' + item.id]" |
src/views/test/index.vue
@@ -122,7 +122,7 @@ | @@ -122,7 +122,7 @@ | ||
122 | <el-table-column | 122 | <el-table-column |
123 | prop="examStartTime" | 123 | prop="examStartTime" |
124 | label="测验时间" | 124 | label="测验时间" |
125 | - width="160" | 125 | + width="100" |
126 | align="center" | 126 | align="center" |
127 | ></el-table-column> | 127 | ></el-table-column> |
128 | <el-table-column prop="avgScore" label="班平均分" align="center" | 128 | <el-table-column prop="avgScore" label="班平均分" align="center" |
@@ -467,6 +467,7 @@ | @@ -467,6 +467,7 @@ | ||
467 | <script> | 467 | <script> |
468 | import { formatDate, downloadFile } from "utils"; | 468 | import { formatDate, downloadFile } from "utils"; |
469 | import editAnswer from "./editAnswer.vue"; | 469 | import editAnswer from "./editAnswer.vue"; |
470 | +import BusEvent from "@/utils/busEvent"; | ||
470 | export default { | 471 | export default { |
471 | components: { editAnswer }, | 472 | components: { editAnswer }, |
472 | data() { | 473 | data() { |
@@ -517,6 +518,19 @@ export default { | @@ -517,6 +518,19 @@ export default { | ||
517 | this.query.endDay = new Date(); | 518 | this.query.endDay = new Date(); |
518 | } | 519 | } |
519 | }, | 520 | }, |
521 | + activated() { | ||
522 | + const that = this; | ||
523 | + BusEvent.$on("keepAlive", async function () { | ||
524 | + await that._QueryClassList(); | ||
525 | + await that._QuerySubjectList(); | ||
526 | + await that.setDate(1); | ||
527 | + let startDay = that.query?.startDay; | ||
528 | + if (!startDay) { | ||
529 | + that.query.startDay = new Date(); | ||
530 | + that.query.endDay = new Date(); | ||
531 | + } | ||
532 | + }); | ||
533 | + }, | ||
520 | methods: { | 534 | methods: { |
521 | changeSub(val) { | 535 | changeSub(val) { |
522 | let sub; | 536 | let sub; |