Commit 5be3bb709e91bf297b3ae3e49f0588b89b11251d
1 parent
addb60e3
切换账号,缓存组件接口报错问题
Showing
6 changed files
with
46 additions
and
15 deletions
src/router/index.js
@@ -282,9 +282,9 @@ let addrouters = [ //测试用,后续后端获取 | @@ -282,9 +282,9 @@ let addrouters = [ //测试用,后续后端获取 | ||
282 | iconCls: "fa fa-dashboard", // 图标样式class | 282 | iconCls: "fa fa-dashboard", // 图标样式class |
283 | name: "", | 283 | name: "", |
284 | component: Device, | 284 | component: Device, |
285 | - // meta: { | ||
286 | - // keepAlive: true, | ||
287 | - // }, | 285 | + meta: { |
286 | + keepAlive: true, | ||
287 | + }, | ||
288 | children: [] | 288 | children: [] |
289 | }, | 289 | }, |
290 | { | 290 | { |
src/views/card/index.vue
@@ -100,6 +100,7 @@ | @@ -100,6 +100,7 @@ | ||
100 | export default { | 100 | export default { |
101 | data() { | 101 | data() { |
102 | return { | 102 | return { |
103 | + loading:false, | ||
103 | props: { multiple: true, checkStrictly: false }, | 104 | props: { multiple: true, checkStrictly: false }, |
104 | query: { | 105 | query: { |
105 | classId: [], | 106 | classId: [], |
src/views/device/index.vue
@@ -60,12 +60,13 @@ | @@ -60,12 +60,13 @@ | ||
60 | <div class="sel-box"> | 60 | <div class="sel-box"> |
61 | <el-cascader | 61 | <el-cascader |
62 | size="small" | 62 | size="small" |
63 | - class="sel" | 63 | + class="sel sel2" |
64 | clearable | 64 | clearable |
65 | placeholder="选择班级" | 65 | placeholder="选择班级" |
66 | v-model="query.classId" | 66 | v-model="query.classId" |
67 | :options="gradeList" | 67 | :options="gradeList" |
68 | :props="props" | 68 | :props="props" |
69 | + collapse-tags | ||
69 | :show-all-levels="false" | 70 | :show-all-levels="false" |
70 | ></el-cascader> | 71 | ></el-cascader> |
71 | <el-select | 72 | <el-select |
@@ -196,12 +197,13 @@ | @@ -196,12 +197,13 @@ | ||
196 | <div class="sel-box"> | 197 | <div class="sel-box"> |
197 | <el-cascader | 198 | <el-cascader |
198 | size="small" | 199 | size="small" |
199 | - class="sel" | 200 | + class="sel sel2" |
200 | clearable | 201 | clearable |
201 | placeholder="选择班级" | 202 | placeholder="选择班级" |
202 | v-model="query.classId" | 203 | v-model="query.classId" |
203 | :options="gradeList" | 204 | :options="gradeList" |
204 | :props="props" | 205 | :props="props" |
206 | + collapse-tags | ||
205 | :show-all-levels="false" | 207 | :show-all-levels="false" |
206 | ></el-cascader> | 208 | ></el-cascader> |
207 | <el-select | 209 | <el-select |
@@ -299,12 +301,13 @@ | @@ -299,12 +301,13 @@ | ||
299 | <div class="sel-box"> | 301 | <div class="sel-box"> |
300 | <el-cascader | 302 | <el-cascader |
301 | size="small" | 303 | size="small" |
302 | - class="sel" | 304 | + class="sel sel2" |
303 | clearable | 305 | clearable |
304 | placeholder="选择班级" | 306 | placeholder="选择班级" |
305 | v-model="query.classId" | 307 | v-model="query.classId" |
306 | :options="gradeList" | 308 | :options="gradeList" |
307 | :props="props" | 309 | :props="props" |
310 | + collapse-tags | ||
308 | :show-all-levels="false" | 311 | :show-all-levels="false" |
309 | @change="_QueryData(false)" | 312 | @change="_QueryData(false)" |
310 | ></el-cascader> | 313 | ></el-cascader> |
@@ -497,6 +500,7 @@ import scatterChart from "@/components/charts/scatterChart"; | @@ -497,6 +500,7 @@ import scatterChart from "@/components/charts/scatterChart"; | ||
497 | import _ from "lodash"; | 500 | import _ from "lodash"; |
498 | import { downloadFile, formatClass, formatGradeNameClass } from "@/utils"; | 501 | import { downloadFile, formatClass, formatGradeNameClass } from "@/utils"; |
499 | import api from "@/api/apis/apis"; | 502 | import api from "@/api/apis/apis"; |
503 | +import BusEvent from "@/utils/busEvent"; | ||
500 | export default { | 504 | export default { |
501 | components: { pieChart, scatterChart }, | 505 | components: { pieChart, scatterChart }, |
502 | watch: { | 506 | watch: { |
@@ -627,6 +631,21 @@ export default { | @@ -627,6 +631,21 @@ export default { | ||
627 | this.showSchool(); | 631 | this.showSchool(); |
628 | } | 632 | } |
629 | }, | 633 | }, |
634 | + activated() { | ||
635 | + const that = this; | ||
636 | + BusEvent.$on("keepAlive", async function () { | ||
637 | + that.type = 1; | ||
638 | + that.page = 1; | ||
639 | + that.total = 0; | ||
640 | + that.count = 0; | ||
641 | + that.query.classId = []; | ||
642 | + that.query.onlineStatus = ""; | ||
643 | + that.query.sn = ""; | ||
644 | + that.query.type = ""; | ||
645 | + that.stationReport(); | ||
646 | + that._QueryData(); | ||
647 | + }); | ||
648 | + }, | ||
630 | methods: { | 649 | methods: { |
631 | upSuccess() { | 650 | upSuccess() { |
632 | //导入成功 | 651 | //导入成功 |
@@ -1073,9 +1092,6 @@ export default { | @@ -1073,9 +1092,6 @@ export default { | ||
1073 | .tab-box { | 1092 | .tab-box { |
1074 | padding: 20px 0 12px; | 1093 | padding: 20px 0 12px; |
1075 | } | 1094 | } |
1076 | -.sel { | ||
1077 | - width: 100%; | ||
1078 | -} | ||
1079 | .content { | 1095 | .content { |
1080 | background: #f8f8f8; | 1096 | background: #f8f8f8; |
1081 | border: 1px solid #e2e2e2; | 1097 | border: 1px solid #e2e2e2; |
src/views/layout/header/header.vue
@@ -139,6 +139,7 @@ export default { | @@ -139,6 +139,7 @@ export default { | ||
139 | this.$router.push({ | 139 | this.$router.push({ |
140 | path: "/login", | 140 | path: "/login", |
141 | }); | 141 | }); |
142 | + window.location.reload() | ||
142 | } | 143 | } |
143 | } else { | 144 | } else { |
144 | this.$message.error(message); | 145 | this.$message.error(message); |
src/views/setUp/account.vue
@@ -26,6 +26,16 @@ | @@ -26,6 +26,16 @@ | ||
26 | @click="openAddDia" | 26 | @click="openAddDia" |
27 | ></el-button> | 27 | ></el-button> |
28 | </el-tooltip> | 28 | </el-tooltip> |
29 | + <el-tooltip effect="dark" content="账号同步" placement="bottom" v-else> | ||
30 | + <el-button | ||
31 | + type="primary" | ||
32 | + icon="el-icon-refresh" | ||
33 | + size="mini" | ||
34 | + plain | ||
35 | + circle | ||
36 | + @click="refreshAcc" | ||
37 | + ></el-button> | ||
38 | + </el-tooltip> | ||
29 | </template> | 39 | </template> |
30 | </back-box> | 40 | </back-box> |
31 | <div class="answer-header"> | 41 | <div class="answer-header"> |
@@ -429,6 +439,14 @@ export default { | @@ -429,6 +439,14 @@ export default { | ||
429 | this._QueryData(4); | 439 | this._QueryData(4); |
430 | }, | 440 | }, |
431 | methods: { | 441 | methods: { |
442 | + async refreshAcc(){//长水账号同步 | ||
443 | + const { data, status, info } = await this.$request.roleList(); | ||
444 | + if (status === 0) { | ||
445 | + this._QueryData(4); | ||
446 | + } else { | ||
447 | + this.$message.error(info); | ||
448 | + } | ||
449 | + }, | ||
432 | upSuccess() { | 450 | upSuccess() { |
433 | //导入成功 | 451 | //导入成功 |
434 | this.diaUp = false; | 452 | this.diaUp = false; |
src/views/setUp/student.vue
@@ -96,12 +96,7 @@ | @@ -96,12 +96,7 @@ | ||
96 | <i class="el-icon-delete" slot="reference"></i> | 96 | <i class="el-icon-delete" slot="reference"></i> |
97 | </el-popconfirm> | 97 | </el-popconfirm> |
98 | <p class="name">{{ item.studentName }}</p> | 98 | <p class="name">{{ item.studentName }}</p> |
99 | - <p class="p1"> | ||
100 | - 答题器:{{ | ||
101 | - (item.clickerList.length && item.clickerList[0].clickerSn) || | ||
102 | - "--" | ||
103 | - }} | ||
104 | - </p> | 99 | + <p class="p1">答题器:{{ item.clickerSn || "--" }}</p> |
105 | <p class="p1">长学号:{{ item.studentCode }}</p> | 100 | <p class="p1">长学号:{{ item.studentCode }}</p> |
106 | <p class="p1">短学号:{{ item.shortNumber || "--" }}</p> | 101 | <p class="p1">短学号:{{ item.shortNumber || "--" }}</p> |
107 | </li> | 102 | </li> |