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,6 +43,7 @@ | ||
| 43 | border: 1px solid #e2e2e2; | 43 | border: 1px solid #e2e2e2; |
| 44 | box-sizing: border-box; | 44 | box-sizing: border-box; |
| 45 | background: #fff; | 45 | background: #fff; |
| 46 | + | ||
| 46 | .el-input__inner { | 47 | .el-input__inner { |
| 47 | border-radius: 20px; | 48 | border-radius: 20px; |
| 48 | border: none; | 49 | border: none; |
| @@ -76,6 +77,7 @@ | @@ -76,6 +77,7 @@ | ||
| 76 | } | 77 | } |
| 77 | } | 78 | } |
| 78 | } | 79 | } |
| 80 | + | ||
| 79 | .answer-box { | 81 | .answer-box { |
| 80 | .answer-s { | 82 | .answer-s { |
| 81 | display: inline-block; | 83 | display: inline-block; |
| @@ -88,6 +90,7 @@ | @@ -88,6 +90,7 @@ | ||
| 88 | color: #333; | 90 | color: #333; |
| 89 | text-align: center; | 91 | text-align: center; |
| 90 | line-height: 30px; | 92 | line-height: 30px; |
| 93 | + | ||
| 91 | &.active { | 94 | &.active { |
| 92 | background: #5e78fa; | 95 | background: #5e78fa; |
| 93 | border-color: #5e78fa; | 96 | border-color: #5e78fa; |
| @@ -95,6 +98,7 @@ | @@ -95,6 +98,7 @@ | ||
| 95 | } | 98 | } |
| 96 | } | 99 | } |
| 97 | } | 100 | } |
| 101 | + | ||
| 98 | .el-menu-item i { | 102 | .el-menu-item i { |
| 99 | width: 12px; | 103 | width: 12px; |
| 100 | text-align: center; | 104 | text-align: center; |
| @@ -104,43 +108,57 @@ | @@ -104,43 +108,57 @@ | ||
| 104 | .el-table thead th.el-table__cell { | 108 | .el-table thead th.el-table__cell { |
| 105 | background: #f5f7fa; | 109 | background: #f5f7fa; |
| 106 | } | 110 | } |
| 107 | -.el-table .el-table__cell.bg{ | 111 | + |
| 112 | +.el-table .el-table__cell.bg { | ||
| 108 | background: #f9f9f9; | 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 | .el-menu--popup { | 121 | .el-menu--popup { |
| 111 | min-width: 160px; | 122 | min-width: 160px; |
| 112 | } | 123 | } |
| 124 | + | ||
| 113 | .ellipsis { | 125 | .ellipsis { |
| 114 | overflow: hidden; | 126 | overflow: hidden; |
| 115 | text-overflow: ellipsis; | 127 | text-overflow: ellipsis; |
| 116 | white-space: nowrap; | 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 | display: flex; | 137 | display: flex; |
| 124 | align-items: center; | 138 | align-items: center; |
| 125 | padding-left: 160px; | 139 | padding-left: 160px; |
| 126 | } | 140 | } |
| 127 | -.h-title{ | ||
| 128 | - padding-left:12px; | 141 | + |
| 142 | +.h-title { | ||
| 143 | + padding-left: 12px; | ||
| 129 | position: relative; | 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 | background: #2e9afe; | 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 | \ No newline at end of file | 165 | \ No newline at end of file |
src/utils/index.js
| @@ -723,6 +723,7 @@ export function formatGradeNameClass(data) { | @@ -723,6 +723,7 @@ export function formatGradeNameClass(data) { | ||
| 723 | { | 723 | { |
| 724 | value: item.classCode, | 724 | value: item.classCode, |
| 725 | label: item.className, | 725 | label: item.className, |
| 726 | + leaf:true | ||
| 726 | }, | 727 | }, |
| 727 | ], | 728 | ], |
| 728 | }); | 729 | }); |
| @@ -736,6 +737,7 @@ export function formatGradeNameClass(data) { | @@ -736,6 +737,7 @@ export function formatGradeNameClass(data) { | ||
| 736 | gradeNameArr[gradeIndex].children.push({ | 737 | gradeNameArr[gradeIndex].children.push({ |
| 737 | value: item.classCode, | 738 | value: item.classCode, |
| 738 | label: item.className, | 739 | label: item.className, |
| 740 | + leaf:true | ||
| 739 | }); | 741 | }); |
| 740 | } | 742 | } |
| 741 | }); | 743 | }); |
src/views/ask/analysis.vue
| @@ -152,7 +152,7 @@ | @@ -152,7 +152,7 @@ | ||
| 152 | prop="duration" | 152 | prop="duration" |
| 153 | label="答题耗时" | 153 | label="答题耗时" |
| 154 | align="center" | 154 | align="center" |
| 155 | - ></el-table-column> | 155 | + ><template slot-scope="scoped">{{setDuration(scoped.row.duration)}}</template></el-table-column> |
| 156 | <el-table-column | 156 | <el-table-column |
| 157 | prop="correctAnswerTimes" | 157 | prop="correctAnswerTimes" |
| 158 | label="答对次数" | 158 | label="答对次数" |
| @@ -332,6 +332,11 @@ export default { | @@ -332,6 +332,11 @@ export default { | ||
| 332 | this.page = 1; | 332 | this.page = 1; |
| 333 | this._QueryData(); | 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 | setSubPro(type) { | 340 | setSubPro(type) { |
| 336 | let tit; | 341 | let tit; |
| 337 | switch (type) { | 342 | switch (type) { |
src/views/ask/index.vue
| @@ -93,7 +93,7 @@ | @@ -93,7 +93,7 @@ | ||
| 93 | @change="tabChange" | 93 | @change="tabChange" |
| 94 | style="margin-bottom: 20px" | 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 | >单课时报表</el-radio-button | 97 | >单课时报表</el-radio-button |
| 98 | > | 98 | > |
| 99 | <!-- <el-radio-button :label="2" v-if="this.role != 'ROLE_BANZHUREN'" | 99 | <!-- <el-radio-button :label="2" v-if="this.role != 'ROLE_BANZHUREN'" |
| @@ -544,6 +544,7 @@ export default { | @@ -544,6 +544,7 @@ export default { | ||
| 544 | that.query.day = formatDate(new Date(), "yyyy-MM-dd"); | 544 | that.query.day = formatDate(new Date(), "yyyy-MM-dd"); |
| 545 | that.query.startDay = that.query.day; | 545 | that.query.startDay = that.query.day; |
| 546 | that.query.endDay = that.query.day; | 546 | that.query.endDay = that.query.day; |
| 547 | + that.tabIndex = 1 | ||
| 547 | break; | 548 | break; |
| 548 | case 2: | 549 | case 2: |
| 549 | let day = new Date().getDay(); | 550 | let day = new Date().getDay(); |
src/views/dataSync/index.vue
| @@ -32,7 +32,7 @@ | @@ -32,7 +32,7 @@ | ||
| 32 | <div class="down-item"> | 32 | <div class="down-item"> |
| 33 | <p class="h-title">数据导出至U盘</p> | 33 | <p class="h-title">数据导出至U盘</p> |
| 34 | <p class="txt"> | 34 | <p class="txt"> |
| 35 | - 本功能将云平台的数据导出到U盘。包括4套答题卡。 | 35 | + 本功能将云平台的数据导出到U盘。 |
| 36 | </p> | 36 | </p> |
| 37 | <div class="btn-box btn-box2" v-loading="downLoading"> | 37 | <div class="btn-box btn-box2" v-loading="downLoading"> |
| 38 | <i class="fa fa-cloud-download" @click="downloadFile"></i> | 38 | <i class="fa fa-cloud-download" @click="downloadFile"></i> |
| @@ -51,8 +51,7 @@ export default { | @@ -51,8 +51,7 @@ export default { | ||
| 51 | data() { | 51 | data() { |
| 52 | return { | 52 | return { |
| 53 | downLoading: false, | 53 | downLoading: false, |
| 54 | - // url: "/api_html/teaching/importData", | ||
| 55 | - url: "", | 54 | + url: "/api_html/teaching/importData", |
| 56 | file: {}, | 55 | file: {}, |
| 57 | }; | 56 | }; |
| 58 | }, | 57 | }, |
src/views/device/index.vue
| @@ -6,9 +6,10 @@ | @@ -6,9 +6,10 @@ | ||
| 6 | </template> | 6 | </template> |
| 7 | <template | 7 | <template |
| 8 | slot="btns" | 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 | <el-button | 13 | <el-button |
| 13 | type="primary" | 14 | type="primary" |
| 14 | icon="el-icon-upload2" | 15 | icon="el-icon-upload2" |
| @@ -17,7 +18,7 @@ | @@ -17,7 +18,7 @@ | ||
| 17 | circle | 18 | circle |
| 18 | @click="diaUp = true" | 19 | @click="diaUp = true" |
| 19 | ></el-button> | 20 | ></el-button> |
| 20 | - </el-tooltip> | 21 | + </el-tooltip> --> |
| 21 | <el-tooltip effect="dark" content="添加基站" placement="bottom"> | 22 | <el-tooltip effect="dark" content="添加基站" placement="bottom"> |
| 22 | <el-button | 23 | <el-button |
| 23 | type="primary" | 24 | type="primary" |
| @@ -501,7 +502,7 @@ export default { | @@ -501,7 +502,7 @@ export default { | ||
| 501 | data() { | 502 | data() { |
| 502 | return { | 503 | return { |
| 503 | role: "", | 504 | role: "", |
| 504 | - school: "", | 505 | + code: "", |
| 505 | loading: false, | 506 | loading: false, |
| 506 | url: "/web/upLoadDevice", | 507 | url: "/web/upLoadDevice", |
| 507 | diaUp: false, | 508 | diaUp: false, |
| @@ -563,6 +564,7 @@ export default { | @@ -563,6 +564,7 @@ export default { | ||
| 563 | }; | 564 | }; |
| 564 | }, | 565 | }, |
| 565 | created() { | 566 | created() { |
| 567 | + this.code = localStorage.getItem("csCode")||"" | ||
| 566 | let role = ""; | 568 | let role = ""; |
| 567 | this.$store.getters.info.permissions.map((item) => { | 569 | this.$store.getters.info.permissions.map((item) => { |
| 568 | if (item.roleName == this.$store.getters.info.showRoleName) { | 570 | if (item.roleName == this.$store.getters.info.showRoleName) { |
src/views/device/log.vue
| @@ -64,9 +64,7 @@ | @@ -64,9 +64,7 @@ | ||
| 64 | >本季度</span | 64 | >本季度</span |
| 65 | > | 65 | > |
| 66 | </p> | 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 | </div> | 68 | </div> |
| 71 | </div> | 69 | </div> |
| 72 | <div class="table-box"> | 70 | <div class="table-box"> |
| @@ -196,7 +194,7 @@ export default { | @@ -196,7 +194,7 @@ export default { | ||
| 196 | //中国式星期天是一周的最后一天 | 194 | //中国式星期天是一周的最后一天 |
| 197 | day = 7; | 195 | day = 7; |
| 198 | } | 196 | } |
| 199 | - day-- | 197 | + day--; |
| 200 | let aTime = new Date().getTime() - 24 * 60 * 60 * 1000 * day; | 198 | let aTime = new Date().getTime() - 24 * 60 * 60 * 1000 * day; |
| 201 | that.query.startDay = formatDate(new Date(aTime), "yyyy-MM-dd"); | 199 | that.query.startDay = formatDate(new Date(aTime), "yyyy-MM-dd"); |
| 202 | that.query.endDay = formatDate(new Date(), "yyyy-MM-dd"); | 200 | that.query.endDay = formatDate(new Date(), "yyyy-MM-dd"); |
| @@ -287,7 +285,7 @@ export default { | @@ -287,7 +285,7 @@ export default { | ||
| 287 | }); | 285 | }); |
| 288 | this.loading = false; | 286 | this.loading = false; |
| 289 | if (status === 0) { | 287 | if (status === 0) { |
| 290 | - this.tableData = data?.list&&[...data?.list] || []; | 288 | + this.tableData = (data?.list && [...data?.list]) || []; |
| 291 | this.total = data.count; | 289 | this.total = data.count; |
| 292 | } else { | 290 | } else { |
| 293 | this.$message.error(info); | 291 | this.$message.error(info); |
| @@ -301,7 +299,10 @@ export default { | @@ -301,7 +299,10 @@ export default { | ||
| 301 | .page-content { | 299 | .page-content { |
| 302 | padding: 20px; | 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 | </style> | 308 | </style> |
| 308 | \ No newline at end of file | 309 | \ No newline at end of file |
src/views/examinationPaper/add.vue
| @@ -151,8 +151,8 @@ | @@ -151,8 +151,8 @@ | ||
| 151 | icon="el-icon-delete" | 151 | icon="el-icon-delete" |
| 152 | ></el-button> | 152 | ></el-button> |
| 153 | </el-popconfirm> | 153 | </el-popconfirm> |
| 154 | - | ||
| 155 | - <span>总分数:{{ setScore(question) }}分</span> | 154 | + <span class="m20">共:{{ question.subQuestions.length }}题</span> |
| 155 | + <span>共:{{ setScore(question) }}分</span> | ||
| 156 | </p> | 156 | </p> |
| 157 | <ul class="questions-ul"> | 157 | <ul class="questions-ul"> |
| 158 | <li class="sub-questions"> | 158 | <li class="sub-questions"> |
| @@ -330,10 +330,10 @@ | @@ -330,10 +330,10 @@ | ||
| 330 | :value="item.value" | 330 | :value="item.value" |
| 331 | > | 331 | > |
| 332 | </el-option> | 332 | </el-option> |
| 333 | - <el-option label="混合题题型" :value="6"> </el-option> | 333 | + <el-option label="混合题" :value="6"> </el-option> |
| 334 | </el-select> | 334 | </el-select> |
| 335 | </el-form-item> | 335 | </el-form-item> |
| 336 | - <el-form-item label="默认题数:"> | 336 | + <el-form-item label="题数:"> |
| 337 | <el-input-number | 337 | <el-input-number |
| 338 | v-model="questionForm.number" | 338 | v-model="questionForm.number" |
| 339 | :min="1" | 339 | :min="1" |
| @@ -344,7 +344,7 @@ | @@ -344,7 +344,7 @@ | ||
| 344 | ></el-input-number> | 344 | ></el-input-number> |
| 345 | </el-form-item> | 345 | </el-form-item> |
| 346 | <el-form-item | 346 | <el-form-item |
| 347 | - label="默认选项:" | 347 | + label="选项个数:" |
| 348 | v-show=" | 348 | v-show=" |
| 349 | questionForm.questionType != 4 && | 349 | questionForm.questionType != 4 && |
| 350 | questionForm.questionType != 5 | 350 | questionForm.questionType != 5 |
| @@ -359,7 +359,7 @@ | @@ -359,7 +359,7 @@ | ||
| 359 | label="label" | 359 | label="label" |
| 360 | ></el-input-number> | 360 | ></el-input-number> |
| 361 | </el-form-item> | 361 | </el-form-item> |
| 362 | - <el-form-item label="默认分数:"> | 362 | + <el-form-item label="单题分数:"> |
| 363 | <el-input-number | 363 | <el-input-number |
| 364 | v-model="questionForm.score" | 364 | v-model="questionForm.score" |
| 365 | :min="1" | 365 | :min="1" |
| @@ -398,7 +398,8 @@ | @@ -398,7 +398,8 @@ | ||
| 398 | <p class="question-title"> | 398 | <p class="question-title"> |
| 399 | <span>{{ setBigNum(index) }}、</span> | 399 | <span>{{ setBigNum(index) }}、</span> |
| 400 | <span class="title-txt">{{ question.questionTitle }}</span> | 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 | </p> | 403 | </p> |
| 403 | <ul class="questions-ul"> | 404 | <ul class="questions-ul"> |
| 404 | <li class="sub-questions"> | 405 | <li class="sub-questions"> |
| @@ -477,7 +478,7 @@ | @@ -477,7 +478,7 @@ | ||
| 477 | class="answer-s" | 478 | class="answer-s" |
| 478 | v-for="option in subQuestions.answerOptions.split(',')" | 479 | v-for="option in subQuestions.answerOptions.split(',')" |
| 479 | :class=" | 480 | :class=" |
| 480 | - subQuestions.correctAnswer.includes(option) | 481 | + subQuestions.correctAnswer?.includes(option) |
| 481 | ? 'active' | 482 | ? 'active' |
| 482 | : '' | 483 | : '' |
| 483 | " | 484 | " |
| @@ -876,7 +877,7 @@ export default { | @@ -876,7 +877,7 @@ export default { | ||
| 876 | } else if (type == 3) { | 877 | } else if (type == 3) { |
| 877 | txt = ans + ","; | 878 | txt = ans + ","; |
| 878 | } else if (type == 4) { | 879 | } else if (type == 4) { |
| 879 | - txt = ans == 1 ? "✓" : "✗"; | 880 | + txt = ans == 1 ? "✓" : ans == 2 ? "✗" : ""; |
| 880 | } | 881 | } |
| 881 | return txt; | 882 | return txt; |
| 882 | }, | 883 | }, |
| @@ -907,75 +908,71 @@ export default { | @@ -907,75 +908,71 @@ export default { | ||
| 907 | // } | 908 | // } |
| 908 | // }); | 909 | // }); |
| 909 | // if (!valid) { | 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 | if (types[addndex].subNum && types[addndex].subNum >= 5) { | 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 | // } else { | 976 | // } else { |
| 980 | // this.$message.error( | 977 | // this.$message.error( |
| 981 | // `大题名称不能为空,请检查第${valid.slice(0, -1)}大题!` | 978 | // `大题名称不能为空,请检查第${valid.slice(0, -1)}大题!` |
| @@ -1384,6 +1381,9 @@ export default { | @@ -1384,6 +1381,9 @@ export default { | ||
| 1384 | } | 1381 | } |
| 1385 | .question-title { | 1382 | .question-title { |
| 1386 | line-height: 40px; | 1383 | line-height: 40px; |
| 1384 | + .m20{ | ||
| 1385 | + margin-right:20px; | ||
| 1386 | + } | ||
| 1387 | .ipt { | 1387 | .ipt { |
| 1388 | width: 300px; | 1388 | width: 300px; |
| 1389 | margin: 0 16px 0 10px; | 1389 | margin: 0 16px 0 10px; |
src/views/login/index.vue
| @@ -95,6 +95,8 @@ export default { | @@ -95,6 +95,8 @@ export default { | ||
| 95 | loginForm: { | 95 | loginForm: { |
| 96 | // username: "15911715665", | 96 | // username: "15911715665", |
| 97 | // password: "715665", | 97 | // password: "715665", |
| 98 | + // username: "18087527793", | ||
| 99 | + // password: "Pw527793#", | ||
| 98 | // username: "18687826606", | 100 | // username: "18687826606", |
| 99 | // password: "Pw826606#", | 101 | // password: "Pw826606#", |
| 100 | // username: "18893712576", | 102 | // username: "18893712576", |
src/views/setUp/account.vue
| @@ -5,7 +5,8 @@ | @@ -5,7 +5,8 @@ | ||
| 5 | <span>账号管理</span> | 5 | <span>账号管理</span> |
| 6 | </template> | 6 | </template> |
| 7 | <template slot="btns" v-if="role == 'ROLE_JITUAN'"> | 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 | <el-button | 10 | <el-button |
| 10 | type="primary" | 11 | type="primary" |
| 11 | icon="el-icon-upload2" | 12 | icon="el-icon-upload2" |
| @@ -14,7 +15,7 @@ | @@ -14,7 +15,7 @@ | ||
| 14 | circle | 15 | circle |
| 15 | @click="diaUp = true" | 16 | @click="diaUp = true" |
| 16 | ></el-button> | 17 | ></el-button> |
| 17 | - </el-tooltip> | 18 | + </el-tooltip> --> |
| 18 | <el-tooltip effect="dark" content="添加账号" placement="bottom"> | 19 | <el-tooltip effect="dark" content="添加账号" placement="bottom"> |
| 19 | <el-button | 20 | <el-button |
| 20 | type="primary" | 21 | type="primary" |
src/views/test/index.vue
| @@ -101,11 +101,7 @@ | @@ -101,11 +101,7 @@ | ||
| 101 | > | 101 | > |
| 102 | </el-radio-group> | 102 | </el-radio-group> |
| 103 | <div v-show="tabIndex == 1" v-loading="loading"> | 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 | <el-table-column | 105 | <el-table-column |
| 110 | prop="title" | 106 | prop="title" |
| 111 | label="试卷名称" | 107 | label="试卷名称" |
| @@ -156,67 +152,103 @@ | @@ -156,67 +152,103 @@ | ||
| 156 | > | 152 | > |
| 157 | <el-table-column | 153 | <el-table-column |
| 158 | prop="excellenRate" | 154 | prop="excellenRate" |
| 159 | - label="优秀数(率)" | 155 | + label="优秀数(率)" |
| 160 | sortable | 156 | sortable |
| 161 | align="center" | 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 | <el-table-column | 178 | <el-table-column |
| 173 | prop="goodRate" | 179 | prop="goodRate" |
| 174 | - label="良好数(率)" | 180 | + label="良好数(率)" |
| 175 | sortable | 181 | sortable |
| 176 | align="center" | 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 | </template></el-table-column | 201 | </template></el-table-column |
| 188 | > | 202 | > |
| 189 | <el-table-column | 203 | <el-table-column |
| 190 | prop="passRate" | 204 | prop="passRate" |
| 191 | - label="及格数(率)" | 205 | + label="及格数(率)" |
| 192 | sortable | 206 | sortable |
| 193 | align="center" | 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 | </template></el-table-column | 226 | </template></el-table-column |
| 205 | > | 227 | > |
| 206 | <el-table-column | 228 | <el-table-column |
| 207 | prop="failedRate" | 229 | prop="failedRate" |
| 208 | - label="不及格数(率)" | 230 | + label="不及格数(率)" |
| 209 | sortable | 231 | sortable |
| 210 | align="center" | 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 | <el-table-column label="操作" align="center"> | 253 | <el-table-column label="操作" align="center"> |
| 222 | <template slot-scope="scoped"> | 254 | <template slot-scope="scoped"> |
| @@ -318,13 +350,13 @@ | @@ -318,13 +350,13 @@ | ||
| 318 | :prop="'score' + index" | 350 | :prop="'score' + index" |
| 319 | :label="index == 0 ? '总分' : '成绩'" | 351 | :label="index == 0 ? '总分' : '成绩'" |
| 320 | align="center" | 352 | align="center" |
| 321 | - :class-name="index%2==0?'bg':''" | 353 | + :class-name="index % 2 == 0 ? 'bg' : ''" |
| 322 | ></el-table-column> | 354 | ></el-table-column> |
| 323 | <el-table-column | 355 | <el-table-column |
| 324 | :prop="'classRank' + index" | 356 | :prop="'classRank' + index" |
| 325 | label="班名" | 357 | label="班名" |
| 326 | align="center" | 358 | align="center" |
| 327 | - :class-name="index%2==0?'bg':''" | 359 | + :class-name="index % 2 == 0 ? 'bg' : ''" |
| 328 | ></el-table-column> | 360 | ></el-table-column> |
| 329 | </el-table-column> | 361 | </el-table-column> |
| 330 | </el-table> | 362 | </el-table> |
| @@ -357,25 +389,25 @@ | @@ -357,25 +389,25 @@ | ||
| 357 | :prop="'examCount' + item" | 389 | :prop="'examCount' + item" |
| 358 | label="测练数" | 390 | label="测练数" |
| 359 | align="center" | 391 | align="center" |
| 360 | - :class-name="index%2==0?'bg':''" | 392 | + :class-name="index % 2 == 0 ? 'bg' : ''" |
| 361 | ></el-table-column> | 393 | ></el-table-column> |
| 362 | <el-table-column | 394 | <el-table-column |
| 363 | :prop="'participationCount' + item" | 395 | :prop="'participationCount' + item" |
| 364 | label="参与数" | 396 | label="参与数" |
| 365 | align="center" | 397 | align="center" |
| 366 | - :class-name="index%2==0?'bg':''" | 398 | + :class-name="index % 2 == 0 ? 'bg' : ''" |
| 367 | ></el-table-column> | 399 | ></el-table-column> |
| 368 | <el-table-column | 400 | <el-table-column |
| 369 | :prop="'score' + item" | 401 | :prop="'score' + item" |
| 370 | label="总分" | 402 | label="总分" |
| 371 | align="center" | 403 | align="center" |
| 372 | - :class-name="index%2==0?'bg':''" | 404 | + :class-name="index % 2 == 0 ? 'bg' : ''" |
| 373 | ></el-table-column> | 405 | ></el-table-column> |
| 374 | <el-table-column | 406 | <el-table-column |
| 375 | :prop="'classRank' + item" | 407 | :prop="'classRank' + item" |
| 376 | label="班名" | 408 | label="班名" |
| 377 | align="center" | 409 | align="center" |
| 378 | - :class-name="index%2==0?'bg':''" | 410 | + :class-name="index % 2 == 0 ? 'bg' : ''" |
| 379 | ></el-table-column> | 411 | ></el-table-column> |
| 380 | </el-table-column> | 412 | </el-table-column> |
| 381 | </el-table> | 413 | </el-table> |
| @@ -517,6 +549,7 @@ export default { | @@ -517,6 +549,7 @@ export default { | ||
| 517 | that.query.day = formatDate(new Date(), "yyyy-MM-dd"); | 549 | that.query.day = formatDate(new Date(), "yyyy-MM-dd"); |
| 518 | that.query.startDay = that.query.day; | 550 | that.query.startDay = that.query.day; |
| 519 | that.query.endDay = that.query.day; | 551 | that.query.endDay = that.query.day; |
| 552 | + that.tabIndex = 1; | ||
| 520 | break; | 553 | break; |
| 521 | case 2: | 554 | case 2: |
| 522 | let day = new Date().getDay(); | 555 | let day = new Date().getDay(); |