Commit 31436559200262f9fba55e8d686b91b6abcaff08
1 parent
da9346ee
多班级样式问题,成绩登记设置问题
Showing
5 changed files
with
54 additions
and
33 deletions
package.json
... | ... | @@ -20,9 +20,10 @@ |
20 | 20 | "script-ext-html-webpack-plugin": "^2.1.5", |
21 | 21 | "vue": "^2.6.11", |
22 | 22 | "vue-i18n": "^8.4.0", |
23 | + "vue-masonry": "^0.16.0", | |
23 | 24 | "vue-router": "^3.5.1", |
24 | - "vuex": "^3.6.2", | |
25 | - "vuedraggable": "^2.24.3" | |
25 | + "vuedraggable": "^2.24.3", | |
26 | + "vuex": "^3.6.2" | |
26 | 27 | }, |
27 | 28 | "devDependencies": { |
28 | 29 | "@vue/cli-plugin-babel": "~4.5.0", | ... | ... |
src/main.js
... | ... | @@ -20,10 +20,13 @@ import "@/router/permission" |
20 | 20 | import "@/assets/css/base.css" |
21 | 21 | import "@/assets/css/index.scss" |
22 | 22 | |
23 | +import { VueMasonryPlugin } from 'vue-masonry' | |
24 | + | |
23 | 25 | Vue.config.productionTip = false |
24 | 26 | Vue.use(ElementUI) |
25 | 27 | Vue.use(globalPlugin) |
26 | 28 | Vue.use(permission) |
29 | +Vue.use(VueMasonryPlugin) | |
27 | 30 | |
28 | 31 | NProgress.inc(0.2) |
29 | 32 | NProgress.configure({ easing: "ease", speed: 500, showSpinner: false }) | ... | ... |
src/views/standard/test/analysis.vue
... | ... | @@ -39,6 +39,7 @@ |
39 | 39 | > |
40 | 40 | </div> |
41 | 41 | <el-button |
42 | + v-if="!status" | |
42 | 43 | class="setMinScore" |
43 | 44 | @click="diaMinScore = true" |
44 | 45 | round |
... | ... | @@ -530,7 +531,7 @@ export default { |
530 | 531 | data() { |
531 | 532 | return { |
532 | 533 | role: "", |
533 | - status: 0, | |
534 | + status: 0,// 1:已归档试卷 | |
534 | 535 | tableMaxHeight: 600, |
535 | 536 | loading: false, |
536 | 537 | exportLoading: false, |
... | ... | @@ -543,7 +544,7 @@ export default { |
543 | 544 | score: "", |
544 | 545 | tabList: ["试题分析", "成绩排名", "小题分报表", "作答明细表"], |
545 | 546 | type: 0, |
546 | - paperModifyLog: { | |
547 | + paperModifyLog: { //修改信息 | |
547 | 548 | realName: "", |
548 | 549 | modifiedTime: "", |
549 | 550 | }, | ... | ... |
src/views/standard/test/contrast.vue
... | ... | @@ -338,15 +338,18 @@ export default { |
338 | 338 | } |
339 | 339 | }, |
340 | 340 | savefrom() { |
341 | - this.tableData = []; | |
342 | - this.tableData2 = []; | |
343 | - | |
344 | 341 | for (let i = 0; i < this.fromData.levels.length; i++) { |
345 | 342 | if (this.fromData.levels[i].includes("")) { |
346 | 343 | this.$message.warning("请补全编号" + (i + 1) + "设置信息!"); |
347 | 344 | return; |
348 | 345 | } |
349 | 346 | } |
347 | + if (this.fromData.levels.length == 0) { | |
348 | + this.$message.warning("请添加等级设置!"); | |
349 | + return | |
350 | + } | |
351 | + this.tableData = []; | |
352 | + this.tableData2 = []; | |
350 | 353 | this.defaultLevels.levelType = this.fromData.levelType; |
351 | 354 | this.defaultLevels.levels = [...this.fromData.levels]; |
352 | 355 | sessionStorage.setItem("levelFromData", JSON.stringify(this.fromData)); | ... | ... |
src/views/standard/test/index.vue
... | ... | @@ -32,9 +32,11 @@ |
32 | 32 | multiple |
33 | 33 | collapse-tags |
34 | 34 | > |
35 | - <el-checkbox v-model="classAll" @change="selectAll" class="select-all" | |
36 | - >全选</el-checkbox | |
37 | - > | |
35 | + <p class="select-all"> | |
36 | + <el-checkbox v-model="classAll" @change="selectAll" | |
37 | + >全选</el-checkbox | |
38 | + > | |
39 | + </p> | |
38 | 40 | <el-option |
39 | 41 | :disabled=" |
40 | 42 | query.classIds.length == 1 && query.classIds[0] == item.value |
... | ... | @@ -114,19 +116,22 @@ |
114 | 116 | </div> |
115 | 117 | <div v-show="query.classIds.length == 1" class="table-box"> |
116 | 118 | <el-radio-group |
119 | + v-if="query.startDay != query.endDay" | |
117 | 120 | v-model="tabIndex" |
118 | 121 | @change="changeTab" |
119 | 122 | style="margin-bottom: 20px" |
120 | 123 | > |
121 | 124 | <template v-for="(item, index) in tabList"> |
122 | - <el-radio-button | |
123 | - v-if="index == 0 || query.startDay != query.endDay" | |
124 | - :key="index" | |
125 | - :label="index + 1" | |
126 | - >{{ item }}</el-radio-button | |
127 | - > | |
125 | + <el-radio-button :key="index" :label="index + 1">{{ | |
126 | + item | |
127 | + }}</el-radio-button> | |
128 | 128 | </template> |
129 | 129 | </el-radio-group> |
130 | + <div class="head-box" v-else> | |
131 | + <div class="tit"> | |
132 | + <p class="txt">已考试卷信息</p> | |
133 | + </div> | |
134 | + </div> | |
130 | 135 | <div v-show="tabIndex == 1" v-loading="loading"> |
131 | 136 | <el-table :data="tableData" border style="width: 100%"> |
132 | 137 | <el-table-column |
... | ... | @@ -527,12 +532,16 @@ |
527 | 532 | > |
528 | 533 | </p> |
529 | 534 | </div> |
530 | - <div v-show="query.classIds.length > 1" class="table-box"> | |
535 | + <div | |
536 | + v-show="query.classIds.length > 1" | |
537 | + class="table-box" | |
538 | + v-loading="loading" | |
539 | + > | |
531 | 540 | <div class="head-box"> |
532 | 541 | <div class="tit"> |
533 | 542 | <p class="txt">已考试卷信息</p> |
534 | 543 | <p> |
535 | - 共筛选出{{ classTableLen }}个班级的已考试卷,<em class="red" | |
544 | + 共筛选出{{ classTable.length }}个班级的已考试卷,<em class="red" | |
536 | 545 | >不同班级请选择同一份试卷进行对比</em |
537 | 546 | > |
538 | 547 | </p> |
... | ... | @@ -552,10 +561,17 @@ |
552 | 561 | </div> |
553 | 562 | <el-empty |
554 | 563 | :imag-size="48" |
555 | - v-if="!classTableLen && !loading" | |
564 | + v-if="total === 0 && !loading" | |
556 | 565 | description="暂无数据" |
557 | 566 | ></el-empty> |
558 | - <ul class="tab-ul" v-if="classTableLen"> | |
567 | + <ul | |
568 | + class="tab-ul" | |
569 | + v-if="classTable.length" | |
570 | + v-masonry | |
571 | + transition-duration="0s" | |
572 | + gutter="0" | |
573 | + item-selector=".tab-li" | |
574 | + > | |
559 | 575 | <template v-for="(item, index) in classTable"> |
560 | 576 | <li class="tab-li"> |
561 | 577 | <p class="tab-tit"> |
... | ... | @@ -610,7 +626,7 @@ |
610 | 626 | </li> |
611 | 627 | </template> |
612 | 628 | </ul> |
613 | - <p class="btn-box" v-if="classTableLen"> | |
629 | + <p class="btn-box" v-if="classTable.length"> | |
614 | 630 | <el-button @click="linkToContrast">生成对比报表</el-button> |
615 | 631 | </p> |
616 | 632 | </div> |
... | ... | @@ -681,21 +697,12 @@ export default { |
681 | 697 | answerList: [], //设置多卷内容供tableStage表格数据用 |
682 | 698 | page: 1, |
683 | 699 | size: 20, |
684 | - total: 0, | |
700 | + total: null, | |
685 | 701 | multipleSelection: [], //选中的试卷ID |
686 | 702 | classTable: [], //多班级数据 |
687 | 703 | classAll: false, //搜索条件多班全选 |
688 | 704 | }; |
689 | 705 | }, |
690 | - computed: { | |
691 | - classTableLen: function () { | |
692 | - let len = 0; | |
693 | - this.classTable?.map((item) => { | |
694 | - item.length ? (len += 1) : ""; | |
695 | - }); | |
696 | - return len; | |
697 | - }, | |
698 | - }, | |
699 | 706 | async created() { |
700 | 707 | this.code = localStorage.getItem("csCode") || ""; |
701 | 708 | this.role = |
... | ... | @@ -718,6 +725,7 @@ export default { |
718 | 725 | const that = this; |
719 | 726 | BusEvent.$on("keepAlive", async function () { |
720 | 727 | // if (that.$route.path == "/test") { |
728 | + that.multipleSelection = []; | |
721 | 729 | that.query.subjectNames = that.role == "ROLE_BANZHUREN" ? [] : ""; |
722 | 730 | that._QueryClassList2(); |
723 | 731 | await that._QueryClassList(); |
... | ... | @@ -745,6 +753,7 @@ export default { |
745 | 753 | } else { |
746 | 754 | this.query.classIds.push(this.classList[0].value); |
747 | 755 | } |
756 | + this.changeclass(this.query.classIds); | |
748 | 757 | }, |
749 | 758 | // 多班级选择同一试卷 |
750 | 759 | checkboxDisabled(obj) { |
... | ... | @@ -1053,8 +1062,6 @@ export default { |
1053 | 1062 | }, |
1054 | 1063 | //单卷测练 |
1055 | 1064 | async examReportList(msg) { |
1056 | - this.multipleSelection = []; | |
1057 | - this.loading = true; | |
1058 | 1065 | let query = {}; |
1059 | 1066 | for (let key in this.query) { |
1060 | 1067 | if (this.query[key] != "") { |
... | ... | @@ -1079,6 +1086,9 @@ export default { |
1079 | 1086 | return; |
1080 | 1087 | } |
1081 | 1088 | } |
1089 | + this.classTable = []; | |
1090 | + this.multipleSelection = []; | |
1091 | + this.loading = true; | |
1082 | 1092 | if (this.query.classIds.length == 1) { |
1083 | 1093 | query.classId = query.classIds[0]; |
1084 | 1094 | query.page = this.page; |
... | ... | @@ -1301,6 +1311,7 @@ div::-webkit-scrollbar-thumb { |
1301 | 1311 | padding: 16px; |
1302 | 1312 | background: #f8f8f8; |
1303 | 1313 | border-radius: 5px; |
1314 | + min-height: 300px; | |
1304 | 1315 | :deep(.fa-arrow-right) { |
1305 | 1316 | padding-left: 2px; |
1306 | 1317 | } |
... | ... | @@ -1399,5 +1410,7 @@ div::-webkit-scrollbar-thumb { |
1399 | 1410 | } |
1400 | 1411 | .select-all { |
1401 | 1412 | padding-left: 16px; |
1413 | + padding-bottom: 10px; | |
1414 | + border-bottom: 1px solid #e2e2e2; | |
1402 | 1415 | } |
1403 | 1416 | </style> |
1404 | 1417 | \ No newline at end of file | ... | ... |