Commit 0e46bc25a9b3d6f04a6622e6f74d32e0905faf61
1 parent
3de13776
优化
Showing
9 changed files
with
62 additions
and
31 deletions
src/api/apis/apis.js
... | ... | @@ -740,6 +740,7 @@ export default { |
740 | 740 | url: setUpUrls.exportSchoolContrast, |
741 | 741 | method: "POST", |
742 | 742 | data, |
743 | + responseType: 'arraybuffer', | |
743 | 744 | }); |
744 | 745 | }, |
745 | 746 | // 导出年级使用对比 |
... | ... | @@ -748,6 +749,7 @@ export default { |
748 | 749 | url: setUpUrls.exportGradeContrast, |
749 | 750 | method: "POST", |
750 | 751 | data, |
752 | + responseType: 'arraybuffer', | |
751 | 753 | }); |
752 | 754 | }, |
753 | 755 | }; | ... | ... |
src/utils/index.js
... | ... | @@ -454,7 +454,7 @@ export function checkAnswer( |
454 | 454 | //单选 |
455 | 455 | console.log(s.length + " " + questionCount); |
456 | 456 | if (s.length > questionCount) { |
457 | - s = s.substring(s.length - questionCount, s.length); | |
457 | + s = s.substring(0, questionCount+1); | |
458 | 458 | } |
459 | 459 | } else if (questionType == 3) { |
460 | 460 | //多选 | ... | ... |
src/views/analysis/index.vue
... | ... | @@ -133,7 +133,7 @@ |
133 | 133 | </template> |
134 | 134 | </el-table-column> |
135 | 135 | </el-table> |
136 | - <p class="down" v-if="role != 'ROLE_JITUAN' && tableData.length"> | |
136 | + <p class="down" v-if="tableData.length"> | |
137 | 137 | <el-button |
138 | 138 | @click="downExc" |
139 | 139 | type="primary" |
... | ... | @@ -202,7 +202,10 @@ export default { |
202 | 202 | delete query.regionId; |
203 | 203 | } |
204 | 204 | this.exportLoading = true; |
205 | - const data = await this.$request.exportUsageAnalysis({ ...query }); | |
205 | + | |
206 | + const exportUsageAnalysis = this.role != "ROLE_JITUAN"?this.$request.exportUsageAnalysis: | |
207 | + this.type ==1?this.$request.exportSchoolContrast:this.$request.exportGradeContrast | |
208 | + const data = await exportUsageAnalysis({ ...query }); | |
206 | 209 | this.exportLoading = false; |
207 | 210 | if (data) { |
208 | 211 | let blob = new Blob([data], { | ... | ... |
src/views/ask/analysis.vue
src/views/device/index.vue
... | ... | @@ -320,6 +320,7 @@ |
320 | 320 | </div> |
321 | 321 | </div> |
322 | 322 | <el-table |
323 | + ref="multipleTable" | |
323 | 324 | :data="tableData" |
324 | 325 | border |
325 | 326 | style="width: 100%" |
... | ... | @@ -405,7 +406,11 @@ |
405 | 406 | <el-button @click="diaUp = false">取 消</el-button> |
406 | 407 | </div> |
407 | 408 | </el-dialog> |
408 | - <el-dialog :title="isAdd?'添加基站':'修改基站'" :visible.sync="diaAnswerEqu" width="400"> | |
409 | + <el-dialog | |
410 | + :title="isAdd ? '添加基站' : '修改基站'" | |
411 | + :visible.sync="diaAnswerEqu" | |
412 | + width="400" | |
413 | + > | |
409 | 414 | <el-form ref="forms" :model="form" :rules="formRules" label-width="140px"> |
410 | 415 | <el-form-item label="设备编码:" prop="sn"> |
411 | 416 | <el-col :span="16" |
... | ... | @@ -508,7 +513,7 @@ export default { |
508 | 513 | }, |
509 | 514 | data() { |
510 | 515 | return { |
511 | - isAdd:false,//添加还是修改基站 | |
516 | + isAdd: false, //添加还是修改基站 | |
512 | 517 | role: "", |
513 | 518 | code: "", |
514 | 519 | loading: false, |
... | ... | @@ -624,7 +629,7 @@ export default { |
624 | 629 | this._QueryData(); |
625 | 630 | }, |
626 | 631 | edit(obj) { |
627 | - this.isAdd=false | |
632 | + this.isAdd = false; | |
628 | 633 | for (let key in this.form) { |
629 | 634 | if (key == "classIds") { |
630 | 635 | this.form[key] = obj.classList[0]?.classId; |
... | ... | @@ -632,7 +637,7 @@ export default { |
632 | 637 | this.form[key] = obj[key]; |
633 | 638 | } |
634 | 639 | } |
635 | - delete this.form.schoolId | |
640 | + delete this.form.schoolId; | |
636 | 641 | this.form.deviceId = obj.id; |
637 | 642 | this.diaAnswerEqu = true; |
638 | 643 | }, |
... | ... | @@ -693,9 +698,9 @@ export default { |
693 | 698 | this.form.pairingCode = ""; |
694 | 699 | this.form.classIds = ""; |
695 | 700 | this.form.roomName = ""; |
696 | - this.form.schoolId= this.school.id | |
697 | - delete this.form.deviceId | |
698 | - this.isAdd = true | |
701 | + this.form.schoolId = this.school.id; | |
702 | + delete this.form.deviceId; | |
703 | + this.isAdd = true; | |
699 | 704 | this.diaAnswerEqu = true; |
700 | 705 | }, |
701 | 706 | async showSchool() { |
... | ... | @@ -783,13 +788,18 @@ export default { |
783 | 788 | // query.classIds = query.classIds.map((item) => { |
784 | 789 | // return item[1]; |
785 | 790 | // }); |
786 | - if(typeof query.classIds == 'string' || typeof query.classIds == 'number'){ | |
791 | + if ( | |
792 | + typeof query.classIds == "string" || | |
793 | + typeof query.classIds == "number" | |
794 | + ) { | |
787 | 795 | query.classIds = [query.classIds]; |
788 | - }else{ | |
796 | + } else { | |
789 | 797 | query.classIds = [query.classIds[1]]; |
790 | 798 | } |
791 | - | |
792 | - let deviceApi = this.isAdd?this.$request.addStation:this.$request.updateDevice | |
799 | + | |
800 | + let deviceApi = this.isAdd | |
801 | + ? this.$request.addStation | |
802 | + : this.$request.updateDevice; | |
793 | 803 | const { data, status, info } = await deviceApi({ |
794 | 804 | ...query, |
795 | 805 | }); |
... | ... | @@ -799,8 +809,8 @@ export default { |
799 | 809 | this.diaAnswerEqu = false; |
800 | 810 | this.$message.success(info); |
801 | 811 | this._QueryData(); |
802 | - if(this.isAdd){ | |
803 | - this.stationReport() | |
812 | + if (this.isAdd) { | |
813 | + this.stationReport(); | |
804 | 814 | } |
805 | 815 | } else { |
806 | 816 | this.$message.error(info); |
... | ... | @@ -1030,9 +1040,16 @@ export default { |
1030 | 1040 | return item; |
1031 | 1041 | })) || |
1032 | 1042 | []; |
1043 | + | |
1033 | 1044 | this.total = data.count; |
1034 | 1045 | this.$nextTick(function () { |
1035 | 1046 | this.$refs.main.scrollTop = 0; |
1047 | + if (this.query.classId.length) { | |
1048 | + this.selectionTabIds = this.tableData.map((item) => { | |
1049 | + this.$refs.multipleTable.toggleRowSelection(item); | |
1050 | + return item.id; | |
1051 | + }); | |
1052 | + } | |
1036 | 1053 | }); |
1037 | 1054 | } else { |
1038 | 1055 | this.$message.error(info); | ... | ... |
src/views/examinationPaper/add.vue
... | ... | @@ -400,7 +400,7 @@ |
400 | 400 | <p class="question-title"> |
401 | 401 | <span>{{ setBigNum(index) }}、</span> |
402 | 402 | <span class="title-txt">{{ question.questionTitle }}</span> |
403 | - <span class="m20">共:{{ question.subQuestions.length }}题</span> | |
403 | + <span class="m20">共:{{ setNums(question.subQuestions) }}题</span> | |
404 | 404 | <span>共:{{ setScore(question) }} 分</span> |
405 | 405 | </p> |
406 | 406 | <ul class="questions-ul"> |
... | ... | @@ -519,13 +519,13 @@ |
519 | 519 | <p>{{ setSubPro(formAns.qusType) }}:</p> |
520 | 520 | <p class="ipt"> |
521 | 521 | <el-input |
522 | - v-if="formAns.qusType ==2 ||formAns.qusType==3" | |
522 | + v-if="formAns.qusType == 2 || formAns.qusType == 3" | |
523 | 523 | v-model="formAns.answerList" |
524 | - @keydown.native="keydownAnswer($event,formAns.qusType)" | |
524 | + @keydown.native="keydownAnswer($event, formAns.qusType)" | |
525 | 525 | @input="setAllAnswer($event, formAns.qusType)" |
526 | 526 | ></el-input> |
527 | 527 | <el-input |
528 | - v-if="formAns.qusType ==4" | |
528 | + v-if="formAns.qusType == 4" | |
529 | 529 | v-model="formAns.answerList" |
530 | 530 | readonly="" |
531 | 531 | ></el-input> |
... | ... | @@ -782,6 +782,14 @@ export default { |
782 | 782 | } |
783 | 783 | return lengths + subIndex + 1; |
784 | 784 | }, |
785 | + setNums(ques) { | |
786 | + let lengths = 0; | |
787 | + let subArr = ques.filter((item) => { | |
788 | + return !!item.questionType; | |
789 | + }); | |
790 | + lengths = subArr.length; | |
791 | + return lengths | |
792 | + }, | |
785 | 793 | setBigNum(num) { |
786 | 794 | let txt = ""; |
787 | 795 | let bigNum = [ |
... | ... | @@ -912,12 +920,12 @@ export default { |
912 | 920 | event.returnValue = ""; |
913 | 921 | } |
914 | 922 | }, |
915 | - setAllAnswer(event, type){ | |
923 | + setAllAnswer(event, type) { | |
916 | 924 | let str = this.formAns.answerList; |
917 | 925 | let str2 = checkAnswer( |
918 | 926 | str, |
919 | 927 | type, |
920 | - this.formAns.answerOptions.split(',').length, | |
928 | + this.formAns.answerOptions.split(",").length, | |
921 | 929 | this.formAns.subNum |
922 | 930 | ); |
923 | 931 | this.formAns.answerList = str2; | ... | ... |
src/views/login/index.vue
... | ... | @@ -95,8 +95,8 @@ export default { |
95 | 95 | loginForm: { |
96 | 96 | // username: "15911715665", |
97 | 97 | // password: "715665", |
98 | - // username: "18314340313", | |
99 | - // password: "Pw340313#", | |
98 | + username: "18314340313", | |
99 | + password: "Pw340313#", | |
100 | 100 | // username: "18687826606", |
101 | 101 | // password: "Pw826606#", |
102 | 102 | // username: "18893712576", | ... | ... |
src/views/setUp/teacher.vue
... | ... | @@ -5,7 +5,7 @@ |
5 | 5 | <span>教师管理</span> |
6 | 6 | </template> |
7 | 7 | <template slot="btns" v-if="!code"> |
8 | - <el-tooltip effect="dark" content="导入教师名单" placement="bottom"> | |
8 | + <!-- <el-tooltip effect="dark" content="导入教师名单" placement="bottom"> | |
9 | 9 | <el-button |
10 | 10 | type="primary" |
11 | 11 | icon="el-icon-upload2" |
... | ... | @@ -14,7 +14,7 @@ |
14 | 14 | circle |
15 | 15 | @click="diaUp = true" |
16 | 16 | ></el-button> |
17 | - </el-tooltip> | |
17 | + </el-tooltip> --> | |
18 | 18 | <el-tooltip effect="dark" content="添加教师" placement="bottom"> |
19 | 19 | <el-button |
20 | 20 | type="primary" | ... | ... |
src/views/test/analysis.vue
... | ... | @@ -341,7 +341,10 @@ |
341 | 341 | > |
342 | 342 | <template slot-scope="scope"> |
343 | 343 | <span |
344 | - v-if="scope.row['answer' + item.id]" | |
344 | + v-if="tableData[index].questionType==5" | |
345 | + >*</span> | |
346 | + <span | |
347 | + v-else-if="scope.row['answer' + item.id]" | |
345 | 348 | :class="scope.row['isRight' + item.id] ? '' : 'error'" |
346 | 349 | > |
347 | 350 | {{ scope.row["answer" + item.id] }} |
... | ... | @@ -349,9 +352,7 @@ |
349 | 352 | <span |
350 | 353 | v-else |
351 | 354 | :class="scope.row['questionType' + item.id] == 5 ? '' : 'error'" |
352 | - > | |
353 | - {{ scope.row["questionType" + item.id] == 5 ? "*" : "-" }} | |
354 | - </span> | |
355 | + >-</span> | |
355 | 356 | </template> |
356 | 357 | </el-table-column> |
357 | 358 | </el-table> | ... | ... |