Commit 31436559200262f9fba55e8d686b91b6abcaff08

Authored by 梁保满
1 parent da9346ee

多班级样式问题,成绩登记设置问题

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