Commit 47a01cb69b30193dd95907018e185749f1edee0b
1 parent
b31444fa
v1.3测试问题
Showing
14 changed files
with
251 additions
and
117 deletions
src/utils/index.js
| ... | ... | @@ -759,8 +759,9 @@ export function tablePrint(id, title) { |
| 759 | 759 | .el-table{width:100%} |
| 760 | 760 | .el-table,.el-table__body-wrapper{max-height:auto} |
| 761 | 761 | .el-table .el-table__cell{padding:12px 0} |
| 762 | - .el-table thead tr:first-child th.el-table__cell{border-top: 1px solid #ccc;background:#ccc} | |
| 762 | + .el-table thead tr:first-child th.el-table__cell{border-top: 1px solid #ccc} | |
| 763 | 763 | .el-table thead tr:first-child th.el-table__cell:first-child{border-left: 1px solid #ccc;} |
| 764 | + .el-table thead tr th.el-table__cell{background:#ccc} | |
| 764 | 765 | .el-table tbody tr td.el-table__cell:first-child{border-left: 1px solid #ccc;} |
| 765 | 766 | .el-table td.el-table__cell{border-bottom: 1px solid #ccc;} |
| 766 | 767 | .el-table--border .el-table__cell{border-right: 1px solid #ccc;} |
| ... | ... | @@ -794,6 +795,6 @@ export function tablePrint(id, title) { |
| 794 | 795 | awin.document.body.append(pTit) |
| 795 | 796 | } |
| 796 | 797 | awin.document.body.append(aDom); |
| 797 | - // awin.print(); | |
| 798 | - // awin.close() | |
| 798 | + awin.print(); | |
| 799 | + awin.close() | |
| 799 | 800 | } |
| 800 | 801 | \ No newline at end of file | ... | ... |
src/views/examinationPaper/add.vue
| ... | ... | @@ -1873,20 +1873,27 @@ export default { |
| 1873 | 1873 | if (status == 0) { |
| 1874 | 1874 | this.form.title = data.title + "_副本"; |
| 1875 | 1875 | this.form.tagId = data.tagId === 0 ? "" : data.tagId; |
| 1876 | - | |
| 1877 | - this.form.subjectName = this.subjectList.length | |
| 1878 | - ? this.subjectList.filter((item) => { | |
| 1879 | - return item.label == data.subjectName; | |
| 1880 | - })?.value | |
| 1881 | - : ""; | |
| 1876 | + if (this.subjectList.length) { | |
| 1877 | + this.subjectList.map((item) => { | |
| 1878 | + if (item.label == data.subjectName) { | |
| 1879 | + this.form.subjectName = item.value; | |
| 1880 | + } | |
| 1881 | + }); | |
| 1882 | + } else { | |
| 1883 | + this.form.subjectName = ""; | |
| 1884 | + } | |
| 1882 | 1885 | this.form.examsDuration = data.examsDuration; |
| 1883 | 1886 | if (this.role != "ROLE_PERSONAL") { |
| 1884 | 1887 | this.form.sharingType = data.sharingType; |
| 1885 | - this.form.gradeName = this.gradeList.length | |
| 1886 | - ? this.gradeList.filter((item) => { | |
| 1887 | - return item == data.gradeName; | |
| 1888 | - }) | |
| 1889 | - : ""; | |
| 1888 | + if (this.gradeList.length) { | |
| 1889 | + this.gradeList.map((item) => { | |
| 1890 | + if (item == data.gradeName) { | |
| 1891 | + this.form.gradeName = data.gradeName; | |
| 1892 | + } | |
| 1893 | + }); | |
| 1894 | + } else { | |
| 1895 | + this.form.gradeName = ""; | |
| 1896 | + } | |
| 1890 | 1897 | } |
| 1891 | 1898 | this.form.questionList = data.questionList?.map((item) => { |
| 1892 | 1899 | let subQuestions = | ... | ... |
src/views/examinationPaper/index.vue
| ... | ... | @@ -6,7 +6,7 @@ |
| 6 | 6 | </template> |
| 7 | 7 | <template slot="btns"> |
| 8 | 8 | <el-tooltip |
| 9 | - v-if="!code" | |
| 9 | + v-if="!code && gdClass" | |
| 10 | 10 | effect="dark" |
| 11 | 11 | content="已归档试卷" |
| 12 | 12 | placement="bottom" |
| ... | ... | @@ -215,6 +215,7 @@ export default { |
| 215 | 215 | data() { |
| 216 | 216 | return { |
| 217 | 217 | code: "", |
| 218 | + gdClass: 0, //已归档班级数量 | |
| 218 | 219 | loading: false, |
| 219 | 220 | userName: "", |
| 220 | 221 | dialogVisible: false, |
| ... | ... | @@ -249,6 +250,7 @@ export default { |
| 249 | 250 | this.$store.getters.info.showRole || |
| 250 | 251 | this.$store.getters.info.permissions[0].role; |
| 251 | 252 | this.userName = this.$store.getters.info.name || ""; |
| 253 | + this._QueryClassList2() | |
| 252 | 254 | await this._QueryClassList(); |
| 253 | 255 | if (!this.query.classId) { |
| 254 | 256 | return; |
| ... | ... | @@ -379,6 +381,21 @@ export default { |
| 379 | 381 | } |
| 380 | 382 | }, |
| 381 | 383 | // 查找班级 |
| 384 | + async _QueryClassList2() { | |
| 385 | + this.loading = true; | |
| 386 | + let fetchClassList = | |
| 387 | + this.role == "ROLE_PERSONAL" | |
| 388 | + ? this.$request.pClassList | |
| 389 | + : this.$request.fetchClassList; | |
| 390 | + | |
| 391 | + const { data, status, info } = await fetchClassList({ status: 1 }); | |
| 392 | + if (status === 0) { | |
| 393 | + this.gdClass = data?.list?.length || 0; | |
| 394 | + } else { | |
| 395 | + this.$message.error(info); | |
| 396 | + } | |
| 397 | + }, | |
| 398 | + // 查找班级 | |
| 382 | 399 | async _QueryClassList() { |
| 383 | 400 | this.loading = true; |
| 384 | 401 | let fetchClassList = | ... | ... |
src/views/personal/ask/index.vue
| ... | ... | @@ -6,7 +6,7 @@ |
| 6 | 6 | </template> |
| 7 | 7 | <template slot="btns"> |
| 8 | 8 | <el-tooltip |
| 9 | - v-if="!code" | |
| 9 | + v-if="!code && gdClass" | |
| 10 | 10 | effect="dark" |
| 11 | 11 | content="已归档试卷" |
| 12 | 12 | placement="bottom" |
| ... | ... | @@ -354,6 +354,7 @@ import BusEvent from "@/utils/busEvent"; |
| 354 | 354 | export default { |
| 355 | 355 | data() { |
| 356 | 356 | return { |
| 357 | + gdClass: 0, | |
| 357 | 358 | tableMaxHeight: 300, |
| 358 | 359 | loading: false, |
| 359 | 360 | form: { questionList: [] }, |
| ... | ... | @@ -384,6 +385,7 @@ export default { |
| 384 | 385 | }; |
| 385 | 386 | }, |
| 386 | 387 | async created() { |
| 388 | + this._QueryClassList2(); | |
| 387 | 389 | await this._QueryClassList(); |
| 388 | 390 | if (!this.query.classId) { |
| 389 | 391 | return; |
| ... | ... | @@ -399,17 +401,18 @@ export default { |
| 399 | 401 | activated() { |
| 400 | 402 | const that = this; |
| 401 | 403 | BusEvent.$on("keepAlive", async function () { |
| 402 | - await that._QueryClassList(); | |
| 403 | - if (!that.query.classId) { | |
| 404 | - return; | |
| 405 | - } | |
| 406 | - await that._QuerySubjectList(); | |
| 407 | - await that.setDate(1); | |
| 408 | - let startDay = that.query?.startDay; | |
| 409 | - if (!startDay) { | |
| 410 | - that.query.startDay = new Date(); | |
| 411 | - that.query.endDay = new Date(); | |
| 412 | - } | |
| 404 | + that._QueryClassList2(); | |
| 405 | + await that._QueryClassList(); | |
| 406 | + if (!that.query.classId) { | |
| 407 | + return; | |
| 408 | + } | |
| 409 | + await that._QuerySubjectList(); | |
| 410 | + await that.setDate(1); | |
| 411 | + let startDay = that.query?.startDay; | |
| 412 | + if (!startDay) { | |
| 413 | + that.query.startDay = new Date(); | |
| 414 | + that.query.endDay = new Date(); | |
| 415 | + } | |
| 413 | 416 | }); |
| 414 | 417 | }, |
| 415 | 418 | methods: { |
| ... | ... | @@ -552,6 +555,16 @@ export default { |
| 552 | 555 | // await this.setDate(1); |
| 553 | 556 | this._QueryData(); |
| 554 | 557 | }, |
| 558 | + async _QueryClassList2() { | |
| 559 | + const { data, status, info } = await this.$request.pClassList({ | |
| 560 | + status: 1, | |
| 561 | + }); | |
| 562 | + if (status === 0) { | |
| 563 | + this.gdClass = data?.list?.length || 0; | |
| 564 | + } else { | |
| 565 | + this.$message.error(info); | |
| 566 | + } | |
| 567 | + }, | |
| 555 | 568 | async _QueryClassList() { |
| 556 | 569 | const { data, status, info } = await this.$request.pClassList(); |
| 557 | 570 | if (status === 0) { | ... | ... |
src/views/personal/test/index.vue
| ... | ... | @@ -4,6 +4,23 @@ |
| 4 | 4 | <template slot="title"> |
| 5 | 5 | <span>即时测-数据报表</span> |
| 6 | 6 | </template> |
| 7 | + <template slot="btns"> | |
| 8 | + <el-tooltip | |
| 9 | + v-if="!code && gdClass" | |
| 10 | + effect="dark" | |
| 11 | + content="已归档试卷" | |
| 12 | + placement="bottom" | |
| 13 | + > | |
| 14 | + <el-button | |
| 15 | + type="primary" | |
| 16 | + icon="fa fa-archive" | |
| 17 | + size="mini" | |
| 18 | + plain | |
| 19 | + circle | |
| 20 | + @click="toPortrait" | |
| 21 | + ></el-button> | |
| 22 | + </el-tooltip> | |
| 23 | + </template> | |
| 7 | 24 | </back-box> |
| 8 | 25 | <div class="answer-header"> |
| 9 | 26 | <div class="sel-box"> |
| ... | ... | @@ -424,6 +441,7 @@ import BusEvent from "@/utils/busEvent"; |
| 424 | 441 | export default { |
| 425 | 442 | data() { |
| 426 | 443 | return { |
| 444 | + gdClass: 0, //已归档班级数量 | |
| 427 | 445 | exportLoading: false, |
| 428 | 446 | tableMaxHeight: 300, |
| 429 | 447 | loading: false, |
| ... | ... | @@ -452,6 +470,7 @@ export default { |
| 452 | 470 | }; |
| 453 | 471 | }, |
| 454 | 472 | async created() { |
| 473 | + this._QueryClassList2() | |
| 455 | 474 | await this._QueryClassList(); |
| 456 | 475 | if (!this.query.classId) { |
| 457 | 476 | return; |
| ... | ... | @@ -467,20 +486,26 @@ export default { |
| 467 | 486 | activated() { |
| 468 | 487 | const that = this; |
| 469 | 488 | BusEvent.$on("keepAlive", async function () { |
| 470 | - await that._QueryClassList(); | |
| 471 | - if (!that.query.classId) { | |
| 472 | - return; | |
| 473 | - } | |
| 474 | - await that._QuerySubjectList(); | |
| 475 | - await that.setDate(1); | |
| 476 | - let startDay = that.query?.startDay; | |
| 477 | - if (!startDay) { | |
| 478 | - that.query.startDay = new Date(); | |
| 479 | - that.query.endDay = new Date(); | |
| 480 | - } | |
| 489 | + that._QueryClassList2() | |
| 490 | + await that._QueryClassList(); | |
| 491 | + if (!that.query.classId) { | |
| 492 | + return; | |
| 493 | + } | |
| 494 | + await that._QuerySubjectList(); | |
| 495 | + await that.setDate(1); | |
| 496 | + let startDay = that.query?.startDay; | |
| 497 | + if (!startDay) { | |
| 498 | + that.query.startDay = new Date(); | |
| 499 | + that.query.endDay = new Date(); | |
| 500 | + } | |
| 481 | 501 | }); |
| 482 | 502 | }, |
| 483 | 503 | methods: { |
| 504 | + toArchiving() { | |
| 505 | + this.$router.push({ | |
| 506 | + path: "/testArchiving", | |
| 507 | + }); | |
| 508 | + }, | |
| 484 | 509 | print() { |
| 485 | 510 | tablePrint("print-content", "即时测-" + this.tabList[this.tabIndex - 1]); |
| 486 | 511 | }, |
| ... | ... | @@ -662,6 +687,14 @@ export default { |
| 662 | 687 | await this._QuerySubjectList(); |
| 663 | 688 | await this._QueryData(); |
| 664 | 689 | }, |
| 690 | + async _QueryClassList2() { | |
| 691 | + const { data, status, info } = await this.$request.pClassList({ status: 1 }); | |
| 692 | + if (status === 0) { | |
| 693 | + this.gdClass = data?.list?.length || 0; | |
| 694 | + } else { | |
| 695 | + this.$message.error(info); | |
| 696 | + } | |
| 697 | + }, | |
| 665 | 698 | async _QueryClassList() { |
| 666 | 699 | const { data, status, info } = await this.$request.pClassList(); |
| 667 | 700 | if (status === 0) { | ... | ... |
src/views/standard/ask/index.vue
| ... | ... | @@ -6,7 +6,7 @@ |
| 6 | 6 | </template> |
| 7 | 7 | <template slot="btns"> |
| 8 | 8 | <el-tooltip |
| 9 | - v-if="!code" | |
| 9 | + v-if="!code && gdClass" | |
| 10 | 10 | effect="dark" |
| 11 | 11 | content="已归档试卷" |
| 12 | 12 | placement="bottom" |
| ... | ... | @@ -499,6 +499,7 @@ import BusEvent from "@/utils/busEvent"; |
| 499 | 499 | export default { |
| 500 | 500 | data() { |
| 501 | 501 | return { |
| 502 | + gdClass: 0, //已归档班级数量 | |
| 502 | 503 | tableMaxHeight: 300, |
| 503 | 504 | code: "", |
| 504 | 505 | role: "", |
| ... | ... | @@ -535,6 +536,7 @@ export default { |
| 535 | 536 | this.$store.getters.info.showRole || |
| 536 | 537 | this.$store.getters.info.permissions[0].role; |
| 537 | 538 | this.query.subjectNames = this.role == "ROLE_BANZHUREN" ? [] : ""; |
| 539 | + this._QueryClassList2(); | |
| 538 | 540 | await this._QueryClassList(); |
| 539 | 541 | if (!this.query.classId) { |
| 540 | 542 | return; |
| ... | ... | @@ -551,6 +553,7 @@ export default { |
| 551 | 553 | const that = this; |
| 552 | 554 | BusEvent.$on("keepAlive", async function () { |
| 553 | 555 | that.query.subjectNames = that.role == "ROLE_BANZHUREN" ? [] : ""; |
| 556 | + that._QueryClassList2(); | |
| 554 | 557 | await that._QueryClassList(); |
| 555 | 558 | if (!that.query.classId) { |
| 556 | 559 | return; |
| ... | ... | @@ -704,6 +707,18 @@ export default { |
| 704 | 707 | // await this.setDate(1); |
| 705 | 708 | this._QueryData(); |
| 706 | 709 | }, |
| 710 | + async _QueryClassList2() { | |
| 711 | + const fetchClassList = | |
| 712 | + this.role == "ROLE_BANZHUREN" | |
| 713 | + ? this.$request.cTClassList | |
| 714 | + : this.$request.tClassList; | |
| 715 | + const { data, status, info } = await fetchClassList({ status: 1 }); | |
| 716 | + if (status === 0) { | |
| 717 | + this.gdClass = data?.list?.length || 0; | |
| 718 | + } else { | |
| 719 | + this.$message.error(info); | |
| 720 | + } | |
| 721 | + }, | |
| 707 | 722 | async _QueryClassList() { |
| 708 | 723 | const fetchClassList = |
| 709 | 724 | this.role == "ROLE_BANZHUREN" | ... | ... |
src/views/standard/card/index.vue
| ... | ... | @@ -42,6 +42,7 @@ |
| 42 | 42 | class="sel sel3" |
| 43 | 43 | v-model="query.operationType" |
| 44 | 44 | placeholder="选择类型" |
| 45 | + @change="(page = 1), _QueryData(1)" | |
| 45 | 46 | > |
| 46 | 47 | <el-option label="全部" value=""></el-option> |
| 47 | 48 | <el-option label="发卡" :value="0"></el-option> |
| ... | ... | @@ -184,6 +185,14 @@ |
| 184 | 185 | |
| 185 | 186 | <script> |
| 186 | 187 | import { downloadFile, formatDate } from "utils"; |
| 188 | +const defauleQuery = { | |
| 189 | + classId: "", | |
| 190 | + studentName: "", | |
| 191 | + studentCode: "", | |
| 192 | + operationType: "", | |
| 193 | + startDay: "", | |
| 194 | + endDay: "", | |
| 195 | +}; | |
| 187 | 196 | export default { |
| 188 | 197 | data() { |
| 189 | 198 | return { |
| ... | ... | @@ -291,36 +300,26 @@ export default { |
| 291 | 300 | let query = {}; |
| 292 | 301 | if (this.role == "ROLE_XUEXIAO") { |
| 293 | 302 | delete query.schoolId; |
| 294 | - query.gradeName = this.query.gradeName; | |
| 295 | 303 | if (type == 1) { |
| 296 | - query.classId = this.query.classId[1] ? this.query.classId[1] : ""; | |
| 297 | 304 | this.query.studentCode = ""; |
| 298 | 305 | this.query.studentName = ""; |
| 306 | + query = {...this.query} | |
| 307 | + query.classId = this.query.classId[1] ? this.query.classId[1] : ""; | |
| 299 | 308 | } else if (type == 2) { |
| 300 | - query.studentName = this.query.studentName; | |
| 301 | - this.query.classId = ""; | |
| 302 | - this.query.studentCode = ""; | |
| 309 | + this.query = {...defauleQuery,studentName:this.query.studentName} | |
| 310 | + query = { ...this.query } | |
| 303 | 311 | } else if (type == 3) { |
| 304 | - query.studentCode = this.query.studentCode; | |
| 305 | - this.query.classId = ""; | |
| 306 | - this.query.studentName = ""; | |
| 312 | + this.query = {...defauleQuery,studentCode:this.query.studentCode} | |
| 313 | + query = { ...this.query } | |
| 307 | 314 | } else { |
| 308 | 315 | query = { ...this.query }; |
| 309 | 316 | query.classId = this.query.classId[1] ? this.query.classId[1] : ""; |
| 310 | 317 | } |
| 311 | 318 | } else if (this.role == "ROLE_JITUAN") { |
| 312 | - query = this.query.schoolId | |
| 313 | - ? { | |
| 314 | - schoolId: this.query.schoolId, | |
| 315 | - } | |
| 316 | - : {}; | |
| 317 | - if (type != 1) { | |
| 318 | - this.query.operationType | |
| 319 | - ? (query["operationType"] = this.query.operationType) | |
| 320 | - : ""; | |
| 321 | - this.query.startDay ? (query["startDay"] = this.query.startDay) : ""; | |
| 322 | - this.query.endDay ? (query["endDay"] = this.query.endDay) : ""; | |
| 323 | - } | |
| 319 | + query.schoolId = this.query.schoolId; | |
| 320 | + query.operationType = this.query.operationType; | |
| 321 | + query.startDay = this.query.startDay; | |
| 322 | + query.endDay = this.query.endDay; | |
| 324 | 323 | } |
| 325 | 324 | return query; |
| 326 | 325 | }, |
| ... | ... | @@ -342,12 +341,15 @@ export default { |
| 342 | 341 | } |
| 343 | 342 | }, |
| 344 | 343 | async downExl() { |
| 345 | - let query = {}; | |
| 346 | - this.query.operationType | |
| 347 | - ? (query["operationType"] = this.query.operationType) | |
| 348 | - : ""; | |
| 349 | - this.query.startDay ? (query["startDay"] = this.query.startDay) : ""; | |
| 350 | - this.query.endDay ? (query["endDay"] = this.query.endDay) : ""; | |
| 344 | + let query = { ...this.query }; | |
| 345 | + if (this.role == "ROLE_XUEXIAO") { | |
| 346 | + query.classId = this.query.classId[1] ? this.query.classId[1] : ""; | |
| 347 | + delete query.schoolId; | |
| 348 | + } else if (this.role == "ROLE_JITUAN") { | |
| 349 | + delete query.classId; | |
| 350 | + delete query.studentName; | |
| 351 | + delete query.studentCode; | |
| 352 | + } | |
| 351 | 353 | //报表导出 |
| 352 | 354 | if (this.exportLoading == true) return; |
| 353 | 355 | this.exportLoading = true; | ... | ... |
src/views/standard/device/index.vue
| ... | ... | @@ -4,27 +4,39 @@ |
| 4 | 4 | <template slot="title"> |
| 5 | 5 | <span>设备管理</span> |
| 6 | 6 | </template> |
| 7 | - <template slot="btns" v-if="role == 'ROLE_XUEXIAO' && type == 1"> | |
| 8 | - <el-tooltip effect="dark" content="设备导入" placement="bottom"> | |
| 7 | + <template slot="btns"> | |
| 8 | + <el-tooltip effect="dark" content="导出报表" placement="bottom"> | |
| 9 | 9 | <el-button |
| 10 | + v-if="tableData.length" | |
| 10 | 11 | type="primary" |
| 11 | - icon="el-icon-upload2" | |
| 12 | 12 | size="mini" |
| 13 | 13 | plain |
| 14 | 14 | circle |
| 15 | - @click="diaUp = true" | |
| 16 | - ></el-button> | |
| 17 | - </el-tooltip> | |
| 18 | - <el-tooltip effect="dark" content="添加基站" placement="bottom"> | |
| 19 | - <el-button | |
| 20 | - type="primary" | |
| 21 | - icon="el-icon-receiving" | |
| 22 | - size="mini" | |
| 23 | - plain | |
| 24 | - circle | |
| 25 | - @click="addDev" | |
| 15 | + icon="fa fa-cloud-download" | |
| 16 | + @click="downExl" | |
| 26 | 17 | ></el-button> |
| 27 | 18 | </el-tooltip> |
| 19 | + <template v-if="role == 'ROLE_XUEXIAO' && type == 1"> | |
| 20 | + <el-tooltip effect="dark" content="设备导入" placement="bottom"> | |
| 21 | + <el-button | |
| 22 | + type="primary" | |
| 23 | + icon="el-icon-upload2" | |
| 24 | + size="mini" | |
| 25 | + plain | |
| 26 | + circle | |
| 27 | + @click="diaUp = true" | |
| 28 | + ></el-button> | |
| 29 | + </el-tooltip> | |
| 30 | + <el-tooltip effect="dark" content="添加基站" placement="bottom"> | |
| 31 | + <el-button | |
| 32 | + type="primary" | |
| 33 | + icon="el-icon-receiving" | |
| 34 | + size="mini" | |
| 35 | + plain | |
| 36 | + circle | |
| 37 | + @click="addDev" | |
| 38 | + ></el-button> </el-tooltip | |
| 39 | + ></template> | |
| 28 | 40 | </template> |
| 29 | 41 | </back-box> |
| 30 | 42 | <div> |
| ... | ... | @@ -96,7 +108,10 @@ |
| 96 | 108 | > |
| 97 | 109 | </div> |
| 98 | 110 | </div> |
| 99 | - <el-table :data="tableData" border style="width: 100%"> | |
| 111 | + <p class="loading" v-if="!tableData.length && loading"> | |
| 112 | + 加载中<i class="el-icon-loading"></i> | |
| 113 | + </p> | |
| 114 | + <el-table v-else :data="tableData" border style="width: 100%"> | |
| 100 | 115 | <el-table-column |
| 101 | 116 | prop="sn" |
| 102 | 117 | label="设备编码" |
| ... | ... | @@ -272,7 +287,10 @@ |
| 272 | 287 | > |
| 273 | 288 | </div> |
| 274 | 289 | </div> |
| 275 | - <el-table :data="tableData" border style="width: 100%"> | |
| 290 | + <p class="loading" v-if="!tableData.length && loading"> | |
| 291 | + 加载中<i class="el-icon-loading"></i> | |
| 292 | + </p> | |
| 293 | + <el-table v-else :data="tableData" border style="width: 100%"> | |
| 276 | 294 | <el-table-column |
| 277 | 295 | prop="sn" |
| 278 | 296 | label="设备编码" |
| ... | ... | @@ -376,7 +394,11 @@ |
| 376 | 394 | > |
| 377 | 395 | </div> |
| 378 | 396 | </div> |
| 397 | + <p class="loading" v-if="!tableData.length && loading"> | |
| 398 | + 加载中<i class="el-icon-loading"></i> | |
| 399 | + </p> | |
| 379 | 400 | <el-table |
| 401 | + v-else | |
| 380 | 402 | ref="multipleTable" |
| 381 | 403 | :data="tableData" |
| 382 | 404 | border |
| ... | ... | @@ -389,7 +411,11 @@ |
| 389 | 411 | label="设备编码" |
| 390 | 412 | align="center" |
| 391 | 413 | ></el-table-column> |
| 392 | - <el-table-column prop="class" label="关联班级" align="center" width="100" | |
| 414 | + <el-table-column | |
| 415 | + prop="class" | |
| 416 | + label="关联班级" | |
| 417 | + align="center" | |
| 418 | + width="100" | |
| 393 | 419 | ><template slot-scope="scoped"> |
| 394 | 420 | <p v-for="(item, index) in scoped.row.classList" :key="index"> |
| 395 | 421 | {{ item.className }} |
| ... | ... | @@ -435,7 +461,7 @@ |
| 435 | 461 | align="center" |
| 436 | 462 | width="80" |
| 437 | 463 | ></el-table-column> |
| 438 | - <el-table-column label="状态" align="center" width="80" | |
| 464 | + <el-table-column label="状态" align="center" width="80" | |
| 439 | 465 | ><template slot-scope="scope"> |
| 440 | 466 | {{ |
| 441 | 467 | scope.row.onlineStatus == 1 |
| ... | ... | @@ -445,8 +471,8 @@ |
| 445 | 471 | : "离线" |
| 446 | 472 | }} |
| 447 | 473 | </template></el-table-column |
| 448 | - > | |
| 449 | - <el-table-column label="自动更新" align="center" width="100" | |
| 474 | + > | |
| 475 | + <el-table-column label="自动更新" align="center" width="100" | |
| 450 | 476 | ><template slot-scope="scoped"> |
| 451 | 477 | <el-switch |
| 452 | 478 | v-model="scoped.row.upgradeFlag" |
| ... | ... | @@ -469,16 +495,6 @@ |
| 469 | 495 | > |
| 470 | 496 | </el-pagination> |
| 471 | 497 | </div> |
| 472 | - <p class="down" v-if="tableData.length"> | |
| 473 | - <el-button | |
| 474 | - type="primary" | |
| 475 | - plain | |
| 476 | - round | |
| 477 | - icon="fa fa-cloud-download" | |
| 478 | - @click="downExl" | |
| 479 | - >导出报表</el-button | |
| 480 | - > | |
| 481 | - </p> | |
| 482 | 498 | </div> |
| 483 | 499 | </div> |
| 484 | 500 | <el-dialog title="设备导入" :visible.sync="diaUp" width="400"> |
| ... | ... | @@ -718,6 +734,10 @@ export default { |
| 718 | 734 | that.query.onlineStatus = ""; |
| 719 | 735 | that.query.sn = ""; |
| 720 | 736 | that.query.type = ""; |
| 737 | + if (this.role == "ROLE_XUEXIAO") { | |
| 738 | + this._QueryDataSchool(); | |
| 739 | + } | |
| 740 | + this._QueryGradeList(); | |
| 721 | 741 | that.stationReport(); |
| 722 | 742 | that._QueryData(); |
| 723 | 743 | } |
| ... | ... | @@ -1149,7 +1169,6 @@ export default { |
| 1149 | 1169 | }, |
| 1150 | 1170 | // 设备列表信息 |
| 1151 | 1171 | async _QueryData(isRef) { |
| 1152 | - this.loading = true; | |
| 1153 | 1172 | let query = this.setQuery(); |
| 1154 | 1173 | if (isRef) { |
| 1155 | 1174 | this.page = 1; |
| ... | ... | @@ -1248,6 +1267,12 @@ export default { |
| 1248 | 1267 | } |
| 1249 | 1268 | .table-box { |
| 1250 | 1269 | padding: 20px 20px 0; |
| 1270 | + .loading { | |
| 1271 | + text-align: center; | |
| 1272 | + line-height: 36px; | |
| 1273 | + font-size: 16px; | |
| 1274 | + color: #666; | |
| 1275 | + } | |
| 1251 | 1276 | .answer-header { |
| 1252 | 1277 | padding: 0; |
| 1253 | 1278 | margin-bottom: 12px; | ... | ... |
src/views/standard/setUp/account.vue
| ... | ... | @@ -310,6 +310,7 @@ |
| 310 | 310 | </el-col> |
| 311 | 311 | </el-form-item> |
| 312 | 312 | <el-form-item |
| 313 | + v-if="formAddCount.roleId != 2" | |
| 313 | 314 | label="选择管辖范围:" |
| 314 | 315 | :prop=" |
| 315 | 316 | permissionLevel(formAddCount.roleId) == 5 ? 'regionId' : 'schoolId' |
| ... | ... | @@ -717,6 +718,8 @@ export default { |
| 717 | 718 | } else { |
| 718 | 719 | query = { ...this.query }; |
| 719 | 720 | } |
| 721 | + delete query.roleId; | |
| 722 | + }else{ | |
| 720 | 723 | delete query.schoolId; |
| 721 | 724 | } |
| 722 | 725 | return query; | ... | ... |
src/views/standard/setUp/school.vue
| ... | ... | @@ -115,7 +115,7 @@ |
| 115 | 115 | <el-button @click="diaUp = false">取 消</el-button> |
| 116 | 116 | </div> |
| 117 | 117 | </el-dialog> |
| 118 | - <el-dialog title="修改年级信息" :visible.sync="diaGrade" width="400"> | |
| 118 | + <el-dialog title="修改年级信息" :visible.sync="diaGrade" width="800px"> | |
| 119 | 119 | <el-form |
| 120 | 120 | class="form-box" |
| 121 | 121 | :model="formGrade" |
| ... | ... | @@ -124,7 +124,7 @@ |
| 124 | 124 | > |
| 125 | 125 | <el-form-item label="科目:" prop="subjectNames"> |
| 126 | 126 | <div class="subject-box" :class="showAll ? 'active' : ''"> |
| 127 | - <span class="showAll" @click="showAll = !showAll">{{ | |
| 127 | + <span v-show="subjectList.length > 12" class="showAll" @click="showAll = !showAll">{{ | |
| 128 | 128 | showAll ? "收起" : "更多..." |
| 129 | 129 | }}</span> |
| 130 | 130 | <el-checkbox-group v-model="formGrade.subjectNames"> | ... | ... |
src/views/standard/setUp/student.vue
| ... | ... | @@ -527,9 +527,10 @@ export default { |
| 527 | 527 | if (status === 0) { |
| 528 | 528 | this.$message.success("归档成功"); |
| 529 | 529 | this.classList.splice(index, 1); |
| 530 | - this.setClass(this.classList[index]); | |
| 530 | + this.classDetail(this.classList[index]); | |
| 531 | 531 | this._QueryArchivedNum(); |
| 532 | - this.diaClass = false; | |
| 532 | + | |
| 533 | + this._QueryData(3); | |
| 533 | 534 | } else { |
| 534 | 535 | this.$message.error(info); |
| 535 | 536 | } | ... | ... |
src/views/standard/setUp/teacher.vue
| ... | ... | @@ -604,7 +604,8 @@ export default { |
| 604 | 604 | classId: [ |
| 605 | 605 | this.classList.find( |
| 606 | 606 | (items) => |
| 607 | - items.value == item.classId || items.label == item.className | |
| 607 | + items.value == item.classId || | |
| 608 | + items.label.includes(item.className) | |
| 608 | 609 | ).grade, |
| 609 | 610 | item.classId, |
| 610 | 611 | ], |
| ... | ... | @@ -617,7 +618,8 @@ export default { |
| 617 | 618 | classId: [ |
| 618 | 619 | this.classList.find( |
| 619 | 620 | (items) => |
| 620 | - items.value == item.classId || items.label == item.className | |
| 621 | + items.value == item.classId || | |
| 622 | + items.label.includes(item.className) | |
| 621 | 623 | ).value, |
| 622 | 624 | item.subjectName, |
| 623 | 625 | ], |
| ... | ... | @@ -760,7 +762,7 @@ export default { |
| 760 | 762 | data.list.map((item) => { |
| 761 | 763 | return { |
| 762 | 764 | value: item.id, |
| 763 | - label: item.className, | |
| 765 | + label: `${item.className}(${item.gradeName})`, | |
| 764 | 766 | grade: item.grade, |
| 765 | 767 | gradeName: item.gradeName, |
| 766 | 768 | children: gradeSubList[item.gradeName], | ... | ... |
src/views/standard/test/analysis.vue
src/views/standard/test/index.vue
| ... | ... | @@ -6,7 +6,7 @@ |
| 6 | 6 | </template> |
| 7 | 7 | <template slot="btns"> |
| 8 | 8 | <el-tooltip |
| 9 | - v-if="!code" | |
| 9 | + v-if="!code && gdClass" | |
| 10 | 10 | effect="dark" |
| 11 | 11 | content="已归档试卷" |
| 12 | 12 | placement="bottom" |
| ... | ... | @@ -505,6 +505,7 @@ export default { |
| 505 | 505 | data() { |
| 506 | 506 | return { |
| 507 | 507 | code: "", |
| 508 | + gdClass: 0, //已归档班级数量 | |
| 508 | 509 | exportLoading: false, |
| 509 | 510 | tableMaxHeight: 300, |
| 510 | 511 | role: "", |
| ... | ... | @@ -543,6 +544,7 @@ export default { |
| 543 | 544 | this.role = |
| 544 | 545 | this.$store.getters.info.showRole || |
| 545 | 546 | this.$store.getters.info.permissions[0].role; |
| 547 | + this._QueryClassList2(); | |
| 546 | 548 | await this._QueryClassList(); |
| 547 | 549 | if (!this.query.classId) { |
| 548 | 550 | return; |
| ... | ... | @@ -559,18 +561,19 @@ export default { |
| 559 | 561 | const that = this; |
| 560 | 562 | BusEvent.$on("keepAlive", async function () { |
| 561 | 563 | // if (that.$route.path == "/test") { |
| 562 | - that.query.subjectNames = that.role == "ROLE_BANZHUREN" ? [] : ""; | |
| 563 | - await that._QueryClassList(); | |
| 564 | - if (!that.query.classId) { | |
| 565 | - return; | |
| 566 | - } | |
| 567 | - await that._QuerySubjectList(); | |
| 568 | - await that.setDate(1); | |
| 569 | - let startDay = that.query?.startDay; | |
| 570 | - if (!startDay) { | |
| 571 | - that.query.startDay = new Date(); | |
| 572 | - that.query.endDay = new Date(); | |
| 573 | - } | |
| 564 | + that.query.subjectNames = that.role == "ROLE_BANZHUREN" ? [] : ""; | |
| 565 | + that._QueryClassList2(); | |
| 566 | + await that._QueryClassList(); | |
| 567 | + if (!that.query.classId) { | |
| 568 | + return; | |
| 569 | + } | |
| 570 | + await that._QuerySubjectList(); | |
| 571 | + await that.setDate(1); | |
| 572 | + let startDay = that.query?.startDay; | |
| 573 | + if (!startDay) { | |
| 574 | + that.query.startDay = new Date(); | |
| 575 | + that.query.endDay = new Date(); | |
| 576 | + } | |
| 574 | 577 | // } |
| 575 | 578 | }); |
| 576 | 579 | }, |
| ... | ... | @@ -752,6 +755,18 @@ export default { |
| 752 | 755 | await this._QuerySubjectList(); |
| 753 | 756 | await this._QueryData(); |
| 754 | 757 | }, |
| 758 | + async _QueryClassList2() { | |
| 759 | + const fetchClassList = | |
| 760 | + this.role == "ROLE_BANZHUREN" | |
| 761 | + ? this.$request.cTClassList | |
| 762 | + : this.$request.tClassList; | |
| 763 | + const { data, status, info } = await fetchClassList({ status: 1 }); | |
| 764 | + if (status === 0) { | |
| 765 | + this.gdClass = data?.list?.length || 0; | |
| 766 | + } else { | |
| 767 | + this.$message.error(info); | |
| 768 | + } | |
| 769 | + }, | |
| 755 | 770 | async _QueryClassList() { |
| 756 | 771 | const fetchClassList = |
| 757 | 772 | this.role == "ROLE_BANZHUREN" | ... | ... |