Commit d32e461c3187dc3bba534d08b140ffb5209ee829
1 parent
533a17d8
备题组卷
Showing
11 changed files
with
225 additions
and
161 deletions
src/assets/css/index.scss
| ... | ... | @@ -43,6 +43,7 @@ |
| 43 | 43 | border: 1px solid #e2e2e2; |
| 44 | 44 | box-sizing: border-box; |
| 45 | 45 | background: #fff; |
| 46 | + | |
| 46 | 47 | .el-input__inner { |
| 47 | 48 | border-radius: 20px; |
| 48 | 49 | border: none; |
| ... | ... | @@ -76,6 +77,7 @@ |
| 76 | 77 | } |
| 77 | 78 | } |
| 78 | 79 | } |
| 80 | + | |
| 79 | 81 | .answer-box { |
| 80 | 82 | .answer-s { |
| 81 | 83 | display: inline-block; |
| ... | ... | @@ -88,6 +90,7 @@ |
| 88 | 90 | color: #333; |
| 89 | 91 | text-align: center; |
| 90 | 92 | line-height: 30px; |
| 93 | + | |
| 91 | 94 | &.active { |
| 92 | 95 | background: #5e78fa; |
| 93 | 96 | border-color: #5e78fa; |
| ... | ... | @@ -95,6 +98,7 @@ |
| 95 | 98 | } |
| 96 | 99 | } |
| 97 | 100 | } |
| 101 | + | |
| 98 | 102 | .el-menu-item i { |
| 99 | 103 | width: 12px; |
| 100 | 104 | text-align: center; |
| ... | ... | @@ -104,43 +108,57 @@ |
| 104 | 108 | .el-table thead th.el-table__cell { |
| 105 | 109 | background: #f5f7fa; |
| 106 | 110 | } |
| 107 | -.el-table .el-table__cell.bg{ | |
| 111 | + | |
| 112 | +.el-table .el-table__cell.bg { | |
| 108 | 113 | background: #f9f9f9; |
| 109 | 114 | } |
| 115 | + | |
| 116 | +.el-table th.el-table__cell.p0>.cell { | |
| 117 | + padding-left: 0; | |
| 118 | + padding-right: 0; | |
| 119 | +} | |
| 120 | + | |
| 110 | 121 | .el-menu--popup { |
| 111 | 122 | min-width: 160px; |
| 112 | 123 | } |
| 124 | + | |
| 113 | 125 | .ellipsis { |
| 114 | 126 | overflow: hidden; |
| 115 | 127 | text-overflow: ellipsis; |
| 116 | 128 | white-space: nowrap; |
| 117 | 129 | } |
| 118 | -.pagination-box{ | |
| 119 | - text-align:center; | |
| 120 | - margin:10px; | |
| 130 | + | |
| 131 | +.pagination-box { | |
| 132 | + text-align: center; | |
| 133 | + margin: 10px; | |
| 121 | 134 | } |
| 122 | -.down-txt{ | |
| 135 | + | |
| 136 | +.down-txt { | |
| 123 | 137 | display: flex; |
| 124 | 138 | align-items: center; |
| 125 | 139 | padding-left: 160px; |
| 126 | 140 | } |
| 127 | -.h-title{ | |
| 128 | - padding-left:12px; | |
| 141 | + | |
| 142 | +.h-title { | |
| 143 | + padding-left: 12px; | |
| 129 | 144 | position: relative; |
| 130 | - font-size:16px; | |
| 131 | - &:after{ | |
| 132 | - content:""; | |
| 133 | - position:absolute; | |
| 134 | - left:0; | |
| 135 | - top:50%; | |
| 136 | - margin-top:-8px; | |
| 137 | - width:3px; | |
| 138 | - height:16px; | |
| 145 | + font-size: 16px; | |
| 146 | + | |
| 147 | + &:after { | |
| 148 | + content: ""; | |
| 149 | + position: absolute; | |
| 150 | + left: 0; | |
| 151 | + top: 50%; | |
| 152 | + margin-top: -8px; | |
| 153 | + width: 3px; | |
| 154 | + height: 16px; | |
| 139 | 155 | background: #2e9afe; |
| 140 | 156 | } |
| 141 | 157 | } |
| 142 | -div,ul{ | |
| 143 | - &::-webkit-scrollbar{ | |
| 144 | - width:0; | |
| 158 | + | |
| 159 | +div, | |
| 160 | +ul { | |
| 161 | + &::-webkit-scrollbar { | |
| 162 | + width: 0; | |
| 145 | 163 | } |
| 146 | 164 | } |
| 147 | 165 | \ No newline at end of file | ... | ... |
src/utils/index.js
| ... | ... | @@ -723,6 +723,7 @@ export function formatGradeNameClass(data) { |
| 723 | 723 | { |
| 724 | 724 | value: item.classCode, |
| 725 | 725 | label: item.className, |
| 726 | + leaf:true | |
| 726 | 727 | }, |
| 727 | 728 | ], |
| 728 | 729 | }); |
| ... | ... | @@ -736,6 +737,7 @@ export function formatGradeNameClass(data) { |
| 736 | 737 | gradeNameArr[gradeIndex].children.push({ |
| 737 | 738 | value: item.classCode, |
| 738 | 739 | label: item.className, |
| 740 | + leaf:true | |
| 739 | 741 | }); |
| 740 | 742 | } |
| 741 | 743 | }); | ... | ... |
src/views/ask/analysis.vue
| ... | ... | @@ -152,7 +152,7 @@ |
| 152 | 152 | prop="duration" |
| 153 | 153 | label="答题耗时" |
| 154 | 154 | align="center" |
| 155 | - ></el-table-column> | |
| 155 | + ><template slot-scope="scoped">{{setDuration(scoped.row.duration)}}</template></el-table-column> | |
| 156 | 156 | <el-table-column |
| 157 | 157 | prop="correctAnswerTimes" |
| 158 | 158 | label="答对次数" |
| ... | ... | @@ -332,6 +332,11 @@ export default { |
| 332 | 332 | this.page = 1; |
| 333 | 333 | this._QueryData(); |
| 334 | 334 | }, |
| 335 | + setDuration(times){ | |
| 336 | + let m = parseInt(times/60) | |
| 337 | + let s = times%60 | |
| 338 | + return `${m}分${s}秒` | |
| 339 | + }, | |
| 335 | 340 | setSubPro(type) { |
| 336 | 341 | let tit; |
| 337 | 342 | switch (type) { | ... | ... |
src/views/ask/index.vue
| ... | ... | @@ -93,7 +93,7 @@ |
| 93 | 93 | @change="tabChange" |
| 94 | 94 | style="margin-bottom: 20px" |
| 95 | 95 | > |
| 96 | - <el-radio-button :label="1" v-if="query.startDay != query.endDay" | |
| 96 | + <el-radio-button :label="1" | |
| 97 | 97 | >单课时报表</el-radio-button |
| 98 | 98 | > |
| 99 | 99 | <!-- <el-radio-button :label="2" v-if="this.role != 'ROLE_BANZHUREN'" |
| ... | ... | @@ -544,6 +544,7 @@ export default { |
| 544 | 544 | that.query.day = formatDate(new Date(), "yyyy-MM-dd"); |
| 545 | 545 | that.query.startDay = that.query.day; |
| 546 | 546 | that.query.endDay = that.query.day; |
| 547 | + that.tabIndex = 1 | |
| 547 | 548 | break; |
| 548 | 549 | case 2: |
| 549 | 550 | let day = new Date().getDay(); | ... | ... |
src/views/dataSync/index.vue
| ... | ... | @@ -32,7 +32,7 @@ |
| 32 | 32 | <div class="down-item"> |
| 33 | 33 | <p class="h-title">数据导出至U盘</p> |
| 34 | 34 | <p class="txt"> |
| 35 | - 本功能将云平台的数据导出到U盘。包括4套答题卡。 | |
| 35 | + 本功能将云平台的数据导出到U盘。 | |
| 36 | 36 | </p> |
| 37 | 37 | <div class="btn-box btn-box2" v-loading="downLoading"> |
| 38 | 38 | <i class="fa fa-cloud-download" @click="downloadFile"></i> |
| ... | ... | @@ -51,8 +51,7 @@ export default { |
| 51 | 51 | data() { |
| 52 | 52 | return { |
| 53 | 53 | downLoading: false, |
| 54 | - // url: "/api_html/teaching/importData", | |
| 55 | - url: "", | |
| 54 | + url: "/api_html/teaching/importData", | |
| 56 | 55 | file: {}, |
| 57 | 56 | }; |
| 58 | 57 | }, | ... | ... |
src/views/device/index.vue
| ... | ... | @@ -6,9 +6,10 @@ |
| 6 | 6 | </template> |
| 7 | 7 | <template |
| 8 | 8 | slot="btns" |
| 9 | - v-if="role != 'ROLE_JITUAN' && type == 1 && school !== '长水'" | |
| 9 | + v-if="role != 'ROLE_JITUAN' && type == 1 && !code" | |
| 10 | 10 | > |
| 11 | - <el-tooltip effect="dark" content="设备导入" placement="bottom"> | |
| 11 | + <!-- 暂未有接口 --> | |
| 12 | + <!-- <el-tooltip effect="dark" content="设备导入" placement="bottom"> | |
| 12 | 13 | <el-button |
| 13 | 14 | type="primary" |
| 14 | 15 | icon="el-icon-upload2" |
| ... | ... | @@ -17,7 +18,7 @@ |
| 17 | 18 | circle |
| 18 | 19 | @click="diaUp = true" |
| 19 | 20 | ></el-button> |
| 20 | - </el-tooltip> | |
| 21 | + </el-tooltip> --> | |
| 21 | 22 | <el-tooltip effect="dark" content="添加基站" placement="bottom"> |
| 22 | 23 | <el-button |
| 23 | 24 | type="primary" |
| ... | ... | @@ -501,7 +502,7 @@ export default { |
| 501 | 502 | data() { |
| 502 | 503 | return { |
| 503 | 504 | role: "", |
| 504 | - school: "", | |
| 505 | + code: "", | |
| 505 | 506 | loading: false, |
| 506 | 507 | url: "/web/upLoadDevice", |
| 507 | 508 | diaUp: false, |
| ... | ... | @@ -563,6 +564,7 @@ export default { |
| 563 | 564 | }; |
| 564 | 565 | }, |
| 565 | 566 | created() { |
| 567 | + this.code = localStorage.getItem("csCode")||"" | |
| 566 | 568 | let role = ""; |
| 567 | 569 | this.$store.getters.info.permissions.map((item) => { |
| 568 | 570 | if (item.roleName == this.$store.getters.info.showRoleName) { | ... | ... |
src/views/device/log.vue
| ... | ... | @@ -64,9 +64,7 @@ |
| 64 | 64 | >本季度</span |
| 65 | 65 | > |
| 66 | 66 | </p> |
| 67 | - <el-button class="serach-box" round @click="_QueryData" | |
| 68 | - >筛选</el-button | |
| 69 | - > | |
| 67 | + <el-button type="primary" class="serach-box" round @click="_QueryData">筛选</el-button> | |
| 70 | 68 | </div> |
| 71 | 69 | </div> |
| 72 | 70 | <div class="table-box"> |
| ... | ... | @@ -196,7 +194,7 @@ export default { |
| 196 | 194 | //中国式星期天是一周的最后一天 |
| 197 | 195 | day = 7; |
| 198 | 196 | } |
| 199 | - day-- | |
| 197 | + day--; | |
| 200 | 198 | let aTime = new Date().getTime() - 24 * 60 * 60 * 1000 * day; |
| 201 | 199 | that.query.startDay = formatDate(new Date(aTime), "yyyy-MM-dd"); |
| 202 | 200 | that.query.endDay = formatDate(new Date(), "yyyy-MM-dd"); |
| ... | ... | @@ -287,7 +285,7 @@ export default { |
| 287 | 285 | }); |
| 288 | 286 | this.loading = false; |
| 289 | 287 | if (status === 0) { |
| 290 | - this.tableData = data?.list&&[...data?.list] || []; | |
| 288 | + this.tableData = (data?.list && [...data?.list]) || []; | |
| 291 | 289 | this.total = data.count; |
| 292 | 290 | } else { |
| 293 | 291 | this.$message.error(info); |
| ... | ... | @@ -301,7 +299,10 @@ export default { |
| 301 | 299 | .page-content { |
| 302 | 300 | padding: 20px; |
| 303 | 301 | } |
| 304 | -.table-box{ | |
| 305 | - padding:0 20px; | |
| 302 | +.table-box { | |
| 303 | + padding: 0 20px; | |
| 304 | +} | |
| 305 | +.serach-box{ | |
| 306 | + margin-left:20px; | |
| 306 | 307 | } |
| 307 | 308 | </style> |
| 308 | 309 | \ No newline at end of file | ... | ... |
src/views/examinationPaper/add.vue
| ... | ... | @@ -151,8 +151,8 @@ |
| 151 | 151 | icon="el-icon-delete" |
| 152 | 152 | ></el-button> |
| 153 | 153 | </el-popconfirm> |
| 154 | - | |
| 155 | - <span>总分数:{{ setScore(question) }}分</span> | |
| 154 | + <span class="m20">共:{{ question.subQuestions.length }}题</span> | |
| 155 | + <span>共:{{ setScore(question) }}分</span> | |
| 156 | 156 | </p> |
| 157 | 157 | <ul class="questions-ul"> |
| 158 | 158 | <li class="sub-questions"> |
| ... | ... | @@ -330,10 +330,10 @@ |
| 330 | 330 | :value="item.value" |
| 331 | 331 | > |
| 332 | 332 | </el-option> |
| 333 | - <el-option label="混合题题型" :value="6"> </el-option> | |
| 333 | + <el-option label="混合题" :value="6"> </el-option> | |
| 334 | 334 | </el-select> |
| 335 | 335 | </el-form-item> |
| 336 | - <el-form-item label="默认题数:"> | |
| 336 | + <el-form-item label="题数:"> | |
| 337 | 337 | <el-input-number |
| 338 | 338 | v-model="questionForm.number" |
| 339 | 339 | :min="1" |
| ... | ... | @@ -344,7 +344,7 @@ |
| 344 | 344 | ></el-input-number> |
| 345 | 345 | </el-form-item> |
| 346 | 346 | <el-form-item |
| 347 | - label="默认选项:" | |
| 347 | + label="选项个数:" | |
| 348 | 348 | v-show=" |
| 349 | 349 | questionForm.questionType != 4 && |
| 350 | 350 | questionForm.questionType != 5 |
| ... | ... | @@ -359,7 +359,7 @@ |
| 359 | 359 | label="label" |
| 360 | 360 | ></el-input-number> |
| 361 | 361 | </el-form-item> |
| 362 | - <el-form-item label="默认分数:"> | |
| 362 | + <el-form-item label="单题分数:"> | |
| 363 | 363 | <el-input-number |
| 364 | 364 | v-model="questionForm.score" |
| 365 | 365 | :min="1" |
| ... | ... | @@ -398,7 +398,8 @@ |
| 398 | 398 | <p class="question-title"> |
| 399 | 399 | <span>{{ setBigNum(index) }}、</span> |
| 400 | 400 | <span class="title-txt">{{ question.questionTitle }}</span> |
| 401 | - <span>共 {{ setScore(question) }} 分</span> | |
| 401 | + <span class="m20">共:{{ question.subQuestions.length }}题</span> | |
| 402 | + <span>共:{{ setScore(question) }} 分</span> | |
| 402 | 403 | </p> |
| 403 | 404 | <ul class="questions-ul"> |
| 404 | 405 | <li class="sub-questions"> |
| ... | ... | @@ -477,7 +478,7 @@ |
| 477 | 478 | class="answer-s" |
| 478 | 479 | v-for="option in subQuestions.answerOptions.split(',')" |
| 479 | 480 | :class=" |
| 480 | - subQuestions.correctAnswer.includes(option) | |
| 481 | + subQuestions.correctAnswer?.includes(option) | |
| 481 | 482 | ? 'active' |
| 482 | 483 | : '' |
| 483 | 484 | " |
| ... | ... | @@ -876,7 +877,7 @@ export default { |
| 876 | 877 | } else if (type == 3) { |
| 877 | 878 | txt = ans + ","; |
| 878 | 879 | } else if (type == 4) { |
| 879 | - txt = ans == 1 ? "✓" : "✗"; | |
| 880 | + txt = ans == 1 ? "✓" : ans == 2 ? "✗" : ""; | |
| 880 | 881 | } |
| 881 | 882 | return txt; |
| 882 | 883 | }, |
| ... | ... | @@ -907,75 +908,71 @@ export default { |
| 907 | 908 | // } |
| 908 | 909 | // }); |
| 909 | 910 | // if (!valid) { |
| 910 | - //添加题目ID、序号 | |
| 911 | - this.form.questionList.map((item, index) => { | |
| 912 | - item.questionType = 0; | |
| 913 | - item.subQuestions.map((items, indexs) => { | |
| 914 | - items.questionId = this.setNum(index, indexs); | |
| 915 | - items.questionIndex = this.setNum(index, indexs); | |
| 916 | - }); | |
| 911 | + //添加题目ID、序号 | |
| 912 | + this.form.questionList.map((item, index) => { | |
| 913 | + item.questionType = 0; | |
| 914 | + item.subQuestions.map((items, indexs) => { | |
| 915 | + items.questionId = this.setNum(index, indexs); | |
| 916 | + items.questionIndex = this.setNum(index, indexs); | |
| 917 | 917 | }); |
| 918 | - //整理问题 | |
| 919 | - this.form.questionList?.map((item) => { | |
| 920 | - let types = [{}]; | |
| 921 | - let addndex = 0; | |
| 922 | - item.subQuestions.map((sub, index) => { | |
| 923 | - if (!!sub.questionType && sub.questionType != 5) { | |
| 924 | - if (sub.questionType == types[addndex].qusType) { | |
| 925 | - //同类型批量答案+1 | |
| 926 | - types[addndex].subNum += 1; | |
| 927 | - if ( | |
| 928 | - types[addndex].answerOptions.length < sub.answerOptions.length | |
| 929 | - ) { | |
| 930 | - types[addndex].answerOptions = sub.answerOptions; | |
| 931 | - } | |
| 932 | - types[addndex].answerList += this.setAnswer( | |
| 933 | - sub.questionType, | |
| 934 | - sub.correctAnswer | |
| 935 | - ); | |
| 936 | - if (index == item.subQuestions.length - 1) { | |
| 937 | - //循环最后类型数量大于等于5,保存批量答案 | |
| 938 | - if (types[addndex].subNum && types[addndex].subNum >= 5) { | |
| 939 | - types[addndex].endIndex = sub.questionIndex; | |
| 940 | - types[addndex].index = index; | |
| 941 | - } | |
| 942 | - } | |
| 943 | - } else { | |
| 918 | + }); | |
| 919 | + //整理问题 | |
| 920 | + this.form.questionList?.map((item) => { | |
| 921 | + let types = [{}]; | |
| 922 | + let addndex = 0; | |
| 923 | + item.subQuestions.map((sub, index) => { | |
| 924 | + if (!!sub.questionType && sub.questionType != 5) { | |
| 925 | + if (sub.questionType == types[addndex].qusType) { | |
| 926 | + //同类型批量答案+1 | |
| 927 | + types[addndex].subNum += 1; | |
| 928 | + if ( | |
| 929 | + types[addndex].answerOptions.length < sub.answerOptions.length | |
| 930 | + ) { | |
| 931 | + types[addndex].answerOptions = sub.answerOptions; | |
| 932 | + } | |
| 933 | + | |
| 934 | + // types[addndex].answerList += this.setAnswer( | |
| 935 | + // sub.questionType, | |
| 936 | + // sub.correctAnswer | |
| 937 | + // ); | |
| 938 | + types[addndex].answerList = ""; | |
| 939 | + if (index == item.subQuestions.length - 1) { | |
| 940 | + //循环最后类型数量大于等于5,保存批量答案 | |
| 944 | 941 | if (types[addndex].subNum && types[addndex].subNum >= 5) { |
| 945 | - //不同类型时如果原有类型数量大于等于5,保存批量答案 | |
| 946 | - types[addndex].endIndex = | |
| 947 | - item.subQuestions[index - 1].questionIndex; | |
| 948 | - types[addndex].index = index - 1; | |
| 949 | - addndex += 1; | |
| 950 | - types[addndex] = {}; | |
| 942 | + types[addndex].endIndex = sub.questionIndex; | |
| 943 | + types[addndex].index = index; | |
| 951 | 944 | } |
| 952 | - //不同类型初始化批量答案 | |
| 953 | - types[addndex].qusType = sub.questionType; | |
| 954 | - types[addndex].subNum = 1; | |
| 955 | - types[addndex].answerOptions = sub.answerOptions; | |
| 956 | - types[addndex].answerList = this.setAnswer( | |
| 957 | - sub.questionType, | |
| 958 | - sub.correctAnswer | |
| 959 | - ); | |
| 960 | 945 | } |
| 961 | - } | |
| 962 | - }); | |
| 963 | - for (let i = 0; i < types.length; i++) { | |
| 964 | - if (types[i].qusType == 3) { | |
| 965 | - types[i].answerList = types[i].answerList.slice(0, -1); | |
| 966 | - } | |
| 967 | - if (types[i].subNum >= 5) { | |
| 968 | - item.subQuestions.splice( | |
| 969 | - types[i].index + i + 1, | |
| 970 | - 0, | |
| 971 | - deepClone(types[i]) | |
| 972 | - ); | |
| 946 | + } else { | |
| 947 | + if (types[addndex].subNum && types[addndex].subNum >= 5) { | |
| 948 | + //不同类型时如果原有类型数量大于等于5,保存批量答案 | |
| 949 | + types[addndex].endIndex = | |
| 950 | + item.subQuestions[index - 1].questionIndex; | |
| 951 | + types[addndex].index = index - 1; | |
| 952 | + addndex += 1; | |
| 953 | + types[addndex] = {}; | |
| 954 | + } | |
| 955 | + //不同类型初始化批量答案 | |
| 956 | + types[addndex].qusType = sub.questionType; | |
| 957 | + types[addndex].subNum = 1; | |
| 958 | + types[addndex].answerOptions = sub.answerOptions; | |
| 959 | + types[addndex].answerList = "" | |
| 973 | 960 | } |
| 974 | 961 | } |
| 975 | - console.log(types); | |
| 976 | 962 | }); |
| 977 | - this.step = 2; | |
| 978 | - return; | |
| 963 | + for (let i = 0; i < types.length; i++) { | |
| 964 | + if (types[i].subNum >= 5) { | |
| 965 | + item.subQuestions.splice( | |
| 966 | + types[i].index + i + 1, | |
| 967 | + 0, | |
| 968 | + deepClone(types[i]) | |
| 969 | + ); | |
| 970 | + } | |
| 971 | + } | |
| 972 | + console.log(types); | |
| 973 | + }); | |
| 974 | + this.step = 2; | |
| 975 | + return; | |
| 979 | 976 | // } else { |
| 980 | 977 | // this.$message.error( |
| 981 | 978 | // `大题名称不能为空,请检查第${valid.slice(0, -1)}大题!` |
| ... | ... | @@ -1384,6 +1381,9 @@ export default { |
| 1384 | 1381 | } |
| 1385 | 1382 | .question-title { |
| 1386 | 1383 | line-height: 40px; |
| 1384 | + .m20{ | |
| 1385 | + margin-right:20px; | |
| 1386 | + } | |
| 1387 | 1387 | .ipt { |
| 1388 | 1388 | width: 300px; |
| 1389 | 1389 | margin: 0 16px 0 10px; | ... | ... |
src/views/login/index.vue
| ... | ... | @@ -95,6 +95,8 @@ export default { |
| 95 | 95 | loginForm: { |
| 96 | 96 | // username: "15911715665", |
| 97 | 97 | // password: "715665", |
| 98 | + // username: "18087527793", | |
| 99 | + // password: "Pw527793#", | |
| 98 | 100 | // username: "18687826606", |
| 99 | 101 | // password: "Pw826606#", |
| 100 | 102 | // username: "18893712576", | ... | ... |
src/views/setUp/account.vue
| ... | ... | @@ -5,7 +5,8 @@ |
| 5 | 5 | <span>账号管理</span> |
| 6 | 6 | </template> |
| 7 | 7 | <template slot="btns" v-if="role == 'ROLE_JITUAN'"> |
| 8 | - <el-tooltip effect="dark" content="导入账号" placement="bottom"> | |
| 8 | + <!-- 暂未有接口 --> | |
| 9 | + <!-- <el-tooltip effect="dark" content="导入账号" placement="bottom"> | |
| 9 | 10 | <el-button |
| 10 | 11 | type="primary" |
| 11 | 12 | icon="el-icon-upload2" |
| ... | ... | @@ -14,7 +15,7 @@ |
| 14 | 15 | circle |
| 15 | 16 | @click="diaUp = true" |
| 16 | 17 | ></el-button> |
| 17 | - </el-tooltip> | |
| 18 | + </el-tooltip> --> | |
| 18 | 19 | <el-tooltip effect="dark" content="添加账号" placement="bottom"> |
| 19 | 20 | <el-button |
| 20 | 21 | type="primary" | ... | ... |
src/views/test/index.vue
| ... | ... | @@ -101,11 +101,7 @@ |
| 101 | 101 | > |
| 102 | 102 | </el-radio-group> |
| 103 | 103 | <div v-show="tabIndex == 1" v-loading="loading"> |
| 104 | - <el-table | |
| 105 | - :data="tableData" | |
| 106 | - border | |
| 107 | - style="width: 100%" | |
| 108 | - > | |
| 104 | + <el-table :data="tableData" border style="width: 100%"> | |
| 109 | 105 | <el-table-column |
| 110 | 106 | prop="title" |
| 111 | 107 | label="试卷名称" |
| ... | ... | @@ -156,67 +152,103 @@ |
| 156 | 152 | > |
| 157 | 153 | <el-table-column |
| 158 | 154 | prop="excellenRate" |
| 159 | - label="优秀数(率)" | |
| 155 | + label="优秀数(率)" | |
| 160 | 156 | sortable |
| 161 | 157 | align="center" |
| 162 | - ><template slot-scope="scoped">{{ | |
| 163 | - (scoped.row.subjectiveScore == scoped.row.examPaperScore || | |
| 164 | - scoped.row.answerNum == 0) && | |
| 165 | - scoped.row.recordStatus == 0 | |
| 166 | - ? "-" | |
| 167 | - : scoped.row.excellenNum | |
| 168 | - ? `${scoped.row.excellenNum}(${scoped.row.excellenRate}%)` | |
| 169 | - : scoped.row.excellenNum | |
| 170 | - }}</template></el-table-column | |
| 158 | + width="110" | |
| 159 | + class-name="p0" | |
| 160 | + ><template slot-scope="scoped"> | |
| 161 | + <p | |
| 162 | + v-if=" | |
| 163 | + (scoped.row.subjectiveScore == scoped.row.examPaperScore || | |
| 164 | + scoped.row.answerNum == 0) && | |
| 165 | + scoped.row.arecordStatus == 0 | |
| 166 | + " | |
| 167 | + > | |
| 168 | + "-" | |
| 169 | + </p> | |
| 170 | + <template v-else> | |
| 171 | + <p>{{ scoped.row.excellenNum }}</p> | |
| 172 | + <p v-if="scoped.row.excellenNum"> | |
| 173 | + {{ `(${scoped.row.excellenRate}%)` }} | |
| 174 | + </p> | |
| 175 | + </template> | |
| 176 | + </template></el-table-column | |
| 171 | 177 | > |
| 172 | 178 | <el-table-column |
| 173 | 179 | prop="goodRate" |
| 174 | - label="良好数(率)" | |
| 180 | + label="良好数(率)" | |
| 175 | 181 | sortable |
| 176 | 182 | align="center" |
| 177 | - ><template slot-scope="scoped" | |
| 178 | - >{{ | |
| 179 | - (scoped.row.subjectiveScore == scoped.row.examPaperScore || | |
| 180 | - scoped.row.answerNum == 0) && | |
| 181 | - scoped.row.recordStatus == 0 | |
| 182 | - ? "-" | |
| 183 | - : scoped.row.goodNum | |
| 184 | - ? `${scoped.row.goodNum}(${scoped.row.goodRate}%)` | |
| 185 | - : scoped.row.goodNum | |
| 186 | - }} | |
| 183 | + width="110" | |
| 184 | + class-name="p0" | |
| 185 | + ><template slot-scope="scoped"> | |
| 186 | + <p | |
| 187 | + v-if=" | |
| 188 | + (scoped.row.subjectiveScore == scoped.row.examPaperScore || | |
| 189 | + scoped.row.answerNum == 0) && | |
| 190 | + scoped.row.arecordStatus == 0 | |
| 191 | + " | |
| 192 | + > | |
| 193 | + "-" | |
| 194 | + </p> | |
| 195 | + <template v-else> | |
| 196 | + <p>{{ scoped.row.goodNum }}</p> | |
| 197 | + <p v-if="scoped.row.goodNum"> | |
| 198 | + {{ `(${scoped.row.goodRate}%)` }} | |
| 199 | + </p> | |
| 200 | + </template> | |
| 187 | 201 | </template></el-table-column |
| 188 | 202 | > |
| 189 | 203 | <el-table-column |
| 190 | 204 | prop="passRate" |
| 191 | - label="及格数(率)" | |
| 205 | + label="及格数(率)" | |
| 192 | 206 | sortable |
| 193 | 207 | align="center" |
| 194 | - ><template slot-scope="scoped" | |
| 195 | - >{{ | |
| 196 | - (scoped.row.subjectiveScore == scoped.row.examPaperScore || | |
| 197 | - scoped.row.answerNum == 0) && | |
| 198 | - scoped.row.recordStatus == 0 | |
| 199 | - ? "-" | |
| 200 | - : scoped.row.passNum | |
| 201 | - ? `${scoped.row.passNum}(${scoped.row.passRate}%)` | |
| 202 | - : scoped.row.passNum | |
| 203 | - }} | |
| 208 | + width="110" | |
| 209 | + class-name="p0" | |
| 210 | + ><template slot-scope="scoped"> | |
| 211 | + <p | |
| 212 | + v-if=" | |
| 213 | + (scoped.row.subjectiveScore == scoped.row.examPaperScore || | |
| 214 | + scoped.row.answerNum == 0) && | |
| 215 | + scoped.row.arecordStatus == 0 | |
| 216 | + " | |
| 217 | + > | |
| 218 | + "-" | |
| 219 | + </p> | |
| 220 | + <template v-else> | |
| 221 | + <p>{{ scoped.row.passNum }}</p> | |
| 222 | + <p v-if="scoped.row.passNum"> | |
| 223 | + {{ `(${scoped.row.passRate}%)` }} | |
| 224 | + </p> | |
| 225 | + </template> | |
| 204 | 226 | </template></el-table-column |
| 205 | 227 | > |
| 206 | 228 | <el-table-column |
| 207 | 229 | prop="failedRate" |
| 208 | - label="不及格数(率)" | |
| 230 | + label="不及格数(率)" | |
| 209 | 231 | sortable |
| 210 | 232 | align="center" |
| 211 | - ><template slot-scope="scoped">{{ | |
| 212 | - (scoped.row.subjectiveScore == scoped.row.examPaperScore || | |
| 213 | - scoped.row.nswerNum == 0) && | |
| 214 | - scoped.row.arecordStatus == 0 | |
| 215 | - ? "-" | |
| 216 | - : scoped.row.failedNum | |
| 217 | - ? `${scoped.row.failedNum}(${scoped.row.failedRate}%)` | |
| 218 | - : scoped.row.failedNum | |
| 219 | - }}</template></el-table-column | |
| 233 | + width="130" | |
| 234 | + class-name="p0" | |
| 235 | + ><template slot-scope="scoped"> | |
| 236 | + <p | |
| 237 | + v-if=" | |
| 238 | + (scoped.row.subjectiveScore == scoped.row.examPaperScore || | |
| 239 | + scoped.row.answerNum == 0) && | |
| 240 | + scoped.row.arecordStatus == 0 | |
| 241 | + " | |
| 242 | + > | |
| 243 | + "-" | |
| 244 | + </p> | |
| 245 | + <template v-else> | |
| 246 | + <p>{{ scoped.row.failedNum }}</p> | |
| 247 | + <p v-if="scoped.row.failedNum"> | |
| 248 | + {{ `(${scoped.row.failedRate}%)` }} | |
| 249 | + </p> | |
| 250 | + </template> | |
| 251 | + </template></el-table-column | |
| 220 | 252 | > |
| 221 | 253 | <el-table-column label="操作" align="center"> |
| 222 | 254 | <template slot-scope="scoped"> |
| ... | ... | @@ -318,13 +350,13 @@ |
| 318 | 350 | :prop="'score' + index" |
| 319 | 351 | :label="index == 0 ? '总分' : '成绩'" |
| 320 | 352 | align="center" |
| 321 | - :class-name="index%2==0?'bg':''" | |
| 353 | + :class-name="index % 2 == 0 ? 'bg' : ''" | |
| 322 | 354 | ></el-table-column> |
| 323 | 355 | <el-table-column |
| 324 | 356 | :prop="'classRank' + index" |
| 325 | 357 | label="班名" |
| 326 | 358 | align="center" |
| 327 | - :class-name="index%2==0?'bg':''" | |
| 359 | + :class-name="index % 2 == 0 ? 'bg' : ''" | |
| 328 | 360 | ></el-table-column> |
| 329 | 361 | </el-table-column> |
| 330 | 362 | </el-table> |
| ... | ... | @@ -357,25 +389,25 @@ |
| 357 | 389 | :prop="'examCount' + item" |
| 358 | 390 | label="测练数" |
| 359 | 391 | align="center" |
| 360 | - :class-name="index%2==0?'bg':''" | |
| 392 | + :class-name="index % 2 == 0 ? 'bg' : ''" | |
| 361 | 393 | ></el-table-column> |
| 362 | 394 | <el-table-column |
| 363 | 395 | :prop="'participationCount' + item" |
| 364 | 396 | label="参与数" |
| 365 | 397 | align="center" |
| 366 | - :class-name="index%2==0?'bg':''" | |
| 398 | + :class-name="index % 2 == 0 ? 'bg' : ''" | |
| 367 | 399 | ></el-table-column> |
| 368 | 400 | <el-table-column |
| 369 | 401 | :prop="'score' + item" |
| 370 | 402 | label="总分" |
| 371 | 403 | align="center" |
| 372 | - :class-name="index%2==0?'bg':''" | |
| 404 | + :class-name="index % 2 == 0 ? 'bg' : ''" | |
| 373 | 405 | ></el-table-column> |
| 374 | 406 | <el-table-column |
| 375 | 407 | :prop="'classRank' + item" |
| 376 | 408 | label="班名" |
| 377 | 409 | align="center" |
| 378 | - :class-name="index%2==0?'bg':''" | |
| 410 | + :class-name="index % 2 == 0 ? 'bg' : ''" | |
| 379 | 411 | ></el-table-column> |
| 380 | 412 | </el-table-column> |
| 381 | 413 | </el-table> |
| ... | ... | @@ -517,6 +549,7 @@ export default { |
| 517 | 549 | that.query.day = formatDate(new Date(), "yyyy-MM-dd"); |
| 518 | 550 | that.query.startDay = that.query.day; |
| 519 | 551 | that.query.endDay = that.query.day; |
| 552 | + that.tabIndex = 1; | |
| 520 | 553 | break; |
| 521 | 554 | case 2: |
| 522 | 555 | let day = new Date().getDay(); | ... | ... |