Commit dbbfc6c5bac371f34ac43c2edcdddc0cae0afa1e
1 parent
8ea67428
飞书优化及bug
Showing
11 changed files
with
213 additions
and
73 deletions
src/views/analysis/index.vue
... | ... | @@ -240,7 +240,7 @@ export default { |
240 | 240 | let query = {}; |
241 | 241 | for (let key in this.query) { |
242 | 242 | if (this.query[key] != "") { |
243 | - if (key == gradeName) { | |
243 | + if (key == "gradeName") { | |
244 | 244 | query[key] = this.query[key]=="全部"?"":this.query[key]; |
245 | 245 | } else { |
246 | 246 | query[key] = this.query[key]; |
... | ... | @@ -335,7 +335,9 @@ export default { |
335 | 335 | ...params, |
336 | 336 | }; |
337 | 337 | }); |
338 | - this.dataList = dataList; | |
338 | + this.dataList = dataList.sort((a,b)=>{ | |
339 | + return a.grade-b.grade | |
340 | + }); | |
339 | 341 | } else { |
340 | 342 | this.$message.error(info); |
341 | 343 | } | ... | ... |
src/views/ask/analysis.vue
... | ... | @@ -112,7 +112,7 @@ |
112 | 112 | prop="fallible" |
113 | 113 | label="干扰答案" |
114 | 114 | align="center" |
115 | - ><template slot-scope="scoped">{{scoped.row.fallible==1?"✓":scoped.row.fallible==2?"✗":scoped.row.correctAnswer}}</template></el-table-column> | |
115 | + ><template slot-scope="scoped">{{scoped.row.fallible==1?"✓":scoped.row.fallible==2?"✗":scoped.row.fallible}}</template></el-table-column> | |
116 | 116 | <!-- <el-table-column prop="screenshot" label="题干" align="center"> |
117 | 117 | <template slot-scope="scoped"> |
118 | 118 | <el-image |
... | ... | @@ -411,7 +411,16 @@ export default { |
411 | 411 | }, |
412 | 412 | }; |
413 | 413 | </script> |
414 | - | |
414 | +<style> | |
415 | +div::-webkit-scrollbar { | |
416 | + width: 3px; | |
417 | + height: 10px; | |
418 | +} | |
419 | +div::-webkit-scrollbar-thumb { | |
420 | + border-radius: 10px; | |
421 | + background-color: #ccc; | |
422 | +} | |
423 | +</style> | |
415 | 424 | <style lang="scss" scoped> |
416 | 425 | .down { |
417 | 426 | padding-top: 20px; | ... | ... |
src/views/ask/index.vue
1 | 1 | <template> |
2 | - <div> | |
2 | + <div class="main" ref="main"> | |
3 | 3 | <back-box> |
4 | 4 | <template slot="title"> |
5 | 5 | <span>问答-数据报表</span> |
... | ... | @@ -7,12 +7,7 @@ |
7 | 7 | </back-box> |
8 | 8 | <div class="answer-header"> |
9 | 9 | <div class="sel-box"> |
10 | - <el-select | |
11 | - class="sel" | |
12 | - v-model="query.classId" | |
13 | - placeholder="选择班级" | |
14 | - @change="changClazz" | |
15 | - > | |
10 | + <el-select class="sel" v-model="query.classId" placeholder="选择班级"> | |
16 | 11 | <el-option |
17 | 12 | v-for="item in classList" |
18 | 13 | :key="item.value" |
... | ... | @@ -27,7 +22,7 @@ |
27 | 22 | multiple |
28 | 23 | v-model="query.subjectNames" |
29 | 24 | placeholder="选择科目" |
30 | - @change="_QueryData" | |
25 | + @change="changeSub" | |
31 | 26 | > |
32 | 27 | <el-option |
33 | 28 | v-for="item in subjectList" |
... | ... | @@ -42,7 +37,6 @@ |
42 | 37 | class="sel" |
43 | 38 | v-model="query.subjectNames" |
44 | 39 | placeholder="选择科目" |
45 | - @change="_QueryData" | |
46 | 40 | > |
47 | 41 | <el-option |
48 | 42 | v-for="item in subjectList" |
... | ... | @@ -260,16 +254,18 @@ |
260 | 254 | align="center" |
261 | 255 | ></el-table-column> |
262 | 256 | </el-table> |
263 | - <el-table v-else :data="tableData" border style="width: 100%"> | |
257 | + <el-table :max-height="tableMaxHeight" v-else :data="tableData" border style="width: 100%"> | |
264 | 258 | <el-table-column |
265 | 259 | prop="studentCode" |
266 | 260 | label="学号" |
267 | 261 | align="center" |
262 | + fixed | |
268 | 263 | ></el-table-column> |
269 | 264 | <el-table-column |
270 | 265 | prop="studentName" |
271 | 266 | label="姓名" |
272 | 267 | align="center" |
268 | + fixed | |
273 | 269 | width="100" |
274 | 270 | ></el-table-column> |
275 | 271 | <el-table-column |
... | ... | @@ -278,16 +274,36 @@ |
278 | 274 | :label="item" |
279 | 275 | align="center" |
280 | 276 | > |
281 | - <el-table-column align="center" :label="index==0?'总课时数':'课时数'" :prop="'periodCount'+item"> </el-table-column> | |
282 | - <el-table-column align="center" :label="index==0?'总出题数':'出题数'" :prop="'questionNum'+item"> </el-table-column> | |
283 | - <el-table-column align="center" :label="index==0?'总参与度':'参与度'" :prop="'participationRate'+item"> </el-table-column> | |
284 | - <el-table-column align="center" :label="index==0?'总正确率':'正确率'" :prop="'correctRate'+item"> </el-table-column> | |
277 | + <el-table-column | |
278 | + align="center" | |
279 | + :label="index == 0 ? '总课时数' : '课时数'" | |
280 | + :prop="'periodCount' + item" | |
281 | + > | |
282 | + </el-table-column> | |
283 | + <el-table-column | |
284 | + align="center" | |
285 | + :label="index == 0 ? '总出题数' : '出题数'" | |
286 | + :prop="'questionNum' + item" | |
287 | + > | |
288 | + </el-table-column> | |
289 | + <el-table-column | |
290 | + align="center" | |
291 | + :label="index == 0 ? '总参与度' : '参与度'" | |
292 | + :prop="'participationRate' + item" | |
293 | + > | |
294 | + </el-table-column> | |
295 | + <el-table-column | |
296 | + align="center" | |
297 | + :label="index == 0 ? '总正确率' : '正确率'" | |
298 | + :prop="'correctRate' + item" | |
299 | + ><template slot-scope="scoped">{{scoped.row['correctRate' + item]}}%</template> | |
300 | + </el-table-column> | |
285 | 301 | </el-table-column> |
286 | 302 | </el-table> |
287 | 303 | </div> |
288 | 304 | <div v-show="tabIndex == 3"> |
289 | 305 | <el-table |
290 | - v-if="role == 'ROLE_JIAOSHI'" | |
306 | + v-if="role == 'ROLE_JIAOSHI'" | |
291 | 307 | :data="tableData" |
292 | 308 | border |
293 | 309 | style="width: 100%" |
... | ... | @@ -359,8 +375,36 @@ |
359 | 375 | :label="item" |
360 | 376 | align="center" |
361 | 377 | > |
362 | - <el-table-column align="center" :label="index==0?'参与分':'互动数'" :prop="'interactionsNum'+item"> </el-table-column> | |
363 | - <el-table-column align="center" :label="index==0?'对错分':'参与数'" :prop="'interactionsCorrectNum'+item"> </el-table-column> | |
378 | + <el-table-column | |
379 | + align="center" | |
380 | + v-if="index == 0" | |
381 | + label="参与分" | |
382 | + sortable | |
383 | + :prop="'interactionsNum' + item" | |
384 | + > | |
385 | + </el-table-column> | |
386 | + <el-table-column | |
387 | + v-else | |
388 | + align="center" | |
389 | + label="互动数" | |
390 | + :prop="'interactionsNum' + item" | |
391 | + > | |
392 | + </el-table-column> | |
393 | + <el-table-column | |
394 | + v-if="index == 0" | |
395 | + align="center" | |
396 | + label="对错分" | |
397 | + sortable | |
398 | + :prop="'interactionsCorrectNum' + item" | |
399 | + > | |
400 | + </el-table-column> | |
401 | + <el-table-column | |
402 | + v-else | |
403 | + align="center" | |
404 | + label="参与数" | |
405 | + :prop="'interactionsCorrectNum' + item" | |
406 | + > | |
407 | + </el-table-column> | |
364 | 408 | </el-table-column> |
365 | 409 | </el-table> |
366 | 410 | </div> |
... | ... | @@ -402,6 +446,7 @@ import { formatDate, deepClone, downloadFile } from "utils"; |
402 | 446 | export default { |
403 | 447 | data() { |
404 | 448 | return { |
449 | + tableMaxHeight:300, | |
405 | 450 | role: "", |
406 | 451 | loading: false, |
407 | 452 | dialogVisible: false, |
... | ... | @@ -424,8 +469,8 @@ export default { |
424 | 469 | subjectList: [], //科目 |
425 | 470 | tabIndex: 1, //选项卡 |
426 | 471 | tableData: [], |
427 | - phaseOption: [],//问答补充数据 | |
428 | - phaseInter:[],//互动补充数据 | |
472 | + phaseOption: [], //问答补充数据 | |
473 | + phaseInter: [], //互动补充数据 | |
429 | 474 | page: 1, |
430 | 475 | size: 20, |
431 | 476 | total: 0, |
... | ... | @@ -446,6 +491,17 @@ export default { |
446 | 491 | } |
447 | 492 | }, |
448 | 493 | methods: { |
494 | + changeSub(val) { | |
495 | + let sub; | |
496 | + if (val && val.length) { | |
497 | + let leng = val.length - 1; | |
498 | + sub = val[leng]; | |
499 | + } | |
500 | + console.log(val); | |
501 | + this.query.subjectNames = val.filter((item) => { | |
502 | + return sub != "全部" ? item != "全部" : item == "全部"; | |
503 | + }); | |
504 | + }, | |
449 | 505 | linkTo(obj) { |
450 | 506 | //去详情 |
451 | 507 | this.$router.push({ |
... | ... | @@ -547,7 +603,9 @@ export default { |
547 | 603 | this._QueryData(); |
548 | 604 | }, |
549 | 605 | tabChange() { |
606 | + this.tableMaxHeight = this.$refs.main.offsetHeight | |
550 | 607 | this.page = 1; |
608 | + this.tableData = []; | |
551 | 609 | this._QueryData(); |
552 | 610 | }, |
553 | 611 | sortChange(obj) { |
... | ... | @@ -643,6 +701,7 @@ export default { |
643 | 701 | query.subjectNames = [query.subjectNames]; |
644 | 702 | } else { |
645 | 703 | if ( |
704 | + query["subjectNames"] && | |
646 | 705 | query["subjectNames"].length == 1 && |
647 | 706 | query["subjectNames"][0] == "全部" |
648 | 707 | ) { |
... | ... | @@ -651,6 +710,10 @@ export default { |
651 | 710 | }); |
652 | 711 | query["subjectNames"].shift(); |
653 | 712 | } |
713 | + if (!query["subjectNames"]) { | |
714 | + this.$message.warning("请选择科目"); | |
715 | + return; | |
716 | + } | |
654 | 717 | } |
655 | 718 | const { data, status, info } = await this.$request.periodReportList({ |
656 | 719 | ...query, |
... | ... | @@ -680,6 +743,7 @@ export default { |
680 | 743 | } |
681 | 744 | if (this.role == "ROLE_BANZHUREN") { |
682 | 745 | if ( |
746 | + query["subjectNames"] && | |
683 | 747 | query["subjectNames"].length == 1 && |
684 | 748 | query["subjectNames"][0] == "全部" |
685 | 749 | ) { |
... | ... | @@ -688,6 +752,10 @@ export default { |
688 | 752 | }); |
689 | 753 | query["subjectNames"].shift(); |
690 | 754 | } |
755 | + if (!query["subjectNames"]) { | |
756 | + this.$message.warning("请选择科目"); | |
757 | + return; | |
758 | + } | |
691 | 759 | } |
692 | 760 | const phaseAnswerReport = |
693 | 761 | this.role == "ROLE_BANZHUREN" |
... | ... | @@ -707,9 +775,11 @@ export default { |
707 | 775 | if (!subjectName.includes(items.subjectName)) { |
708 | 776 | subjectName.push(items.subjectName); |
709 | 777 | } |
710 | - params["answerCorrectRate" + items.subjectName] = items.answerCorrectRate; | |
778 | + params["answerCorrectRate" + items.subjectName] = | |
779 | + items.answerCorrectRate; | |
711 | 780 | params["correctRate" + items.subjectName] = items.correctRate; |
712 | - params["participationRate" + items.subjectName] = items.participationRate; | |
781 | + params["participationRate" + items.subjectName] = | |
782 | + items.participationRate; | |
713 | 783 | params["periodCount" + items.subjectName] = items.periodCount; |
714 | 784 | params["questionNum" + items.subjectName] = items.questionNum; |
715 | 785 | }); |
... | ... | @@ -742,6 +812,7 @@ export default { |
742 | 812 | } |
743 | 813 | if (this.role == "ROLE_BANZHUREN") { |
744 | 814 | if ( |
815 | + query["subjectNames"] && | |
745 | 816 | query["subjectNames"].length == 1 && |
746 | 817 | query["subjectNames"][0] == "全部" |
747 | 818 | ) { |
... | ... | @@ -750,6 +821,10 @@ export default { |
750 | 821 | }); |
751 | 822 | query["subjectNames"].shift(); |
752 | 823 | } |
824 | + if (!query["subjectNames"]) { | |
825 | + this.$message.warning("请选择科目"); | |
826 | + return; | |
827 | + } | |
753 | 828 | } |
754 | 829 | const phaseInteractiveReport = |
755 | 830 | this.role == "ROLE_BANZHUREN" |
... | ... | @@ -769,8 +844,10 @@ export default { |
769 | 844 | if (!subjectName.includes(items.subjectName)) { |
770 | 845 | subjectName.push(items.subjectName); |
771 | 846 | } |
772 | - params["interactionsNum" + items.subjectName] = items.interactionsNum; | |
773 | - params["interactionsCorrectNum" + items.subjectName] = items.interactionsCorrectNum; | |
847 | + params["interactionsNum" + items.subjectName] = | |
848 | + items.interactionsNum; | |
849 | + params["interactionsCorrectNum" + items.subjectName] = | |
850 | + items.interactionsCorrectNum; | |
774 | 851 | }); |
775 | 852 | return { |
776 | 853 | ...item, |
... | ... | @@ -801,8 +878,20 @@ export default { |
801 | 878 | }, |
802 | 879 | }; |
803 | 880 | </script> |
804 | - | |
881 | +<style> | |
882 | +div::-webkit-scrollbar { | |
883 | + width: 3px; | |
884 | + height: 10px; | |
885 | +} | |
886 | +div::-webkit-scrollbar-thumb { | |
887 | + border-radius: 10px; | |
888 | + background-color: #ccc; | |
889 | +} | |
890 | +</style> | |
805 | 891 | <style lang="scss" scoped> |
892 | +.main{ | |
893 | + height:100%; | |
894 | +} | |
806 | 895 | .table-box { |
807 | 896 | margin: 0 20px; |
808 | 897 | padding: 16px; | ... | ... |
src/views/device/index.vue
... | ... | @@ -517,6 +517,7 @@ export default { |
517 | 517 | type: "", |
518 | 518 | }, |
519 | 519 | statusList: [ |
520 | + { label: "全部", value: "" }, | |
520 | 521 | { label: "离线", value: 0 }, |
521 | 522 | { label: "在线", value: 1 }, |
522 | 523 | { label: "异常", value: 2 }, |
... | ... | @@ -916,7 +917,7 @@ export default { |
916 | 917 | this.loading = false; |
917 | 918 | if (status == 0) { |
918 | 919 | this.tableData = |
919 | - data?.list.map((item) => { | |
920 | + data?.list&&data?.list.map((item) => { | |
920 | 921 | item.upgradeFlag = item.upgradeFlag == 1 ? true : false; |
921 | 922 | return item; |
922 | 923 | }) || []; | ... | ... |
src/views/device/log.vue
... | ... | @@ -64,6 +64,9 @@ |
64 | 64 | >本季度</span |
65 | 65 | > |
66 | 66 | </p> |
67 | + <el-button class="serach-box" round @click="_QueryData" | |
68 | + >筛选</el-button | |
69 | + > | |
67 | 70 | </div> |
68 | 71 | </div> |
69 | 72 | <div class="table-box"> |
... | ... | @@ -284,7 +287,7 @@ export default { |
284 | 287 | }); |
285 | 288 | this.loading = false; |
286 | 289 | if (status === 0) { |
287 | - this.tableData = [...data?.list] || []; | |
290 | + this.tableData = data?.list&&[...data?.list] || []; | |
288 | 291 | this.total = data.count; |
289 | 292 | } else { |
290 | 293 | this.$message.error(info); | ... | ... |
src/views/down/client.vue
... | ... | @@ -54,7 +54,7 @@ |
54 | 54 | <i class="fa fa-mail-reply-all"></i> |
55 | 55 | <p> |
56 | 56 | {{ |
57 | - `${type == 1 ? "参数设置" : formData.configName + "-修改入口"}` | |
57 | + `${type == 1 ? "参数设置" : formData.configName}` | |
58 | 58 | }} |
59 | 59 | </p> |
60 | 60 | </div> |
... | ... | @@ -66,7 +66,7 @@ |
66 | 66 | :rules="ruleForm" |
67 | 67 | label-width="180px" |
68 | 68 | > |
69 | - <el-form-item label="主菜单设置:" prop="configName" v-if="type == 1"> | |
69 | + <el-form-item label="配置名称:" prop="configName" v-if="type == 1"> | |
70 | 70 | <el-col :span="12"> |
71 | 71 | <el-input |
72 | 72 | v-model.trim="formData.configName" |
... | ... | @@ -169,7 +169,7 @@ |
169 | 169 | :step="1" |
170 | 170 | :step-strictly="true" |
171 | 171 | ></el-input-number> |
172 | - <span v-show="formData.viesAnswerSet != 2">秒</span> | |
172 | + <span v-show="formData.viesAnswerSet == 0">秒</span> | |
173 | 173 | </el-form-item> |
174 | 174 | <el-form-item label="抽答设置:" prop="ballotAnswerSet"> |
175 | 175 | <el-radio-group v-model="formData.ballotAnswerSet"> | ... | ... |
src/views/layout/layout.vue
src/views/login/index.vue
... | ... | @@ -95,16 +95,10 @@ export default { |
95 | 95 | loginForm: { |
96 | 96 | // username: "15911715665", |
97 | 97 | // password: "Csiy88888", |
98 | - // username: "13610050254", | |
99 | - // password: "Pw050254#", | |
100 | - // username: "18332123505", | |
101 | - // password: "Pw123505#", | |
102 | 98 | username: "18687826606", |
103 | 99 | password: "Pw826606#", |
104 | - // username: "18946034886", | |
105 | - // password: "Pw034886#", | |
106 | 100 | // username: "18893712576", |
107 | - // password: "Pw712576#", | |
101 | + // password: "712576", | |
108 | 102 | // username: "13247726488", |
109 | 103 | // password: "726488", |
110 | 104 | // username: "13319607658", | ... | ... |
src/views/setUp/account.vue
... | ... | @@ -132,9 +132,9 @@ |
132 | 132 | label="管辖范围" |
133 | 133 | align="center" |
134 | 134 | > |
135 | - <template slot-scope="scoped" v-if="scoped.row.regionList"> | |
136 | - <span v-for="item in scoped.row.regionList" :key="item.id">{{ | |
137 | - item.regionName | |
135 | + <template slot-scope="scoped" v-if="scoped.row.schoolList.length"> | |
136 | + <span v-for="item in scoped.row.schoolList" :key="item.id">{{ | |
137 | + item.schoolName | |
138 | 138 | }}</span> |
139 | 139 | </template> |
140 | 140 | </el-table-column> |
... | ... | @@ -461,7 +461,7 @@ export default { |
461 | 461 | if (this.role != "ROLE_JITUAN") { |
462 | 462 | this.formCount.userId = obj.userId; |
463 | 463 | } else { |
464 | - this.formCount.id = obj.id; | |
464 | + this.formCount.userId = obj.id; | |
465 | 465 | } |
466 | 466 | this.formCount.loginName = obj.loginName; |
467 | 467 | this.formCount.realName = obj.realName; |
... | ... | @@ -503,6 +503,7 @@ export default { |
503 | 503 | }); |
504 | 504 | if (status === 0) { |
505 | 505 | this.$message.success(info); |
506 | + this.diaCount=false | |
506 | 507 | this._QueryData(4); |
507 | 508 | } else { |
508 | 509 | this.$message.error(info); |
... | ... | @@ -548,7 +549,7 @@ export default { |
548 | 549 | ...query, |
549 | 550 | }) |
550 | 551 | : await this.$request.tenantUpdateUser({ |
551 | - id: obj.id, | |
552 | + userId: obj.id, | |
552 | 553 | type: type, |
553 | 554 | ...query, |
554 | 555 | }); | ... | ... |
src/views/test/analysis.vue
1 | 1 | <template> |
2 | - <div class="page-container" :class="dialogVisible ? 'active' : ''"> | |
2 | + <div ref="main" class="page-container" :class="dialogVisible ? 'active' : ''"> | |
3 | 3 | <back-box> |
4 | 4 | <template slot="title"> |
5 | 5 | <span>单卷分析</span> |
... | ... | @@ -31,39 +31,41 @@ |
31 | 31 | <span |
32 | 32 | class="tab-item" |
33 | 33 | :class="type == 1 ? 'active' : ''" |
34 | - @click="type = 1" | |
34 | + @click="setType(1)" | |
35 | 35 | >试题分析</span |
36 | 36 | > |
37 | 37 | <span |
38 | 38 | class="tab-item" |
39 | 39 | :class="type == 2 ? 'active' : ''" |
40 | - @click="type = 2" | |
40 | + @click="setType(2)" | |
41 | 41 | >成绩排名</span |
42 | 42 | > |
43 | 43 | <span |
44 | 44 | class="tab-item" |
45 | 45 | :class="type == 3 ? 'active' : ''" |
46 | - @click="type = 3" | |
46 | + @click="setType(3)" | |
47 | 47 | >小题分报表</span |
48 | 48 | > |
49 | 49 | <span |
50 | 50 | class="tab-item" |
51 | 51 | :class="type == 4 ? 'active' : ''" |
52 | - @click="type = 4" | |
52 | + @click="setType(4)" | |
53 | 53 | >作答明细表</span |
54 | 54 | > |
55 | 55 | </div> |
56 | - <el-table v-show="type == 1" :data="tableData" border style="width: 100%"> | |
56 | + <el-table :max-height="tableMaxHeight" v-show="type == 1" :data="tableData" border style="width: 100%"> | |
57 | 57 | <el-table-column |
58 | 58 | prop="questionIndex" |
59 | 59 | label="题号" |
60 | 60 | align="center" |
61 | + fixed | |
61 | 62 | width="60" |
62 | 63 | ></el-table-column> |
63 | 64 | <el-table-column |
64 | 65 | prop="questionType" |
65 | 66 | label="题型" |
66 | 67 | align="center" |
68 | + fixed | |
67 | 69 | width="100" |
68 | 70 | ><template slot-scope="scope">{{ |
69 | 71 | setSubPro(scope.row.questionType) |
... | ... | @@ -120,7 +122,7 @@ |
120 | 122 | v-for="(item, index) in optionsList" |
121 | 123 | :key="index" |
122 | 124 | :label="'选项' + (index + 1)" |
123 | - :prop="'option' + index" | |
125 | + :prop="'count' + index" | |
124 | 126 | align="center" |
125 | 127 | > |
126 | 128 | </el-table-column> |
... | ... | @@ -170,6 +172,7 @@ |
170 | 172 | </div> |
171 | 173 | <el-table |
172 | 174 | v-show="type == 2" |
175 | + :max-height="tableMaxHeight" | |
173 | 176 | :data="tableData2" |
174 | 177 | border |
175 | 178 | style="width: 100%" |
... | ... | @@ -241,6 +244,7 @@ |
241 | 244 | </el-table> |
242 | 245 | <el-table |
243 | 246 | v-show="type == 3" |
247 | + :max-height="tableMaxHeight" | |
244 | 248 | :data="tableData2" |
245 | 249 | border |
246 | 250 | style="width: 100%" |
... | ... | @@ -249,11 +253,13 @@ |
249 | 253 | <el-table-column |
250 | 254 | prop="studentCode" |
251 | 255 | label="学号" |
256 | + fixed | |
252 | 257 | align="center" |
253 | 258 | ></el-table-column> |
254 | 259 | <el-table-column |
255 | 260 | prop="studentName" |
256 | 261 | label="姓名" |
262 | + fixed | |
257 | 263 | align="center" |
258 | 264 | ></el-table-column> |
259 | 265 | <el-table-column |
... | ... | @@ -284,6 +290,7 @@ |
284 | 290 | </el-table-column> |
285 | 291 | </el-table> |
286 | 292 | <el-table |
293 | + :max-height="tableMaxHeight" | |
287 | 294 | v-show="type == 4" |
288 | 295 | :data="tableData2" |
289 | 296 | border |
... | ... | @@ -293,11 +300,13 @@ |
293 | 300 | <el-table-column |
294 | 301 | prop="studentCode" |
295 | 302 | label="学号" |
303 | + fixed | |
296 | 304 | align="center" |
297 | 305 | ></el-table-column> |
298 | 306 | <el-table-column |
299 | 307 | prop="studentName" |
300 | 308 | label="姓名" |
309 | + fixed | |
301 | 310 | align="center" |
302 | 311 | ></el-table-column> |
303 | 312 | <el-table-column |
... | ... | @@ -306,7 +315,7 @@ |
306 | 315 | align="center" |
307 | 316 | ></el-table-column> |
308 | 317 | <el-table-column |
309 | - prop="examPaperScore" | |
318 | + prop="examScore" | |
310 | 319 | label="总分" |
311 | 320 | sortable |
312 | 321 | align="center" |
... | ... | @@ -363,11 +372,12 @@ |
363 | 372 | v-loading="exportLoading" |
364 | 373 | >导入主观题分数</el-button |
365 | 374 | > |
366 | - <el-button @click="edit" type="primary" round>设置答案</el-button> | |
375 | + <el-button @click="edit" type="primary" round>修改答案</el-button> | |
367 | 376 | </div> |
368 | 377 | </div> |
369 | 378 | <div class="edit-dia" v-show="dialogVisible" height="100%"> |
370 | 379 | <editAnswer |
380 | + ref="editAnswer" | |
371 | 381 | :title="title" |
372 | 382 | :score="score" |
373 | 383 | @cancel="cancel" |
... | ... | @@ -399,6 +409,7 @@ export default { |
399 | 409 | components: { editAnswer }, |
400 | 410 | data() { |
401 | 411 | return { |
412 | + tableMaxHeight:300, | |
402 | 413 | loading: false, |
403 | 414 | exportLoading: false, |
404 | 415 | diaUp: false, |
... | ... | @@ -443,6 +454,10 @@ export default { |
443 | 454 | this._QueryData(); |
444 | 455 | }, |
445 | 456 | methods: { |
457 | + setType(type){ | |
458 | + this.tableMaxHeight = this.$refs.main.offsetHeight-120 | |
459 | + this.type=type | |
460 | + }, | |
446 | 461 | setSubPro(type) { |
447 | 462 | let tit; |
448 | 463 | switch (type) { |
... | ... | @@ -580,6 +595,7 @@ export default { |
580 | 595 | } |
581 | 596 | console.log(detail); |
582 | 597 | detail.map((items, index) => { |
598 | + params["count" + index] = items.count; | |
583 | 599 | params["option" + index] = |
584 | 600 | items.option == 1 ? "✓" : items.option == 2 ? "✗" : items.option; |
585 | 601 | }); |
... | ... | @@ -609,12 +625,21 @@ export default { |
609 | 625 | }, |
610 | 626 | }; |
611 | 627 | </script> |
612 | - | |
628 | +<style> | |
629 | +div::-webkit-scrollbar { | |
630 | + width: 3px; | |
631 | + height: 10px; | |
632 | +} | |
633 | +div::-webkit-scrollbar-thumb { | |
634 | + border-radius: 10px; | |
635 | + background-color: #ccc; | |
636 | +} | |
637 | +</style> | |
613 | 638 | <style lang="scss" scoped> |
614 | 639 | .page-container { |
615 | 640 | position: relative; |
641 | + min-height: 100%; | |
616 | 642 | &.active { |
617 | - height: 100%; | |
618 | 643 | overflow: hidden; |
619 | 644 | } |
620 | 645 | .edit-dia { | ... | ... |
src/views/test/index.vue
1 | 1 | <template> |
2 | - <div class="page-container" :class="dialogVisible ? 'active' : ''"> | |
2 | + <div ref="main" class="page-container" :class="dialogVisible ? 'active' : ''"> | |
3 | 3 | <back-box> |
4 | 4 | <template slot="title"> |
5 | 5 | <span>即时测-数据报表</span> |
... | ... | @@ -26,6 +26,7 @@ |
26 | 26 | multiple |
27 | 27 | v-model="query.subjectNames" |
28 | 28 | placeholder="选择科目" |
29 | + @change="changeSub" | |
29 | 30 | > |
30 | 31 | <el-option |
31 | 32 | v-for="item in subjectList" |
... | ... | @@ -121,7 +122,7 @@ |
121 | 122 | ><template slot-scope="scoped">{{ |
122 | 123 | scoped.row.subjectiveScore == scoped.row.examPaperScore || |
123 | 124 | scoped.row.answerNum == 0 |
124 | - ? scoped.row.avgScore || "-" | |
125 | + ? "-" | |
125 | 126 | : scoped.row.avgScore |
126 | 127 | }}</template></el-table-column |
127 | 128 | > |
... | ... | @@ -129,7 +130,7 @@ |
129 | 130 | ><template slot-scope="scoped">{{ |
130 | 131 | scoped.row.subjectiveScore == scoped.row.examPaperScore || |
131 | 132 | scoped.row.answerNum == 0 |
132 | - ? scoped.row.highestScore || "-" | |
133 | + ? "-" | |
133 | 134 | : scoped.row.highestScore |
134 | 135 | }}</template></el-table-column |
135 | 136 | > |
... | ... | @@ -137,7 +138,7 @@ |
137 | 138 | ><template slot-scope="scoped">{{ |
138 | 139 | scoped.row.subjectiveScore == scoped.row.examPaperScore || |
139 | 140 | scoped.row.answerNum == 0 |
140 | - ? scoped.row.lowestScore || "-" | |
141 | + ? "-" | |
141 | 142 | : scoped.row.lowestScore |
142 | 143 | }}</template></el-table-column |
143 | 144 | > |
... | ... | @@ -149,8 +150,8 @@ |
149 | 150 | ><template slot-scope="scoped">{{ |
150 | 151 | scoped.row.subjectiveScore == scoped.row.examPaperScore || |
151 | 152 | scoped.row.answerNum == 0 |
152 | - ? scoped.row.excellenNum || "-" | |
153 | - : `${scoped.row.excellenNum}/${scoped.row.excellenRate}%` | |
153 | + ? "-" | |
154 | + : scoped.row.excellenNum?`${scoped.row.excellenNum}/${scoped.row.excellenRate}%`:scoped.row.excellenNum | |
154 | 155 | }}</template></el-table-column |
155 | 156 | > |
156 | 157 | <el-table-column |
... | ... | @@ -162,8 +163,8 @@ |
162 | 163 | >{{ |
163 | 164 | scoped.row.subjectiveScore == scoped.row.examPaperScore || |
164 | 165 | scoped.row.answerNum == 0 |
165 | - ? scoped.row.goodNum || "-" | |
166 | - : `${scoped.row.goodNum}/${scoped.row.goodRate}%` | |
166 | + ? "-" | |
167 | + : scoped.row.goodNum?`${scoped.row.goodNum}/${scoped.row.goodRate}%`:scoped.row.goodNum | |
167 | 168 | }} |
168 | 169 | </template></el-table-column |
169 | 170 | > |
... | ... | @@ -176,8 +177,8 @@ |
176 | 177 | >{{ |
177 | 178 | scoped.row.subjectiveScore == scoped.row.examPaperScore || |
178 | 179 | scoped.row.answerNum == 0 |
179 | - ? scoped.row.passNum || "-" | |
180 | - : `${scoped.row.passNum}/${scoped.row.passRate}%` | |
180 | + ? "-" | |
181 | + : scoped.row.passNum?`${scoped.row.passNum}/${scoped.row.passRate}%`:scoped.row.passNum | |
181 | 182 | }} |
182 | 183 | </template></el-table-column |
183 | 184 | > |
... | ... | @@ -189,8 +190,8 @@ |
189 | 190 | ><template slot-scope="scoped">{{ |
190 | 191 | scoped.row.subjectiveScore == scoped.row.examPaperScore || |
191 | 192 | scoped.row.answerNum == 0 |
192 | - ? scoped.row.failedNum || "-" | |
193 | - : `${scoped.row.failedNum}/${scoped.row.failedRate}%` | |
193 | + ? "-" | |
194 | + : scoped.row.failedNum?`${scoped.row.failedNum}/${scoped.row.failedRate}%`:scoped.row.failedNum | |
194 | 195 | }}</template></el-table-column |
195 | 196 | > |
196 | 197 | <el-table-column label="操作" align="center"> |
... | ... | @@ -290,7 +291,7 @@ |
290 | 291 | ></el-table-column> |
291 | 292 | </el-table-column> |
292 | 293 | </el-table> |
293 | - <el-table v-else :data="tableData" border style="width: 100%"> | |
294 | + <el-table :max-height="tableMaxHeight" v-else :data="tableData" border style="width: 100%"> | |
294 | 295 | <el-table-column |
295 | 296 | prop="studentCode" |
296 | 297 | label="学号" |
... | ... | @@ -371,6 +372,7 @@ export default { |
371 | 372 | components: { editAnswer }, |
372 | 373 | data() { |
373 | 374 | return { |
375 | + tableMaxHeight:300, | |
374 | 376 | role: "", |
375 | 377 | loading: false, |
376 | 378 | diaUp: false, |
... | ... | @@ -415,6 +417,17 @@ export default { |
415 | 417 | } |
416 | 418 | }, |
417 | 419 | methods: { |
420 | + changeSub(val) { | |
421 | + let sub; | |
422 | + if (val && val.length) { | |
423 | + let leng = val.length - 1; | |
424 | + sub = val[leng]; | |
425 | + } | |
426 | + console.log(val) | |
427 | + this.query.subjectNames = val.filter((item) => { | |
428 | + return sub != "全部" ? item != "全部" : item == "全部"; | |
429 | + }); | |
430 | + }, | |
418 | 431 | linkTo(obj) { |
419 | 432 | //去详情 |
420 | 433 | this.$router.push({ |
... | ... | @@ -516,6 +529,7 @@ export default { |
516 | 529 | this.dialogVisible = true; |
517 | 530 | }, |
518 | 531 | changeTab() { |
532 | + this.tableMaxHeight = this.$refs.main.offsetHeight-100 | |
519 | 533 | this.page = 1; |
520 | 534 | this._QueryData(); |
521 | 535 | }, |
... | ... | @@ -614,9 +628,10 @@ export default { |
614 | 628 | return item.value; |
615 | 629 | }); |
616 | 630 | query["subjectNames"].shift(); |
617 | - }else{ | |
618 | - this.loading = false; | |
619 | - return | |
631 | + } | |
632 | + if (!query["subjectNames"]) { | |
633 | + this.$message.warning("请选择科目"); | |
634 | + return; | |
620 | 635 | } |
621 | 636 | } |
622 | 637 | const { data, status, info } = await this.$request.examReportList({ |
... | ... | @@ -739,8 +754,8 @@ div::-webkit-scrollbar-thumb { |
739 | 754 | <style lang="scss" scoped> |
740 | 755 | .page-container { |
741 | 756 | position: relative; |
757 | + min-height: 100%; | |
742 | 758 | &.active { |
743 | - height: 100%; | |
744 | 759 | overflow: hidden; |
745 | 760 | } |
746 | 761 | } | ... | ... |