Commit b8827a72eba2f703cd243dbfb8956b8d6c14ef3d
1 parent
8243c409
测试bug
Showing
9 changed files
with
125 additions
and
64 deletions
src/components/charts/barChart.vue
src/views/standard/analysis/index.vue
... | ... | @@ -119,20 +119,7 @@ export default { |
119 | 119 | multiple: false, |
120 | 120 | checkStrictly: true, |
121 | 121 | }, |
122 | - params: [ | |
123 | - { | |
124 | - index: 1, | |
125 | - sections: "小学", | |
126 | - grades: "二年级", | |
127 | - classIds: "2班", | |
128 | - subjectNames: "语文", | |
129 | - }, | |
130 | - { | |
131 | - index: 2, | |
132 | - sections: "小学", | |
133 | - grades: "二年级", | |
134 | - }, | |
135 | - ], | |
122 | + params: [], | |
136 | 123 | gradeList: [], |
137 | 124 | chartData: [ |
138 | 125 | { |
... | ... | @@ -185,12 +172,13 @@ export default { |
185 | 172 | if (this.role == "ROLE_XUEXIAO") { |
186 | 173 | await this._QueryClassList(); |
187 | 174 | } |
188 | - | |
189 | 175 | let startDay = this.query?.startDay; |
190 | 176 | if (!startDay) { |
191 | 177 | this.query.startDay = formatDate(new Date(), "yyyy-MM-dd"); |
192 | 178 | this.query.endDay = formatDate(new Date(), "yyyy-MM-dd"); |
193 | 179 | } |
180 | + this.setDate(4) | |
181 | + this._QueryData(); | |
194 | 182 | }, |
195 | 183 | methods: { |
196 | 184 | setBigNum(num) { |
... | ... | @@ -353,12 +341,16 @@ export default { |
353 | 341 | const { data, status, info } = await gradeList(); |
354 | 342 | if (status === 0) { |
355 | 343 | if (!!data.list) { |
344 | + this.query.secGraClaSub = []; | |
356 | 345 | if (this.role != "ROLE_JITUAN") { |
357 | 346 | this.gradeList = |
358 | 347 | data.list?.map((item) => { |
359 | 348 | let gradeIds = []; |
360 | 349 | let children = item.gradeList.map((items) => { |
361 | 350 | gradeIds.push(items.grade); |
351 | + if (this.query.secGraClaSub.length < 10) { | |
352 | + this.query.secGraClaSub.push([item.section, items.grade]); | |
353 | + } | |
362 | 354 | return { |
363 | 355 | value: items.grade, |
364 | 356 | label: items.gradeName, |
... | ... | @@ -386,6 +378,9 @@ export default { |
386 | 378 | }; |
387 | 379 | }); |
388 | 380 | this.gradeList = this.schoolList.map((item) => { |
381 | + if (this.query.secGraClaSub.length < 10) { | |
382 | + this.query.secGraClaSub.push([item.id]); | |
383 | + } | |
389 | 384 | return { |
390 | 385 | value: item.id, |
391 | 386 | label: item.schoolName, | ... | ... |
src/views/standard/device/error.vue
src/views/standard/down/client.vue
src/views/standard/down/index.vue
... | ... | @@ -12,7 +12,7 @@ |
12 | 12 | </p> |
13 | 13 | <el-button plan round @click="links">授课端下载</el-button> |
14 | 14 | </div> |
15 | - <div class="down-item" v-loading="loading" v-if="role != 'ROLE_JIAOSHI'"> | |
15 | + <div class="down-item" v-loading="loading" v-if="role == 'ROLE_XUEXIAO'"> | |
16 | 16 | <p class="txt"> |
17 | 17 | 配合发卡器硬件,方便学校管理员进行发卡补卡操作的软件。 |
18 | 18 | </p> | ... | ... |
src/views/standard/setUp/archived.vue
... | ... | @@ -29,8 +29,6 @@ |
29 | 29 | :value="item.value" |
30 | 30 | > |
31 | 31 | </el-option> |
32 | - <el-option label="未分配" :value="80"></el-option> | |
33 | - <el-option label="已毕业" :value="81"></el-option> | |
34 | 32 | </el-select> |
35 | 33 | </div> |
36 | 34 | <div class="form-item"> |
... | ... | @@ -154,7 +152,7 @@ export default { |
154 | 152 | loading: false, |
155 | 153 | loadingClass: false, |
156 | 154 | loadingDown: false, |
157 | - step: 1, | |
155 | + step: 0, | |
158 | 156 | grade: "", |
159 | 157 | gradeList: [], |
160 | 158 | classIds: [], | ... | ... |
src/views/standard/setUp/clazz.vue
... | ... | @@ -77,7 +77,6 @@ |
77 | 77 | </div> |
78 | 78 | <el-dialog title="导入班级名单" :visible.sync="diaUp" width="600"> |
79 | 79 | <up-load |
80 | - id="downTeacher" | |
81 | 80 | :url="url" |
82 | 81 | @upSuccess="upSuccess" |
83 | 82 | fileName="班级名单" |
... | ... | @@ -218,7 +217,7 @@ export default { |
218 | 217 | diaClass: false, |
219 | 218 | diaSubject: false, |
220 | 219 | subjectLoading: false, |
221 | - url: "/api_html/school/manager/importClazzClicker", | |
220 | + url: "/api_html/school/manager/importClassAndStudent", | |
222 | 221 | formClass: { |
223 | 222 | //修改班级信息 |
224 | 223 | gradeName: "", |
... | ... | @@ -441,7 +440,7 @@ export default { |
441 | 440 | } |
442 | 441 | }, |
443 | 442 | async downExcel() { |
444 | - let data = await this.$request.teacherTemplate(); | |
443 | + let data = await this.$request.classAndStudentTemplate(); | |
445 | 444 | if (data && !data.code) { |
446 | 445 | let blob = new Blob([data], { |
447 | 446 | type: "application/vnd.ms-excel;charset=utf-8", |
... | ... | @@ -453,7 +452,7 @@ export default { |
453 | 452 | }, |
454 | 453 | async exportTeacherExl() { |
455 | 454 | this.loadingDown = true; |
456 | - let data = await this.$request.exportTeacher(); | |
455 | + let data = await this.$request.exportClassAndStudent(); | |
457 | 456 | this.loadingDown = false; |
458 | 457 | if (data) { |
459 | 458 | let blob = new Blob([data], { | ... | ... |
src/views/standard/setUp/student.vue
... | ... | @@ -48,8 +48,16 @@ |
48 | 48 | :value="item.value" |
49 | 49 | > |
50 | 50 | </el-option> |
51 | - <el-option label="未分配" :value="80"></el-option> | |
52 | - <el-option label="已毕业" :value="81"></el-option> | |
51 | + </el-select> | |
52 | + <el-select | |
53 | + class="sel" | |
54 | + v-model="query.status" | |
55 | + @change="_QueryData(4)" | |
56 | + placeholder="学生状态" | |
57 | + > | |
58 | + <el-option label="正常" :value="0"></el-option> | |
59 | + <el-option label="未分配" :value="1"></el-option> | |
60 | + <el-option label="已毕业" :value="2"></el-option> | |
53 | 61 | </el-select> |
54 | 62 | <el-input |
55 | 63 | placeholder="请输入学生姓名" |
... | ... | @@ -79,10 +87,7 @@ |
79 | 87 | </div> |
80 | 88 | <div class="page-content"> |
81 | 89 | <div class="stu-box"> |
82 | - <div | |
83 | - class="stu-list" | |
84 | - v-show="query.grade != 80 && query.grade != 81 && query.grade" | |
85 | - > | |
90 | + <div class="stu-list" v-show="query.grade"> | |
86 | 91 | <div class="h-title">班级列表</div> |
87 | 92 | <ul class="stu-ul"> |
88 | 93 | <li |
... | ... | @@ -96,19 +101,21 @@ |
96 | 101 | </li> |
97 | 102 | </ul> |
98 | 103 | </div> |
99 | - <div class="stu-detail"> | |
104 | + <div class="stu-detail" v-loading="loading"> | |
100 | 105 | <div class="stu-detail-tit"> |
101 | 106 | <p class="total" v-if="studentList.length"> |
102 | 107 | 共筛选出{{ studentList.length }}名学生。 |
103 | 108 | </p> |
104 | - <div class="clazz-detail" v-if="clazzDetail.stationSn"> | |
109 | + <div | |
110 | + class="clazz-detail" | |
111 | + v-if="clazzDetail.stationSn && query.grade" | |
112 | + > | |
105 | 113 | <p>基站SN:{{ clazzDetail.stationSn }}</p> |
106 | 114 | <p>配对码:{{ clazzDetail.pairingCode }}</p> |
107 | 115 | <p>频点:{{ clazzDetail.frequency }}</p> |
108 | 116 | </div> |
109 | 117 | </div> |
110 | - | |
111 | - <ul class="s-ul" v-loading="loading"> | |
118 | + <ul class="s-ul"> | |
112 | 119 | <li |
113 | 120 | class="s-li" |
114 | 121 | v-for="(item, index) in studentList" |
... | ... | @@ -203,8 +210,11 @@ |
203 | 210 | <span>{{ formClassTrack.studentName }}</span> |
204 | 211 | </el-form-item> |
205 | 212 | <el-form-item label="当前班级:"> |
213 | + <span>{{ formClassTrack.className }}</span> | |
214 | + </el-form-item> | |
215 | + <el-form-item label="历史班级:"> | |
206 | 216 | <p v-for="item in formClassTrack.classList"> |
207 | - {{ `${item.gradeName}-${item.className}(${item.createdTime})` }} | |
217 | + {{ `${item.gradeName}-${item.className}:${item.createdTime}` }} | |
208 | 218 | </p> |
209 | 219 | </el-form-item> |
210 | 220 | </el-form> |
... | ... | @@ -300,12 +310,14 @@ export default { |
300 | 310 | diaChangeClassTrack: false, |
301 | 311 | formClassTrack: { |
302 | 312 | studentName: "", |
313 | + className: "", | |
303 | 314 | classList: [], |
304 | 315 | }, |
305 | 316 | clazzDetail: { stationSn: "", pairingCode: "", frequency: "" }, |
306 | 317 | query: { |
307 | 318 | grade: "", |
308 | 319 | classId: "", |
320 | + status: 0, | |
309 | 321 | studentCode: "", |
310 | 322 | studentName: "", |
311 | 323 | }, |
... | ... | @@ -387,7 +399,6 @@ export default { |
387 | 399 | this.clazzDetail.frequency = obj.frequency; |
388 | 400 | this.query.classId = obj.id; |
389 | 401 | this.formStu.className = obj.className; |
390 | - this.formStuCla.className = obj.className; | |
391 | 402 | this._QueryData(3); |
392 | 403 | }, |
393 | 404 | |
... | ... | @@ -431,7 +442,6 @@ export default { |
431 | 442 | if (status === 0) { |
432 | 443 | this.$message.success(info); |
433 | 444 | this.diaStu = false; |
434 | - this._QueryClass(); | |
435 | 445 | this._QueryData(); |
436 | 446 | } else { |
437 | 447 | this.$message.error(info); |
... | ... | @@ -449,6 +459,7 @@ export default { |
449 | 459 | //学生调班弹窗 |
450 | 460 | openChangeClazz(obj) { |
451 | 461 | this.formStuCla.studentId = obj.id; |
462 | + this.formStuCla.className = obj.className | |
452 | 463 | this.formStuCla.studentName = obj.studentName; |
453 | 464 | this.formStuCla.studentCode = obj.studentCode; |
454 | 465 | this.formStuCla.classId = obj.classId; |
... | ... | @@ -470,7 +481,6 @@ export default { |
470 | 481 | if (status == 0) { |
471 | 482 | this.diaChangeClass = false; |
472 | 483 | this.$message.success(info); |
473 | - this._QueryClass(); | |
474 | 484 | this._QueryData(); |
475 | 485 | } else { |
476 | 486 | this.$message.error(info); |
... | ... | @@ -492,6 +502,7 @@ export default { |
492 | 502 | }); |
493 | 503 | this.loadingClassLogs = false; |
494 | 504 | if (status == 0) { |
505 | + this.formClassTrack.className = obj.className; | |
495 | 506 | this.formClassTrack.studentName = obj.studentName; |
496 | 507 | this.formClassTrack.classList = (data.list && [...data.list]) || []; |
497 | 508 | } else { |
... | ... | @@ -505,7 +516,7 @@ export default { |
505 | 516 | if (status === 0) { |
506 | 517 | this.$message.success("删除成功"); |
507 | 518 | this.studentList.splice(index, 1); |
508 | - this._QueryClass(); | |
519 | + this._QueryData(); | |
509 | 520 | } else { |
510 | 521 | this.$message.error(info); |
511 | 522 | } |
... | ... | @@ -515,10 +526,12 @@ export default { |
515 | 526 | this.query.classId = ""; |
516 | 527 | this.query.studentName = ""; |
517 | 528 | this.query.studentCode = ""; |
529 | + this.classList = []; | |
530 | + this.studentList = []; | |
518 | 531 | await this._QueryClass(val); |
519 | 532 | this._QueryData(3); |
520 | 533 | }, |
521 | - async _QueryData(type) { | |
534 | + serQuery(type) { | |
522 | 535 | let query = {}; |
523 | 536 | if (type == 1) { |
524 | 537 | if (!this.query.studentName) { |
... | ... | @@ -526,35 +539,47 @@ export default { |
526 | 539 | return; |
527 | 540 | } |
528 | 541 | this.query.classId = ""; |
542 | + query.status = this.query.status; | |
529 | 543 | query.studentName = this.query.studentName; |
530 | 544 | this.query.studentCode = ""; |
531 | 545 | this.query.grade = ""; |
532 | 546 | } else if (type == 2) { |
533 | - if (!this.query.studentName) { | |
547 | + if (!this.query.studentCode) { | |
534 | 548 | this.$message.warning("输入学生学号~"); |
535 | 549 | return; |
536 | 550 | } |
537 | 551 | this.query.classId = ""; |
552 | + query.status = this.query.status; | |
538 | 553 | query.studentCode = this.query.studentCode; |
539 | 554 | this.query.studentName = ""; |
540 | 555 | this.query.grade = ""; |
541 | 556 | } else if (type == 3) { |
542 | 557 | this.query.studentName = ""; |
543 | 558 | this.query.studentCode = ""; |
559 | + this.query.status = 0; | |
544 | 560 | query.grade = this.query.grade; |
545 | 561 | query.classId = this.query.classId; |
562 | + } else if (type == 4) { | |
563 | + this.clazzDetail.stationSn = ""; | |
564 | + if (this.query.status) { | |
565 | + this.query.grade = ""; | |
566 | + this.query.classId = ""; | |
567 | + } else { | |
568 | + this.query.studentName = ""; | |
569 | + this.query.studentCode = ""; | |
570 | + this.query.grade = this.gradeList[0]?.value; | |
571 | + this.query.classId = this.classList[0]?.id; | |
572 | + query.grade = this.query.grade; | |
573 | + query.classId = this.query.classId; | |
574 | + } | |
575 | + query.status = this.query.status; | |
546 | 576 | } else { |
547 | 577 | query = this.query; |
548 | 578 | } |
549 | - if (query.grade == 80) { | |
550 | - query.status = 1; | |
551 | - delete query.grade; | |
552 | - } else if (query.grade == 81) { | |
553 | - query.status = 2; | |
554 | - delete query.grade; | |
555 | - } else { | |
556 | - query.status = 0; | |
557 | - } | |
579 | + return query; | |
580 | + }, | |
581 | + async _QueryData(type) { | |
582 | + let query = this.serQuery(type); | |
558 | 583 | this.loading = true; |
559 | 584 | const { data, status, info } = await this.$request.studentList({ |
560 | 585 | ...query, |
... | ... | @@ -562,7 +587,7 @@ export default { |
562 | 587 | this.loading = false; |
563 | 588 | console.log(status); |
564 | 589 | if (status === 0) { |
565 | - this.studentList = data.list || []; | |
590 | + this.studentList = (data.list && [...data?.list]) || []; | |
566 | 591 | } else { |
567 | 592 | this.$message.error(info); |
568 | 593 | } |
... | ... | @@ -583,14 +608,14 @@ export default { |
583 | 608 | } |
584 | 609 | }, |
585 | 610 | async _QueryClass(value) { |
611 | + this.loading = true; | |
586 | 612 | const { data, status, info } = await this.$request.schoolClassList({ |
587 | 613 | grade: value || this.query.grade, |
588 | 614 | }); |
589 | 615 | if (status === 0) { |
590 | - this.classList = [...data.list] || []; | |
616 | + this.classList = (data.list && [...data?.list]) || []; | |
591 | 617 | this.query.classId = this.classList[0]?.id; |
592 | 618 | this.formStu.className = this.classList[0]?.className; |
593 | - this.formStuCla.className = this.classList[0]?.className; | |
594 | 619 | this.clazzDetail.stationSn = this.classList[0]?.stationSn; |
595 | 620 | this.clazzDetail.pairingCode = this.classList[0]?.pairingCode; |
596 | 621 | this.clazzDetail.frequency = this.classList[0]?.frequency; |
... | ... | @@ -702,7 +727,8 @@ export default { |
702 | 727 | .stu-detail { |
703 | 728 | flex: 1; |
704 | 729 | border-left: 0.5px solid #eee; |
705 | - &-tit{ | |
730 | + min-height: 200px; | |
731 | + &-tit { | |
706 | 732 | display: flex; |
707 | 733 | justify-content: space-between; |
708 | 734 | } | ... | ... |
src/views/standard/setUp/teacher.vue
... | ... | @@ -54,7 +54,13 @@ |
54 | 54 | collapse-tags |
55 | 55 | :show-all-levels="false" |
56 | 56 | ></el-cascader> |
57 | - <el-select class="sel" v-model="query.type" placeholder="选择类型"> | |
57 | + <el-select | |
58 | + class="sel" | |
59 | + v-model="query.type" | |
60 | + @change="_QueryData(4)" | |
61 | + placeholder="选择类型" | |
62 | + > | |
63 | + <el-option disabled label="请选择" value=""></el-option> | |
58 | 64 | <el-option label="已分配教师" :value="0"></el-option> |
59 | 65 | <el-option label="未分配教师" :value="1"></el-option> |
60 | 66 | </el-select> |
... | ... | @@ -109,7 +115,7 @@ |
109 | 115 | :class="showTId == item.id ? 'active' : ''" |
110 | 116 | @click="showTeacher(item)" |
111 | 117 | > |
112 | - {{ item.realName }}({{ setClass(item) }}) | |
118 | + {{ item.realName }}<template v-if="setClass(item)">({{ setClass(item) }})</template> | |
113 | 119 | </li> |
114 | 120 | </ul> |
115 | 121 | </div> |
... | ... | @@ -452,9 +458,9 @@ export default { |
452 | 458 | }, |
453 | 459 | async created() { |
454 | 460 | this.code = localStorage.getItem("csCode") || ""; |
461 | + this._QueryData(4); | |
455 | 462 | await this._QuerySubject(); |
456 | 463 | await this._QueryDataGrade(); |
457 | - this._QueryData(1); | |
458 | 464 | this._RoleList(); |
459 | 465 | await this._QueryClass(); |
460 | 466 | }, |
... | ... | @@ -702,12 +708,44 @@ export default { |
702 | 708 | }, |
703 | 709 | setQuery(type) { |
704 | 710 | let query = {}; |
711 | + if (type == 1) { | |
712 | + query.grades = []; | |
713 | + query.classIds = []; | |
714 | + query.subjectNames = []; | |
715 | + this.query.gradeClassSub?.map((item) => { | |
716 | + if (item.length == 1) { | |
717 | + if (!query.grades.includes(item[0])) { | |
718 | + query.grades.push(item[0]); | |
719 | + } | |
720 | + } else if (item.length == 2) { | |
721 | + if (!query.classIds.includes(item[1])) { | |
722 | + query.classIds.push(item[1]); | |
723 | + } | |
724 | + query.grades.includes(item[0]) && query.grades.remove(item[0]); | |
725 | + } else if (item.length == 3) { | |
726 | + if (!query.subjectNames.includes(item[2])) { | |
727 | + query.subjectNames.push(item[2]); | |
728 | + } | |
729 | + query.grades.includes(item[0]) && query.grades.remove(item[0]); | |
730 | + query.classIds.includes(item[0]) && query.classIds.remove(item[0]); | |
731 | + } | |
732 | + }); | |
733 | + | |
734 | + delete query.gradeClassSub; | |
735 | + query.grades.length ? "" : delete query.grades; | |
736 | + query.classIds.length ? "" : delete query.classIds; | |
737 | + query.subjectNames.length ? "" : delete query.subjectNames; | |
738 | + this.query.teacherName = ""; | |
739 | + this.query.phone = ""; | |
740 | + this.query.type = ""; | |
741 | + } | |
705 | 742 | if (type == 2) { |
706 | 743 | if (this.query.teacherName == "") { |
707 | 744 | this.$message.warning("请输入老师姓名"); |
708 | 745 | return; |
709 | 746 | } |
710 | 747 | query.teacherName = this.query.teacherName; |
748 | + this.query.type = ""; | |
711 | 749 | this.query.phone = ""; |
712 | 750 | this.query.gradeClassSub = []; |
713 | 751 | } else if (type == 3) { |
... | ... | @@ -715,9 +753,15 @@ export default { |
715 | 753 | this.$message.warning("请输入老师手机"); |
716 | 754 | return; |
717 | 755 | } |
756 | + this.query.type = ""; | |
718 | 757 | query.phone = this.query.phone; |
719 | 758 | this.query.teacherName = ""; |
720 | 759 | this.query.gradeClassSub = []; |
760 | + } else if (type == 4) { | |
761 | + this.query.teacherName = ""; | |
762 | + this.query.phone = ""; | |
763 | + this.query.gradeClassSub = []; | |
764 | + query.type = this.query.type; | |
721 | 765 | } else { |
722 | 766 | query = { ...this.query }; |
723 | 767 | query.grades = []; |
... | ... | @@ -732,14 +776,12 @@ export default { |
732 | 776 | if (!query.classIds.includes(item[1])) { |
733 | 777 | query.classIds.push(item[1]); |
734 | 778 | } |
735 | - query.grades.includes(item[0]) && | |
736 | - query.grades.remove(item[0]); | |
779 | + query.grades.includes(item[0]) && query.grades.remove(item[0]); | |
737 | 780 | } else if (item.length == 3) { |
738 | 781 | if (!query.subjectNames.includes(item[2])) { |
739 | 782 | query.subjectNames.push(item[2]); |
740 | 783 | } |
741 | - query.grades.includes(item[0]) && | |
742 | - query.grades.remove(item[0]); | |
784 | + query.grades.includes(item[0]) && query.grades.remove(item[0]); | |
743 | 785 | query.classIds.includes(item[0]) && query.classIds.remove(item[0]); |
744 | 786 | } |
745 | 787 | }); |
... | ... | @@ -757,7 +799,7 @@ export default { |
757 | 799 | async _QueryData(type) { |
758 | 800 | if (this.loading) return; |
759 | 801 | this.loading = true; |
760 | - let query = this.setQuery(); | |
802 | + let query = this.setQuery(type); | |
761 | 803 | this.teacherList = []; |
762 | 804 | const { data, status, info } = await this.$request.teacherList({ |
763 | 805 | ...query, |
... | ... | @@ -830,7 +872,7 @@ export default { |
830 | 872 | if (status === 0) { |
831 | 873 | let gradeSubList = {}; |
832 | 874 | this.gradeList.map((item) => { |
833 | - gradeSubList[item.value] = [...item.children]; | |
875 | + gradeSubList[item.label] = [...item.children]; | |
834 | 876 | }); |
835 | 877 | this.classList = |
836 | 878 | data.list.map((item) => { | ... | ... |