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