Commit ae0a304c014444d344c8cff94723c69809960314
1 parent
5fb1f184
学生管理-显示班级基站信息
Showing
2 changed files
with
64 additions
and
0 deletions
src/views/standard/device/index.vue
| ... | ... | @@ -386,6 +386,16 @@ |
| 386 | 386 | > |
| 387 | 387 | </el-pagination> |
| 388 | 388 | </div> |
| 389 | + <!-- <p class="down" v-if="tableData.length"> | |
| 390 | + <el-button | |
| 391 | + type="primary" | |
| 392 | + plain | |
| 393 | + round | |
| 394 | + icon="fa fa-cloud-download" | |
| 395 | + @click="downExl" | |
| 396 | + >导出报表</el-button | |
| 397 | + > | |
| 398 | + </p> --> | |
| 389 | 399 | </div> |
| 390 | 400 | </div> |
| 391 | 401 | <el-dialog title="设备导入" :visible.sync="diaUp" width="400"> |
| ... | ... | @@ -506,6 +516,7 @@ export default { |
| 506 | 516 | }, |
| 507 | 517 | data() { |
| 508 | 518 | return { |
| 519 | + exportLoading: false, | |
| 509 | 520 | isAdd: false, //添加还是修改基站 |
| 510 | 521 | role: "", |
| 511 | 522 | code: "", |
| ... | ... | @@ -794,6 +805,33 @@ export default { |
| 794 | 805 | this.$message.error("下载失败"); |
| 795 | 806 | } |
| 796 | 807 | }, |
| 808 | + async downExl() { | |
| 809 | + //报表到处 | |
| 810 | + if (this.exportLoading == true) return; | |
| 811 | + const exportPhaseExamReport = | |
| 812 | + this.type == 1 | |
| 813 | + ? this.$request.cTExportPhaseExamReport | |
| 814 | + : this.type == 1 | |
| 815 | + ? this.$request.exportPhaseExamReport | |
| 816 | + : this.$request.exportPhaseExamReport; | |
| 817 | + this.exportLoading = true; | |
| 818 | + const data = await exportPhaseExamReport({ ...this.query }); | |
| 819 | + this.exportLoading = false; | |
| 820 | + if (data && !data.code) { | |
| 821 | + let blob = new Blob([data], { | |
| 822 | + type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", | |
| 823 | + }); | |
| 824 | + let txt = | |
| 825 | + this.type == 1 | |
| 826 | + ? "基站管理报表.xlsx" | |
| 827 | + : this.type == 2 | |
| 828 | + ? "答题器报表.xlsx" | |
| 829 | + : "授课端报表.xlsx"; | |
| 830 | + downloadFile(txt, blob); | |
| 831 | + } else { | |
| 832 | + this.$message.error(data.info); | |
| 833 | + } | |
| 834 | + }, | |
| 797 | 835 | |
| 798 | 836 | // 修改基站 |
| 799 | 837 | setAnswerEqu() { |
| ... | ... | @@ -1075,6 +1113,9 @@ export default { |
| 1075 | 1113 | .tab-box { |
| 1076 | 1114 | padding: 20px 0 12px; |
| 1077 | 1115 | } |
| 1116 | +.down { | |
| 1117 | + padding:0 0 16px 20px; | |
| 1118 | +} | |
| 1078 | 1119 | .content { |
| 1079 | 1120 | background: #f8f8f8; |
| 1080 | 1121 | border: 1px solid #e2e2e2; | ... | ... |
src/views/standard/setUp/student.vue
| ... | ... | @@ -70,6 +70,11 @@ |
| 70 | 70 | </ul> |
| 71 | 71 | </div> |
| 72 | 72 | <div class="stu-detail"> |
| 73 | + <div class="clazz-detail"> | |
| 74 | + <p>基站SN:{{ clazzDetail.stationSn }}</p> | |
| 75 | + <p>配对码:{{ clazzDetail.pairingCode }}</p> | |
| 76 | + <p>频点:{{ clazzDetail.frequency }}</p> | |
| 77 | + </div> | |
| 73 | 78 | <div class="answer-header"> |
| 74 | 79 | <div class="sel-box"> |
| 75 | 80 | <el-input |
| ... | ... | @@ -239,6 +244,7 @@ export default { |
| 239 | 244 | url: "/api_html/school/manager/importStudentClicker", |
| 240 | 245 | diaStu: false, |
| 241 | 246 | diaClass: false, |
| 247 | + clazzDetail: { stationSn: "", pairingCode: "", frequency: "" }, | |
| 242 | 248 | query: { |
| 243 | 249 | gradeName: "", |
| 244 | 250 | classId: "", |
| ... | ... | @@ -305,6 +311,9 @@ export default { |
| 305 | 311 | this.diaStu = true; |
| 306 | 312 | }, |
| 307 | 313 | classDetail(obj) { |
| 314 | + this.clazzDetail.stationSn = obj.stationSn; | |
| 315 | + this.clazzDetail.pairingCode = obj.pairingCode; | |
| 316 | + this.clazzDetail.frequency = obj.frequency; | |
| 308 | 317 | this.query.classId = obj.id; |
| 309 | 318 | this.formStu.className = obj.className; |
| 310 | 319 | this._QueryData(3); |
| ... | ... | @@ -455,6 +464,9 @@ export default { |
| 455 | 464 | this.classList = [...data.list] || []; |
| 456 | 465 | this.query.classId = this.classList[0]?.id; |
| 457 | 466 | this.formStu.className = this.classList[0]?.className; |
| 467 | + this.clazzDetail.stationSn = this.classList[0]?.stationSn; | |
| 468 | + this.clazzDetail.pairingCode = this.classList[0]?.pairingCode; | |
| 469 | + this.clazzDetail.frequency = this.classList[0]?.frequency; | |
| 458 | 470 | } else { |
| 459 | 471 | this.$message.error(info); |
| 460 | 472 | } |
| ... | ... | @@ -487,6 +499,9 @@ export default { |
| 487 | 499 | background: #f8f8f8; |
| 488 | 500 | border-radius: 10px; |
| 489 | 501 | overflow: hidden; |
| 502 | + .answer-header { | |
| 503 | + padding-top: 0; | |
| 504 | + } | |
| 490 | 505 | .stu-list { |
| 491 | 506 | max-height: 80vh; |
| 492 | 507 | .h-title { |
| ... | ... | @@ -581,5 +596,13 @@ export default { |
| 581 | 596 | } |
| 582 | 597 | } |
| 583 | 598 | } |
| 599 | + .clazz-detail { | |
| 600 | + display: flex; | |
| 601 | + padding: 12px 12px 10px 20px; | |
| 602 | + p { | |
| 603 | + margin-right: 16px; | |
| 604 | + color: #666; | |
| 605 | + } | |
| 606 | + } | |
| 584 | 607 | } |
| 585 | 608 | </style> |
| 586 | 609 | \ No newline at end of file | ... | ... |