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