Commit 1365ef5e8ed3cdf23b76e7c7e59725ee39135da4
1 parent
d32e461c
优化
Showing
13 changed files
with
108 additions
and
51 deletions
src/components/charts/pieChart.vue
src/utils/index.js
... | ... | @@ -689,7 +689,7 @@ export function formatGradeClass(data) { |
689 | 689 | label: item.gradeName, |
690 | 690 | children: [ |
691 | 691 | { |
692 | - value: item.classCode, | |
692 | + value: item.id, | |
693 | 693 | label: item.className, |
694 | 694 | }, |
695 | 695 | ], |
... | ... | @@ -702,7 +702,7 @@ export function formatGradeClass(data) { |
702 | 702 | } |
703 | 703 | }); |
704 | 704 | gradeNameArr[gradeIndex].children.push({ |
705 | - value: item.classCode, | |
705 | + value: item.id, | |
706 | 706 | label: item.className, |
707 | 707 | }); |
708 | 708 | } |
... | ... | @@ -721,7 +721,7 @@ export function formatGradeNameClass(data) { |
721 | 721 | grade: item.grade, |
722 | 722 | children: [ |
723 | 723 | { |
724 | - value: item.classCode, | |
724 | + value: item.id, | |
725 | 725 | label: item.className, |
726 | 726 | leaf:true |
727 | 727 | }, |
... | ... | @@ -735,7 +735,7 @@ export function formatGradeNameClass(data) { |
735 | 735 | } |
736 | 736 | }); |
737 | 737 | gradeNameArr[gradeIndex].children.push({ |
738 | - value: item.classCode, | |
738 | + value: item.id, | |
739 | 739 | label: item.className, |
740 | 740 | leaf:true |
741 | 741 | }); | ... | ... |
src/views/analysis/index.vue
... | ... | @@ -93,7 +93,7 @@ |
93 | 93 | style="width: 100%" |
94 | 94 | show-summary |
95 | 95 | > |
96 | - <el-table-column align="center" label="科目" prop="subjectName"> | |
96 | + <el-table-column align="center" fixed label="科目" prop="subjectName"> | |
97 | 97 | </el-table-column> |
98 | 98 | <el-table-column |
99 | 99 | align="center" |
... | ... | @@ -105,22 +105,55 @@ |
105 | 105 | : item.gradeName || item.className |
106 | 106 | " |
107 | 107 | > |
108 | - <template> | |
108 | + <template v-if="role == 'ROLE_JITUAN'"> | |
109 | 109 | <el-table-column |
110 | - :prop="'periodCount' + index" | |
110 | + :prop="'periodCount' + type == 1 ? item.schoolId : item.grade" | |
111 | 111 | label="课时数" |
112 | 112 | align="center" |
113 | - ></el-table-column> | |
113 | + ><template slot-scope="scoped">{{ | |
114 | + scoped.row[ | |
115 | + "periodCount" + type == 1 ? item.schoolId : item.grade | |
116 | + ] || "--" | |
117 | + }}</template></el-table-column | |
118 | + > | |
114 | 119 | <el-table-column |
115 | - :prop="'examCount' + index" | |
120 | + :prop="'examCount' + type == 1 ? item.schoolId : item.grade" | |
116 | 121 | label="测练数" |
117 | 122 | align="center" |
118 | - ></el-table-column> | |
123 | + ><template slot-scope="scoped">{{ | |
124 | + scoped.row[ | |
125 | + "examCount" + type == 1 ? item.schoolId : item.grade | |
126 | + ] || "--" | |
127 | + }}</template></el-table-column | |
128 | + > | |
129 | + </template> | |
130 | + <template v-else> | |
131 | + <el-table-column | |
132 | + :prop="'periodCount' + item.grade || item.classId" | |
133 | + label="课时数" | |
134 | + align="center" | |
135 | + ><template slot-scope="scoped">{{ | |
136 | + scoped.row["periodCount" + item.grade || item.classId] || "--" | |
137 | + }}</template></el-table-column | |
138 | + > | |
139 | + <el-table-column | |
140 | + :prop="'examCount' + item.grade || item.classId" | |
141 | + label="测练数" | |
142 | + align="center" | |
143 | + ><template slot-scope="scoped">{{ | |
144 | + scoped.row["examCount" + item.grade || item.classId] || "--" | |
145 | + }}</template></el-table-column | |
146 | + > | |
119 | 147 | </template> |
120 | 148 | </el-table-column> |
121 | 149 | </el-table> |
122 | - <p class="down" v-if="role != 'ROLE_JITUAN'"> | |
123 | - <el-button @click="downExc" type="primary" plain round icon="fa fa-cloud-download" | |
150 | + <p class="down" v-if="role != 'ROLE_JITUAN' && tableData.length"> | |
151 | + <el-button | |
152 | + @click="downExc" | |
153 | + type="primary" | |
154 | + plain | |
155 | + round | |
156 | + icon="fa fa-cloud-download" | |
124 | 157 | >导出报表</el-button |
125 | 158 | > |
126 | 159 | </p> |
... | ... | @@ -341,25 +374,25 @@ export default { |
341 | 374 | if (this.role == "ROLE_JITUAN") { |
342 | 375 | if (this.type == 1) { |
343 | 376 | if (items.schoolId == ids) { |
344 | - params["examCount" + index] = items.examCount; | |
345 | - params["periodCount" + index] = items.periodCount; | |
377 | + params["examCount" + items.schoolId] = items.examCount; | |
378 | + params["periodCount" + items.schoolId] = items.periodCount; | |
346 | 379 | } |
347 | 380 | } else if (this.type == 2) { |
348 | 381 | if (items.grade == ids) { |
349 | - params["examCount" + index] = items.examCount; | |
350 | - params["periodCount" + index] = items.periodCount; | |
382 | + params["examCount" + items.grade] = items.examCount; | |
383 | + params["periodCount" + items.grade] = items.periodCount; | |
351 | 384 | } |
352 | 385 | } |
353 | 386 | } else { |
354 | 387 | if (this.query.gradeName == "全部") { |
355 | 388 | if (items.grade == ids) { |
356 | - params["examCount" + index] = items.examCount; | |
357 | - params["periodCount" + index] = items.periodCount; | |
389 | + params["examCount" + items.grade] = items.examCount; | |
390 | + params["periodCount" + items.grade] = items.periodCount; | |
358 | 391 | } |
359 | 392 | } else if (this.query.gradeName) { |
360 | 393 | if (items.classId == ids) { |
361 | - params["examCount" + index] = items.examCount; | |
362 | - params["periodCount" + index] = items.periodCount; | |
394 | + params["examCount" + items.classId] = items.examCount; | |
395 | + params["periodCount" + items.classId] = items.periodCount; | |
363 | 396 | } |
364 | 397 | } |
365 | 398 | } | ... | ... |
src/views/card/index.vue
src/views/dataSync/index.vue
... | ... | @@ -91,17 +91,18 @@ export default { |
91 | 91 | // } |
92 | 92 | }, |
93 | 93 | upSuccess(res) { |
94 | - if (res && res.code == 0 && res.success) { | |
94 | + debugger | |
95 | + if (res && res.status == 0 ) { | |
95 | 96 | this.$message.success("上传成功"); |
96 | 97 | this.$emit("upSuccess"); |
97 | 98 | } else { |
98 | - this.$message.error(res.message); | |
99 | + this.$message.error(res.info); | |
99 | 100 | } |
100 | 101 | }, |
101 | 102 | upError(res) { |
103 | + debugger | |
102 | 104 | if (res && res.status == 0) { |
103 | - this.$message.success("上传成功"); | |
104 | - this.$emit("upSuccess"); | |
105 | + this.$message.error("上传失败"); | |
105 | 106 | } else { |
106 | 107 | this.$message.error(res.message); |
107 | 108 | } | ... | ... |
src/views/device/index.vue
1 | 1 | <template> |
2 | - <div> | |
2 | + <div ref="main" class="page-content"> | |
3 | 3 | <back-box> |
4 | 4 | <template slot="title"> |
5 | 5 | <span>设备管理</span> |
... | ... | @@ -19,7 +19,7 @@ |
19 | 19 | @click="diaUp = true" |
20 | 20 | ></el-button> |
21 | 21 | </el-tooltip> --> |
22 | - <el-tooltip effect="dark" content="添加基站" placement="bottom"> | |
22 | + <!-- <el-tooltip effect="dark" content="添加基站" placement="bottom"> | |
23 | 23 | <el-button |
24 | 24 | type="primary" |
25 | 25 | icon="el-icon-receiving" |
... | ... | @@ -28,10 +28,10 @@ |
28 | 28 | circle |
29 | 29 | @click="diaAnswerEqu = true" |
30 | 30 | ></el-button> |
31 | - </el-tooltip> | |
31 | + </el-tooltip> --> | |
32 | 32 | </template> |
33 | 33 | </back-box> |
34 | - <div class="page-content"> | |
34 | + <div> | |
35 | 35 | <div class="tab-box"> |
36 | 36 | <el-radio-group v-model="type"> |
37 | 37 | <el-radio-button :label="1">基站管理</el-radio-button> |
... | ... | @@ -401,12 +401,12 @@ |
401 | 401 | </el-dialog> |
402 | 402 | <el-dialog title="修改基站" :visible.sync="diaAnswerEqu" width="400"> |
403 | 403 | <el-form ref="forms" :model="form" :rules="formRules" label-width="140px"> |
404 | - <el-form-item label="设备编码:" prop="deviceId"> | |
404 | + <el-form-item label="设备编码:" prop="sn"> | |
405 | 405 | <el-col :span="16" |
406 | 406 | ><el-input |
407 | 407 | type="text" |
408 | 408 | placeholder="输入设备编码" |
409 | - v-model.trim="form.deviceId" | |
409 | + v-model.trim="form.sn" | |
410 | 410 | maxlength="30" |
411 | 411 | size="45" |
412 | 412 | show-word-limit |
... | ... | @@ -538,13 +538,14 @@ export default { |
538 | 538 | ], |
539 | 539 | form: { |
540 | 540 | deviceId: "", |
541 | + sn: "", | |
541 | 542 | frequency: "", |
542 | 543 | pairingCode: "", |
543 | 544 | classIds: [], |
544 | 545 | roomName: "", |
545 | 546 | }, |
546 | 547 | formRules: { |
547 | - deviceId: [ | |
548 | + sn: [ | |
548 | 549 | { required: true, message: "请输入设备编码", trigger: "blur" }, |
549 | 550 | ], |
550 | 551 | frequency: [{ required: true, message: "请输入频点", trigger: "blur" }], |
... | ... | @@ -621,6 +622,7 @@ export default { |
621 | 622 | this.form[key] = obj[key]; |
622 | 623 | } |
623 | 624 | } |
625 | + this.form.deviceId = obj.id | |
624 | 626 | this.diaAnswerEqu = true; |
625 | 627 | }, |
626 | 628 | linkTo(obj, type) { |
... | ... | @@ -765,6 +767,7 @@ export default { |
765 | 767 | console.log(status); |
766 | 768 | if (status === 0) { |
767 | 769 | this.diaAnswerEqu = false; |
770 | + this.$message.success(info); | |
768 | 771 | this._QueryData(); |
769 | 772 | } else { |
770 | 773 | this.$message.error(info); |
... | ... | @@ -794,7 +797,7 @@ export default { |
794 | 797 | gradeList.children = |
795 | 798 | item.classList?.map((items) => { |
796 | 799 | return { |
797 | - value: Number(items.classCode), | |
800 | + value: Number(items.id), | |
798 | 801 | label: items.className, |
799 | 802 | }; |
800 | 803 | }) || []; |
... | ... | @@ -912,15 +915,15 @@ export default { |
912 | 915 | ? query.regionIds.remove(item[0]) |
913 | 916 | : ""; |
914 | 917 | } else if (item.length == 3) { |
918 | + if (!query.schoolIds.includes(item[1])) { | |
919 | + query.schoolIds.push(item[1]); | |
920 | + } | |
915 | 921 | if (!query.gradeNames.includes(item[2])) { |
916 | 922 | query.gradeNames.push(item[2]); |
917 | 923 | } |
918 | 924 | query.regionIds.includes(item[0]) |
919 | 925 | ? query.regionIds.remove(item[0]) |
920 | 926 | : ""; |
921 | - query.schoolIds.includes(item[1]) | |
922 | - ? query.schoolIds.remove(item[1]) | |
923 | - : ""; | |
924 | 927 | } else if (item.length == 4) { |
925 | 928 | if (!query.classIds.includes(item[3])) { |
926 | 929 | query.classIds.push(item[3]); |
... | ... | @@ -987,6 +990,9 @@ export default { |
987 | 990 | })) || |
988 | 991 | []; |
989 | 992 | this.total = data.count; |
993 | + this.$nextTick(function(){ | |
994 | + this.$refs.main.scrollTop = 0 | |
995 | + }) | |
990 | 996 | } else { |
991 | 997 | this.$message.error(info); |
992 | 998 | } |
... | ... | @@ -997,10 +1003,12 @@ export default { |
997 | 1003 | |
998 | 1004 | <style lang="scss" scoped> |
999 | 1005 | .page-content { |
1000 | - padding: 20px 20px 0; | |
1006 | + padding: 0 20px; | |
1007 | + height: 100%; | |
1008 | + overflow-y: auto; | |
1001 | 1009 | } |
1002 | 1010 | .tab-box { |
1003 | - margin-bottom: 12px; | |
1011 | + padding:20px 0 12px | |
1004 | 1012 | } |
1005 | 1013 | .sel { |
1006 | 1014 | width: 100%; | ... | ... |
src/views/examinationPaper/add.vue
... | ... | @@ -303,6 +303,7 @@ |
303 | 303 | <el-dialog |
304 | 304 | title="添加大题" |
305 | 305 | :visible.sync="addQuestionVisible" |
306 | + :close-on-click-modal="false" | |
306 | 307 | width="600px" |
307 | 308 | > |
308 | 309 | <div class="dia-content"> |
... | ... | @@ -363,6 +364,7 @@ |
363 | 364 | <el-input-number |
364 | 365 | v-model="questionForm.score" |
365 | 366 | :min="1" |
367 | + :max="100" | |
366 | 368 | :precision="2" |
367 | 369 | :step="1" |
368 | 370 | label="label" |
... | ... | @@ -437,7 +439,7 @@ |
437 | 439 | class="number-ipt" |
438 | 440 | size="medium" |
439 | 441 | :min="1" |
440 | - :max="200" | |
442 | + :max="100" | |
441 | 443 | :precision="2" |
442 | 444 | v-model="subQuestions.score" |
443 | 445 | label="单题分值" |
... | ... | @@ -840,7 +842,7 @@ export default { |
840 | 842 | |
841 | 843 | console.log(this.formAns.answerList.split(",")[subNum - i]); |
842 | 844 | } else if (this.formAns.qusType == 4) { |
843 | - correctAnswer = this.formAns.answerList[subNum - i] == "✓" ? 1 : 2; | |
845 | + correctAnswer = this.formAns.answerList[subNum - i] == "✓" ? 1 :this.formAns.answerList[subNum - i] == "✗" ? 2:""; | |
844 | 846 | } |
845 | 847 | this.form.questionList[this.formAns.listIndex].subQuestions[ |
846 | 848 | EndIndex - i | ... | ... |
src/views/layout/layout.vue
... | ... | @@ -6,7 +6,9 @@ |
6 | 6 | <layoutHeader></layoutHeader> |
7 | 7 | <el-main id="elmain"> |
8 | 8 | <transition name="main" mode="out-in"> |
9 | - <router-view></router-view> | |
9 | + <keep-alive> | |
10 | + <router-view></router-view> | |
11 | + </keep-alive> | |
10 | 12 | </transition> |
11 | 13 | </el-main> |
12 | 14 | <el-footer height="28px"> |
... | ... | @@ -109,7 +111,7 @@ ul.el-menu { |
109 | 111 | #elmain { |
110 | 112 | background-color: #fff; |
111 | 113 | padding: 0; |
112 | - min-height:calc(100% - 78px); | |
114 | + min-height: calc(100% - 78px); | |
113 | 115 | } |
114 | 116 | |
115 | 117 | .avatar-uploader .el-upload { | ... | ... |
src/views/login/index.vue
... | ... | @@ -95,8 +95,8 @@ export default { |
95 | 95 | loginForm: { |
96 | 96 | // username: "15911715665", |
97 | 97 | // password: "715665", |
98 | - // username: "18087527793", | |
99 | - // password: "Pw527793#", | |
98 | + // username: "18314340313", | |
99 | + // password: "Pw340313#", | |
100 | 100 | // username: "18687826606", |
101 | 101 | // password: "Pw826606#", |
102 | 102 | // username: "18893712576", | ... | ... |
src/views/setUp/account.vue
... | ... | @@ -71,6 +71,8 @@ |
71 | 71 | " |
72 | 72 | v-model="query.loginName" |
73 | 73 | class="input-with-select" |
74 | + type="number" | |
75 | + oninput="if(value.length > 11) value = value.slice(0,11)" | |
74 | 76 | @keyup.enter.native="(page = 1), _QueryData(2)" |
75 | 77 | > |
76 | 78 | <el-button |
... | ... | @@ -82,6 +84,7 @@ |
82 | 84 | <el-input |
83 | 85 | v-if="role != 'ROLE_JITUAN'" |
84 | 86 | placeholder="请输入老师姓名" |
87 | + maxlength="30" | |
85 | 88 | v-model="query.realName" |
86 | 89 | class="input-with-select" |
87 | 90 | @keyup.enter.native="(page = 1), _QueryData(3)" |
... | ... | @@ -242,7 +245,8 @@ |
242 | 245 | <el-input |
243 | 246 | placeholder="请输入联系电话" |
244 | 247 | v-model.trim="formAddCount.phone" |
245 | - maxlength="11" | |
248 | + type="number" | |
249 | + oninput="if(value.length > 11) value = value.slice(0,11)" | |
246 | 250 | > |
247 | 251 | </el-input> |
248 | 252 | </el-col> |
... | ... | @@ -323,7 +327,12 @@ |
323 | 327 | </div> |
324 | 328 | </el-dialog> |
325 | 329 | <el-dialog title="导入账号名单" :visible.sync="diaUp" width="600"> |
326 | - <up-load id="downTeacher" :url="url" @upSuccess="upSuccess" fileName="教师名单"> | |
330 | + <up-load | |
331 | + id="downTeacher" | |
332 | + :url="url" | |
333 | + @upSuccess="upSuccess" | |
334 | + fileName="教师名单" | |
335 | + > | |
327 | 336 | <p class="down-txt" slot="down"> |
328 | 337 | 通过Excel名单导入账号名单,点击 |
329 | 338 | <el-link type="danger" @click="downExcel">模板下载</el-link> 。 |
... | ... | @@ -418,8 +427,9 @@ export default { |
418 | 427 | this._QueryData(4); |
419 | 428 | }, |
420 | 429 | methods: { |
421 | - upSuccess(){//导入成功 | |
422 | - this.diaUp = false | |
430 | + upSuccess() { | |
431 | + //导入成功 | |
432 | + this.diaUp = false; | |
423 | 433 | this._QueryData(4); |
424 | 434 | }, |
425 | 435 | async downExcel() { | ... | ... |
src/views/setUp/student.vue
src/views/setUp/teacher.vue