Commit 99713685c8210a66c35ae3c033d5ed58c200d0ba
1 parent
b8827a72
学生调班,班级数据重新请求,使用过分析参数
Showing
4 changed files
with
76 additions
and
32 deletions
src/views/standard/analysis/index.vue
| ... | ... | @@ -55,7 +55,7 @@ |
| 55 | 55 | </p> |
| 56 | 56 | </div> |
| 57 | 57 | </li> |
| 58 | - <li class="item" v-for="(item, index) in query.secGraClaSub"> | |
| 58 | + <li class="item item2" v-for="(item, index) in query.secGraClaSub"> | |
| 59 | 59 | <span class="s-txt">对比项{{ setBigNum(index) }}:</span> |
| 60 | 60 | <div class="sel-box"> |
| 61 | 61 | <el-cascader |
| ... | ... | @@ -177,7 +177,7 @@ export default { |
| 177 | 177 | this.query.startDay = formatDate(new Date(), "yyyy-MM-dd"); |
| 178 | 178 | this.query.endDay = formatDate(new Date(), "yyyy-MM-dd"); |
| 179 | 179 | } |
| 180 | - this.setDate(4) | |
| 180 | + this.setDate(4); | |
| 181 | 181 | this._QueryData(); |
| 182 | 182 | }, |
| 183 | 183 | methods: { |
| ... | ... | @@ -331,7 +331,7 @@ export default { |
| 331 | 331 | this.$message.error(info); |
| 332 | 332 | } |
| 333 | 333 | }, |
| 334 | - // 查找班级 | |
| 334 | + // 查找nian级 | |
| 335 | 335 | async _QueryGradeList() { |
| 336 | 336 | this.loading = true; |
| 337 | 337 | const gradeList = |
| ... | ... | @@ -348,9 +348,6 @@ export default { |
| 348 | 348 | let gradeIds = []; |
| 349 | 349 | let children = item.gradeList.map((items) => { |
| 350 | 350 | gradeIds.push(items.grade); |
| 351 | - if (this.query.secGraClaSub.length < 10) { | |
| 352 | - this.query.secGraClaSub.push([item.section, items.grade]); | |
| 353 | - } | |
| 354 | 351 | return { |
| 355 | 352 | value: items.grade, |
| 356 | 353 | label: items.gradeName, |
| ... | ... | @@ -399,6 +396,7 @@ export default { |
| 399 | 396 | if (status === 0) { |
| 400 | 397 | if (!!data.list) { |
| 401 | 398 | if (this.role == "ROLE_XUEXIAO") { |
| 399 | + this.query.secGraClaSub = []; | |
| 402 | 400 | data.list?.map((item) => { |
| 403 | 401 | let subList = item.subjectNames?.map((items) => { |
| 404 | 402 | return { |
| ... | ... | @@ -422,6 +420,13 @@ export default { |
| 422 | 420 | } |
| 423 | 421 | }); |
| 424 | 422 | }) || []; |
| 423 | + this.gradeList.map((sec) => { | |
| 424 | + sec.gradeIds.map((items) => { | |
| 425 | + if (this.query.secGraClaSub.length < 10) { | |
| 426 | + this.query.secGraClaSub.push([sec.value, items]); | |
| 427 | + } | |
| 428 | + }); | |
| 429 | + }); | |
| 425 | 430 | } |
| 426 | 431 | } |
| 427 | 432 | } else { |
| ... | ... | @@ -506,7 +511,10 @@ div::-webkit-scrollbar-thumb { |
| 506 | 511 | } |
| 507 | 512 | } |
| 508 | 513 | .params-box { |
| 514 | + display: flex; | |
| 515 | + flex-wrap: wrap; | |
| 509 | 516 | .item { |
| 517 | + width: 100%; | |
| 510 | 518 | display: flex; |
| 511 | 519 | align-items: center; |
| 512 | 520 | margin-bottom: 20px; |
| ... | ... | @@ -533,6 +541,9 @@ div::-webkit-scrollbar-thumb { |
| 533 | 541 | } |
| 534 | 542 | } |
| 535 | 543 | } |
| 544 | + .item2 { | |
| 545 | + width: 50%; | |
| 546 | + } | |
| 536 | 547 | } |
| 537 | 548 | .chart-box { |
| 538 | 549 | height: 600px; | ... | ... |
src/views/standard/device/error.vue
| ... | ... | @@ -75,7 +75,7 @@ |
| 75 | 75 | <el-table-column label="操作" align="center" width="100" |
| 76 | 76 | ><template slot-scope="scoped"> |
| 77 | 77 | <el-link |
| 78 | - :disabled="scoped.row.abnormalRemark" | |
| 78 | + :disabled="!!scoped.row.abnormalRemark" | |
| 79 | 79 | @click="openDia(scoped.row)" |
| 80 | 80 | >处理</el-link |
| 81 | 81 | ></template | ... | ... |
src/views/standard/setUp/student.vue
| ... | ... | @@ -56,7 +56,7 @@ |
| 56 | 56 | placeholder="学生状态" |
| 57 | 57 | > |
| 58 | 58 | <el-option label="正常" :value="0"></el-option> |
| 59 | - <el-option label="未分配" :value="1"></el-option> | |
| 59 | + <el-option label="未分配" :value="-1"></el-option> | |
| 60 | 60 | <el-option label="已毕业" :value="2"></el-option> |
| 61 | 61 | </el-select> |
| 62 | 62 | <el-input |
| ... | ... | @@ -85,6 +85,12 @@ |
| 85 | 85 | </el-input> |
| 86 | 86 | </div> |
| 87 | 87 | </div> |
| 88 | + <p class="total" v-if="studentList.length && !query.grade"> | |
| 89 | + 共筛选出{{ studentList.length }}名学生。 | |
| 90 | + </p> | |
| 91 | + <p class="total" v-if="getStuTotal && query.grade"> | |
| 92 | + 共筛选出{{ getStuTotal }}名学生。 | |
| 93 | + </p> | |
| 88 | 94 | <div class="page-content"> |
| 89 | 95 | <div class="stu-box"> |
| 90 | 96 | <div class="stu-list" v-show="query.grade"> |
| ... | ... | @@ -102,18 +108,10 @@ |
| 102 | 108 | </ul> |
| 103 | 109 | </div> |
| 104 | 110 | <div class="stu-detail" v-loading="loading"> |
| 105 | - <div class="stu-detail-tit"> | |
| 106 | - <p class="total" v-if="studentList.length"> | |
| 107 | - 共筛选出{{ studentList.length }}名学生。 | |
| 108 | - </p> | |
| 109 | - <div | |
| 110 | - class="clazz-detail" | |
| 111 | - v-if="clazzDetail.stationSn && query.grade" | |
| 112 | - > | |
| 113 | - <p>基站SN:{{ clazzDetail.stationSn }}</p> | |
| 114 | - <p>配对码:{{ clazzDetail.pairingCode }}</p> | |
| 115 | - <p>频点:{{ clazzDetail.frequency }}</p> | |
| 116 | - </div> | |
| 111 | + <div class="clazz-detail" v-if="clazzDetail.stationSn && query.grade"> | |
| 112 | + <p>基站SN:{{ clazzDetail.stationSn }}</p> | |
| 113 | + <p>配对码:{{ clazzDetail.pairingCode }}</p> | |
| 114 | + <p>频点:{{ clazzDetail.frequency }}</p> | |
| 117 | 115 | </div> |
| 118 | 116 | <ul class="s-ul"> |
| 119 | 117 | <li |
| ... | ... | @@ -210,7 +208,7 @@ |
| 210 | 208 | <span>{{ formClassTrack.studentName }}</span> |
| 211 | 209 | </el-form-item> |
| 212 | 210 | <el-form-item label="当前班级:"> |
| 213 | - <span>{{ formClassTrack.className }}</span> | |
| 211 | + <span>{{ formClassTrack.className }}</span> | |
| 214 | 212 | </el-form-item> |
| 215 | 213 | <el-form-item label="历史班级:"> |
| 216 | 214 | <p v-for="item in formClassTrack.classList"> |
| ... | ... | @@ -368,6 +366,14 @@ export default { |
| 368 | 366 | }, |
| 369 | 367 | }; |
| 370 | 368 | }, |
| 369 | + computed: { | |
| 370 | + getStuTotal: function () { | |
| 371 | + let num = this.classList.reduce((pre, cur) => { | |
| 372 | + return (pre += cur.studentCount); | |
| 373 | + }, 0); | |
| 374 | + return num; | |
| 375 | + }, | |
| 376 | + }, | |
| 371 | 377 | async created() { |
| 372 | 378 | this.code = localStorage.getItem("csCode") || ""; |
| 373 | 379 | this.role = |
| ... | ... | @@ -458,11 +464,17 @@ export default { |
| 458 | 464 | }, |
| 459 | 465 | //学生调班弹窗 |
| 460 | 466 | openChangeClazz(obj) { |
| 467 | + if (!this.query.grade) { | |
| 468 | + this._QueryClazz(obj.grade); | |
| 469 | + this.formStuCla.classId = ""; | |
| 470 | + } else { | |
| 471 | + this.formStuCla.classId = this.classList[0].id; | |
| 472 | + } | |
| 473 | + | |
| 461 | 474 | this.formStuCla.studentId = obj.id; |
| 462 | - this.formStuCla.className = obj.className | |
| 475 | + this.formStuCla.className = obj.className; | |
| 463 | 476 | this.formStuCla.studentName = obj.studentName; |
| 464 | 477 | this.formStuCla.studentCode = obj.studentCode; |
| 465 | - this.formStuCla.classId = obj.classId; | |
| 466 | 478 | this.formStuCla.oldClassId = obj.classId; |
| 467 | 479 | this.diaChangeClass = true; |
| 468 | 480 | }, |
| ... | ... | @@ -526,8 +538,6 @@ export default { |
| 526 | 538 | this.query.classId = ""; |
| 527 | 539 | this.query.studentName = ""; |
| 528 | 540 | this.query.studentCode = ""; |
| 529 | - this.classList = []; | |
| 530 | - this.studentList = []; | |
| 531 | 541 | await this._QueryClass(val); |
| 532 | 542 | this._QueryData(3); |
| 533 | 543 | }, |
| ... | ... | @@ -581,6 +591,7 @@ export default { |
| 581 | 591 | async _QueryData(type) { |
| 582 | 592 | let query = this.serQuery(type); |
| 583 | 593 | this.loading = true; |
| 594 | + this.studentList = []; | |
| 584 | 595 | const { data, status, info } = await this.$request.studentList({ |
| 585 | 596 | ...query, |
| 586 | 597 | }); |
| ... | ... | @@ -609,6 +620,7 @@ export default { |
| 609 | 620 | }, |
| 610 | 621 | async _QueryClass(value) { |
| 611 | 622 | this.loading = true; |
| 623 | + this.classList = []; | |
| 612 | 624 | const { data, status, info } = await this.$request.schoolClassList({ |
| 613 | 625 | grade: value || this.query.grade, |
| 614 | 626 | }); |
| ... | ... | @@ -623,6 +635,18 @@ export default { |
| 623 | 635 | this.$message.error(info); |
| 624 | 636 | } |
| 625 | 637 | }, |
| 638 | + async _QueryClazz(value) { | |
| 639 | + this.classList = []; | |
| 640 | + const { data, status, info } = await this.$request.schoolClassList({ | |
| 641 | + grade: value, | |
| 642 | + }); | |
| 643 | + if (status === 0) { | |
| 644 | + this.classList = (data.list && [...data?.list]) || []; | |
| 645 | + this.formStuCla.classId = this.classList[0].id; | |
| 646 | + } else { | |
| 647 | + this.$message.error(info); | |
| 648 | + } | |
| 649 | + }, | |
| 626 | 650 | async downExcel() { |
| 627 | 651 | this.loadingDown = true; |
| 628 | 652 | let { data, info, status } = |
| ... | ... | @@ -653,6 +677,11 @@ export default { |
| 653 | 677 | color: #999; |
| 654 | 678 | margin-bottom: 10px; |
| 655 | 679 | } |
| 680 | +.total { | |
| 681 | + padding: 0 20px 10px; | |
| 682 | + font-size: 14px; | |
| 683 | + color: #666; | |
| 684 | +} | |
| 656 | 685 | .stu-box { |
| 657 | 686 | display: flex; |
| 658 | 687 | background: #f8f8f8; |
| ... | ... | @@ -732,15 +761,11 @@ export default { |
| 732 | 761 | display: flex; |
| 733 | 762 | justify-content: space-between; |
| 734 | 763 | } |
| 735 | - .total { | |
| 736 | - padding: 15px 12px; | |
| 737 | - font-size: 14px; | |
| 738 | - color: #666; | |
| 739 | - } | |
| 764 | + | |
| 740 | 765 | .s-ul { |
| 741 | 766 | display: flex; |
| 742 | 767 | flex-wrap: wrap; |
| 743 | - padding-left: 20px; | |
| 768 | + padding: 12px 0 0 20px; | |
| 744 | 769 | .s-li { |
| 745 | 770 | position: relative; |
| 746 | 771 | box-shadow: 2px 2px 5px #7f7f7f; |
| ... | ... | @@ -806,7 +831,7 @@ export default { |
| 806 | 831 | } |
| 807 | 832 | .clazz-detail { |
| 808 | 833 | display: flex; |
| 809 | - padding: 12px 12px 12px 20px; | |
| 834 | + padding: 12px 12px 0 20px; | |
| 810 | 835 | p { |
| 811 | 836 | margin-right: 16px; |
| 812 | 837 | color: #666; | ... | ... |
src/views/standard/setUp/teacher.vue
| ... | ... | @@ -98,6 +98,9 @@ |
| 98 | 98 | > |
| 99 | 99 | </div> |
| 100 | 100 | </div> |
| 101 | + <p class="total" v-if="teacherList.length"> | |
| 102 | + 共筛选出{{ teacherList.length }}名教师。 | |
| 103 | + </p> | |
| 101 | 104 | <div class="page-content"> |
| 102 | 105 | <el-empty |
| 103 | 106 | :image-size="100" |
| ... | ... | @@ -921,6 +924,11 @@ export default { |
| 921 | 924 | .page-content { |
| 922 | 925 | padding: 0 20px 20px; |
| 923 | 926 | } |
| 927 | +.total { | |
| 928 | + padding: 0 20px 10px; | |
| 929 | + font-size: 14px; | |
| 930 | + color: #666; | |
| 931 | +} | |
| 924 | 932 | .teacher-box { |
| 925 | 933 | display: flex; |
| 926 | 934 | background: #f8f8f8; | ... | ... |