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 | 149 | align="center" |
| 150 | 150 | ></el-table-column> |
| 151 | 151 | <el-table-column |
| 152 | - prop="duration" | |
| 152 | + prop="consumingDuration" | |
| 153 | 153 | label="答题耗时" |
| 154 | 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 | 156 | <el-table-column |
| 157 | 157 | prop="correctAnswerTimes" |
| 158 | 158 | label="答对次数" | ... | ... |
src/views/ask/index.vue
| ... | ... | @@ -375,7 +375,13 @@ |
| 375 | 375 | align="center" |
| 376 | 376 | ></el-table-column> |
| 377 | 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 | 385 | <el-table-column |
| 380 | 386 | prop="studentCode" |
| 381 | 387 | label="学号" |
| ... | ... | @@ -465,6 +471,7 @@ |
| 465 | 471 | |
| 466 | 472 | <script> |
| 467 | 473 | import { formatDate, deepClone, downloadFile } from "utils"; |
| 474 | +import BusEvent from "@/utils/busEvent"; | |
| 468 | 475 | export default { |
| 469 | 476 | data() { |
| 470 | 477 | return { |
| ... | ... | @@ -512,6 +519,20 @@ export default { |
| 512 | 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 | 536 | methods: { |
| 516 | 537 | changeSub(val) { |
| 517 | 538 | let sub; | ... | ... |
src/views/device/index.vue
| ... | ... | @@ -327,6 +327,11 @@ |
| 327 | 327 | @selection-change="handleSelectionChange" |
| 328 | 328 | > |
| 329 | 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 | 335 | <el-table-column prop="class" label="关联班级" align="center" |
| 331 | 336 | ><template slot-scope="scoped"> |
| 332 | 337 | <p v-for="(item, index) in scoped.row.classList" :key="index"> | ... | ... |
src/views/layout/aside/aside.vue
| ... | ... | @@ -2,9 +2,14 @@ |
| 2 | 2 | <div class="aside-box"> |
| 3 | 3 | <el-aside id="asideNav"> |
| 4 | 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 | 11 | <template v-else> |
| 7 | - <img class="logo" :src="code?csLogo:logo" alt="" /> | |
| 12 | + <img class="logo" :src="code ? csLogo : logo" alt="" /> | |
| 8 | 13 | <p class="ellipsis"> |
| 9 | 14 | {{ code ? "331互动课堂云平台" : "中天易教云平台" }} |
| 10 | 15 | </p> |
| ... | ... | @@ -56,8 +61,9 @@ |
| 56 | 61 | <script> |
| 57 | 62 | import menuTree from "./menuTree"; |
| 58 | 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 | 67 | export default { |
| 62 | 68 | name: "asideNav", |
| 63 | 69 | components: { |
| ... | ... | @@ -68,14 +74,15 @@ export default { |
| 68 | 74 | "$route.path": function (val) { |
| 69 | 75 | // this.selectmenu(val); |
| 70 | 76 | this.path = val; |
| 77 | + BusEvent.$off("keepAlive"); | |
| 71 | 78 | }, |
| 72 | 79 | }, |
| 73 | 80 | data() { |
| 74 | 81 | return { |
| 75 | 82 | path: "", |
| 76 | 83 | code: "", |
| 77 | - logo:logo, | |
| 78 | - csLogo:csLogo, | |
| 84 | + logo: logo, | |
| 85 | + csLogo: csLogo, | |
| 79 | 86 | }; |
| 80 | 87 | }, |
| 81 | 88 | created() { |
| ... | ... | @@ -83,6 +90,9 @@ export default { |
| 83 | 90 | this.path = this.$route.path; |
| 84 | 91 | }, |
| 85 | 92 | methods: { |
| 93 | + isKeep() { | |
| 94 | + BusEvent.$emit("keepAlive"); | |
| 95 | + }, | |
| 86 | 96 | selectmenu(key, indexpath) { |
| 87 | 97 | // 如果不使用 elemenUI 菜单的 vue-router 的模式将用以下方式进行页面跳转 el-menu的router设置为false |
| 88 | 98 | // this.$router.push(indexpath.join("/")) | ... | ... |
src/views/layout/layout.vue
| ... | ... | @@ -5,17 +5,17 @@ |
| 5 | 5 | <el-container> |
| 6 | 6 | <layoutHeader></layoutHeader> |
| 7 | 7 | <el-main id="elmain"> |
| 8 | - <!-- <transition name="main" mode="out-in"> | |
| 8 | + <transition name="main" mode="out-in"> | |
| 9 | 9 | <keep-alive key="keepAlive"> |
| 10 | 10 | <router-view v-if="$route.meta.keepAlive" ></router-view> |
| 11 | 11 | </keep-alive> |
| 12 | 12 | </transition> |
| 13 | 13 | <transition name="main" mode="out-in"> |
| 14 | 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 | 15 | </transition> |
| 16 | + <!-- <transition name="main" mode="out-in"> | |
| 17 | + <router-view key="not-keepAlive"></router-view> | |
| 18 | + </transition> --> | |
| 19 | 19 | </el-main> |
| 20 | 20 | <el-footer height="28px"> |
| 21 | 21 | <Bottom></Bottom> | ... | ... |
src/views/login/index.vue
| ... | ... | @@ -95,14 +95,14 @@ export default { |
| 95 | 95 | loginForm: { |
| 96 | 96 | // username: "15911715665", |
| 97 | 97 | // password: "715665", |
| 98 | - username: "18314340313", | |
| 99 | - password: "Pw340313#", | |
| 98 | + // username: "18314340313", | |
| 99 | + // password: "Pw340313#", | |
| 100 | 100 | // username: "18687826606", |
| 101 | 101 | // password: "Pw826606#", |
| 102 | 102 | // username: "18893712576", |
| 103 | 103 | // password: "712576", |
| 104 | - // username: "13247726488", | |
| 105 | - // password: "726488", | |
| 104 | + username: "13247726488", | |
| 105 | + password: "726488", | |
| 106 | 106 | }, |
| 107 | 107 | loginRules: { |
| 108 | 108 | username: [ | ... | ... |
src/views/test/analysis.vue
src/views/test/index.vue
| ... | ... | @@ -122,7 +122,7 @@ |
| 122 | 122 | <el-table-column |
| 123 | 123 | prop="examStartTime" |
| 124 | 124 | label="测验时间" |
| 125 | - width="160" | |
| 125 | + width="100" | |
| 126 | 126 | align="center" |
| 127 | 127 | ></el-table-column> |
| 128 | 128 | <el-table-column prop="avgScore" label="班平均分" align="center" |
| ... | ... | @@ -467,6 +467,7 @@ |
| 467 | 467 | <script> |
| 468 | 468 | import { formatDate, downloadFile } from "utils"; |
| 469 | 469 | import editAnswer from "./editAnswer.vue"; |
| 470 | +import BusEvent from "@/utils/busEvent"; | |
| 470 | 471 | export default { |
| 471 | 472 | components: { editAnswer }, |
| 472 | 473 | data() { |
| ... | ... | @@ -517,6 +518,19 @@ export default { |
| 517 | 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 | 534 | methods: { |
| 521 | 535 | changeSub(val) { |
| 522 | 536 | let sub; | ... | ... |