Commit 6d7bd86229932a5de41defb9a7ddb17252985e95
1 parent
9309dc5d
飞书bug
Showing
17 changed files
with
165 additions
and
158 deletions
public/331icon.ico
0 → 100644
No preview for this file type
public/index.html
... | ... | @@ -5,13 +5,21 @@ |
5 | 5 | <meta charset="utf-8"> |
6 | 6 | <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
7 | 7 | <meta name="viewport" content="width=device-width,initial-scale=1.0"> |
8 | - <link rel="icon" href="<%= BASE_URL %>favicon.ico"> | |
8 | + <!-- <link rel="icon" href="<%= BASE_URL %>favicon.ico"> --> | |
9 | 9 | <title> |
10 | 10 | <%= htmlWebpackPlugin.options.title %> |
11 | 11 | </title> |
12 | 12 | </head> |
13 | 13 | |
14 | 14 | <body> |
15 | + <script> | |
16 | + var link = document.querySelector("link[rel*='icon']") || document.createElement('link'); | |
17 | + link.type = 'image/x-icon'; | |
18 | + link.rel = 'shortcut icon'; | |
19 | + var csCode = localStorage.getItem("csCode")||"" | |
20 | + link.href = csCode?"./331icon.ico":"./favicon.ico"; | |
21 | + document.getElementsByTagName('head')[0].appendChild(link); | |
22 | + </script> | |
15 | 23 | <noscript> |
16 | 24 | <strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. |
17 | 25 | Please enable it to continue.</strong> | ... | ... |
src/api/axios.js
... | ... | @@ -56,6 +56,7 @@ service.interceptors.response.use( |
56 | 56 | } |
57 | 57 | } |
58 | 58 | } |
59 | + return | |
59 | 60 | } else { |
60 | 61 | // Cookies.set("access_token", response.data.message, { expires: 1 / 12 }) |
61 | 62 | } |
... | ... | @@ -64,32 +65,25 @@ service.interceptors.response.use( |
64 | 65 | }, |
65 | 66 | (error) => { |
66 | 67 | const { data, status } = error.response; |
67 | - | |
68 | - Message({ | |
69 | - message: error, | |
70 | - type: "error", | |
71 | - duration: 3 * 1000, | |
72 | - }); | |
73 | 68 | if (error.response == undefined) { |
74 | 69 | return Promise.reject(error); |
75 | 70 | } |
76 | 71 | |
77 | 72 | if (status === 403 || status === 401) { |
78 | 73 | if (data.status === 999) { |
79 | - if (!location.href.includes("localhost")) { | |
80 | - if (data.data) { | |
74 | + debugger | |
75 | + console.log(data.data) | |
76 | + if (data.data) { | |
81 | 77 | window.location.href = data.data; |
82 | - } else { | |
83 | - router.push({ path: "/login" }); | |
84 | - if (res.message.includes("不存在")) { | |
85 | - Message({ | |
86 | - message: data.info, | |
87 | - type: "error", | |
88 | - duration: 3 * 1000, | |
89 | - }); | |
90 | - } | |
91 | - } | |
78 | + } else { | |
79 | + Message({ | |
80 | + message: data.info, | |
81 | + type: "error", | |
82 | + duration: 3 * 1000, | |
83 | + }); | |
84 | + router.push({ path: "/login" }); | |
92 | 85 | } |
86 | + return | |
93 | 87 | } |
94 | 88 | Message.closeAll(); |
95 | 89 | Message({ |
... | ... | @@ -109,6 +103,11 @@ service.interceptors.response.use( |
109 | 103 | } |
110 | 104 | return; |
111 | 105 | } |
106 | + Message({ | |
107 | + message: data.info || error, | |
108 | + type: "error", | |
109 | + duration: 3 * 1000, | |
110 | + }); | |
112 | 111 | return Promise.reject(error.response); // 返回接口返回的错误信息 |
113 | 112 | } |
114 | 113 | ); | ... | ... |
src/assets/images/331logo.png
0 → 100644
2.74 KB
src/assets/images/E/photo_cache/98d71c21c679eccd804eab61885fe378713eb851.dat deleted
No preview for this file type
src/router/index.js
src/store/index.js
... | ... | @@ -36,7 +36,7 @@ const store = new Vuex.Store({ |
36 | 36 | }, |
37 | 37 | setInfo(state, data) { |
38 | 38 | state.info = { ...data }; |
39 | - sessionStorage.setItem("info", JSON.stringify(state.info)); | |
39 | + sessionStorage.setItem("info", JSON.stringify(data)); | |
40 | 40 | }, |
41 | 41 | setRouters: (state, routers) => { |
42 | 42 | let aRouters = addrouters.filter((item) => { | ... | ... |
src/views/analysis/index.vue
... | ... | @@ -136,7 +136,7 @@ export default { |
136 | 136 | query: { |
137 | 137 | //搜索条件 |
138 | 138 | regionId: "", |
139 | - gradeName: "", | |
139 | + gradeName: "全部", | |
140 | 140 | startDay: "", |
141 | 141 | endDay: "", |
142 | 142 | day: "", |
... | ... | @@ -195,7 +195,7 @@ export default { |
195 | 195 | that.query.endDay = formatDate(new Date(), "yyyy-MM-dd"); |
196 | 196 | break; |
197 | 197 | case 4: |
198 | - if (aMonth > 1 && aMonth < 4) { | |
198 | + if (aMonth > 0 && aMonth < 4) { | |
199 | 199 | aMonth = "01"; |
200 | 200 | } else if (aMonth > 3 && aMonth < 7) { |
201 | 201 | aMonth = "04"; |
... | ... | @@ -239,7 +239,11 @@ export default { |
239 | 239 | let query = {}; |
240 | 240 | for (let key in this.query) { |
241 | 241 | if (this.query[key] != "") { |
242 | - query[key] = this.query[key]; | |
242 | + if (key == gradeName) { | |
243 | + query[key] = this.query[key]=="全部"?"":this.query[key]; | |
244 | + } else { | |
245 | + query[key] = this.query[key]; | |
246 | + } | |
243 | 247 | } |
244 | 248 | } |
245 | 249 | if (this.role == "ROLE_JITUAN") { |
... | ... | @@ -247,7 +251,7 @@ export default { |
247 | 251 | } else { |
248 | 252 | delete query.regionId; |
249 | 253 | } |
250 | - this.tableData=[] | |
254 | + this.tableData = []; | |
251 | 255 | const Contrast = |
252 | 256 | this.role != "ROLE_JITUAN" |
253 | 257 | ? this.$request.usageAnalysis |
... | ... | @@ -354,6 +358,10 @@ export default { |
354 | 358 | }; |
355 | 359 | return gradeList; |
356 | 360 | }) || []; |
361 | + this.gradeList.unshift({ | |
362 | + value: "", | |
363 | + label: "全部", | |
364 | + }); | |
357 | 365 | } else { |
358 | 366 | this.gradeList = |
359 | 367 | data.list?.map((item) => { | ... | ... |
src/views/ask/analysis.vue
... | ... | @@ -341,7 +341,7 @@ export default { |
341 | 341 | if (this.editLoading) return; |
342 | 342 | this.editLoading = true; |
343 | 343 | const { data, status, info } = await this.$request.periodQuestionList({ |
344 | - examId: this.id, | |
344 | + periodId: this.id, | |
345 | 345 | }); |
346 | 346 | this.editLoading = false; |
347 | 347 | if (status === 0) { | ... | ... |
src/views/card/index.vue
... | ... | @@ -100,17 +100,7 @@ export default { |
100 | 100 | studentCode: "", |
101 | 101 | }, |
102 | 102 | gradeList: [], |
103 | - tableData: [ | |
104 | - { | |
105 | - sn: 2543641, | |
106 | - className: "xxx", | |
107 | - studentName: "xxxx", | |
108 | - studentId: 563456, | |
109 | - type: "换卡", | |
110 | - desc: "xxxxx", | |
111 | - time: "20:00:00", | |
112 | - }, | |
113 | - ], | |
103 | + tableData: [], | |
114 | 104 | }; |
115 | 105 | }, |
116 | 106 | created() { | ... | ... |
src/views/device/index.vue
... | ... | @@ -99,7 +99,7 @@ |
99 | 99 | </div> |
100 | 100 | <el-table :data="tableData" border style="width: 100%"> |
101 | 101 | <el-table-column |
102 | - prop="deviceId" | |
102 | + prop="sn" | |
103 | 103 | label="设备编码" |
104 | 104 | align="center" |
105 | 105 | ></el-table-column> |
... | ... | @@ -126,23 +126,23 @@ |
126 | 126 | </template> |
127 | 127 | </el-table-column> |
128 | 128 | <el-table-column |
129 | - prop="otaVersionNumber" | |
129 | + prop="otaVersionName" | |
130 | 130 | label="固件版本号" |
131 | 131 | align="center" |
132 | 132 | ></el-table-column> |
133 | 133 | <el-table-column |
134 | - prop="latestReportTime" | |
134 | + prop="onlineTime" | |
135 | 135 | label="最近上报" |
136 | 136 | align="center" |
137 | 137 | ></el-table-column> |
138 | 138 | <el-table-column label="状态" align="center" |
139 | 139 | ><template slot-scope="scope"> |
140 | 140 | {{ |
141 | - scope.row.status == 1 | |
141 | + scope.row.onlineStatus == 1 | |
142 | 142 | ? "在线" |
143 | - : scope.row.status == 0 | |
144 | - ? "离线" | |
145 | - : "异常" | |
143 | + : scope.row.onlineStatus == 2 | |
144 | + ? "异常" | |
145 | + : "离线" | |
146 | 146 | }} |
147 | 147 | </template></el-table-column |
148 | 148 | > |
... | ... | @@ -175,7 +175,7 @@ |
175 | 175 | </el-table> |
176 | 176 | </div> |
177 | 177 | </div> |
178 | - <div v-if="type == 2"> | |
178 | + <div v-else-if="type == 2"> | |
179 | 179 | <div class="chart-box" v-if="count"> |
180 | 180 | <div class="device-num"> |
181 | 181 | <p class="p1">{{ count }}</p> |
... | ... | @@ -235,15 +235,15 @@ |
235 | 235 | </div> |
236 | 236 | <el-table :data="tableData" border style="width: 100%"> |
237 | 237 | <el-table-column |
238 | - prop="deviceId" | |
238 | + prop="sn" | |
239 | 239 | label="设备编码" |
240 | 240 | align="center" |
241 | 241 | ></el-table-column> |
242 | 242 | <el-table-column label="学生信息" align="center" |
243 | 243 | ><template slot-scope="scoped" |
244 | 244 | ><p |
245 | - v-for="item in scoped.row.studentList" | |
246 | - :key="item.studentId" | |
245 | + v-for="(item, index) in scoped.row.studentList" | |
246 | + :key="index" | |
247 | 247 | > |
248 | 248 | {{ item.studentName }} |
249 | 249 | </p></template |
... | ... | @@ -256,7 +256,7 @@ |
256 | 256 | ></el-table-column> |
257 | 257 | <el-table-column prop="class" label="关联班级" align="center"> |
258 | 258 | <template slot-scope="scoped"> |
259 | - <p v-for="item in scoped.row.classList" :key="item.classId"> | |
259 | + <p v-for="(item, index) in scoped.row.classList" :key="index"> | |
260 | 260 | {{ item.className }} |
261 | 261 | </p> |
262 | 262 | </template></el-table-column |
... | ... | @@ -291,7 +291,7 @@ |
291 | 291 | </el-table> |
292 | 292 | </div> |
293 | 293 | </div> |
294 | - <div v-if="type == 3"> | |
294 | + <div v-else-if="type == 3"> | |
295 | 295 | <div class="table-box"> |
296 | 296 | <div class="answer-header"> |
297 | 297 | <div class="sel-box"> |
... | ... | @@ -323,10 +323,10 @@ |
323 | 323 | style="width: 100%" |
324 | 324 | @selection-change="handleSelectionChange" |
325 | 325 | > |
326 | - <el-table-column type="selection" width="55"> </el-table-column> | |
326 | + <el-table-column type="selection" width="55"></el-table-column> | |
327 | 327 | <el-table-column prop="class" label="关联班级" align="center" |
328 | 328 | ><template slot-scope="scoped"> |
329 | - <p v-for="item in scoped.row.classList" :key="item.classId"> | |
329 | + <p v-for="(item, index) in scoped.row.classList" :key="index"> | |
330 | 330 | {{ item.className }} |
331 | 331 | </p> |
332 | 332 | </template></el-table-column |
... | ... | @@ -354,11 +354,11 @@ |
354 | 354 | <el-table-column label="状态" align="center" |
355 | 355 | ><template slot-scope="scope"> |
356 | 356 | {{ |
357 | - scope.row.status == 1 | |
357 | + scope.row.onlineStatus == 1 | |
358 | 358 | ? "在线" |
359 | - : scope.row.status == 2 | |
360 | - ? "离线" | |
361 | - : "异常" | |
359 | + : scope.row.onlineStatus == 2 | |
360 | + ? "异常" | |
361 | + : "离线" | |
362 | 362 | }} |
363 | 363 | </template></el-table-column |
364 | 364 | > |
... | ... | @@ -398,14 +398,14 @@ |
398 | 398 | <el-button @click="diaUp = false">取 消</el-button> |
399 | 399 | </div> |
400 | 400 | </el-dialog> |
401 | - <el-dialog title="添加答题器" :visible.sync="diaAnswerEqu" width="400"> | |
401 | + <el-dialog title="修改基站" :visible.sync="diaAnswerEqu" width="400"> | |
402 | 402 | <el-form ref="forms" :model="form" :rules="formRules" label-width="140px"> |
403 | - <el-form-item label="设备编码:" prop="number"> | |
404 | - <el-col :span="10" | |
403 | + <el-form-item label="设备编码:" prop="deviceId"> | |
404 | + <el-col :span="16" | |
405 | 405 | ><el-input |
406 | 406 | type="text" |
407 | 407 | placeholder="输入设备编码" |
408 | - v-model.trim="form.number" | |
408 | + v-model.trim="form.deviceId" | |
409 | 409 | maxlength="30" |
410 | 410 | size="45" |
411 | 411 | show-word-limit |
... | ... | @@ -414,7 +414,7 @@ |
414 | 414 | ></el-col> |
415 | 415 | </el-form-item> |
416 | 416 | <el-form-item label="频点:" prop="frequency"> |
417 | - <el-col :span="10" | |
417 | + <el-col :span="16" | |
418 | 418 | ><el-input |
419 | 419 | type="text" |
420 | 420 | placeholder="输入频点" |
... | ... | @@ -427,7 +427,7 @@ |
427 | 427 | ></el-col> |
428 | 428 | </el-form-item> |
429 | 429 | <el-form-item label="配对码:" prop="pairingCode"> |
430 | - <el-col :span="10" | |
430 | + <el-col :span="16" | |
431 | 431 | ><el-input |
432 | 432 | type="text" |
433 | 433 | placeholder="输入配对码" |
... | ... | @@ -439,20 +439,20 @@ |
439 | 439 | </el-input |
440 | 440 | ></el-col> |
441 | 441 | </el-form-item> |
442 | - <el-form-item label="选择班级:" prop="classId"> | |
443 | - <el-col :span="10"> | |
442 | + <el-form-item label="选择班级:" prop="classIds"> | |
443 | + <el-col :span="16"> | |
444 | 444 | <el-cascader |
445 | - size="small" | |
445 | + class="sel" | |
446 | 446 | clearable |
447 | - v-model="form.classId" | |
447 | + v-model="form.classIds" | |
448 | 448 | :options="gradeList" |
449 | - :props="{ expandTrigger: 'hover' }" | |
449 | + :props="{ expandTrigger: 'hover',checkStrictly: true }" | |
450 | 450 | :show-all-levels="false" |
451 | 451 | ></el-cascader> |
452 | 452 | </el-col> |
453 | 453 | </el-form-item> |
454 | 454 | <el-form-item label="所在教室:"> |
455 | - <el-col :span="10" | |
455 | + <el-col :span="16" | |
456 | 456 | ><el-input |
457 | 457 | type="text" |
458 | 458 | placeholder="输入所在教室" |
... | ... | @@ -531,21 +531,21 @@ export default { |
531 | 531 | { label: "3月以上", value: 6 }, |
532 | 532 | ], |
533 | 533 | form: { |
534 | - number: "", | |
534 | + deviceId:"", | |
535 | 535 | frequency: "", |
536 | 536 | pairingCode: "", |
537 | - classId: "", | |
537 | + classIds: [], | |
538 | 538 | roomName: "", |
539 | 539 | }, |
540 | 540 | formRules: { |
541 | - number: [ | |
541 | + deviceId: [ | |
542 | 542 | { required: true, message: "请输入设备编码", trigger: "blur" }, |
543 | 543 | ], |
544 | 544 | frequency: [{ required: true, message: "请输入频点", trigger: "blur" }], |
545 | 545 | pairingCode: [ |
546 | 546 | { required: true, message: "请输入配对码", trigger: "blur" }, |
547 | 547 | ], |
548 | - classId: [{ required: true, message: "请选择班级", trigger: "blur" }], | |
548 | + classIds: [{ required: true, message: "请选择班级", trigger: "blur" }], | |
549 | 549 | }, |
550 | 550 | tableData: [], |
551 | 551 | total: 0, |
... | ... | @@ -573,7 +573,19 @@ export default { |
573 | 573 | } |
574 | 574 | }, |
575 | 575 | methods: { |
576 | - edit() {}, | |
576 | + edit(obj) { | |
577 | + for(let key in this.form){ | |
578 | + if(key=="classIds"){ | |
579 | + this.form[key] = obj.classList?.map(item=>{ | |
580 | + return [item.classId] | |
581 | + }) | |
582 | + }else{ | |
583 | + this.form[key] = obj[key] | |
584 | + | |
585 | + } | |
586 | + } | |
587 | + this.diaAnswerEqu=true | |
588 | + }, | |
577 | 589 | linkTo(obj, type) { |
578 | 590 | this.$router.push({ |
579 | 591 | path: "/deviceLog", |
... | ... | @@ -700,17 +712,28 @@ export default { |
700 | 712 | }, |
701 | 713 | |
702 | 714 | // 添加设备 |
703 | - async addAnswerEqu() { | |
704 | - if (this.loadingAnswerEqu) return; | |
705 | - this.loadingAnswerEqu = true; | |
706 | - const { data, status, info } = await this.$request.fetchgradeList(); | |
707 | - this.loadingAnswerEqu = false; | |
708 | - console.log(status); | |
709 | - if (status === 0) { | |
710 | - this._QueryData(); | |
711 | - } else { | |
712 | - this.$message.error(info); | |
713 | - } | |
715 | + addAnswerEqu() { | |
716 | + this.$refs.forms.validate(async (valid) => { | |
717 | + if (valid) { | |
718 | + if (this.loadingAnswerEqu) return; | |
719 | + this.loadingAnswerEqu = true; | |
720 | + let query = {...this.form} | |
721 | + query.classIds = query.classIds.map(item=>{ | |
722 | + return item[1] | |
723 | + }) | |
724 | + const { data, status, info } = await this.$request.updateDevice({...query}); | |
725 | + this.loadingAnswerEqu = false; | |
726 | + console.log(status); | |
727 | + if (status === 0) { | |
728 | + this.diaAnswerEqu=false | |
729 | + this._QueryData(); | |
730 | + } else { | |
731 | + this.$message.error(info); | |
732 | + } | |
733 | + } else { | |
734 | + this.$message.warning("数据有误,请检查!"); | |
735 | + } | |
736 | + }); | |
714 | 737 | }, |
715 | 738 | // 查找班级 |
716 | 739 | async _QueryGradeList() { |
... | ... | @@ -883,6 +906,7 @@ export default { |
883 | 906 | this.role != "ROLE_JITUAN" |
884 | 907 | ? this.$request.deviceList |
885 | 908 | : this.$request.tenantDeviceList; |
909 | + this.tableData = []; | |
886 | 910 | const { data, status, info } = await deviceList({ |
887 | 911 | ...query, |
888 | 912 | deviceType: this.type, |
... | ... | @@ -912,6 +936,9 @@ export default { |
912 | 936 | .tab-box { |
913 | 937 | margin-bottom: 12px; |
914 | 938 | } |
939 | +.sel{ | |
940 | + width:100%; | |
941 | +} | |
915 | 942 | .content { |
916 | 943 | background: #f8f8f8; |
917 | 944 | border: 1px solid #e2e2e2; | ... | ... |
src/views/device/log.vue
... | ... | @@ -203,7 +203,7 @@ export default { |
203 | 203 | that.query.endDay = formatDate(new Date(), "yyyy-MM-dd"); |
204 | 204 | break; |
205 | 205 | case 4: |
206 | - if (aMonth > 1 && aMonth < 4) { | |
206 | + if (aMonth > 0 && aMonth < 4) { | |
207 | 207 | aMonth = "01"; |
208 | 208 | } else if (aMonth > 3 && aMonth < 7) { |
209 | 209 | aMonth = "04"; | ... | ... |
src/views/layout/aside/aside.vue
... | ... | @@ -2,15 +2,12 @@ |
2 | 2 | <div class="aside-box"> |
3 | 3 | <el-aside id="asideNav"> |
4 | 4 | <div class="logo-name"> |
5 | - <img | |
6 | - v-if="$store.getters.logoShow" | |
7 | - class="logo" | |
8 | - src="../../../assets/images/logo.png" | |
9 | - alt="" | |
10 | - /> | |
5 | + <img v-if="$store.getters.logoShow" class="logo" :src="code?csLogo:logo" alt="" /> | |
11 | 6 | <template v-else> |
12 | - <img class="logo" src="../../../assets/images/logo.png" alt="" /> | |
13 | - <p class="ellipsis">中天易教中天易教中天易教</p> | |
7 | + <img class="logo" :src="code?csLogo:logo" alt="" /> | |
8 | + <p class="ellipsis"> | |
9 | + {{ code ? "331互动课堂云平台" : "中天易教云平台" }} | |
10 | + </p> | |
14 | 11 | </template> |
15 | 12 | </div> |
16 | 13 | <el-menu |
... | ... | @@ -39,7 +36,12 @@ |
39 | 36 | |
40 | 37 | <menu-tree :menuData="item.children"></menu-tree> |
41 | 38 | </el-submenu> |
42 | - <el-menu-item :index="item.path" v-else :key="item.path" :class="path.includes(item.path)?'is-active':''"> | |
39 | + <el-menu-item | |
40 | + :index="item.path" | |
41 | + v-else | |
42 | + :key="item.path" | |
43 | + :class="path.includes(item.path) ? 'is-active' : ''" | |
44 | + > | |
43 | 45 | <i :class="item.iconCls ? item.iconCls : [fa, fa - file]" /> |
44 | 46 | <span slot="title">{{ item.name }}</span> |
45 | 47 | </el-menu-item> |
... | ... | @@ -52,7 +54,9 @@ |
52 | 54 | |
53 | 55 | <script> |
54 | 56 | import menuTree from "./menuTree"; |
55 | - | |
57 | +import { getURLParams } from "@/utils"; | |
58 | +const logo = require('../../../assets/images/logo.png') | |
59 | +const csLogo = require('../../../assets/images/331logo.png') | |
56 | 60 | export default { |
57 | 61 | name: "asideNav", |
58 | 62 | components: { |
... | ... | @@ -62,16 +66,20 @@ export default { |
62 | 66 | // 监听浏览器直接输入路由,将此路由添加到tabnavBox |
63 | 67 | "$route.path": function (val) { |
64 | 68 | // this.selectmenu(val); |
65 | - this.path = val | |
69 | + this.path = val; | |
66 | 70 | }, |
67 | 71 | }, |
68 | - data(){ | |
72 | + data() { | |
69 | 73 | return { |
70 | - path:"" | |
71 | - } | |
74 | + path: "", | |
75 | + code: "", | |
76 | + logo:logo, | |
77 | + csLogo:csLogo, | |
78 | + }; | |
72 | 79 | }, |
73 | - created(){ | |
74 | - this.path = this.$route.path | |
80 | + created() { | |
81 | + this.code = getURLParams("code") || localStorage.getItem("csCode") || ""; | |
82 | + this.path = this.$route.path; | |
75 | 83 | }, |
76 | 84 | methods: { |
77 | 85 | selectmenu(key, indexpath) { |
... | ... | @@ -125,8 +133,8 @@ $right: right; |
125 | 133 | #{$side}-#{$prop}: $value; |
126 | 134 | } |
127 | 135 | } |
128 | -.aside-box{ | |
129 | - max-width:200px; | |
136 | +.aside-box { | |
137 | + max-width: 200px; | |
130 | 138 | } |
131 | 139 | #asideNav { |
132 | 140 | width: auto !important; |
... | ... | @@ -192,7 +200,7 @@ $right: right; |
192 | 200 | } |
193 | 201 | } |
194 | 202 | } |
195 | -:deep(.is-active){ | |
196 | - color:#fff | |
203 | +:deep(.is-active) { | |
204 | + color: #fff; | |
197 | 205 | } |
198 | 206 | </style> | ... | ... |
src/views/layout/layout.vue
... | ... | @@ -38,7 +38,7 @@ export default { |
38 | 38 | }; |
39 | 39 | }, |
40 | 40 | created() { |
41 | - this.initRouter(); | |
41 | + // this.initRouter(); | |
42 | 42 | }, |
43 | 43 | methods: { |
44 | 44 | initRouter() { |
... | ... | @@ -55,46 +55,7 @@ export default { |
55 | 55 | code: this.code, |
56 | 56 | }; |
57 | 57 | } |
58 | - // const { data = {}, message, code } = await loginCheck(params); | |
59 | - // if (code === 0) { | |
60 | - // if (data) { | |
61 | - const userInfo = { | |
62 | - permissions: [ | |
63 | - { | |
64 | - role: "superAdmin", | |
65 | - roleName: "超级管理员", | |
66 | - }, | |
67 | - ], | |
68 | - name: "李老师", | |
69 | - // avatar: data.avatar ? data.avatar : "", | |
70 | - // uid: data.id, | |
71 | - authorityRouter: [ | |
72 | - "examinationPaper", | |
73 | - "examinationPaperAdd", | |
74 | - "examinationPaperEdit", | |
75 | - "examinationPaperRecycle", | |
76 | - "ask", | |
77 | - "askAnalysis", | |
78 | - "test", | |
79 | - "testAnalysis", | |
80 | - ], | |
81 | - }; | |
82 | - await this.$store.commit("setInfo", { ...userInfo }); | |
83 | - await this.$store.commit("setRouters", userInfo.authorityRouter); | |
84 | - let newAddRouters = this.$store.getters.addRouters; | |
85 | - newAddRouters.forEach((res) => { | |
86 | - this.$router.addRoute(res); | |
87 | - }); | |
88 | - this.$router.addRoute({ | |
89 | - path: "*", | |
90 | - redirect: "/404", | |
91 | - hidden: true, | |
92 | - children: [], | |
93 | - }); | |
94 | - // } | |
95 | - // } else { | |
96 | - // this.$message.error(message); | |
97 | - // } | |
58 | + this.$store.dispatch("CSLogin", this.code); | |
98 | 59 | }, |
99 | 60 | }, |
100 | 61 | }; | ... | ... |
src/views/login/index.vue
1 | -<template> | |
2 | - <div class="login-container"> | |
1 | +// <template> | |
2 | + <div class="login-container" v-loading="loading" element-loading-text="努力加载中..."> | |
3 | 3 | <el-form |
4 | + v-if="!code && !dockkey" | |
4 | 5 | ref="loginForm" |
5 | 6 | :model="loginForm" |
6 | 7 | :rules="loginRules" |
... | ... | @@ -88,22 +89,26 @@ import { getURLParams } from "@/utils"; |
88 | 89 | export default { |
89 | 90 | data() { |
90 | 91 | return { |
92 | + loading:false, | |
91 | 93 | disableClick: true, |
92 | 94 | passwordType: "password", |
93 | 95 | loginForm: { |
94 | 96 | // username: "15911715665", |
95 | 97 | // password: "Csiy88888", |
96 | - // username: "13610050254", | |
97 | - // password: "Pw050254#", | |
98 | + username: "13610050254", | |
99 | + password: "Pw050254#", | |
98 | 100 | // username: "18332123505", |
99 | 101 | // password: "Pw123505#", |
102 | + // username: "18687826606", | |
103 | + // password: "Pw826606#", | |
100 | 104 | // username: "18946034886", |
101 | 105 | // password: "Pw034886#", |
102 | 106 | // username: "18893712576", |
103 | 107 | // password: "Pw712576#", |
104 | - username: "13247726488", | |
105 | - password: "726488", | |
106 | - | |
108 | + // username: "13247726488", | |
109 | + // password: "726488", | |
110 | + // username: "13319607658", | |
111 | + // password: "Pw607658#", | |
107 | 112 | }, |
108 | 113 | loginRules: { |
109 | 114 | username: [ |
... | ... | @@ -123,7 +128,8 @@ export default { |
123 | 128 | this.code = getURLParams("code") || localStorage.getItem("csCode") || ""; |
124 | 129 | this.dockkey = getURLParams("dockkey") || ""; |
125 | 130 | if (this.code || this.dockkey) { |
126 | - this._LoginCheck(); | |
131 | + this.loading = true | |
132 | + // this._LoginCheck(); | |
127 | 133 | } |
128 | 134 | }, |
129 | 135 | methods: { |
... | ... | @@ -188,7 +194,7 @@ $cursor: #000; |
188 | 194 | border-radius: 0px; |
189 | 195 | font-size: 16px; |
190 | 196 | color: $light_gray; |
191 | - height:48px; | |
197 | + height: 48px; | |
192 | 198 | line-height: 48px; |
193 | 199 | caret-color: $cursor; |
194 | 200 | &:-webkit-autofill { | ... | ... |
src/views/setUp/conglomerate.vue
... | ... | @@ -190,7 +190,7 @@ |
190 | 190 | </el-option> |
191 | 191 | </el-select> |
192 | 192 | </el-form-item> |
193 | - <el-form-item label="学段:"> | |
193 | + <el-form-item label="学段:" prop="sections"> | |
194 | 194 | <el-checkbox-group v-model="formSchool.sections"> |
195 | 195 | <el-checkbox :label="1">小学</el-checkbox> |
196 | 196 | <el-checkbox :label="2">初中</el-checkbox> |
... | ... | @@ -446,7 +446,7 @@ export default { |
446 | 446 | this.$message.error(info); |
447 | 447 | } |
448 | 448 | } else { |
449 | - this.$message.error("学校名称数据有误,请检查!"); | |
449 | + this.$message.error("数据有误,请检查!"); | |
450 | 450 | return false; |
451 | 451 | } |
452 | 452 | }); | ... | ... |
src/views/setUp/student.vue
... | ... | @@ -422,7 +422,6 @@ export default { |
422 | 422 | max-height: 80vh; |
423 | 423 | .h-title { |
424 | 424 | height: 40px; |
425 | - overflow-y: scroll; | |
426 | 425 | line-height: 40px; |
427 | 426 | background: #eee; |
428 | 427 | } |
... | ... | @@ -451,6 +450,7 @@ export default { |
451 | 450 | } |
452 | 451 | &.active { |
453 | 452 | color: #667ffd; |
453 | + background: #eee; | |
454 | 454 | } |
455 | 455 | } |
456 | 456 | .sel { | ... | ... |