From 99713685c8210a66c35ae3c033d5ed58c200d0ba Mon Sep 17 00:00:00 2001 From: 梁保满 Date: Wed, 31 May 2023 15:44:19 +0800 Subject: [PATCH] 学生调班,班级数据重新请求,使用过分析参数 --- src/views/standard/analysis/index.vue | 23 +++++++++++++++++------ src/views/standard/device/error.vue | 2 +- src/views/standard/setUp/student.vue | 75 ++++++++++++++++++++++++++++++++++++++++++++++++++------------------------- src/views/standard/setUp/teacher.vue | 8 ++++++++ 4 files changed, 76 insertions(+), 32 deletions(-) diff --git a/src/views/standard/analysis/index.vue b/src/views/standard/analysis/index.vue index e6ebbbe..14ab168 100644 --- a/src/views/standard/analysis/index.vue +++ b/src/views/standard/analysis/index.vue @@ -55,7 +55,7 @@

-
  • +
  • 对比项{{ setBigNum(index) }}:
    { gradeIds.push(items.grade); - if (this.query.secGraClaSub.length < 10) { - this.query.secGraClaSub.push([item.section, items.grade]); - } return { value: items.grade, label: items.gradeName, @@ -399,6 +396,7 @@ export default { if (status === 0) { if (!!data.list) { if (this.role == "ROLE_XUEXIAO") { + this.query.secGraClaSub = []; data.list?.map((item) => { let subList = item.subjectNames?.map((items) => { return { @@ -422,6 +420,13 @@ export default { } }); }) || []; + this.gradeList.map((sec) => { + sec.gradeIds.map((items) => { + if (this.query.secGraClaSub.length < 10) { + this.query.secGraClaSub.push([sec.value, items]); + } + }); + }); } } } else { @@ -506,7 +511,10 @@ div::-webkit-scrollbar-thumb { } } .params-box { + display: flex; + flex-wrap: wrap; .item { + width: 100%; display: flex; align-items: center; margin-bottom: 20px; @@ -533,6 +541,9 @@ div::-webkit-scrollbar-thumb { } } } + .item2 { + width: 50%; + } } .chart-box { height: 600px; diff --git a/src/views/standard/device/error.vue b/src/views/standard/device/error.vue index cde51c6..32aae1f 100644 --- a/src/views/standard/device/error.vue +++ b/src/views/standard/device/error.vue @@ -75,7 +75,7 @@ - +
    +

    + 共筛选出{{ studentList.length }}名学生。 +

    +

    + 共筛选出{{ getStuTotal }}名学生。 +

    @@ -102,18 +108,10 @@
    -
    -

    - 共筛选出{{ studentList.length }}名学生。 -

    -
    -

    基站SN:{{ clazzDetail.stationSn }}

    -

    配对码:{{ clazzDetail.pairingCode }}

    -

    频点:{{ clazzDetail.frequency }}

    -
    +
    +

    基站SN:{{ clazzDetail.stationSn }}

    +

    配对码:{{ clazzDetail.pairingCode }}

    +

    频点:{{ clazzDetail.frequency }}

    • {{ formClassTrack.studentName }} - {{ formClassTrack.className }} + {{ formClassTrack.className }}

      @@ -368,6 +366,14 @@ export default { }, }; }, + computed: { + getStuTotal: function () { + let num = this.classList.reduce((pre, cur) => { + return (pre += cur.studentCount); + }, 0); + return num; + }, + }, async created() { this.code = localStorage.getItem("csCode") || ""; this.role = @@ -458,11 +464,17 @@ export default { }, //学生调班弹窗 openChangeClazz(obj) { + if (!this.query.grade) { + this._QueryClazz(obj.grade); + this.formStuCla.classId = ""; + } else { + this.formStuCla.classId = this.classList[0].id; + } + this.formStuCla.studentId = obj.id; - this.formStuCla.className = obj.className + this.formStuCla.className = obj.className; this.formStuCla.studentName = obj.studentName; this.formStuCla.studentCode = obj.studentCode; - this.formStuCla.classId = obj.classId; this.formStuCla.oldClassId = obj.classId; this.diaChangeClass = true; }, @@ -526,8 +538,6 @@ export default { this.query.classId = ""; this.query.studentName = ""; this.query.studentCode = ""; - this.classList = []; - this.studentList = []; await this._QueryClass(val); this._QueryData(3); }, @@ -581,6 +591,7 @@ export default { async _QueryData(type) { let query = this.serQuery(type); this.loading = true; + this.studentList = []; const { data, status, info } = await this.$request.studentList({ ...query, }); @@ -609,6 +620,7 @@ export default { }, async _QueryClass(value) { this.loading = true; + this.classList = []; const { data, status, info } = await this.$request.schoolClassList({ grade: value || this.query.grade, }); @@ -623,6 +635,18 @@ export default { this.$message.error(info); } }, + async _QueryClazz(value) { + this.classList = []; + const { data, status, info } = await this.$request.schoolClassList({ + grade: value, + }); + if (status === 0) { + this.classList = (data.list && [...data?.list]) || []; + this.formStuCla.classId = this.classList[0].id; + } else { + this.$message.error(info); + } + }, async downExcel() { this.loadingDown = true; let { data, info, status } = @@ -653,6 +677,11 @@ export default { color: #999; margin-bottom: 10px; } +.total { + padding: 0 20px 10px; + font-size: 14px; + color: #666; +} .stu-box { display: flex; background: #f8f8f8; @@ -732,15 +761,11 @@ export default { display: flex; justify-content: space-between; } - .total { - padding: 15px 12px; - font-size: 14px; - color: #666; - } + .s-ul { display: flex; flex-wrap: wrap; - padding-left: 20px; + padding: 12px 0 0 20px; .s-li { position: relative; box-shadow: 2px 2px 5px #7f7f7f; @@ -806,7 +831,7 @@ export default { } .clazz-detail { display: flex; - padding: 12px 12px 12px 20px; + padding: 12px 12px 0 20px; p { margin-right: 16px; color: #666; diff --git a/src/views/standard/setUp/teacher.vue b/src/views/standard/setUp/teacher.vue index 1106931..4ae9123 100644 --- a/src/views/standard/setUp/teacher.vue +++ b/src/views/standard/setUp/teacher.vue @@ -98,6 +98,9 @@ >

    +

    + 共筛选出{{ teacherList.length }}名教师。 +