Commit 6192eba8070623cf64b7e28704af419fbc7bdf3d
1 parent
881a7e55
引用上传文件组件问题,备题组卷顶部
Showing
26 changed files
with
1019 additions
and
2505 deletions
src/api/apis/apis.js
| @@ -1562,4 +1562,46 @@ export default { | @@ -1562,4 +1562,46 @@ export default { | ||
| 1562 | data | 1562 | data |
| 1563 | }); | 1563 | }); |
| 1564 | }, | 1564 | }, |
| 1565 | + | ||
| 1566 | + // 删除即时测考试 | ||
| 1567 | + deleteReport(data) { | ||
| 1568 | + return service({ | ||
| 1569 | + url: setUpUrls.deleteReport, | ||
| 1570 | + method: "POST", | ||
| 1571 | + data | ||
| 1572 | + }); | ||
| 1573 | + }, | ||
| 1574 | + // 设置单班科目分析低分区间 | ||
| 1575 | + setLowRange(data) { | ||
| 1576 | + return service({ | ||
| 1577 | + url: setUpUrls.setLowRange, | ||
| 1578 | + method: "POST", | ||
| 1579 | + data | ||
| 1580 | + }); | ||
| 1581 | + }, | ||
| 1582 | + // 查询即时测多班对比情况详情 | ||
| 1583 | + examMultiClassReport(data) { | ||
| 1584 | + return service({ | ||
| 1585 | + url: setUpUrls.examMultiClassReport, | ||
| 1586 | + method: "POST", | ||
| 1587 | + data | ||
| 1588 | + }); | ||
| 1589 | + }, | ||
| 1590 | + // 导出即时测多班报表 | ||
| 1591 | + exportExamMultiReport(data) { | ||
| 1592 | + return service({ | ||
| 1593 | + url: setUpUrls.exportExamMultiReport, | ||
| 1594 | + method: "POST", | ||
| 1595 | + data | ||
| 1596 | + }); | ||
| 1597 | + }, | ||
| 1598 | + // 查询即时测多班默认等级列表 | ||
| 1599 | + defaultLevels(data) { | ||
| 1600 | + return service({ | ||
| 1601 | + url: setUpUrls.defaultLevels, | ||
| 1602 | + method: "POST", | ||
| 1603 | + data | ||
| 1604 | + }); | ||
| 1605 | + }, | ||
| 1606 | + | ||
| 1565 | }; | 1607 | }; |
src/api/urls/apis.js
| @@ -405,4 +405,15 @@ export default { | @@ -405,4 +405,15 @@ export default { | ||
| 405 | 405 | ||
| 406 | // 删除班级信息 | 406 | // 删除班级信息 |
| 407 | removeClass: "/api_html/school/manager/delClass", | 407 | removeClass: "/api_html/school/manager/delClass", |
| 408 | + | ||
| 409 | + //删除即时测考试 | ||
| 410 | + deleteReport: "/api_html/teaching/deleteReport", | ||
| 411 | + //设置单班科目分析低分区间 | ||
| 412 | + setLowRange: "/api_html/teaching/setLowRange", | ||
| 413 | + //查询即时测多班对比情况详情 | ||
| 414 | + examMultiClassReport: "/api_html/teaching/examMultiClassReport", | ||
| 415 | + //导出即时测多班报表 | ||
| 416 | + exportExamMultiReport: "/api_html/teaching/exportExamMultiReport", | ||
| 417 | + //查询即时测多班默认等级列表 | ||
| 418 | + defaultLevels: "/api_html/teaching/defaultLevels", | ||
| 408 | } | 419 | } |
src/assets/css/index.scss
| @@ -149,6 +149,10 @@ | @@ -149,6 +149,10 @@ | ||
| 149 | margin: 10px; | 149 | margin: 10px; |
| 150 | } | 150 | } |
| 151 | 151 | ||
| 152 | +.down-box { | ||
| 153 | + padding-left: 160px; | ||
| 154 | +} | ||
| 155 | + | ||
| 152 | .down-txt { | 156 | .down-txt { |
| 153 | display: flex; | 157 | display: flex; |
| 154 | align-items: center; | 158 | align-items: center; |
| @@ -180,12 +184,13 @@ ul { | @@ -180,12 +184,13 @@ ul { | ||
| 180 | } | 184 | } |
| 181 | 185 | ||
| 182 | .cascader-clazz { | 186 | .cascader-clazz { |
| 183 | - .el-cascader-menu{ | 187 | + .el-cascader-menu { |
| 184 | .el-checkbox { | 188 | .el-checkbox { |
| 185 | display: none; | 189 | display: none; |
| 186 | } | 190 | } |
| 187 | } | 191 | } |
| 188 | - .el-cascader-menu:nth-child(3){ | 192 | + |
| 193 | + .el-cascader-menu:nth-child(3) { | ||
| 189 | .el-checkbox { | 194 | .el-checkbox { |
| 190 | display: block; | 195 | display: block; |
| 191 | } | 196 | } |
src/components/backBox.vue
| @@ -11,20 +11,29 @@ | @@ -11,20 +11,29 @@ | ||
| 11 | </template> | 11 | </template> |
| 12 | 12 | ||
| 13 | <script> | 13 | <script> |
| 14 | -import BusEvent from "@/utils/busEvent"; | ||
| 15 | export default { | 14 | export default { |
| 16 | name: "back", | 15 | name: "back", |
| 17 | - props:{ | ||
| 18 | - params:{ | ||
| 19 | - type:Object, | ||
| 20 | - default:function(){ | 16 | + props: { |
| 17 | + params: { | ||
| 18 | + type: Object, | ||
| 19 | + default: function () { | ||
| 21 | return {} | 20 | return {} |
| 22 | } | 21 | } |
| 23 | - } | 22 | + }, |
| 23 | + toHome: { | ||
| 24 | + type: Boolean, | ||
| 25 | + default: false | ||
| 26 | + }, | ||
| 24 | }, | 27 | }, |
| 25 | methods: { | 28 | methods: { |
| 26 | back() { | 29 | back() { |
| 27 | - BusEvent.$emit("querySel", this.params); | 30 | + console.log(this.toHome) |
| 31 | + if (this.toHome) { | ||
| 32 | + this.$router.push({ | ||
| 33 | + path: "/index", | ||
| 34 | + }) | ||
| 35 | + return | ||
| 36 | + } | ||
| 28 | this.$router.go(-1); | 37 | this.$router.go(-1); |
| 29 | }, | 38 | }, |
| 30 | }, | 39 | }, |
| @@ -41,6 +50,7 @@ export default { | @@ -41,6 +50,7 @@ export default { | ||
| 41 | align-items: center; | 50 | align-items: center; |
| 42 | padding: 0 20px; | 51 | padding: 0 20px; |
| 43 | box-sizing: border-box; | 52 | box-sizing: border-box; |
| 53 | + | ||
| 44 | .back-l { | 54 | .back-l { |
| 45 | display: flex; | 55 | display: flex; |
| 46 | align-items: center; | 56 | align-items: center; |
| @@ -49,11 +59,13 @@ export default { | @@ -49,11 +59,13 @@ export default { | ||
| 49 | font-size: 18px; | 59 | font-size: 18px; |
| 50 | font-weight: 500; | 60 | font-weight: 500; |
| 51 | } | 61 | } |
| 62 | + | ||
| 52 | .back-r { | 63 | .back-r { |
| 53 | flex: 1; | 64 | flex: 1; |
| 54 | display: flex; | 65 | display: flex; |
| 55 | justify-content: flex-end; | 66 | justify-content: flex-end; |
| 56 | } | 67 | } |
| 68 | + | ||
| 57 | .fa-mail-reply-all { | 69 | .fa-mail-reply-all { |
| 58 | font-size: 28px; | 70 | font-size: 28px; |
| 59 | color: #b3b3b3; | 71 | color: #b3b3b3; |
src/components/upload.vue
| @@ -2,24 +2,12 @@ | @@ -2,24 +2,12 @@ | ||
| 2 | <div> | 2 | <div> |
| 3 | <slot name="down"></slot> | 3 | <slot name="down"></slot> |
| 4 | <div class="d1"> | 4 | <div class="d1"> |
| 5 | - <el-upload | ||
| 6 | - class="upload-demo" | ||
| 7 | - ref="upload" | ||
| 8 | - :action="url" | ||
| 9 | - :multiple="false" | ||
| 10 | - :data="{ ...query }" | ||
| 11 | - :with-credentials="true" | ||
| 12 | - :limit="1" | ||
| 13 | - :on-change="change" | ||
| 14 | - :on-success="upSuccess" | ||
| 15 | - :on-error="upError" | ||
| 16 | - > | 5 | + <el-upload class="upload-demo" ref="upload" :action="url" :multiple="false" :data="{ ...query }" |
| 6 | + :with-credentials="true" :limit="1" :on-change="change" :on-success="upSuccess" :on-error="upError"> | ||
| 17 | <!-- accept="application/vnd.ms-excel" --> | 7 | <!-- accept="application/vnd.ms-excel" --> |
| 18 | <div class="upload-btn"> | 8 | <div class="upload-btn"> |
| 19 | <i class="el-icon-upload"></i> | 9 | <i class="el-icon-upload"></i> |
| 20 | - <el-button class="btn" size="mini" type="primary" | ||
| 21 | - >选择文件并上传</el-button | ||
| 22 | - > | 10 | + <el-button class="btn" size="mini" type="primary">选择文件并上传</el-button> |
| 23 | </div> | 11 | </div> |
| 24 | </el-upload> | 12 | </el-upload> |
| 25 | </div> | 13 | </div> |
| @@ -36,22 +24,33 @@ export default { | @@ -36,22 +24,33 @@ export default { | ||
| 36 | type: String, | 24 | type: String, |
| 37 | default: "", | 25 | default: "", |
| 38 | }, | 26 | }, |
| 39 | - | ||
| 40 | fileName: { | 27 | fileName: { |
| 41 | type: String, | 28 | type: String, |
| 42 | default: "模板", | 29 | default: "模板", |
| 43 | }, | 30 | }, |
| 31 | + params: {//上传附带参数 | ||
| 32 | + type: Object, | ||
| 33 | + default: function () { | ||
| 34 | + return {} | ||
| 35 | + }, | ||
| 36 | + }, | ||
| 44 | }, | 37 | }, |
| 45 | computed: { | 38 | computed: { |
| 46 | query: function () { | 39 | query: function () { |
| 47 | if (this.id) { | 40 | if (this.id) { |
| 48 | return { | 41 | return { |
| 49 | id: this.id, | 42 | id: this.id, |
| 43 | + ...this.params | ||
| 50 | }; | 44 | }; |
| 51 | } else if (this.examId) { | 45 | } else if (this.examId) { |
| 52 | return { | 46 | return { |
| 53 | examId: this.examId, | 47 | examId: this.examId, |
| 48 | + ...this.params | ||
| 54 | }; | 49 | }; |
| 50 | + } else { | ||
| 51 | + return { | ||
| 52 | + ...this.params | ||
| 53 | + } | ||
| 55 | } | 54 | } |
| 56 | }, | 55 | }, |
| 57 | }, | 56 | }, |
| @@ -76,9 +75,9 @@ export default { | @@ -76,9 +75,9 @@ export default { | ||
| 76 | // } | 75 | // } |
| 77 | }, | 76 | }, |
| 78 | upSuccess(res) { | 77 | upSuccess(res) { |
| 79 | - if (res && res.status == 0 ) { | 78 | + if (res && res.status == 0) { |
| 80 | this.$message.success("上传成功"); | 79 | this.$message.success("上传成功"); |
| 81 | - this.$emit("upSuccess",res); | 80 | + this.$emit("upSuccess", res); |
| 82 | this.$refs.upload.clearFiles() | 81 | this.$refs.upload.clearFiles() |
| 83 | } else { | 82 | } else { |
| 84 | this.$message.error(res.info); | 83 | this.$message.error(res.info); |
| @@ -102,19 +101,23 @@ export default { | @@ -102,19 +101,23 @@ export default { | ||
| 102 | .d1 { | 101 | .d1 { |
| 103 | padding: 10px; | 102 | padding: 10px; |
| 104 | } | 103 | } |
| 104 | + | ||
| 105 | .btn { | 105 | .btn { |
| 106 | border-radius: 8px; | 106 | border-radius: 8px; |
| 107 | font-weight: normal; | 107 | font-weight: normal; |
| 108 | } | 108 | } |
| 109 | + | ||
| 109 | .upload-demo { | 110 | .upload-demo { |
| 110 | display: flex; | 111 | display: flex; |
| 111 | flex-direction: column; | 112 | flex-direction: column; |
| 112 | align-items: center; | 113 | align-items: center; |
| 113 | } | 114 | } |
| 115 | + | ||
| 114 | .upload-btn { | 116 | .upload-btn { |
| 115 | display: flex; | 117 | display: flex; |
| 116 | flex-direction: column; | 118 | flex-direction: column; |
| 117 | align-items: center; | 119 | align-items: center; |
| 120 | + | ||
| 118 | .el-icon-upload { | 121 | .el-icon-upload { |
| 119 | font-size: 48px; | 122 | font-size: 48px; |
| 120 | margin-bottom: 6px; | 123 | margin-bottom: 6px; |
src/views/basic/ask/list.vue
0 → 100644
src/views/basic/device/index.vue
| @@ -517,12 +517,12 @@ | @@ -517,12 +517,12 @@ | ||
| 517 | </div> | 517 | </div> |
| 518 | </div> | 518 | </div> |
| 519 | <el-dialog :close-on-click-modal="false" title="设备导入" :visible.sync="diaUp" width="400"> | 519 | <el-dialog :close-on-click-modal="false" title="设备导入" :visible.sync="diaUp" width="400"> |
| 520 | - <up-load :url="url" @upSuccess="upSuccess" fileName="设备信息"> | 520 | + <upload :url="url" @upSuccess="upSuccess" fileName="设备信息"> |
| 521 | <p class="down-txt" slot="down"> | 521 | <p class="down-txt" slot="down"> |
| 522 | 通过Excel名单导入设备,需要提供设备编码,点击 | 522 | 通过Excel名单导入设备,需要提供设备编码,点击 |
| 523 | <el-link type="danger" @click="downExcel">模板下载</el-link> 。 | 523 | <el-link type="danger" @click="downExcel">模板下载</el-link> 。 |
| 524 | </p> | 524 | </p> |
| 525 | - </up-load> | 525 | + </upload> |
| 526 | <div class="dialog-footer" slot="footer"> | 526 | <div class="dialog-footer" slot="footer"> |
| 527 | <el-button @click="diaUp = false">取 消</el-button> | 527 | <el-button @click="diaUp = false">取 消</el-button> |
| 528 | </div> | 528 | </div> |
src/views/basic/examinationPaper/detail.vue deleted
| 1 | -<template> | ||
| 2 | - <div> | ||
| 3 | - <back-box> | ||
| 4 | - <template slot="title"> | ||
| 5 | - <span>修改答案</span> | ||
| 6 | - </template> | ||
| 7 | - </back-box> | ||
| 8 | - <div class="content"> | ||
| 9 | - <p class="tips"> | ||
| 10 | - <i class="fa fa-bell-o"></i> 2022-11-24 14:30张老师修改了答案。 | ||
| 11 | - </p> | ||
| 12 | - <div class="answer-title"> | ||
| 13 | - <p class="name">{{ form.title }}</p> | ||
| 14 | - <p class="totals">卷面总分:{{ allScore }}分</p> | ||
| 15 | - </div> | ||
| 16 | - <div v-for="(question, index) in form.questionList" :key="index"> | ||
| 17 | - <p class="question-title"> | ||
| 18 | - <span>{{ setBigNum(index) }}、</span> | ||
| 19 | - <span class="title-txt">{{ question.questionTitle }}</span> | ||
| 20 | - <span>共 {{ question.score }} 分</span> | ||
| 21 | - </p> | ||
| 22 | - <ul class="questions-ul"> | ||
| 23 | - <li class="sub-questions"> | ||
| 24 | - <div class="qs-num">题号</div> | ||
| 25 | - <div class="qs-type">题型</div> | ||
| 26 | - <div class="qs-score">分数</div> | ||
| 27 | - <div class="qs-partScore">部分分值</div> | ||
| 28 | - <div class="qs-answer">答案</div> | ||
| 29 | - </li> | ||
| 30 | - <li | ||
| 31 | - class="sub-questions" | ||
| 32 | - v-for="(subQuestions, indexs) in question.subQuestions" | ||
| 33 | - :key="indexs" | ||
| 34 | - > | ||
| 35 | - <div class="qs-num">{{ subQuestions.questionIndex }}</div> | ||
| 36 | - <div class="qs-type"> | ||
| 37 | - {{ setSubPro(subQuestions.questionType) }} | ||
| 38 | - </div> | ||
| 39 | - <div class="qs-score"> | ||
| 40 | - {{ subQuestions.score }} | ||
| 41 | - </div> | ||
| 42 | - <div class="qs-partScore"> | ||
| 43 | - {{ subQuestions.partScore }} | ||
| 44 | - </div> | ||
| 45 | - <div class="qs-answer"> | ||
| 46 | - {{ setAns(subQuestions.correctAnswer) }} | ||
| 47 | - </div> | ||
| 48 | - </li> | ||
| 49 | - </ul> | ||
| 50 | - </div> | ||
| 51 | - <div class="btn-box"> | ||
| 52 | - <el-button type="danger" plain round @click="linkBack">取消</el-button> | ||
| 53 | - <el-button type="primary" round @click="save">保存</el-button> | ||
| 54 | - </div> | ||
| 55 | - </div> | ||
| 56 | - </div> | ||
| 57 | -</template> | ||
| 58 | - | ||
| 59 | -<script> | ||
| 60 | -export default { | ||
| 61 | - methods: { | ||
| 62 | - setSubPro(type) { | ||
| 63 | - let tit; | ||
| 64 | - switch (type) { | ||
| 65 | - case 2: | ||
| 66 | - tit = "单选题"; | ||
| 67 | - break; | ||
| 68 | - case 3: | ||
| 69 | - tit = "多选题"; | ||
| 70 | - break; | ||
| 71 | - case 4: | ||
| 72 | - tit = "判断题"; | ||
| 73 | - break; | ||
| 74 | - case 5: | ||
| 75 | - tit = "主观题"; | ||
| 76 | - break; | ||
| 77 | - } | ||
| 78 | - return tit; | ||
| 79 | - }, | ||
| 80 | - setBigNum(num) { | ||
| 81 | - let txt = ""; | ||
| 82 | - let bigNum = [ | ||
| 83 | - "一", | ||
| 84 | - "二", | ||
| 85 | - "三", | ||
| 86 | - "四", | ||
| 87 | - "五", | ||
| 88 | - "六", | ||
| 89 | - "七", | ||
| 90 | - "八", | ||
| 91 | - "九", | ||
| 92 | - "十", | ||
| 93 | - "十一", | ||
| 94 | - "十二", | ||
| 95 | - "十三", | ||
| 96 | - "十四", | ||
| 97 | - "十五", | ||
| 98 | - "十六", | ||
| 99 | - "十七", | ||
| 100 | - "十八", | ||
| 101 | - "十九", | ||
| 102 | - "二十", | ||
| 103 | - ]; | ||
| 104 | - txt = bigNum[num]; | ||
| 105 | - | ||
| 106 | - return txt; | ||
| 107 | - }, | ||
| 108 | - setAns(answer) { | ||
| 109 | - let txt; | ||
| 110 | - switch (answer) { | ||
| 111 | - case 1: | ||
| 112 | - case "1": | ||
| 113 | - txt = "✓"; | ||
| 114 | - break; | ||
| 115 | - case 2: | ||
| 116 | - case "2": | ||
| 117 | - txt = "✗"; | ||
| 118 | - break; | ||
| 119 | - case "": | ||
| 120 | - txt = "--"; | ||
| 121 | - break; | ||
| 122 | - default: | ||
| 123 | - txt = answer; | ||
| 124 | - } | ||
| 125 | - return txt | ||
| 126 | - }, | ||
| 127 | - }, | ||
| 128 | -}; | ||
| 129 | -</script> | ||
| 130 | - | ||
| 131 | -<style lang="scss" scoped> | ||
| 132 | -.content { | ||
| 133 | - width: 100%; | ||
| 134 | - box-sizing: border-box; | ||
| 135 | - padding: 0 50px; | ||
| 136 | - .ml-20 { | ||
| 137 | - margin-left: 20px; | ||
| 138 | - } | ||
| 139 | - .btn-box { | ||
| 140 | - text-align: right; | ||
| 141 | - margin-left: 140px; | ||
| 142 | - } | ||
| 143 | - .tips { | ||
| 144 | - height: 48px; | ||
| 145 | - line-height: 48px; | ||
| 146 | - padding: 0 16px; | ||
| 147 | - border: 1px solid #fac7cc; | ||
| 148 | - background-color: #ffebec; | ||
| 149 | - font-size: 14px; | ||
| 150 | - color: #fd9795; | ||
| 151 | - margin: 10px 0 20px 0; | ||
| 152 | - .fa-bell-o { | ||
| 153 | - font-size: 18px; | ||
| 154 | - margin-right: 5px; | ||
| 155 | - } | ||
| 156 | - } | ||
| 157 | -} | ||
| 158 | -.answer-title { | ||
| 159 | - text-align: center; | ||
| 160 | - font-size: 20px; | ||
| 161 | - color: #333; | ||
| 162 | - font-weight: 700; | ||
| 163 | - padding-bottom: 20px; | ||
| 164 | - .totals { | ||
| 165 | - font-size: 16px; | ||
| 166 | - color: #888; | ||
| 167 | - font-weight: normal; | ||
| 168 | - } | ||
| 169 | -} | ||
| 170 | -.question-title { | ||
| 171 | - line-height: 40px; | ||
| 172 | - .ipt { | ||
| 173 | - width: 300px; | ||
| 174 | - margin: 0 16px 0 10px; | ||
| 175 | - :deep(.el-input__inner) { | ||
| 176 | - border-radius: 20px; | ||
| 177 | - border-color: #667ffd; | ||
| 178 | - background: rgba($color: #667ffd, $alpha: 0.05); | ||
| 179 | - } | ||
| 180 | - } | ||
| 181 | - .delete { | ||
| 182 | - margin-right: 8px; | ||
| 183 | - } | ||
| 184 | - .title-txt { | ||
| 185 | - margin-right: 20px; | ||
| 186 | - font-size: 16px; | ||
| 187 | - font-weight: 700; | ||
| 188 | - } | ||
| 189 | -} | ||
| 190 | -</style> | ||
| 191 | \ No newline at end of file | 0 | \ No newline at end of file |
src/views/basic/examinationPaper/index.vue deleted
| 1 | -<template> | ||
| 2 | - <div> | ||
| 3 | - <back-box> | ||
| 4 | - <template slot="title"> | ||
| 5 | - <span>备题组卷</span> | ||
| 6 | - </template> | ||
| 7 | - <template slot="btns"> | ||
| 8 | - <el-button | ||
| 9 | - type="primary" | ||
| 10 | - size="mini" | ||
| 11 | - icon="el-icon-plus" | ||
| 12 | - plain | ||
| 13 | - @click="toAdd({})" | ||
| 14 | - > | ||
| 15 | - 添加答题卡</el-button | ||
| 16 | - > | ||
| 17 | - </template> | ||
| 18 | - </back-box> | ||
| 19 | - | ||
| 20 | - <div class="answer-header"> | ||
| 21 | - <div class="sel-box"> | ||
| 22 | - <el-select | ||
| 23 | - class="sel" | ||
| 24 | - v-model="query.classId" | ||
| 25 | - placeholder="选择班级" | ||
| 26 | - @change="changClazz" | ||
| 27 | - > | ||
| 28 | - <el-option | ||
| 29 | - v-for="item in classList" | ||
| 30 | - :key="item.value" | ||
| 31 | - :label="item.label" | ||
| 32 | - :value="item.value" | ||
| 33 | - > | ||
| 34 | - </el-option> | ||
| 35 | - </el-select> | ||
| 36 | - <el-select | ||
| 37 | - class="sel" | ||
| 38 | - v-model="query.subjectName" | ||
| 39 | - placeholder="选择科目" | ||
| 40 | - @change="_QueryData()" | ||
| 41 | - > | ||
| 42 | - <el-option | ||
| 43 | - v-for="item in subjectList" | ||
| 44 | - :key="item.value" | ||
| 45 | - :label="item.label" | ||
| 46 | - :value="item.value" | ||
| 47 | - > | ||
| 48 | - </el-option> | ||
| 49 | - </el-select> | ||
| 50 | - <el-select | ||
| 51 | - class="sel" | ||
| 52 | - v-model="query.tagId" | ||
| 53 | - placeholder="选择类型" | ||
| 54 | - @change="_QueryData()" | ||
| 55 | - > | ||
| 56 | - <el-option | ||
| 57 | - v-for="item in typeList" | ||
| 58 | - :key="item.label" | ||
| 59 | - :label="item.label" | ||
| 60 | - :value="item.value" | ||
| 61 | - >{{ item.label }} | ||
| 62 | - </el-option> | ||
| 63 | - </el-select> | ||
| 64 | - <el-input | ||
| 65 | - placeholder="试卷名称" | ||
| 66 | - v-model="query.title" | ||
| 67 | - class="input-with-select" | ||
| 68 | - @keyup.enter.native="_QueryData(true)" | ||
| 69 | - > | ||
| 70 | - <el-button | ||
| 71 | - slot="append" | ||
| 72 | - icon="el-icon-search" | ||
| 73 | - @click="_QueryData(true)" | ||
| 74 | - ></el-button> | ||
| 75 | - </el-input> | ||
| 76 | - </div> | ||
| 77 | - </div> | ||
| 78 | - <p class="tips" v-show="archivedTotal"> | ||
| 79 | - <span>回收站内已有{{ archivedTotal }}份答题卡,</span> | ||
| 80 | - <router-link to="/examinationPaperRecycle">点击查看>></router-link> | ||
| 81 | - </p> | ||
| 82 | - <ul class="content" v-if="tableData && tableData.length"> | ||
| 83 | - <li class="item" v-for="item in tableData" :key="item.id"> | ||
| 84 | - <div class="pic-box"> | ||
| 85 | - <p class="i-box"><i class="fa fa-map-o"></i></p> | ||
| 86 | - <p class="ids">{{ item.id }}</p> | ||
| 87 | - </div> | ||
| 88 | - <div class="info"> | ||
| 89 | - <p class="title"> | ||
| 90 | - {{ item.title }} | ||
| 91 | - <span class="label" v-if="!!item.tag">{{ item.tag }}</span> | ||
| 92 | - </p> | ||
| 93 | - <p class="num"> | ||
| 94 | - 总题数:{{ item.questionNum }} | ||
| 95 | - <em class="s-line">|</em> | ||
| 96 | - 预计时长:{{ item.examsDuration }} | ||
| 97 | - <em class="s-line">|</em> | ||
| 98 | - 授课端同步: | ||
| 99 | - <span | ||
| 100 | - class="clazz" | ||
| 101 | - v-for="(clazzChild, indexs) in item.classList" | ||
| 102 | - :key="clazzChild.classId" | ||
| 103 | - :class="clazzChild.keepStatus == 1?'active':''" | ||
| 104 | - >{{ | ||
| 105 | - `${clazzChild.className}${ | ||
| 106 | - indexs != item.classList.length - 1 ? "、" : "" | ||
| 107 | - }` | ||
| 108 | - }} | ||
| 109 | - <i v-if="clazzChild.keepStatus == 1" class="el-icon-success"></i | ||
| 110 | - ></span> | ||
| 111 | - <el-tooltip effect="dark" content="刷新同步状态" placement="right"> | ||
| 112 | - <i class="icon-refresh el-icon-refresh" @click="refreshStic"></i> | ||
| 113 | - </el-tooltip> | ||
| 114 | - </p> | ||
| 115 | - <p class="person"> | ||
| 116 | - {{ item.realName }}<em class="s-line">|</em | ||
| 117 | - ><span class="date">{{ item.modifiedTime }}</span> | ||
| 118 | - </p> | ||
| 119 | - </div> | ||
| 120 | - <div class="btn-box"> | ||
| 121 | - <el-tooltip effect="dark" content="修改答案" placement="bottom"> | ||
| 122 | - <el-button | ||
| 123 | - class="edit" | ||
| 124 | - type="primary" | ||
| 125 | - size="mini" | ||
| 126 | - circle | ||
| 127 | - icon="el-icon-edit" | ||
| 128 | - @click="toEdit(item)" | ||
| 129 | - ></el-button> | ||
| 130 | - </el-tooltip> | ||
| 131 | - <el-dropdown | ||
| 132 | - trigger="click" | ||
| 133 | - @command="handleDropdownClick($event, item)" | ||
| 134 | - > | ||
| 135 | - <el-button | ||
| 136 | - type="info" | ||
| 137 | - size="mini" | ||
| 138 | - circle | ||
| 139 | - icon="el-icon-more" | ||
| 140 | - ></el-button> | ||
| 141 | - <el-dropdown-menu slot="dropdown"> | ||
| 142 | - <el-dropdown-item :command="1" v-if="userName == item.realName" | ||
| 143 | - >修改分享范围</el-dropdown-item | ||
| 144 | - > | ||
| 145 | - <el-dropdown-item :command="2">复制</el-dropdown-item> | ||
| 146 | - <el-dropdown-item :command="3">放入回收站</el-dropdown-item> | ||
| 147 | - </el-dropdown-menu> | ||
| 148 | - </el-dropdown> | ||
| 149 | - </div> | ||
| 150 | - </li> | ||
| 151 | - </ul> | ||
| 152 | - <div class="pagination-box"> | ||
| 153 | - <el-pagination | ||
| 154 | - small="" | ||
| 155 | - layout="total,prev, pager, next" | ||
| 156 | - :hide-on-single-page="true" | ||
| 157 | - :total="total" | ||
| 158 | - @current-change="changePage" | ||
| 159 | - :current-page="page" | ||
| 160 | - :page-size="size" | ||
| 161 | - > | ||
| 162 | - </el-pagination> | ||
| 163 | - </div> | ||
| 164 | - <el-empty | ||
| 165 | - v-if="!loading && tableData.length == 0" | ||
| 166 | - content="没有更多数据" | ||
| 167 | - :image-size="100" | ||
| 168 | - ></el-empty> | ||
| 169 | - <el-dialog :close-on-click-modal="false" title="选择分享范围" :visible.sync="dialogVisible" width="400"> | ||
| 170 | - <el-form :model="shareForm" :rules="shareRulesForm" label-width="160px"> | ||
| 171 | - <el-form-item prop="share" label="分享范围:"> | ||
| 172 | - <el-radio-group v-model="shareForm.sharingType"> | ||
| 173 | - <el-radio :label="0">任课班级分享</el-radio> | ||
| 174 | - <el-radio :label="1">全年级分享</el-radio> | ||
| 175 | - </el-radio-group> | ||
| 176 | - </el-form-item> | ||
| 177 | - </el-form> | ||
| 178 | - <div slot="footer" class="dialog-footer"> | ||
| 179 | - <el-button type="primary" @click="saveShare">确 定</el-button> | ||
| 180 | - <el-button @click="dialogVisible = false">取 消</el-button> | ||
| 181 | - </div> | ||
| 182 | - </el-dialog> | ||
| 183 | - </div> | ||
| 184 | -</template> | ||
| 185 | - | ||
| 186 | -<script> | ||
| 187 | -export default { | ||
| 188 | - name: "examinationPaper", | ||
| 189 | - data() { | ||
| 190 | - return { | ||
| 191 | - loading: false, | ||
| 192 | - userName: "", | ||
| 193 | - dialogVisible: false, | ||
| 194 | - query: { | ||
| 195 | - classId: "", | ||
| 196 | - subjectName: "", | ||
| 197 | - tagId: "", | ||
| 198 | - title: "", | ||
| 199 | - }, | ||
| 200 | - classList: [], | ||
| 201 | - subjectList: [], | ||
| 202 | - typeList: [], | ||
| 203 | - archivedTotal: 0, //已归档答题卡数量 | ||
| 204 | - tableData: null, | ||
| 205 | - shareForm: { | ||
| 206 | - id: "", | ||
| 207 | - sharingType: 0, //0-任课班级/1-全年级 | ||
| 208 | - }, | ||
| 209 | - shareRulesForm: { | ||
| 210 | - sharingType: [ | ||
| 211 | - { required: true, message: "选择分享范围", trigger: "blur" }, | ||
| 212 | - ], | ||
| 213 | - }, | ||
| 214 | - total: 0, | ||
| 215 | - page: 1, | ||
| 216 | - size: 20, | ||
| 217 | - }; | ||
| 218 | - }, | ||
| 219 | - async created() { | ||
| 220 | - this.userName = this.$store.getters.info.name || ""; | ||
| 221 | - await this._QueryClassList(); | ||
| 222 | - await this._QuerySubjectList(); | ||
| 223 | - this._QueryData(); | ||
| 224 | - this._QueryTypeList(); | ||
| 225 | - }, | ||
| 226 | - methods: { | ||
| 227 | - refreshStic(){ | ||
| 228 | - setTimeout(function(){ | ||
| 229 | - window.location.reload() | ||
| 230 | - },500) | ||
| 231 | - }, | ||
| 232 | - toAdd(query) { | ||
| 233 | - let routerItem = { | ||
| 234 | - path: "/examinationPaperAdd", | ||
| 235 | - }; | ||
| 236 | - query ? (routerItem["query"] = { ...query }) : ""; | ||
| 237 | - this.$router.push(routerItem); | ||
| 238 | - }, | ||
| 239 | - toEdit(item) { | ||
| 240 | - this.$router.push({ | ||
| 241 | - path: "/examinationPaperEdit", | ||
| 242 | - query: { | ||
| 243 | - paperId: item.id, | ||
| 244 | - }, | ||
| 245 | - }); | ||
| 246 | - }, | ||
| 247 | - handleDropdownClick(value, item) { | ||
| 248 | - //更多 | ||
| 249 | - const that = this; | ||
| 250 | - switch (value) { | ||
| 251 | - case 1: | ||
| 252 | - //修改分享范围 | ||
| 253 | - that.shareForm.id = item.id; | ||
| 254 | - that.shareForm.sharingType = item.sharingType; | ||
| 255 | - that.dialogVisible = true; | ||
| 256 | - break; | ||
| 257 | - case 2: | ||
| 258 | - //复制 | ||
| 259 | - that.toAdd({ type: 2, paperId: item.id }); | ||
| 260 | - break; | ||
| 261 | - case 3: | ||
| 262 | - //归档 | ||
| 263 | - that.recovery(item); | ||
| 264 | - break; | ||
| 265 | - } | ||
| 266 | - }, | ||
| 267 | - changePage(page) { | ||
| 268 | - this.page = page; | ||
| 269 | - this._QueryData(this.query.title); | ||
| 270 | - }, | ||
| 271 | - async saveShare() { | ||
| 272 | - //修改分享范围 | ||
| 273 | - const { data, status, info } = await this.$request.modifyPaper({ | ||
| 274 | - paperId: this.shareForm.id, | ||
| 275 | - sharingType: this.shareForm.sharingType, | ||
| 276 | - }); | ||
| 277 | - if (status === 0) { | ||
| 278 | - this.shareForm.id = ""; | ||
| 279 | - this.shareForm.sharingType = 1; | ||
| 280 | - this.dialogVisible = false; | ||
| 281 | - this.$message.success(info); | ||
| 282 | - this._QueryData(this.query.title == ""); | ||
| 283 | - } else { | ||
| 284 | - this.$message.error(info); | ||
| 285 | - } | ||
| 286 | - }, | ||
| 287 | - async recovery(item) { | ||
| 288 | - //归档 | ||
| 289 | - const { data, status, info } = await this.$request.modifyPaper({ | ||
| 290 | - paperId: item.id, | ||
| 291 | - status: 2, | ||
| 292 | - }); | ||
| 293 | - if (status === 0) { | ||
| 294 | - let type = this.query.title ? 1 : 0; | ||
| 295 | - this.page = 1; | ||
| 296 | - this._QueryData(type); | ||
| 297 | - } else { | ||
| 298 | - this.$message.error(info); | ||
| 299 | - } | ||
| 300 | - }, | ||
| 301 | - //切换班级 | ||
| 302 | - async changClazz() { | ||
| 303 | - await this._QuerySubjectList(); | ||
| 304 | - this._QueryData(false); | ||
| 305 | - }, | ||
| 306 | - // 查找答题卡类型 | ||
| 307 | - async _QueryTypeList() { | ||
| 308 | - const { data, status, info } = await this.$request.fetchTypeNames({ | ||
| 309 | - classId: this.query.classId, | ||
| 310 | - type: 0, | ||
| 311 | - }); | ||
| 312 | - if (status === 0) { | ||
| 313 | - this.typeList = | ||
| 314 | - data.list.map((item) => { | ||
| 315 | - return { | ||
| 316 | - value: item.tagId, | ||
| 317 | - label: item.tag, | ||
| 318 | - }; | ||
| 319 | - }) || []; | ||
| 320 | - this.typeList.unshift({ | ||
| 321 | - value: "", | ||
| 322 | - label: "请选择标签", | ||
| 323 | - }); | ||
| 324 | - } else { | ||
| 325 | - this.$message.error(info); | ||
| 326 | - } | ||
| 327 | - }, | ||
| 328 | - // 查找班级 | ||
| 329 | - async _QueryClassList() { | ||
| 330 | - this.loading = true; | ||
| 331 | - const { data, status, info } = await this.$request.fetchClassList(); | ||
| 332 | - console.log(status); | ||
| 333 | - if (status === 0) { | ||
| 334 | - if (!!data.list) { | ||
| 335 | - this.classList = | ||
| 336 | - data.list?.map((item) => { | ||
| 337 | - return { | ||
| 338 | - value: item.classId, | ||
| 339 | - label: item.className, | ||
| 340 | - }; | ||
| 341 | - }) || []; | ||
| 342 | - this.query.classId = this.classList[0]?.value; | ||
| 343 | - } | ||
| 344 | - } else { | ||
| 345 | - this.$message.error(info); | ||
| 346 | - } | ||
| 347 | - }, | ||
| 348 | - // 查找科目 | ||
| 349 | - async _QuerySubjectList() { | ||
| 350 | - const { data, status, info } = await this.$request.fetchSubjectList({ | ||
| 351 | - classId: this.query.classId, | ||
| 352 | - }); | ||
| 353 | - if (status === 0) { | ||
| 354 | - this.subjectList = | ||
| 355 | - data.subjectNames?.map((item) => { | ||
| 356 | - return { | ||
| 357 | - value: item, | ||
| 358 | - label: item, | ||
| 359 | - }; | ||
| 360 | - }) || []; | ||
| 361 | - this.query.subjectName = this.subjectList[0]?.value; | ||
| 362 | - } else { | ||
| 363 | - this.$message.error(info); | ||
| 364 | - } | ||
| 365 | - }, | ||
| 366 | - async _QueryData(type) { | ||
| 367 | - this.loading = true; | ||
| 368 | - //获取答题卡列表 | ||
| 369 | - let query = {}; | ||
| 370 | - if (!type) { | ||
| 371 | - this.query.title = ""; | ||
| 372 | - query = { ...this.query }; | ||
| 373 | - } else { | ||
| 374 | - query = { title: this.query.title }; | ||
| 375 | - this.query.tagId = ""; | ||
| 376 | - // this.query.subjectName = ""; | ||
| 377 | - } | ||
| 378 | - query.classId = this.query.classId; | ||
| 379 | - query.subjectName = this.query.subjectName; | ||
| 380 | - for (let key in query) { | ||
| 381 | - if (!query[key]) { | ||
| 382 | - query[key] = null; | ||
| 383 | - } | ||
| 384 | - } | ||
| 385 | - if (!query.classId) { | ||
| 386 | - this.total = 0; | ||
| 387 | - this.tableData = []; | ||
| 388 | - this.loading = false; | ||
| 389 | - return; | ||
| 390 | - } | ||
| 391 | - this.loading = true; | ||
| 392 | - const { data, status, info } = await this.$request.fetchPaperList({ | ||
| 393 | - ...query, | ||
| 394 | - status: 1, | ||
| 395 | - page: this.page, | ||
| 396 | - size: this.size, | ||
| 397 | - }); | ||
| 398 | - this.loading = false; | ||
| 399 | - if (status === 0) { | ||
| 400 | - this.archivedTotal = data.archivedTotal; | ||
| 401 | - this.total = data.total; | ||
| 402 | - this.tableData = (data.list && [...data.list]) || []; | ||
| 403 | - } else { | ||
| 404 | - this.$message.error(info); | ||
| 405 | - } | ||
| 406 | - }, | ||
| 407 | - }, | ||
| 408 | -}; | ||
| 409 | -</script> | ||
| 410 | - | ||
| 411 | -<style scoped lang="scss"> | ||
| 412 | -.tips { | ||
| 413 | - display: flex; | ||
| 414 | - padding-left: 30px; | ||
| 415 | - line-height: 16px; | ||
| 416 | - font-size: 14px; | ||
| 417 | - color: #999; | ||
| 418 | - margin-bottom: 10px; | ||
| 419 | -} | ||
| 420 | -.content { | ||
| 421 | - margin: 0 20px; | ||
| 422 | - background: #f8f8f8; | ||
| 423 | - padding: 12px; | ||
| 424 | - border-radius: 20px; | ||
| 425 | - .item { | ||
| 426 | - display: flex; | ||
| 427 | - align-items: center; | ||
| 428 | - width: 100%; | ||
| 429 | - overflow: hidden; | ||
| 430 | - box-sizing: border-box; | ||
| 431 | - padding: 12px; | ||
| 432 | - border-radius: 20px; | ||
| 433 | - background: #fff; | ||
| 434 | - margin-bottom: 12px; | ||
| 435 | - &:last-of-type { | ||
| 436 | - margin-bottom: 0; | ||
| 437 | - } | ||
| 438 | - .pic-box { | ||
| 439 | - width: 80px; | ||
| 440 | - height: 80px; | ||
| 441 | - border-radius: 10px; | ||
| 442 | - margin-right: 10px; | ||
| 443 | - flex-shrink: 0; | ||
| 444 | - background: #667ffd; | ||
| 445 | - text-align: center; | ||
| 446 | - color: #fff; | ||
| 447 | - font-weight: 500; | ||
| 448 | - .i-box { | ||
| 449 | - padding-top: 10px; | ||
| 450 | - font-size: 32px; | ||
| 451 | - margin-bottom: 3px; | ||
| 452 | - } | ||
| 453 | - } | ||
| 454 | - .info { | ||
| 455 | - min-height: 80px; | ||
| 456 | - flex: 1; | ||
| 457 | - overflow: hidden; | ||
| 458 | - display: flex; | ||
| 459 | - flex-direction: column; | ||
| 460 | - justify-content: space-between; | ||
| 461 | - .s-line { | ||
| 462 | - padding: 0 5px; | ||
| 463 | - color: #e2e2e2; | ||
| 464 | - } | ||
| 465 | - .title { | ||
| 466 | - font-size: 16px; | ||
| 467 | - color: #222; | ||
| 468 | - font-weight: 500; | ||
| 469 | - .label { | ||
| 470 | - display: inline-block; | ||
| 471 | - font-size: 12px; | ||
| 472 | - color: #2e9afe; | ||
| 473 | - line-height: 16px; | ||
| 474 | - padding: 0 10px; | ||
| 475 | - border: 1px solid #2e9afe; | ||
| 476 | - border-radius: 10px; | ||
| 477 | - transform: translateY(-2px); | ||
| 478 | - } | ||
| 479 | - } | ||
| 480 | - .person { | ||
| 481 | - color: #666; | ||
| 482 | - } | ||
| 483 | - } | ||
| 484 | - .clazz { | ||
| 485 | - font-size: 14px; | ||
| 486 | - font-weight: 500; | ||
| 487 | - position: relative; | ||
| 488 | - position: relative; | ||
| 489 | - &.active { | ||
| 490 | - color: #667ffd; | ||
| 491 | - } | ||
| 492 | - .el-icon-success { | ||
| 493 | - position: absolute; | ||
| 494 | - right: 0; | ||
| 495 | - top: -5px; | ||
| 496 | - color: #667ffd; | ||
| 497 | - } | ||
| 498 | - &:last-of-type { | ||
| 499 | - .el-icon-success { | ||
| 500 | - right: -18px; | ||
| 501 | - } | ||
| 502 | - } | ||
| 503 | - } | ||
| 504 | - .btn-box { | ||
| 505 | - flex-shrink: 0; | ||
| 506 | - .edit { | ||
| 507 | - margin-right: 12px; | ||
| 508 | - } | ||
| 509 | - } | ||
| 510 | - .icon-refresh{ | ||
| 511 | - margin-left:20px; | ||
| 512 | - cursor: pointer; | ||
| 513 | - &:hover{ | ||
| 514 | - color:#2e9afe | ||
| 515 | - } | ||
| 516 | - } | ||
| 517 | - } | ||
| 518 | -} | ||
| 519 | -.answer-header { | ||
| 520 | - .sel-box { | ||
| 521 | - .sel { | ||
| 522 | - min-width: 160px; | ||
| 523 | - } | ||
| 524 | - :deep(.el-cascader__tags) { | ||
| 525 | - flex-wrap: nowrap; | ||
| 526 | - } | ||
| 527 | - } | ||
| 528 | -} | ||
| 529 | -.dialog-footer { | ||
| 530 | - text-align: center; | ||
| 531 | - :deep(.el-button) { | ||
| 532 | - border-radius: 20px; | ||
| 533 | - padding: 8px 20px 7px; | ||
| 534 | - margin: 0 12px; | ||
| 535 | - } | ||
| 536 | -} | ||
| 537 | -</style> | ||
| 538 | \ No newline at end of file | 0 | \ No newline at end of file |
src/views/basic/examinationPaper/recycle.vue deleted
| 1 | -<template> | ||
| 2 | - <div> | ||
| 3 | - <back-box> | ||
| 4 | - <template slot="title"> | ||
| 5 | - <span>已归档答题卡</span> | ||
| 6 | - </template> | ||
| 7 | - </back-box> | ||
| 8 | - <div class="answer-header"> | ||
| 9 | - <div class="sel-box"> | ||
| 10 | - <!-- <el-cascader size="small" | ||
| 11 | - class="sel sel2" | ||
| 12 | - :options="options" | ||
| 13 | - :props="props" | ||
| 14 | - collapse-tags | ||
| 15 | - clearable | ||
| 16 | - placeholder="选择年级-班级" | ||
| 17 | - v-model="query.gradeClass" | ||
| 18 | - @change="changeGrade" | ||
| 19 | - ><template slot-scope="{ node, data }"> | ||
| 20 | - <span>{{ data.label }}</span> | ||
| 21 | - <span v-if="!node.isLeaf"> ({{ data.children.length }}) </span> | ||
| 22 | - </template></el-cascader | ||
| 23 | - > --> | ||
| 24 | - <el-select | ||
| 25 | - class="sel" | ||
| 26 | - v-model="query.classId" | ||
| 27 | - placeholder="选择班级" | ||
| 28 | - @change="changClazz" | ||
| 29 | - > | ||
| 30 | - <el-option | ||
| 31 | - v-for="item in classList" | ||
| 32 | - :key="item.value" | ||
| 33 | - :label="item.label" | ||
| 34 | - :value="item.value" | ||
| 35 | - > | ||
| 36 | - </el-option> | ||
| 37 | - </el-select> | ||
| 38 | - <el-select | ||
| 39 | - class="sel" | ||
| 40 | - v-model="query.subjectName" | ||
| 41 | - placeholder="选择科目" | ||
| 42 | - @change="_QueryData()" | ||
| 43 | - > | ||
| 44 | - <el-option | ||
| 45 | - v-for="item in subjectList" | ||
| 46 | - :key="item.value" | ||
| 47 | - :label="item.label" | ||
| 48 | - :value="item.value" | ||
| 49 | - > | ||
| 50 | - </el-option> | ||
| 51 | - </el-select> | ||
| 52 | - <el-select | ||
| 53 | - class="sel" | ||
| 54 | - v-model="query.tagId" | ||
| 55 | - placeholder="选择类型" | ||
| 56 | - @change="_QueryData()" | ||
| 57 | - > | ||
| 58 | - <el-option | ||
| 59 | - v-for="item in typeList" | ||
| 60 | - :key="item.label" | ||
| 61 | - :label="item.label" | ||
| 62 | - :value="item.value" | ||
| 63 | - >{{ item.label }} | ||
| 64 | - </el-option> | ||
| 65 | - </el-select> | ||
| 66 | - | ||
| 67 | - <el-input | ||
| 68 | - placeholder="输入试卷名称" | ||
| 69 | - v-model="query.title" | ||
| 70 | - class="input-with-select" | ||
| 71 | - @keyup.enter.native="_QueryData(true)" | ||
| 72 | - > | ||
| 73 | - <el-button | ||
| 74 | - slot="append" | ||
| 75 | - icon="el-icon-search" | ||
| 76 | - @click="_QueryData(true)" | ||
| 77 | - ></el-button> | ||
| 78 | - </el-input> | ||
| 79 | - </div> | ||
| 80 | - </div> | ||
| 81 | - <ul class="content" v-loading="loading"> | ||
| 82 | - <li class="item" v-for="item in tableData" :key="item.id"> | ||
| 83 | - <div class="pic-box"> | ||
| 84 | - <p class="i-box"><i class="fa fa-map-o"></i></p> | ||
| 85 | - <p class="ids">{{ item.id }}</p> | ||
| 86 | - </div> | ||
| 87 | - <div class="info"> | ||
| 88 | - <p class="title"> | ||
| 89 | - {{ item.title }} <span class="label" v-if="item.tag">{{ item.tag }}</span> | ||
| 90 | - </p> | ||
| 91 | - <p class="num"> | ||
| 92 | - {{ item.gradeName }} | ||
| 93 | - <em class="s-line">|</em> | ||
| 94 | - 总题数:{{ item.questionNum }} | ||
| 95 | - <em class="s-line">|</em> | ||
| 96 | - 预计时长:{{ item.examsDuration }} | ||
| 97 | - </p> | ||
| 98 | - <p class="person"> | ||
| 99 | - {{ item.realName }}<em class="s-line">|</em | ||
| 100 | - ><span class="date">{{ item.modifiedTime }}</span> | ||
| 101 | - </p> | ||
| 102 | - </div> | ||
| 103 | - <div class="btn-box"> | ||
| 104 | - <el-tooltip effect="dark" content="恢复" placement="bottom"> | ||
| 105 | - <el-button | ||
| 106 | - class="edit" | ||
| 107 | - type="info" | ||
| 108 | - size="mini" | ||
| 109 | - circle | ||
| 110 | - icon="fa fa-mail-reply" | ||
| 111 | - @click="modify(item)" | ||
| 112 | - ></el-button> | ||
| 113 | - </el-tooltip> | ||
| 114 | - <el-popconfirm title="确定删除这张答题卡吗?" @confirm="remove(item)"> | ||
| 115 | - <el-button | ||
| 116 | - slot="reference" | ||
| 117 | - class="delete" | ||
| 118 | - type="info" | ||
| 119 | - size="mini" | ||
| 120 | - circle | ||
| 121 | - icon="el-icon-delete" | ||
| 122 | - ></el-button> | ||
| 123 | - </el-popconfirm> | ||
| 124 | - </div> | ||
| 125 | - </li> | ||
| 126 | - </ul> | ||
| 127 | - <div class="pagination-box"> | ||
| 128 | - <el-pagination | ||
| 129 | - small="" | ||
| 130 | - layout="total,prev, pager, next" | ||
| 131 | - :hide-on-single-page="true" | ||
| 132 | - :total="total" | ||
| 133 | - @current-change="changePage" | ||
| 134 | - :current-page="page" | ||
| 135 | - :page-size="size" | ||
| 136 | - > | ||
| 137 | - </el-pagination> | ||
| 138 | - </div> | ||
| 139 | - <el-empty :image-size="100" v-if="!tableData.length&&loading==false" description="没有更多数据"></el-empty> | ||
| 140 | - </div> | ||
| 141 | -</template> | ||
| 142 | - | ||
| 143 | -<script> | ||
| 144 | -export default { | ||
| 145 | - data() { | ||
| 146 | - return { | ||
| 147 | - loading:false, | ||
| 148 | - props: { multiple: true, checkStrictly: true }, | ||
| 149 | - options: [ | ||
| 150 | - { | ||
| 151 | - value: 1, | ||
| 152 | - label: "一年级", | ||
| 153 | - children: [ | ||
| 154 | - { | ||
| 155 | - value: 2, | ||
| 156 | - label: "二班", | ||
| 157 | - }, | ||
| 158 | - { | ||
| 159 | - value: 3, | ||
| 160 | - label: "三班", | ||
| 161 | - }, | ||
| 162 | - ], | ||
| 163 | - }, | ||
| 164 | - { | ||
| 165 | - value: 4, | ||
| 166 | - label: "二年级", | ||
| 167 | - children: [ | ||
| 168 | - { | ||
| 169 | - value: 5, | ||
| 170 | - label: "二班", | ||
| 171 | - }, | ||
| 172 | - { | ||
| 173 | - value: 6, | ||
| 174 | - label: "三班", | ||
| 175 | - }, | ||
| 176 | - ], | ||
| 177 | - }, | ||
| 178 | - ], | ||
| 179 | - query: { | ||
| 180 | - classId: "", | ||
| 181 | - subjectName: "", | ||
| 182 | - tagId: "", | ||
| 183 | - title: "", | ||
| 184 | - }, | ||
| 185 | - classList: [], | ||
| 186 | - subjectList: [], | ||
| 187 | - typeList: [], | ||
| 188 | - tableData: [], | ||
| 189 | - total: 0, | ||
| 190 | - page:1, | ||
| 191 | - size:20 | ||
| 192 | - }; | ||
| 193 | - }, | ||
| 194 | - async created() { | ||
| 195 | - await this._QueryClassList(); | ||
| 196 | - await this._QuerySubjectList(); | ||
| 197 | - this._QueryTypeList(); | ||
| 198 | - this._QueryData(false); | ||
| 199 | - }, | ||
| 200 | - methods: { | ||
| 201 | - async modify(obj) { | ||
| 202 | - //恢复答题卡 | ||
| 203 | - const { data, status, info } = await this.$request.modifyPaper({ | ||
| 204 | - paperId: obj.id, | ||
| 205 | - status: 1, | ||
| 206 | - }); | ||
| 207 | - if (status == 0) { | ||
| 208 | - let type = this.query.title ? 1 : 0; | ||
| 209 | - this._QueryData(type); | ||
| 210 | - } else { | ||
| 211 | - this.$message.error(info); | ||
| 212 | - } | ||
| 213 | - }, | ||
| 214 | - async remove(obj) { | ||
| 215 | - //删除答题卡 | ||
| 216 | - const { data, status, info } = await this.$request.delPaper({ | ||
| 217 | - paperId: obj.id, | ||
| 218 | - }); | ||
| 219 | - if (status == 0) { | ||
| 220 | - let type = this.query.title ? 1 : 0; | ||
| 221 | - this._QueryData(type); | ||
| 222 | - } else { | ||
| 223 | - this.$message.error(info); | ||
| 224 | - } | ||
| 225 | - }, | ||
| 226 | - //切换班级 | ||
| 227 | - async changClazz() { | ||
| 228 | - await this._QuerySubjectList(); | ||
| 229 | - this._QueryData(false); | ||
| 230 | - }, | ||
| 231 | - changePage(page){ | ||
| 232 | - this.page = page | ||
| 233 | - this._QueryData(this.query.title) | ||
| 234 | - }, | ||
| 235 | - async _QueryData(type) { | ||
| 236 | - //获取答题卡列表 | ||
| 237 | - this.loading=true | ||
| 238 | - let query = {}; | ||
| 239 | - if (!type) { | ||
| 240 | - this.query.title = ""; | ||
| 241 | - query = { ...this.query }; | ||
| 242 | - } else { | ||
| 243 | - query = { title: this.query.title }; | ||
| 244 | - this.query.type = ""; | ||
| 245 | - this.query.subjectId = ""; | ||
| 246 | - } | ||
| 247 | - query.classId = this.query.classId; | ||
| 248 | - for (let key in query) { | ||
| 249 | - if (!query[key]) { | ||
| 250 | - query[key] = null; | ||
| 251 | - } | ||
| 252 | - } | ||
| 253 | - const { data, status, info } = await this.$request.fetchPaperList({ | ||
| 254 | - ...query, | ||
| 255 | - status:2, | ||
| 256 | - page:this.page, | ||
| 257 | - size:this.size | ||
| 258 | - }); | ||
| 259 | - this.loading = false; | ||
| 260 | - if (status === 0) { | ||
| 261 | - this.total = data.total; | ||
| 262 | - this.tableData = (data.list && [...data.list]) || []; | ||
| 263 | - } else { | ||
| 264 | - this.$message.error(info); | ||
| 265 | - } | ||
| 266 | - }, | ||
| 267 | - // 查找班级 | ||
| 268 | - async _QueryClassList() { | ||
| 269 | - const { data, status, info } = await this.$request.fetchClassList(); | ||
| 270 | - console.log(status); | ||
| 271 | - if (status === 0) { | ||
| 272 | - if (!!data.list) { | ||
| 273 | - this.classList = data.list?.map((item) => { | ||
| 274 | - return { | ||
| 275 | - value: item.classId, | ||
| 276 | - label: item.className, | ||
| 277 | - }; | ||
| 278 | - })||[]; | ||
| 279 | - this.query.classId = this.classList[0]?.value; | ||
| 280 | - } | ||
| 281 | - } else { | ||
| 282 | - this.$message.error(info); | ||
| 283 | - } | ||
| 284 | - }, | ||
| 285 | - // 查找科目 | ||
| 286 | - async _QuerySubjectList() { | ||
| 287 | - const { data, status, info } = await this.$request.fetchSubjectList({ | ||
| 288 | - classId: this.query.classId, | ||
| 289 | - }); | ||
| 290 | - if (status === 0) { | ||
| 291 | - this.subjectList = data.subjectNames?.map((item) => { | ||
| 292 | - return { | ||
| 293 | - value: item, | ||
| 294 | - label: item, | ||
| 295 | - }; | ||
| 296 | - })||[]; | ||
| 297 | - this.query.subjectName = this.subjectList[0]?.value; | ||
| 298 | - } else { | ||
| 299 | - this.$message.error(info); | ||
| 300 | - } | ||
| 301 | - }, | ||
| 302 | - // 查找答题卡类型 | ||
| 303 | - async _QueryTypeList() { | ||
| 304 | - const { data, status, info } = await this.$request.fetchTypeNames({ | ||
| 305 | - classId: this.query.classId, | ||
| 306 | - tyle:0 | ||
| 307 | - }); | ||
| 308 | - if (status === 0) { | ||
| 309 | - this.typeList = | ||
| 310 | - data.list?.map((item) => { | ||
| 311 | - return { | ||
| 312 | - value: item.tagId, | ||
| 313 | - label: item.tag, | ||
| 314 | - }; | ||
| 315 | - }) || []; | ||
| 316 | - this.typeList.unshift({ | ||
| 317 | - value: "", | ||
| 318 | - label: "请选择标签", | ||
| 319 | - }); | ||
| 320 | - } else { | ||
| 321 | - this.$message.error(info); | ||
| 322 | - } | ||
| 323 | - }, | ||
| 324 | - }, | ||
| 325 | -}; | ||
| 326 | -</script> | ||
| 327 | - | ||
| 328 | -<style lang="scss" scoped> | ||
| 329 | -.answer-header { | ||
| 330 | - .sel-box { | ||
| 331 | - .sel { | ||
| 332 | - min-width: 160px; | ||
| 333 | - } | ||
| 334 | - :deep(.el-cascader__tags) { | ||
| 335 | - flex-wrap: nowrap; | ||
| 336 | - } | ||
| 337 | - } | ||
| 338 | -} | ||
| 339 | -.content { | ||
| 340 | - margin: 0 20px; | ||
| 341 | - background: #f8f8f8; | ||
| 342 | - padding: 12px; | ||
| 343 | - border-radius: 20px; | ||
| 344 | - .item { | ||
| 345 | - display: flex; | ||
| 346 | - align-items: center; | ||
| 347 | - width: 100%; | ||
| 348 | - overflow: hidden; | ||
| 349 | - box-sizing: border-box; | ||
| 350 | - padding: 12px; | ||
| 351 | - border-radius: 20px; | ||
| 352 | - background: #fff; | ||
| 353 | - margin-bottom: 12px; | ||
| 354 | - &:last-of-type { | ||
| 355 | - margin-bottom: 0; | ||
| 356 | - } | ||
| 357 | - .pic-box { | ||
| 358 | - width: 80px; | ||
| 359 | - height: 80px; | ||
| 360 | - border-radius: 10px; | ||
| 361 | - margin-right: 10px; | ||
| 362 | - flex-shrink: 0; | ||
| 363 | - background: #d7d7d7; | ||
| 364 | - text-align: center; | ||
| 365 | - color: #fff; | ||
| 366 | - font-weight: 500; | ||
| 367 | - .i-box { | ||
| 368 | - padding-top: 10px; | ||
| 369 | - font-size: 32px; | ||
| 370 | - margin-bottom: 3px; | ||
| 371 | - } | ||
| 372 | - } | ||
| 373 | - .info { | ||
| 374 | - height: 80px; | ||
| 375 | - flex: 1; | ||
| 376 | - overflow: hidden; | ||
| 377 | - display: flex; | ||
| 378 | - flex-direction: column; | ||
| 379 | - justify-content: space-between; | ||
| 380 | - .s-line { | ||
| 381 | - padding: 0 5px; | ||
| 382 | - color: #e2e2e2; | ||
| 383 | - } | ||
| 384 | - .title { | ||
| 385 | - font-size: 16px; | ||
| 386 | - color: #222; | ||
| 387 | - font-weight: 500; | ||
| 388 | - .label { | ||
| 389 | - display: inline-block; | ||
| 390 | - font-size: 12px; | ||
| 391 | - color: #2e9afe; | ||
| 392 | - line-height: 16px; | ||
| 393 | - padding: 0 10px; | ||
| 394 | - border: 1px solid #2e9afe; | ||
| 395 | - border-radius: 10px; | ||
| 396 | - transform: translateY(-2px); | ||
| 397 | - } | ||
| 398 | - } | ||
| 399 | - .person { | ||
| 400 | - color: #666; | ||
| 401 | - } | ||
| 402 | - } | ||
| 403 | - .btn-box { | ||
| 404 | - flex-shrink: 0; | ||
| 405 | - .edit { | ||
| 406 | - margin-right: 12px; | ||
| 407 | - } | ||
| 408 | - } | ||
| 409 | - } | ||
| 410 | -} | ||
| 411 | -</style> | ||
| 412 | \ No newline at end of file | 0 | \ No newline at end of file |
src/views/basic/setUp/account.vue
| @@ -350,7 +350,7 @@ | @@ -350,7 +350,7 @@ | ||
| 350 | </div> | 350 | </div> |
| 351 | </el-dialog> | 351 | </el-dialog> |
| 352 | <el-dialog :close-on-click-modal="false" title="导入账号名单" :visible.sync="diaUp" width="600"> | 352 | <el-dialog :close-on-click-modal="false" title="导入账号名单" :visible.sync="diaUp" width="600"> |
| 353 | - <up-load | 353 | + <upload |
| 354 | id="downTeacher" | 354 | id="downTeacher" |
| 355 | :url="url" | 355 | :url="url" |
| 356 | @upSuccess="upSuccess" | 356 | @upSuccess="upSuccess" |
| @@ -360,7 +360,7 @@ | @@ -360,7 +360,7 @@ | ||
| 360 | 通过Excel名单导入账号名单,点击 | 360 | 通过Excel名单导入账号名单,点击 |
| 361 | <el-link type="danger" @click="downExcel">模板下载</el-link> 。 | 361 | <el-link type="danger" @click="downExcel">模板下载</el-link> 。 |
| 362 | </p> | 362 | </p> |
| 363 | - </up-load> | 363 | + </upload> |
| 364 | <div class="dialog-footer" slot="footer"> | 364 | <div class="dialog-footer" slot="footer"> |
| 365 | <el-button @click="diaUp = false">取 消</el-button> | 365 | <el-button @click="diaUp = false">取 消</el-button> |
| 366 | </div> | 366 | </div> |
src/views/basic/setUp/archived.vue
| @@ -78,7 +78,7 @@ | @@ -78,7 +78,7 @@ | ||
| 78 | </li> | 78 | </li> |
| 79 | <li v-show="step == 1"> | 79 | <li v-show="step == 1"> |
| 80 | <div class="step-item"> | 80 | <div class="step-item"> |
| 81 | - <up-load | 81 | + <upload |
| 82 | id="downTeacher" | 82 | id="downTeacher" |
| 83 | :url="urlClazz" | 83 | :url="urlClazz" |
| 84 | @upSuccess="upStudentSuccess" | 84 | @upSuccess="upStudentSuccess" |
| @@ -91,12 +91,12 @@ | @@ -91,12 +91,12 @@ | ||
| 91 | > | 91 | > |
| 92 | 。 | 92 | 。 |
| 93 | </p> | 93 | </p> |
| 94 | - </up-load> | 94 | + </upload> |
| 95 | </div> | 95 | </div> |
| 96 | </li> | 96 | </li> |
| 97 | <li v-show="step == 2"> | 97 | <li v-show="step == 2"> |
| 98 | <div class="step-item"> | 98 | <div class="step-item"> |
| 99 | - <up-load | 99 | + <upload |
| 100 | id="downTeacher" | 100 | id="downTeacher" |
| 101 | :url="urlTeacher" | 101 | :url="urlTeacher" |
| 102 | @upSuccess="upTeacherSuccess" | 102 | @upSuccess="upTeacherSuccess" |
| @@ -108,7 +108,7 @@ | @@ -108,7 +108,7 @@ | ||
| 108 | >导出未分配教师</el-link | 108 | >导出未分配教师</el-link |
| 109 | >。 | 109 | >。 |
| 110 | </p> | 110 | </p> |
| 111 | - </up-load> | 111 | + </upload> |
| 112 | </div> | 112 | </div> |
| 113 | </li> | 113 | </li> |
| 114 | <li v-show="step == 3"> | 114 | <li v-show="step == 3"> |
src/views/basic/setUp/clazz.vue
| @@ -89,12 +89,12 @@ | @@ -89,12 +89,12 @@ | ||
| 89 | :visible.sync="diaUp" | 89 | :visible.sync="diaUp" |
| 90 | width="600" | 90 | width="600" |
| 91 | > | 91 | > |
| 92 | - <up-load :url="url" @upSuccess="upSuccess" fileName="班级名单"> | 92 | + <upload :url="url" @upSuccess="upSuccess" fileName="班级名单"> |
| 93 | <p class="down-txt" slot="down"> | 93 | <p class="down-txt" slot="down"> |
| 94 | 通过Excel名单导入班级名单,点击 | 94 | 通过Excel名单导入班级名单,点击 |
| 95 | <el-link type="danger" @click="downExcel">模板下载</el-link> 。 | 95 | <el-link type="danger" @click="downExcel">模板下载</el-link> 。 |
| 96 | </p> | 96 | </p> |
| 97 | - </up-load> | 97 | + </upload> |
| 98 | <div class="dialog-footer" slot="footer"> | 98 | <div class="dialog-footer" slot="footer"> |
| 99 | <el-button @click="diaUp = false">取 消</el-button> | 99 | <el-button @click="diaUp = false">取 消</el-button> |
| 100 | </div> | 100 | </div> |
src/views/basic/setUp/student.vue
| @@ -322,7 +322,7 @@ | @@ -322,7 +322,7 @@ | ||
| 322 | :visible.sync="diaUp" | 322 | :visible.sync="diaUp" |
| 323 | width="600" | 323 | width="600" |
| 324 | > | 324 | > |
| 325 | - <up-load | 325 | + <upload |
| 326 | id="downTeacher" | 326 | id="downTeacher" |
| 327 | :url="url" | 327 | :url="url" |
| 328 | @upSuccess="upSuccess" | 328 | @upSuccess="upSuccess" |
| @@ -332,7 +332,7 @@ | @@ -332,7 +332,7 @@ | ||
| 332 | 通过Excel名单导入学生答题器绑定模板,点击 | 332 | 通过Excel名单导入学生答题器绑定模板,点击 |
| 333 | <el-link type="danger" @click="downExcel">模板下载</el-link> 。 | 333 | <el-link type="danger" @click="downExcel">模板下载</el-link> 。 |
| 334 | </p> | 334 | </p> |
| 335 | - </up-load> | 335 | + </upload> |
| 336 | <div class="dialog-footer" slot="footer"> | 336 | <div class="dialog-footer" slot="footer"> |
| 337 | <el-button @click="diaUp = false">取 消</el-button> | 337 | <el-button @click="diaUp = false">取 消</el-button> |
| 338 | </div> | 338 | </div> |
src/views/basic/setUp/teacher.vue
| @@ -258,7 +258,7 @@ | @@ -258,7 +258,7 @@ | ||
| 258 | :visible.sync="diaUp" | 258 | :visible.sync="diaUp" |
| 259 | width="600" | 259 | width="600" |
| 260 | > | 260 | > |
| 261 | - <up-load | 261 | + <upload |
| 262 | id="downTeacher" | 262 | id="downTeacher" |
| 263 | :url="url" | 263 | :url="url" |
| 264 | @upSuccess="upSuccess" | 264 | @upSuccess="upSuccess" |
| @@ -268,7 +268,7 @@ | @@ -268,7 +268,7 @@ | ||
| 268 | 通过Excel名单导入教师名单,点击 | 268 | 通过Excel名单导入教师名单,点击 |
| 269 | <el-link type="danger" @click="downExcel">模板下载</el-link> 。 | 269 | <el-link type="danger" @click="downExcel">模板下载</el-link> 。 |
| 270 | </p> | 270 | </p> |
| 271 | - </up-load> | 271 | + </upload> |
| 272 | <div class="dialog-footer" slot="footer"> | 272 | <div class="dialog-footer" slot="footer"> |
| 273 | <el-button @click="diaUp = false">取 消</el-button> | 273 | <el-button @click="diaUp = false">取 消</el-button> |
| 274 | </div> | 274 | </div> |
src/views/basic/test/analysis.vue
| @@ -460,7 +460,7 @@ | @@ -460,7 +460,7 @@ | ||
| 460 | :visible.sync="diaUp" | 460 | :visible.sync="diaUp" |
| 461 | width="600" | 461 | width="600" |
| 462 | > | 462 | > |
| 463 | - <up-load :url="url" :examId="id" @upSuccess="upSuccess"> | 463 | + <upload :url="url" :examId="id" @upSuccess="upSuccess"> |
| 464 | <template slot="down"> | 464 | <template slot="down"> |
| 465 | <p class="down-txt"> | 465 | <p class="down-txt"> |
| 466 | 第一步:下载模板并编辑完成学生分数 | 466 | 第一步:下载模板并编辑完成学生分数 |
| @@ -468,7 +468,7 @@ | @@ -468,7 +468,7 @@ | ||
| 468 | </p> | 468 | </p> |
| 469 | <p class="down-txt">第二步:上传完成编辑的模板文件并导入。</p> | 469 | <p class="down-txt">第二步:上传完成编辑的模板文件并导入。</p> |
| 470 | </template> | 470 | </template> |
| 471 | - </up-load> | 471 | + </upload> |
| 472 | <div class="dialog-footer" slot="footer"> | 472 | <div class="dialog-footer" slot="footer"> |
| 473 | <el-button @click="diaUp = false">取 消</el-button> | 473 | <el-button @click="diaUp = false">取 消</el-button> |
| 474 | </div> | 474 | </div> |
src/views/basic/test/index.vue
| @@ -481,7 +481,7 @@ | @@ -481,7 +481,7 @@ | ||
| 481 | </p> | 481 | </p> |
| 482 | </div> | 482 | </div> |
| 483 | <el-dialog :close-on-click-modal="false" title="导入主观题分数" :visible.sync="diaUp" width="600"> | 483 | <el-dialog :close-on-click-modal="false" title="导入主观题分数" :visible.sync="diaUp" width="600"> |
| 484 | - <up-load | 484 | + <upload |
| 485 | :url="url" | 485 | :url="url" |
| 486 | :examId="examId" | 486 | :examId="examId" |
| 487 | @upSuccess="upSuccess" | 487 | @upSuccess="upSuccess" |
| @@ -495,7 +495,7 @@ | @@ -495,7 +495,7 @@ | ||
| 495 | </p> | 495 | </p> |
| 496 | <p class="down-txt">第二步:上传完成编辑的模板文件并导入。</p> | 496 | <p class="down-txt">第二步:上传完成编辑的模板文件并导入。</p> |
| 497 | </template> | 497 | </template> |
| 498 | - </up-load> | 498 | + </upload> |
| 499 | <div class="dialog-footer" slot="footer"> | 499 | <div class="dialog-footer" slot="footer"> |
| 500 | <el-button @click="diaUp = false">取 消</el-button> | 500 | <el-button @click="diaUp = false">取 消</el-button> |
| 501 | </div> | 501 | </div> |
src/views/examinationPaper/add.vue
| @@ -354,37 +354,6 @@ | @@ -354,37 +354,6 @@ | ||
| 354 | </p> | 354 | </p> |
| 355 | </div> | 355 | </div> |
| 356 | <div class="qs-set"> | 356 | <div class="qs-set"> |
| 357 | - <!-- <el-tooltip effect="dark" content="上传提干" placement="top"> | ||
| 358 | - <el-button | ||
| 359 | - type="primary" | ||
| 360 | - circle | ||
| 361 | - size="mini" | ||
| 362 | - icon="el-icon-tickets" | ||
| 363 | - @click="openStem(subQuestions, 1, index, indexs)" | ||
| 364 | - ></el-button> | ||
| 365 | - </el-tooltip> | ||
| 366 | - <el-tooltip effect="dark" content="题目打标" placement="top"> | ||
| 367 | - <el-button | ||
| 368 | - type="primary" | ||
| 369 | - circle | ||
| 370 | - size="mini" | ||
| 371 | - icon="el-icon-price-tag" | ||
| 372 | - @click="openTag(subQuestions, 3, index, indexs)" | ||
| 373 | - ></el-button> | ||
| 374 | - </el-tooltip> | ||
| 375 | - <el-tooltip | ||
| 376 | - effect="dark" | ||
| 377 | - content="上传题目解析" | ||
| 378 | - placement="top" | ||
| 379 | - > | ||
| 380 | - <el-button | ||
| 381 | - type="primary" | ||
| 382 | - circle | ||
| 383 | - size="mini" | ||
| 384 | - icon="el-icon-upload" | ||
| 385 | - @click="openStem(subQuestions, 2, index, indexs)" | ||
| 386 | - ></el-button> | ||
| 387 | - </el-tooltip> --> | ||
| 388 | <el-popconfirm | 357 | <el-popconfirm |
| 389 | title="确定删除这道题吗?" | 358 | title="确定删除这道题吗?" |
| 390 | @confirm="delTabData(indexs, index)" | 359 | @confirm="delTabData(indexs, index)" |
| @@ -860,69 +829,6 @@ | @@ -860,69 +829,6 @@ | ||
| 860 | <el-button type="primary" round @click="save">保存</el-button> | 829 | <el-button type="primary" round @click="save">保存</el-button> |
| 861 | </div> | 830 | </div> |
| 862 | </div> | 831 | </div> |
| 863 | - <el-dialog :close-on-click-modal="false" | ||
| 864 | - :title="stem.type == 1 ? '上传题干' : '上传题目解析'" | ||
| 865 | - :visible.sync="dialogStem" | ||
| 866 | - v-if="dialogStem" | ||
| 867 | - width="500" | ||
| 868 | - > | ||
| 869 | - <div class="upload-box"> | ||
| 870 | - <img | ||
| 871 | - v-if="stem.screenshot || stem.answerScreenshot" | ||
| 872 | - :src=" | ||
| 873 | - stem.type == 1 ? stem.screenshotSrc : stem.answerScreenshotSrc | ||
| 874 | - " | ||
| 875 | - class="stem-pic" | ||
| 876 | - /> | ||
| 877 | - <el-upload | ||
| 878 | - class="upload-demo" | ||
| 879 | - action="http://121.40.127.171/file/uploadImg" | ||
| 880 | - :limit="1" | ||
| 881 | - :on-success="upSuccess" | ||
| 882 | - :on-error="upError" | ||
| 883 | - accept="image/*" | ||
| 884 | - > | ||
| 885 | - <el-button size="small" type="primary">{{ | ||
| 886 | - stem.screenshot || stem.answerScreenshot ? "重新上传" : "选择照片" | ||
| 887 | - }}</el-button> | ||
| 888 | - </el-upload> | ||
| 889 | - </div> | ||
| 890 | - <div slot="footer"> | ||
| 891 | - <el-button @click="dialogStem = false">关闭弹窗</el-button> | ||
| 892 | - </div> | ||
| 893 | - </el-dialog> | ||
| 894 | - <el-dialog :close-on-click-modal="false" title="题目打标" :visible.sync="dialogTag" width="500"> | ||
| 895 | - <div> | ||
| 896 | - <el-form ref="form" :model="stem" label-width="160px"> | ||
| 897 | - <el-form-item label="题目难度:"> | ||
| 898 | - <el-select | ||
| 899 | - v-model="stem.difficultyFactor" | ||
| 900 | - placeholder="选择题目难度" | ||
| 901 | - > | ||
| 902 | - <el-option label="简单" value="简单"></el-option> | ||
| 903 | - <el-option label="正常" value="正常"></el-option> | ||
| 904 | - <el-option label="困难" value="困难"></el-option> | ||
| 905 | - </el-select> | ||
| 906 | - </el-form-item> | ||
| 907 | - <el-form-item label="知识点:"> | ||
| 908 | - <el-select | ||
| 909 | - v-model="stem.knowledge" | ||
| 910 | - multiple | ||
| 911 | - placeholder="选择知识点" | ||
| 912 | - > | ||
| 913 | - <el-option label="生字积累" value="生字积累"></el-option> | ||
| 914 | - <el-option label="字词运用" value="字词运用"></el-option> | ||
| 915 | - <el-option label="阅读理解" value="阅读理解"></el-option> | ||
| 916 | - <el-option label="写作方法" value="写作方法"></el-option> | ||
| 917 | - </el-select> | ||
| 918 | - </el-form-item> | ||
| 919 | - </el-form> | ||
| 920 | - </div> | ||
| 921 | - <div slot="footer"> | ||
| 922 | - <el-button @click="dialogTag = false">取 消</el-button> | ||
| 923 | - <el-button type="primary" @click="setKnowledge">确 定</el-button> | ||
| 924 | - </div> | ||
| 925 | - </el-dialog> | ||
| 926 | </div> | 832 | </div> |
| 927 | </div> | 833 | </div> |
| 928 | </template> | 834 | </template> |
| @@ -1003,8 +909,6 @@ export default { | @@ -1003,8 +909,6 @@ export default { | ||
| 1003 | }, | 909 | }, |
| 1004 | tagList: [], | 910 | tagList: [], |
| 1005 | diaSetAns: false, //答案开关 | 911 | diaSetAns: false, //答案开关 |
| 1006 | - dialogStem: false, //截图开关 | ||
| 1007 | - dialogTag: false, //打标开关 | ||
| 1008 | formAns: { | 912 | formAns: { |
| 1009 | listIndex: 0, //大题位置 | 913 | listIndex: 0, //大题位置 |
| 1010 | endIndex: 0, //相同题目最后一位题目的questionIndex | 914 | endIndex: 0, //相同题目最后一位题目的questionIndex |
| @@ -1014,17 +918,6 @@ export default { | @@ -1014,17 +918,6 @@ export default { | ||
| 1014 | answerOptions: [], //答案选项 | 918 | answerOptions: [], //答案选项 |
| 1015 | answerList: "", //答案列表-字符串 | 919 | answerList: "", //答案列表-字符串 |
| 1016 | }, | 920 | }, |
| 1017 | - stem: { | ||
| 1018 | - type: 1, //类型 | ||
| 1019 | - index: 0, //大题位置 | ||
| 1020 | - indexs: 0, //小题位置 | ||
| 1021 | - screenshot: "", //题干图片id | ||
| 1022 | - answerScreenshot: "", //题干解析图片id | ||
| 1023 | - screenshotSrc: "", //题干图片地址显示用保存时删除 | ||
| 1024 | - answerScreenshotSrc: "", //题干解析图片地址显示用保存时删除 | ||
| 1025 | - difficultyFactor: 0, //题目难度 | ||
| 1026 | - knowledge: null, //知识点 | ||
| 1027 | - }, | ||
| 1028 | type: 1, //1-创建,2-复制答题卡 | 921 | type: 1, //1-创建,2-复制答题卡 |
| 1029 | dialogVisible: false, //测验类型设置弹窗 | 922 | dialogVisible: false, //测验类型设置弹窗 |
| 1030 | addQuestionVisible: false, //添加大题弹窗 | 923 | addQuestionVisible: false, //添加大题弹窗 |
| @@ -1068,64 +961,7 @@ export default { | @@ -1068,64 +961,7 @@ export default { | ||
| 1068 | } | 961 | } |
| 1069 | }, | 962 | }, |
| 1070 | methods: { | 963 | methods: { |
| 1071 | - //上传截图 | ||
| 1072 | - openStem(obj, type, index, indexs) { | ||
| 1073 | - this.stem.type = type; | ||
| 1074 | - this.stem.index = index; | ||
| 1075 | - this.stem.indexs = indexs; | ||
| 1076 | - if (type == 1) { | ||
| 1077 | - this.stem.screenshot = obj.screenshot || ""; | ||
| 1078 | - this.stem.screenshotSrc = obj.screenshotSrc || ""; | ||
| 1079 | - this.stem.answerScreenshot = ""; | ||
| 1080 | - this.stem.answerScreenshotSrc = ""; | ||
| 1081 | - } else { | ||
| 1082 | - this.stem.screenshot = ""; | ||
| 1083 | - this.stem.screenshotSrc = ""; | ||
| 1084 | - this.stem.answerScreenshot = obj.answerScreenshot || ""; | ||
| 1085 | - this.stem.answerScreenshotSrc = obj.answerScreenshotSrc || ""; | ||
| 1086 | - } | ||
| 1087 | - this.dialogStem = true; | ||
| 1088 | - }, | ||
| 1089 | - //难度,知识点 | ||
| 1090 | - openTag(obj, type, index, indexs) { | ||
| 1091 | - this.stem = { ...this.stem, obj }; | ||
| 1092 | - this.stem.type = type; | ||
| 1093 | - this.stem.index = index; | ||
| 1094 | - this.stem.indexs = indexs; | ||
| 1095 | - this.stem.knowledge = (obj.knowledge && obj.knowledge.split(",")) || []; | ||
| 1096 | - this.stem.difficultyFactor = obj.difficultyFactor || ""; | ||
| 1097 | - this.dialogTag = true; | ||
| 1098 | - }, | ||
| 1099 | - //图片上传成功 | ||
| 1100 | - upSuccess(res, file) { | ||
| 1101 | - if (res && res.status == 0) { | ||
| 1102 | - let keys = this.stem.type == 1 ? "screenshot" : "answerScreenshot"; | ||
| 1103 | - this.stem[keys + "Src"] = res.data.url; | ||
| 1104 | - this.stem[keys] = res.data.resId; | ||
| 1105 | - this.form.questionList[this.stem.index].subQuestions[this.stem.indexs][ | ||
| 1106 | - keys | ||
| 1107 | - ] = this.stem[keys]; | ||
| 1108 | - this.form.questionList[this.stem.index].subQuestions[this.stem.indexs][ | ||
| 1109 | - keys + "Src" | ||
| 1110 | - ] = this.stem[keys + "Src"]; | ||
| 1111 | - this.$message.success("上传成功"); | ||
| 1112 | - } else { | ||
| 1113 | - this.$message.error(res.info); | ||
| 1114 | - } | ||
| 1115 | - }, | ||
| 1116 | - //保存难度、知识点 | ||
| 1117 | - setKnowledge() { | ||
| 1118 | - this.form.questionList[this.stem.index].subQuestions[ | ||
| 1119 | - this.stem.indexs | ||
| 1120 | - ].knowledge = this.stem.knowledge.join(","); | ||
| 1121 | - this.form.questionList[this.stem.index].subQuestions[ | ||
| 1122 | - this.stem.indexs | ||
| 1123 | - ].difficultyFactor = this.stem.difficultyFactor; | ||
| 1124 | - this.dialogTag = false; | ||
| 1125 | - }, | ||
| 1126 | - upError(res) { | ||
| 1127 | - this.$message.error("上传失败"); | ||
| 1128 | - }, | 964 | + |
| 1129 | linkBack() { | 965 | linkBack() { |
| 1130 | this.$confirm( | 966 | this.$confirm( |
| 1131 | (this.type == 2 ? "修改复制的" : "组建的") + | 967 | (this.type == 2 ? "修改复制的" : "组建的") + |
| @@ -2195,15 +2031,4 @@ export default { | @@ -2195,15 +2031,4 @@ export default { | ||
| 2195 | } | 2031 | } |
| 2196 | } | 2032 | } |
| 2197 | } | 2033 | } |
| 2198 | -.upload-box { | ||
| 2199 | - .upload-demo { | ||
| 2200 | - text-align: center; | ||
| 2201 | - } | ||
| 2202 | - .stem-pic { | ||
| 2203 | - display: block; | ||
| 2204 | - margin: 0 auto 20px; | ||
| 2205 | - height: 200px; | ||
| 2206 | - object-fit: cover; | ||
| 2207 | - } | ||
| 2208 | -} | ||
| 2209 | </style> | 2034 | </style> |
| 2210 | \ No newline at end of file | 2035 | \ No newline at end of file |
src/views/basic/examinationPaper/add.vue renamed to src/views/examinationPaper/addAsk.vue
| @@ -6,94 +6,44 @@ | @@ -6,94 +6,44 @@ | ||
| 6 | </template> | 6 | </template> |
| 7 | </back-box> | 7 | </back-box> |
| 8 | <div class="content"> | 8 | <div class="content"> |
| 9 | - <el-steps | ||
| 10 | - :active="step" | ||
| 11 | - finish-status="success" | ||
| 12 | - simple | ||
| 13 | - style="margin: 20px 0" | ||
| 14 | - > | 9 | + <el-steps :active="step" finish-status="success" simple style="margin: 20px 0"> |
| 15 | <el-step title="基础信息" icon="el-icon-edit"></el-step> | 10 | <el-step title="基础信息" icon="el-icon-edit"></el-step> |
| 16 | <el-step title="题目编辑" icon="el-icon-tickets"></el-step> | 11 | <el-step title="题目编辑" icon="el-icon-tickets"></el-step> |
| 17 | <el-step title="设置答案" icon="el-icon-edit-outline"></el-step> | 12 | <el-step title="设置答案" icon="el-icon-edit-outline"></el-step> |
| 18 | </el-steps> | 13 | </el-steps> |
| 19 | <div v-show="step == 0"> | 14 | <div v-show="step == 0"> |
| 20 | - <el-form | ||
| 21 | - ref="forms" | ||
| 22 | - :model="form" | ||
| 23 | - :rules="formRules" | ||
| 24 | - label-width="140px" | ||
| 25 | - > | 15 | + <el-form ref="forms" :model="form" :rules="formRules" label-width="140px"> |
| 26 | <el-form-item label="答题卡名称:" prop="title"> | 16 | <el-form-item label="答题卡名称:" prop="title"> |
| 27 | - <el-input | ||
| 28 | - class="sel2" | ||
| 29 | - type="text" | ||
| 30 | - placeholder="请输入答题卡名称" | ||
| 31 | - v-model.trim="form.title" | ||
| 32 | - maxlength="30" | ||
| 33 | - size="45" | ||
| 34 | - show-word-limit | ||
| 35 | - > | 17 | + <el-input class="sel2" type="text" placeholder="请输入答题卡名称" v-model.trim="form.title" maxlength="30" size="45" |
| 18 | + show-word-limit> | ||
| 36 | </el-input> | 19 | </el-input> |
| 37 | </el-form-item> | 20 | </el-form-item> |
| 38 | <el-form-item label="测验类型:"> | 21 | <el-form-item label="测验类型:"> |
| 39 | <el-select v-model="form.tagId" placeholder="选择测验类型"> | 22 | <el-select v-model="form.tagId" placeholder="选择测验类型"> |
| 40 | <el-option label="--" value=""> </el-option> | 23 | <el-option label="--" value=""> </el-option> |
| 41 | - <el-option | ||
| 42 | - v-for="item in answerTypeList" | ||
| 43 | - :key="item.id" | ||
| 44 | - :label="item.typeName" | ||
| 45 | - :value="item.id" | ||
| 46 | - >{{ item.typeName }}</el-option | ||
| 47 | - > | 24 | + <el-option v-for="item in answerTypeList" :key="item.id" :label="item.typeName" :value="item.id">{{ |
| 25 | + item.typeName }}</el-option> | ||
| 48 | </el-select> | 26 | </el-select> |
| 49 | - <el-button | ||
| 50 | - class="ml-20" | ||
| 51 | - type="primary" | ||
| 52 | - round | ||
| 53 | - circle | ||
| 54 | - icon="el-icon-edit" | ||
| 55 | - @click="openTagDia" | ||
| 56 | - ></el-button> | 27 | + <el-button class="ml-20" type="primary" round circle icon="el-icon-edit" @click="openTagDia"></el-button> |
| 57 | </el-form-item> | 28 | </el-form-item> |
| 58 | - <el-form-item label="年级:" prop="gradeName"> | ||
| 59 | - <el-select | ||
| 60 | - class="sel" | ||
| 61 | - v-model="form.gradeName" | ||
| 62 | - placeholder="" | ||
| 63 | - @change="changeGrade" | ||
| 64 | - > | ||
| 65 | - <el-option | ||
| 66 | - v-for="item in gradeList" | ||
| 67 | - :key="item" | ||
| 68 | - :label="item" | ||
| 69 | - :value="item" | ||
| 70 | - > | 29 | + <el-form-item v-if="role != 'ROLE_PERSONAL'" label="年级:" prop="gradeName"> |
| 30 | + <el-select class="sel" v-model="form.gradeName" placeholder="" @change="changeGrade"> | ||
| 31 | + <el-option v-for="item in gradeList" :key="item" :label="item" :value="item"> | ||
| 71 | </el-option> | 32 | </el-option> |
| 72 | </el-select> | 33 | </el-select> |
| 73 | </el-form-item> | 34 | </el-form-item> |
| 74 | <el-form-item label="科目:" prop="subjectName"> | 35 | <el-form-item label="科目:" prop="subjectName"> |
| 75 | <el-select class="sel" v-model="form.subjectName" placeholder=""> | 36 | <el-select class="sel" v-model="form.subjectName" placeholder=""> |
| 76 | - <el-option | ||
| 77 | - v-for="item in subjectList" | ||
| 78 | - :key="item.value" | ||
| 79 | - :label="item.label" | ||
| 80 | - :value="item.value" | ||
| 81 | - >{{ item.label }} | 37 | + <el-option v-for="item in subjectList" :key="item.value" :label="item.label" :value="item.value">{{ |
| 38 | + item.label }} | ||
| 82 | </el-option> | 39 | </el-option> |
| 83 | </el-select> | 40 | </el-select> |
| 84 | </el-form-item> | 41 | </el-form-item> |
| 85 | <el-form-item label="考试时长:"> | 42 | <el-form-item label="考试时长:"> |
| 86 | - <el-input-number | ||
| 87 | - size="medium" | ||
| 88 | - :min="1" | ||
| 89 | - :max="140" | ||
| 90 | - :step-strictly="true" | ||
| 91 | - :step="1" | ||
| 92 | - v-model="form.examsDuration" | ||
| 93 | - label="考试时长" | ||
| 94 | - ></el-input-number> | 43 | + <el-input-number size="medium" :min="1" :max="140" :step-strictly="true" :step="1" |
| 44 | + v-model="form.examsDuration" label="考试时长"></el-input-number> | ||
| 95 | </el-form-item> | 45 | </el-form-item> |
| 96 | - <el-form-item label="分享范围:" prop="sharingType"> | 46 | + <el-form-item v-if="role != 'ROLE_PERSONAL'" label="分享范围:" prop="sharingType"> |
| 97 | <el-radio-group v-model="form.sharingType"> | 47 | <el-radio-group v-model="form.sharingType"> |
| 98 | <el-radio :label="0">任课班级分享</el-radio> | 48 | <el-radio :label="0">任课班级分享</el-radio> |
| 99 | <el-radio :label="1">全年级分享</el-radio> | 49 | <el-radio :label="1">全年级分享</el-radio> |
| @@ -101,52 +51,24 @@ | @@ -101,52 +51,24 @@ | ||
| 101 | </el-form-item> | 51 | </el-form-item> |
| 102 | </el-form> | 52 | </el-form> |
| 103 | <div class="btn-box"> | 53 | <div class="btn-box"> |
| 104 | - <el-button type="danger" plain round @click="linkBack" | ||
| 105 | - >取消</el-button | ||
| 106 | - > | 54 | + <el-button type="danger" plain round @click="linkBack">取消</el-button> |
| 107 | <el-button type="primary" round @click="setStep1">下一步</el-button> | 55 | <el-button type="primary" round @click="setStep1">下一步</el-button> |
| 108 | </div> | 56 | </div> |
| 109 | - <el-dialog :close-on-click-modal="false" | ||
| 110 | - title="设置测验类型" | ||
| 111 | - :visible.sync="dialogVisible" | ||
| 112 | - width="500px" | ||
| 113 | - > | 57 | + <el-dialog :close-on-click-modal="false" title="设置测验类型" :visible.sync="dialogVisible" width="500px"> |
| 114 | <div class="dia-content"> | 58 | <div class="dia-content"> |
| 115 | <p class="add-type" v-for="item in tagList" :key="item.id"> | 59 | <p class="add-type" v-for="item in tagList" :key="item.id"> |
| 116 | <el-row :gutter="10"> | 60 | <el-row :gutter="10"> |
| 117 | - <el-col :span="18" | ||
| 118 | - ><el-input | ||
| 119 | - v-model="item.typeName" | ||
| 120 | - :maxlength="10" | ||
| 121 | - placeholder="请输入答题卡类型名称" | ||
| 122 | - ></el-input | ||
| 123 | - ></el-col> | 61 | + <el-col :span="18"><el-input v-model="item.typeName" :maxlength="10" |
| 62 | + placeholder="请输入答题卡类型名称"></el-input></el-col> | ||
| 124 | <el-col :span="6"> | 63 | <el-col :span="6"> |
| 125 | <el-tooltip effect="dark" content="保存" placement="top"> | 64 | <el-tooltip effect="dark" content="保存" placement="top"> |
| 126 | - <el-button | ||
| 127 | - class="js-set" | ||
| 128 | - type="primary" | ||
| 129 | - size="small" | ||
| 130 | - round | ||
| 131 | - circle | ||
| 132 | - icon="el-icon-check" | ||
| 133 | - @click="editTypeName(item)" | ||
| 134 | - ></el-button> | 65 | + <el-button class="js-set" type="primary" size="small" round circle icon="el-icon-check" |
| 66 | + @click="editTypeName(item)"></el-button> | ||
| 135 | </el-tooltip> | 67 | </el-tooltip> |
| 136 | <el-tooltip effect="dark" content="删除" placement="right"> | 68 | <el-tooltip effect="dark" content="删除" placement="right"> |
| 137 | - <el-popconfirm | ||
| 138 | - title="确定删除这道大题吗?" | ||
| 139 | - @confirm="removeTypeName(item)" | ||
| 140 | - > | ||
| 141 | - <el-button | ||
| 142 | - class="js-set" | ||
| 143 | - type="danger" | ||
| 144 | - size="small" | ||
| 145 | - round | ||
| 146 | - circle | ||
| 147 | - icon="el-icon-delete" | ||
| 148 | - slot="reference" | ||
| 149 | - ></el-button> | 69 | + <el-popconfirm title="确定删除这道大题吗?" @confirm="removeTypeName(item)"> |
| 70 | + <el-button class="js-set" type="danger" size="small" round circle icon="el-icon-delete" | ||
| 71 | + slot="reference"></el-button> | ||
| 150 | </el-popconfirm> | 72 | </el-popconfirm> |
| 151 | </el-tooltip> | 73 | </el-tooltip> |
| 152 | </el-col> | 74 | </el-col> |
| @@ -155,25 +77,13 @@ | @@ -155,25 +77,13 @@ | ||
| 155 | <p class="add-type"> | 77 | <p class="add-type"> |
| 156 | <el-row :gutter="10"> | 78 | <el-row :gutter="10"> |
| 157 | <el-col :span="18"> | 79 | <el-col :span="18"> |
| 158 | - <el-input | ||
| 159 | - type="text" | ||
| 160 | - placeholder="请输入答题卡类型名称" | ||
| 161 | - v-model.trim="answerTypeName" | ||
| 162 | - :maxlength="10" | ||
| 163 | - > | 80 | + <el-input type="text" placeholder="请输入答题卡类型名称" v-model.trim="answerTypeName" :maxlength="10"> |
| 164 | </el-input> | 81 | </el-input> |
| 165 | </el-col> | 82 | </el-col> |
| 166 | <el-col :span="6"> | 83 | <el-col :span="6"> |
| 167 | <el-tooltip effect="dark" content="添加" placement="right"> | 84 | <el-tooltip effect="dark" content="添加" placement="right"> |
| 168 | - <el-button | ||
| 169 | - class="js-set" | ||
| 170 | - type="primary" | ||
| 171 | - size="small" | ||
| 172 | - round | ||
| 173 | - circle | ||
| 174 | - icon="el-icon-plus" | ||
| 175 | - @click="addPaperType" | ||
| 176 | - ></el-button> | 85 | + <el-button class="js-set" type="primary" size="small" round circle icon="el-icon-plus" |
| 86 | + @click="addPaperType"></el-button> | ||
| 177 | </el-tooltip> | 87 | </el-tooltip> |
| 178 | </el-col> | 88 | </el-col> |
| 179 | </el-row> | 89 | </el-row> |
| @@ -185,52 +95,20 @@ | @@ -185,52 +95,20 @@ | ||
| 185 | </el-dialog> | 95 | </el-dialog> |
| 186 | </div> | 96 | </div> |
| 187 | <div v-show="step == 1"> | 97 | <div v-show="step == 1"> |
| 188 | - <div | ||
| 189 | - class="question-box" | ||
| 190 | - v-for="(question, index) in form.questionList" | ||
| 191 | - :key="index" | ||
| 192 | - > | 98 | + <div class="question-box" v-for="(question, index) in form.questionList" :key="index"> |
| 193 | <p class="question-title"> | 99 | <p class="question-title"> |
| 194 | - <el-tooltip | ||
| 195 | - effect="dark" | ||
| 196 | - :content="question.show ? '收起' : '展开'" | ||
| 197 | - placement="left" | ||
| 198 | - > | ||
| 199 | - <i | ||
| 200 | - class="el-icon-caret-right" | ||
| 201 | - :class="question.show ? 'active' : ''" | ||
| 202 | - @click="question.show = !question.show" | ||
| 203 | - ></i> | 100 | + <el-tooltip effect="dark" :content="question.show ? '收起' : '展开'" placement="left"> |
| 101 | + <i class="el-icon-caret-right" :class="question.show ? 'active' : ''" | ||
| 102 | + @click="question.show = !question.show"></i> | ||
| 204 | </el-tooltip> | 103 | </el-tooltip> |
| 205 | <span>{{ setBigNum(index) }}、</span> | 104 | <span>{{ setBigNum(index) }}、</span> |
| 206 | - <el-input | ||
| 207 | - class="ipt" | ||
| 208 | - v-model.trim="question.questionTitle" | ||
| 209 | - maxlength="30" | ||
| 210 | - placeholder="填写大题名称" | ||
| 211 | - ></el-input> | ||
| 212 | - <el-popconfirm | ||
| 213 | - title="确定删除这道大题吗?" | ||
| 214 | - @confirm="form.questionList.splice(index, 1)" | ||
| 215 | - > | ||
| 216 | - <el-button | ||
| 217 | - slot="reference" | ||
| 218 | - class="delete" | ||
| 219 | - type="danger" | ||
| 220 | - size="mini" | ||
| 221 | - circle | ||
| 222 | - icon="el-icon-delete" | ||
| 223 | - ></el-button> | 105 | + <el-input class="ipt" v-model.trim="question.questionTitle" maxlength="30" placeholder="填写大题名称"></el-input> |
| 106 | + <el-popconfirm title="确定删除这道大题吗?" @confirm="form.questionList.splice(index, 1)"> | ||
| 107 | + <el-button slot="reference" class="delete" type="danger" size="mini" circle | ||
| 108 | + icon="el-icon-delete"></el-button> | ||
| 224 | </el-popconfirm> | 109 | </el-popconfirm> |
| 225 | - <template v-if="equalScore(question)"> | ||
| 226 | - <span class="m20" | ||
| 227 | - >每题{{ | ||
| 228 | - question.subQuestions && question.subQuestions[0].score | ||
| 229 | - }}分</span | ||
| 230 | - > | ||
| 231 | - </template> | ||
| 232 | <span class="m20">共:{{ question.subQuestions.length }}题</span> | 110 | <span class="m20">共:{{ question.subQuestions.length }}题</span> |
| 233 | - <span class="m20">共:{{ setScore(question) }}分</span> | 111 | + <span>共:{{ setScore(question) }}分</span> |
| 234 | </p> | 112 | </p> |
| 235 | <transition name="el-zoom-in-top"> | 113 | <transition name="el-zoom-in-top"> |
| 236 | <ul v-show="question.show" class="questions-ul"> | 114 | <ul v-show="question.show" class="questions-ul"> |
| @@ -242,18 +120,11 @@ | @@ -242,18 +120,11 @@ | ||
| 242 | <div class="qs-options">选项设置</div> | 120 | <div class="qs-options">选项设置</div> |
| 243 | <div class="qs-set">操作</div> | 121 | <div class="qs-set">操作</div> |
| 244 | </li> | 122 | </li> |
| 245 | - <li | ||
| 246 | - class="sub-questions" | ||
| 247 | - v-for="(subQuestions, indexs) in question.subQuestions" | ||
| 248 | - :key="indexs" | ||
| 249 | - > | 123 | + <li class="sub-questions" v-for="(subQuestions, indexs) in question.subQuestions" :key="indexs"> |
| 250 | <div class="qs-num">{{ setNum(index, indexs) }}</div> | 124 | <div class="qs-num">{{ setNum(index, indexs) }}</div> |
| 251 | <div class="qs-type"> | 125 | <div class="qs-type"> |
| 252 | - <el-select | ||
| 253 | - v-model="subQuestions.questionType" | ||
| 254 | - placeholder="选择题目类型" | ||
| 255 | - @change="changeSubQuestions($event, subQuestions)" | ||
| 256 | - > | 126 | + <el-select v-model="subQuestions.questionType" placeholder="选择题目类型" |
| 127 | + @change="changeSubQuestions($event, subQuestions)"> | ||
| 257 | <el-option label="单选题" :value="2"></el-option> | 128 | <el-option label="单选题" :value="2"></el-option> |
| 258 | <el-option label="多选题" :value="3"></el-option> | 129 | <el-option label="多选题" :value="3"></el-option> |
| 259 | <el-option label="判断题" :value="4"></el-option> | 130 | <el-option label="判断题" :value="4"></el-option> |
| @@ -261,121 +132,65 @@ | @@ -261,121 +132,65 @@ | ||
| 261 | </el-select> | 132 | </el-select> |
| 262 | </div> | 133 | </div> |
| 263 | <div class="qs-score"> | 134 | <div class="qs-score"> |
| 264 | - <el-input-number | ||
| 265 | - class="number-ipt" | ||
| 266 | - size="medium" | ||
| 267 | - :min="1" | ||
| 268 | - :max="200" | ||
| 269 | - :precision="2" | ||
| 270 | - :step="1" | ||
| 271 | - v-model="subQuestions.score" | ||
| 272 | - label="单题分值" | ||
| 273 | - ></el-input-number> | 135 | + <el-input-number class="number-ipt" size="medium" :min="1" :max="200" :precision="2" :step="1" |
| 136 | + v-model="subQuestions.score" label="单题分值"></el-input-number> | ||
| 274 | </div> | 137 | </div> |
| 275 | <div class="qs-partScore"> | 138 | <div class="qs-partScore"> |
| 276 | <p v-if="subQuestions.questionType != 3">--</p> | 139 | <p v-if="subQuestions.questionType != 3">--</p> |
| 277 | - <el-input-number | ||
| 278 | - class="number-ipt" | ||
| 279 | - v-else | ||
| 280 | - size="medium" | ||
| 281 | - :min="0" | ||
| 282 | - :precision="2" | ||
| 283 | - :max="subQuestions.score" | ||
| 284 | - :step="0.5" | ||
| 285 | - v-model="subQuestions.partScore" | ||
| 286 | - label="漏选得分" | ||
| 287 | - ></el-input-number> | 140 | + <el-input-number class="number-ipt" v-else size="medium" :min="0" :precision="2" |
| 141 | + :max="subQuestions.score" :step="0.5" v-model="subQuestions.partScore" label="漏选得分"></el-input-number> | ||
| 288 | </div> | 142 | </div> |
| 289 | <div class="qs-options"> | 143 | <div class="qs-options"> |
| 290 | <p v-if="subQuestions.questionType == 5">--</p> | 144 | <p v-if="subQuestions.questionType == 5">--</p> |
| 291 | <p v-if="subQuestions.questionType == 4" class="answer-box"> | 145 | <p v-if="subQuestions.questionType == 4" class="answer-box"> |
| 292 | - <span | ||
| 293 | - class="answer-s" | ||
| 294 | - :class="subQuestions.correctAnswer == 1 ? 'active' : ''" | ||
| 295 | - @click="subQuestions.correctAnswer = 1" | ||
| 296 | - >✓</span | ||
| 297 | - > | ||
| 298 | - <span | ||
| 299 | - class="answer-s" | ||
| 300 | - :class="subQuestions.correctAnswer == 2 ? 'active' : ''" | ||
| 301 | - @click="subQuestions.correctAnswer = 2" | ||
| 302 | - >✗</span | ||
| 303 | - > | 146 | + <span class="answer-s" :class="subQuestions.correctAnswer == 1 ? 'active' : ''" |
| 147 | + @click="subQuestions.correctAnswer = 1">✓</span> | ||
| 148 | + <span class="answer-s" :class="subQuestions.correctAnswer == 2 ? 'active' : ''" | ||
| 149 | + @click="subQuestions.correctAnswer = 2">✗</span> | ||
| 304 | </p> | 150 | </p> |
| 305 | <p v-if="subQuestions.questionType == 3" class="answer-box"> | 151 | <p v-if="subQuestions.questionType == 3" class="answer-box"> |
| 306 | - <span | ||
| 307 | - class="answer-s" | ||
| 308 | - v-for="option in subQuestions.answerOptions.split(',')" | ||
| 309 | - :class=" | ||
| 310 | - subQuestions.correctAnswer?.includes(option) | ||
| 311 | - ? 'active' | ||
| 312 | - : '' | ||
| 313 | - " | ||
| 314 | - :key="option" | ||
| 315 | - @click="changAnswer(subQuestions, option)" | ||
| 316 | - >{{ option }}</span | ||
| 317 | - > | 152 | + <span class="answer-s" v-for="option in subQuestions.answerOptions.split(',')" :class="subQuestions.correctAnswer?.includes(option) |
| 153 | + ? 'active' | ||
| 154 | + : '' | ||
| 155 | + " :key="option" @click="changAnswer(subQuestions, option)">{{ option }}</span> | ||
| 318 | </p> | 156 | </p> |
| 319 | <p v-if="subQuestions.questionType == 2" class="answer-box"> | 157 | <p v-if="subQuestions.questionType == 2" class="answer-box"> |
| 320 | - <span | ||
| 321 | - class="answer-s" | ||
| 322 | - v-for="option in subQuestions.answerOptions.split(',')" | ||
| 323 | - :class=" | ||
| 324 | - subQuestions.correctAnswer == option ? 'active' : '' | ||
| 325 | - " | ||
| 326 | - :key="option" | ||
| 327 | - @click="subQuestions.correctAnswer = option" | ||
| 328 | - >{{ option }}</span | ||
| 329 | - > | 158 | + <span class="answer-s" v-for="option in subQuestions.answerOptions.split(',')" :class="subQuestions.correctAnswer == option ? 'active' : '' |
| 159 | + " :key="option" @click="subQuestions.correctAnswer = option">{{ option }}</span> | ||
| 330 | </p> | 160 | </p> |
| 331 | - <p | ||
| 332 | - v-if=" | ||
| 333 | - subQuestions.questionType == 3 || | ||
| 334 | - subQuestions.questionType == 2 | ||
| 335 | - " | ||
| 336 | - class="answer-box" | ||
| 337 | - > | ||
| 338 | - <el-button | ||
| 339 | - size="mini" | ||
| 340 | - type="primary" | ||
| 341 | - icon="el-icon-plus" | ||
| 342 | - circle | ||
| 343 | - @click="addOptions(subQuestions)" | ||
| 344 | - ></el-button> | ||
| 345 | - <el-button | ||
| 346 | - size="mini" | ||
| 347 | - type="primary" | ||
| 348 | - icon="el-icon-minus" | ||
| 349 | - round | ||
| 350 | - circle | ||
| 351 | - @click="removeOptions(subQuestions)" | ||
| 352 | - ></el-button> | 161 | + <p v-if="subQuestions.questionType == 3 || |
| 162 | + subQuestions.questionType == 2 | ||
| 163 | + " class="answer-box answer-box2"> | ||
| 164 | + <el-button size="mini" type="primary" icon="el-icon-plus" circle | ||
| 165 | + @click="addOptions(subQuestions)"></el-button> | ||
| 166 | + <el-button size="mini" type="primary" icon="el-icon-minus" round circle | ||
| 167 | + @click="removeOptions(subQuestions)"></el-button> | ||
| 353 | </p> | 168 | </p> |
| 354 | </div> | 169 | </div> |
| 355 | <div class="qs-set"> | 170 | <div class="qs-set"> |
| 356 | - <el-popconfirm | ||
| 357 | - title="确定删除这道题吗?" | ||
| 358 | - @confirm="delTabData(indexs, index)" | ||
| 359 | - > | ||
| 360 | - <el-button | ||
| 361 | - slot="reference" | ||
| 362 | - class="delete" | ||
| 363 | - type="danger" | ||
| 364 | - size="mini" | ||
| 365 | - circle | ||
| 366 | - icon="el-icon-delete" | ||
| 367 | - ></el-button> | 171 | + <el-tooltip effect="dark" content="上传提干" placement="top"> |
| 172 | + <el-button type="primary" circle size="mini" icon="el-icon-tickets" | ||
| 173 | + @click="openStem(subQuestions, 1, index, indexs)"></el-button> | ||
| 174 | + </el-tooltip> | ||
| 175 | + <el-tooltip effect="dark" content="题目打标" placement="top"> | ||
| 176 | + <el-button type="primary" circle size="mini" icon="el-icon-price-tag" | ||
| 177 | + @click="openTag(subQuestions, 3, index, indexs)"></el-button> | ||
| 178 | + </el-tooltip> | ||
| 179 | + <el-tooltip effect="dark" content="上传题目解析" placement="top"> | ||
| 180 | + <el-button type="primary" circle size="mini" icon="el-icon-upload" | ||
| 181 | + @click="openStem(subQuestions, 2, index, indexs)"></el-button> | ||
| 182 | + </el-tooltip> | ||
| 183 | + <el-popconfirm title="确定删除这道题吗?" @confirm="delTabData(indexs, index)"> | ||
| 184 | + <el-button slot="reference" class="delete" type="danger" size="mini" circle | ||
| 185 | + icon="el-icon-delete"></el-button> | ||
| 368 | </el-popconfirm> | 186 | </el-popconfirm> |
| 369 | </div> | 187 | </div> |
| 370 | </li> | 188 | </li> |
| 371 | <li class="sub-questions"> | 189 | <li class="sub-questions"> |
| 372 | <div class="qs-num">添加</div> | 190 | <div class="qs-num">添加</div> |
| 373 | <div class="qs-type"> | 191 | <div class="qs-type"> |
| 374 | - <el-select | ||
| 375 | - v-model="addSubQuestionsType" | ||
| 376 | - placeholder="选择题目类型" | ||
| 377 | - @change="changeAddSubQuestions($event, question)" | ||
| 378 | - > | 192 | + <el-select v-model="addSubQuestionsType" placeholder="选择题目类型" |
| 193 | + @change="changeAddSubQuestions($event, question)"> | ||
| 379 | <el-option label="单选题" :value="2"></el-option> | 194 | <el-option label="单选题" :value="2"></el-option> |
| 380 | <el-option label="多选题" :value="3"></el-option> | 195 | <el-option label="多选题" :value="3"></el-option> |
| 381 | <el-option label="判断题" :value="4"></el-option> | 196 | <el-option label="判断题" :value="4"></el-option> |
| @@ -392,216 +207,102 @@ | @@ -392,216 +207,102 @@ | ||
| 392 | </div> | 207 | </div> |
| 393 | <div class="add-box"> | 208 | <div class="add-box"> |
| 394 | <p class="add-question" @click="openQuestion"> | 209 | <p class="add-question" @click="openQuestion"> |
| 395 | - <el-button | ||
| 396 | - size="mini" | ||
| 397 | - type="primary" | ||
| 398 | - icon="el-icon-plus" | ||
| 399 | - circle | ||
| 400 | - ></el-button> | 210 | + <el-button size="mini" type="primary" icon="el-icon-plus" circle></el-button> |
| 401 | <span class="s1">添加大题</span> | 211 | <span class="s1">添加大题</span> |
| 402 | </p> | 212 | </p> |
| 403 | </div> | 213 | </div> |
| 404 | <div class="btn-box"> | 214 | <div class="btn-box"> |
| 405 | - <el-button type="danger" plain round @click="linkBack" | ||
| 406 | - >取消</el-button | ||
| 407 | - > | 215 | + <el-button type="danger" plain round @click="linkBack">取消</el-button> |
| 408 | <el-button round @click="step = 0">上一步</el-button> | 216 | <el-button round @click="step = 0">上一步</el-button> |
| 409 | - <el-button | ||
| 410 | - :type="form.questionList.length == 0 ? 'info' : 'primary'" | ||
| 411 | - round | ||
| 412 | - @click="setStep2" | ||
| 413 | - >下一步</el-button | ||
| 414 | - > | 217 | + <el-button :type="form.questionList.length == 0 ? 'info' : 'primary'" round @click="setStep2">下一步</el-button> |
| 415 | </div> | 218 | </div> |
| 416 | - <el-dialog :close-on-click-modal="false" | ||
| 417 | - title="添加大题" | ||
| 418 | - :visible.sync="addQuestionVisible" | ||
| 419 | - width="600px" | ||
| 420 | - > | 219 | + <el-dialog :close-on-click-modal="false" title="添加大题" :visible.sync="addQuestionVisible" width="600px"> |
| 421 | <div class="dia-content"> | 220 | <div class="dia-content"> |
| 422 | - <el-form | ||
| 423 | - ref="form" | ||
| 424 | - :model="questionForm" | ||
| 425 | - :rules="questionFormRules" | ||
| 426 | - label-width="100px" | ||
| 427 | - > | 221 | + <el-form ref="form" :model="questionForm" :rules="questionFormRules" label-width="100px"> |
| 428 | <el-form-item label="标题:"> | 222 | <el-form-item label="标题:"> |
| 429 | <el-col :span="20"> | 223 | <el-col :span="20"> |
| 430 | - <el-input | ||
| 431 | - v-model.trim="questionForm.questionTitle" | ||
| 432 | - maxlength="30" | ||
| 433 | - placeholder="输入大题名称" | ||
| 434 | - ></el-input> | 224 | + <el-input v-model.trim="questionForm.questionTitle" maxlength="30" placeholder="输入大题名称"></el-input> |
| 435 | </el-col> | 225 | </el-col> |
| 436 | </el-form-item> | 226 | </el-form-item> |
| 437 | <el-form-item label="选择题型:"> | 227 | <el-form-item label="选择题型:"> |
| 438 | - <el-select | ||
| 439 | - v-model="questionForm.questionType" | ||
| 440 | - placeholder="" | ||
| 441 | - @change="setQuestionForm" | ||
| 442 | - > | ||
| 443 | - <el-option | ||
| 444 | - v-for="item in questionOptions" | ||
| 445 | - :key="item.value" | ||
| 446 | - :label="item.label" | ||
| 447 | - :value="item.value" | ||
| 448 | - > | 228 | + <el-select v-model="questionForm.questionType" placeholder="" @change="setQuestionForm"> |
| 229 | + <el-option v-for="item in questionOptions" :key="item.value" :label="item.label" :value="item.value"> | ||
| 449 | </el-option> | 230 | </el-option> |
| 450 | <el-option label="混合题" :value="6"> </el-option> | 231 | <el-option label="混合题" :value="6"> </el-option> |
| 451 | </el-select> | 232 | </el-select> |
| 452 | </el-form-item> | 233 | </el-form-item> |
| 453 | <el-form-item label="题数:"> | 234 | <el-form-item label="题数:"> |
| 454 | - <el-input-number | ||
| 455 | - v-model="questionForm.number" | ||
| 456 | - @change="changeQesNum" | ||
| 457 | - :min="1" | ||
| 458 | - :max="100" | ||
| 459 | - :step-strictly="true" | ||
| 460 | - :step="1" | ||
| 461 | - label="label" | ||
| 462 | - ></el-input-number> | 235 | + <el-input-number v-model="questionForm.number" @change="changeQesNum" :min="1" :max="100" |
| 236 | + :step-strictly="true" :step="1" label="label"></el-input-number> | ||
| 463 | </el-form-item> | 237 | </el-form-item> |
| 464 | - <el-form-item | ||
| 465 | - label="选项个数:" | ||
| 466 | - v-show=" | ||
| 467 | - questionForm.questionType != 4 && | ||
| 468 | - questionForm.questionType != 5 | ||
| 469 | - " | ||
| 470 | - > | ||
| 471 | - <el-input-number | ||
| 472 | - v-model="questionForm.selectNum" | ||
| 473 | - :min="3" | ||
| 474 | - :max="7" | ||
| 475 | - :step-strictly="true" | ||
| 476 | - :step="1" | ||
| 477 | - label="label" | ||
| 478 | - ></el-input-number> | 238 | + <el-form-item label="选项个数:" v-show="questionForm.questionType != 4 && |
| 239 | + questionForm.questionType != 5 | ||
| 240 | + "> | ||
| 241 | + <el-input-number v-model="questionForm.selectNum" :min="3" :max="10" :step-strictly="true" :step="1" | ||
| 242 | + label="label"></el-input-number> | ||
| 479 | </el-form-item> | 243 | </el-form-item> |
| 480 | <el-form-item label="单题分数:"> | 244 | <el-form-item label="单题分数:"> |
| 481 | - <el-input-number | ||
| 482 | - v-model="questionForm.score" | ||
| 483 | - :min="1" | ||
| 484 | - :max="200" | ||
| 485 | - :precision="2" | ||
| 486 | - :step="1" | ||
| 487 | - label="label" | ||
| 488 | - ></el-input-number> | 245 | + <el-input-number v-model="questionForm.score" :min="1" :max="200" :precision="2" :step="1" |
| 246 | + label="label"></el-input-number> | ||
| 489 | </el-form-item> | 247 | </el-form-item> |
| 490 | - <el-form-item | ||
| 491 | - label="漏选得分:" | ||
| 492 | - v-if="questionForm.questionType == 3" | ||
| 493 | - > | ||
| 494 | - <el-input-number | ||
| 495 | - v-model="questionForm.partScore" | ||
| 496 | - :min="0" | ||
| 497 | - :max="questionForm.score" | ||
| 498 | - :precision="2" | ||
| 499 | - :step="0.5" | ||
| 500 | - label="label" | ||
| 501 | - ></el-input-number> | 248 | + <el-form-item label="漏选得分:" v-if="questionForm.questionType == 3"> |
| 249 | + <el-input-number v-model="questionForm.partScore" :min="0" :max="questionForm.score" :precision="2" | ||
| 250 | + :step="0.5" label="label"></el-input-number> | ||
| 502 | </el-form-item> | 251 | </el-form-item> |
| 503 | - <el-form-item | ||
| 504 | - label="设置答案:" | ||
| 505 | - v-show=" | ||
| 506 | - questionForm.questionType != 5 && | ||
| 507 | - questionForm.questionType != 6 | ||
| 508 | - " | ||
| 509 | - > | 252 | + <el-form-item label="设置答案:" v-show="questionForm.questionType != 5 && |
| 253 | + questionForm.questionType != 6 | ||
| 254 | + "> | ||
| 510 | <div class="qs-options"> | 255 | <div class="qs-options"> |
| 511 | <p class="ipt"> | 256 | <p class="ipt"> |
| 512 | - <el-input | ||
| 513 | - v-if=" | ||
| 514 | - questionForm.questionType == 2 || | ||
| 515 | - questionForm.questionType == 3 || | ||
| 516 | - questionForm.questionType == 6 | ||
| 517 | - " | ||
| 518 | - ref="formAnsIpt2" | ||
| 519 | - v-model="questionForm.answerList" | ||
| 520 | - @keydown.native=" | ||
| 521 | - keydownAnswer($event, questionForm.questionType, 1) | ||
| 522 | - " | ||
| 523 | - @input=" | ||
| 524 | - setAllAnswer($event, questionForm.questionType, 1) | ||
| 525 | - " | ||
| 526 | - ></el-input> | ||
| 527 | - <el-input | ||
| 528 | - v-if="questionForm.questionType == 4" | ||
| 529 | - v-model="questionForm.answerList" | ||
| 530 | - readonly="" | ||
| 531 | - ></el-input> | 257 | + <el-input v-if="questionForm.questionType == 2 || |
| 258 | + questionForm.questionType == 3 || | ||
| 259 | + questionForm.questionType == 6 | ||
| 260 | + " ref="formAnsIpt2" v-model="questionForm.answerList" @keydown.native=" | ||
| 261 | + keydownAnswer($event, questionForm.questionType, 1) | ||
| 262 | + " @input=" | ||
| 263 | + setAllAnswer($event, questionForm.questionType, 1) | ||
| 264 | + "></el-input> | ||
| 265 | + <el-input v-if="questionForm.questionType == 4" v-model="questionForm.answerList" | ||
| 266 | + readonly=""></el-input> | ||
| 532 | </p> | 267 | </p> |
| 533 | <p class="answer-box"> | 268 | <p class="answer-box"> |
| 534 | <template v-if="questionForm.questionType == 4"> | 269 | <template v-if="questionForm.questionType == 4"> |
| 535 | - <span | ||
| 536 | - class="answer-s active" | ||
| 537 | - @click=" | ||
| 538 | - questionForm.answerList.length < questionForm.number | ||
| 539 | - ? (questionForm.answerList += '✓') | ||
| 540 | - : '' | ||
| 541 | - " | ||
| 542 | - >✓</span | ||
| 543 | - > | ||
| 544 | - <span | ||
| 545 | - class="answer-s active" | ||
| 546 | - @click=" | ||
| 547 | - questionForm.answerList.length < questionForm.number | ||
| 548 | - ? (questionForm.answerList += '✗') | ||
| 549 | - : '' | ||
| 550 | - " | ||
| 551 | - >✗</span | ||
| 552 | - > | 270 | + <span class="answer-s active" @click=" |
| 271 | + questionForm.answerList.length < questionForm.number | ||
| 272 | + ? (questionForm.answerList += '✓') | ||
| 273 | + : '' | ||
| 274 | + ">✓</span> | ||
| 275 | + <span class="answer-s active" @click=" | ||
| 276 | + questionForm.answerList.length < questionForm.number | ||
| 277 | + ? (questionForm.answerList += '✗') | ||
| 278 | + : '' | ||
| 279 | + ">✗</span> | ||
| 553 | </template> | 280 | </template> |
| 554 | <template v-if="questionForm.questionType == 3"> | 281 | <template v-if="questionForm.questionType == 3"> |
| 555 | <template v-for="(option, opIdx) in rightOptions"> | 282 | <template v-for="(option, opIdx) in rightOptions"> |
| 556 | - <span | ||
| 557 | - v-if="opIdx < questionForm.selectNum" | ||
| 558 | - class="answer-s active" | ||
| 559 | - :key="option" | ||
| 560 | - @click="setMultiple(questionForm, option, 1)" | ||
| 561 | - >{{ option }}</span | ||
| 562 | - > | 283 | + <span v-if="opIdx < questionForm.selectNum" class="answer-s active" :key="option" |
| 284 | + @click="setMultiple(questionForm, option, 1)">{{ option }}</span> | ||
| 563 | </template> | 285 | </template> |
| 564 | - <span | ||
| 565 | - class="answer-s active" | ||
| 566 | - @click="setMultiple(questionForm, ',', 1)" | ||
| 567 | - >,</span | ||
| 568 | - > | 286 | + <span class="answer-s active" @click="setMultiple(questionForm, ',', 1)">,</span> |
| 569 | </template> | 287 | </template> |
| 570 | - <template | ||
| 571 | - v-if=" | ||
| 572 | - questionForm.questionType == 2 || | ||
| 573 | - questionForm.questionType == 6 | ||
| 574 | - " | ||
| 575 | - > | 288 | + <template v-if="questionForm.questionType == 2 || |
| 289 | + questionForm.questionType == 6 | ||
| 290 | + "> | ||
| 576 | <template v-for="(option, opIdx) in rightOptions"> | 291 | <template v-for="(option, opIdx) in rightOptions"> |
| 577 | - <span | ||
| 578 | - v-if="opIdx < questionForm.selectNum" | ||
| 579 | - class="answer-s active" | ||
| 580 | - :key="option" | ||
| 581 | - @click=" | ||
| 582 | - questionForm.answerList.length < questionForm.number | ||
| 583 | - ? (questionForm.answerList += option) | ||
| 584 | - : '' | ||
| 585 | - " | ||
| 586 | - >{{ option }}</span | ||
| 587 | - > | 292 | + <span v-if="opIdx < questionForm.selectNum" class="answer-s active" :key="option" @click=" |
| 293 | + questionForm.answerList.length < questionForm.number | ||
| 294 | + ? (questionForm.answerList += option) | ||
| 295 | + : '' | ||
| 296 | + ">{{ option }}</span> | ||
| 588 | </template> | 297 | </template> |
| 589 | </template> | 298 | </template> |
| 590 | - <span | ||
| 591 | - class="answer-s delButton" | ||
| 592 | - @click=" | ||
| 593 | - questionForm.answerList = questionForm.answerList.slice( | ||
| 594 | - 0, | ||
| 595 | - -1 | ||
| 596 | - ) | ||
| 597 | - " | ||
| 598 | - >x</span | ||
| 599 | - > | ||
| 600 | - <span | ||
| 601 | - class="answer-s ac" | ||
| 602 | - @click="questionForm.answerList = ''" | ||
| 603 | - >ac</span | ||
| 604 | - > | 299 | + <span class="answer-s delButton" @click=" |
| 300 | + questionForm.answerList = questionForm.answerList.slice( | ||
| 301 | + 0, | ||
| 302 | + -1 | ||
| 303 | + ) | ||
| 304 | + ">x</span> | ||
| 305 | + <span class="answer-s ac" @click="questionForm.answerList = ''">ac</span> | ||
| 605 | </p> | 306 | </p> |
| 606 | </div> | 307 | </div> |
| 607 | </el-form-item> | 308 | </el-form-item> |
| @@ -618,16 +319,12 @@ | @@ -618,16 +319,12 @@ | ||
| 618 | <p class="name">{{ form.title }}</p> | 319 | <p class="name">{{ form.title }}</p> |
| 619 | <p class="totals">卷面总分:{{ allScore }}分</p> | 320 | <p class="totals">卷面总分:{{ allScore }}分</p> |
| 620 | </div> | 321 | </div> |
| 621 | - <div | ||
| 622 | - class="question-box" | ||
| 623 | - v-for="(question, index) in form.questionList" | ||
| 624 | - :key="index" | ||
| 625 | - > | 322 | + <div class="question-box" v-for="(question, index) in form.questionList" :key="index"> |
| 626 | <p class="question-title"> | 323 | <p class="question-title"> |
| 627 | <span>{{ setBigNum(index) }}、</span> | 324 | <span>{{ setBigNum(index) }}、</span> |
| 628 | <span class="title-txt">{{ question.questionTitle }}</span> | 325 | <span class="title-txt">{{ question.questionTitle }}</span> |
| 629 | <span class="m20">共:{{ setNums(question.subQuestions) }}题</span> | 326 | <span class="m20">共:{{ setNums(question.subQuestions) }}题</span> |
| 630 | - <span class="m20">共:{{ setScore(question) }} 分</span> | 327 | + <span>共:{{ setScore(question) }} 分</span> |
| 631 | </p> | 328 | </p> |
| 632 | <ul class="questions-ul"> | 329 | <ul class="questions-ul"> |
| 633 | <li class="sub-questions"> | 330 | <li class="sub-questions"> |
| @@ -637,21 +334,12 @@ | @@ -637,21 +334,12 @@ | ||
| 637 | <div class="qs-partScore">漏选得分</div> | 334 | <div class="qs-partScore">漏选得分</div> |
| 638 | <div class="qs-options qs-options2">选项设置</div> | 335 | <div class="qs-options qs-options2">选项设置</div> |
| 639 | </li> | 336 | </li> |
| 640 | - <li | ||
| 641 | - v-for="(subQuestions, indexs) in question.subQuestions" | ||
| 642 | - :key="indexs" | ||
| 643 | - > | ||
| 644 | - <p | ||
| 645 | - class="set-ans-btn" | ||
| 646 | - v-if=" | ||
| 647 | - subQuestions.qusType && | ||
| 648 | - subQuestions.subNum && | ||
| 649 | - subQuestions.subNum > 4 | ||
| 650 | - " | ||
| 651 | - > | ||
| 652 | - <el-button type="primary" @click="setFormAns(indexs, index)" | ||
| 653 | - >批量设置答案</el-button | ||
| 654 | - > | 337 | + <li v-for="(subQuestions, indexs) in question.subQuestions" :key="indexs"> |
| 338 | + <p class="set-ans-btn" v-if="subQuestions.qusType && | ||
| 339 | + subQuestions.subNum && | ||
| 340 | + subQuestions.subNum > 4 | ||
| 341 | + "> | ||
| 342 | + <el-button type="primary" @click="setFormAns(indexs, index)">批量设置答案</el-button> | ||
| 655 | </p> | 343 | </p> |
| 656 | <div v-else class="sub-questions"> | 344 | <div v-else class="sub-questions"> |
| 657 | <div class="qs-num"> | 345 | <div class="qs-num"> |
| @@ -661,158 +349,77 @@ | @@ -661,158 +349,77 @@ | ||
| 661 | {{ setSubPro(subQuestions.questionType) }} | 349 | {{ setSubPro(subQuestions.questionType) }} |
| 662 | </div> | 350 | </div> |
| 663 | <div class="qs-score"> | 351 | <div class="qs-score"> |
| 664 | - <el-input-number | ||
| 665 | - class="number-ipt" | ||
| 666 | - size="medium" | ||
| 667 | - :min="1" | ||
| 668 | - :max="200" | ||
| 669 | - :precision="2" | ||
| 670 | - v-model="subQuestions.score" | ||
| 671 | - label="单题分值" | ||
| 672 | - ></el-input-number> | 352 | + <el-input-number class="number-ipt" size="medium" :min="1" :max="200" :precision="2" |
| 353 | + v-model="subQuestions.score" label="单题分值"></el-input-number> | ||
| 673 | </div> | 354 | </div> |
| 674 | <div class="qs-partScore"> | 355 | <div class="qs-partScore"> |
| 675 | <p v-if="subQuestions.questionType != 3">--</p> | 356 | <p v-if="subQuestions.questionType != 3">--</p> |
| 676 | - <el-input-number | ||
| 677 | - class="number-ipt" | ||
| 678 | - v-else | ||
| 679 | - size="medium" | ||
| 680 | - :min="0" | ||
| 681 | - :precision="2" | ||
| 682 | - :max="subQuestions.score" | ||
| 683 | - :step="0.5" | ||
| 684 | - v-model="subQuestions.partScore" | ||
| 685 | - label="漏选得分" | ||
| 686 | - ></el-input-number> | 357 | + <el-input-number class="number-ipt" v-else size="medium" :min="0" :precision="2" |
| 358 | + :max="subQuestions.score" :step="0.5" v-model="subQuestions.partScore" label="漏选得分"></el-input-number> | ||
| 687 | </div> | 359 | </div> |
| 688 | <div class="qs-options qs-options2"> | 360 | <div class="qs-options qs-options2"> |
| 689 | <p v-if="subQuestions.questionType == 5">--</p> | 361 | <p v-if="subQuestions.questionType == 5">--</p> |
| 690 | <p v-if="subQuestions.questionType == 4" class="answer-box"> | 362 | <p v-if="subQuestions.questionType == 4" class="answer-box"> |
| 691 | - <span | ||
| 692 | - class="answer-s" | ||
| 693 | - :class="subQuestions.correctAnswer == 1 ? 'active' : ''" | ||
| 694 | - @click="subQuestions.correctAnswer = 1" | ||
| 695 | - >✓</span | ||
| 696 | - > | ||
| 697 | - <span | ||
| 698 | - class="answer-s" | ||
| 699 | - :class="subQuestions.correctAnswer == 2 ? 'active' : ''" | ||
| 700 | - @click="subQuestions.correctAnswer = 2" | ||
| 701 | - >✗</span | ||
| 702 | - > | 363 | + <span class="answer-s" :class="subQuestions.correctAnswer == 1 ? 'active' : ''" |
| 364 | + @click="subQuestions.correctAnswer = 1">✓</span> | ||
| 365 | + <span class="answer-s" :class="subQuestions.correctAnswer == 2 ? 'active' : ''" | ||
| 366 | + @click="subQuestions.correctAnswer = 2">✗</span> | ||
| 703 | </p> | 367 | </p> |
| 704 | <p v-if="subQuestions.questionType == 3" class="answer-box"> | 368 | <p v-if="subQuestions.questionType == 3" class="answer-box"> |
| 705 | - <span | ||
| 706 | - class="answer-s" | ||
| 707 | - v-for="option in subQuestions.answerOptions.split(',')" | ||
| 708 | - :class=" | ||
| 709 | - subQuestions.correctAnswer?.includes(option) | ||
| 710 | - ? 'active' | ||
| 711 | - : '' | ||
| 712 | - " | ||
| 713 | - :key="option" | ||
| 714 | - @click="changAnswer(subQuestions, option)" | ||
| 715 | - >{{ option }}</span | ||
| 716 | - > | 369 | + <span class="answer-s" v-for="option in subQuestions.answerOptions.split(',')" :class="subQuestions.correctAnswer?.includes(option) |
| 370 | + ? 'active' | ||
| 371 | + : '' | ||
| 372 | + " :key="option" @click="changAnswer(subQuestions, option)">{{ option }}</span> | ||
| 717 | </p> | 373 | </p> |
| 718 | <p v-if="subQuestions.questionType == 2" class="answer-box"> | 374 | <p v-if="subQuestions.questionType == 2" class="answer-box"> |
| 719 | - <span | ||
| 720 | - class="answer-s" | ||
| 721 | - v-for="option in subQuestions.answerOptions.split(',')" | ||
| 722 | - :class=" | ||
| 723 | - subQuestions.correctAnswer == option ? 'active' : '' | ||
| 724 | - " | ||
| 725 | - :key="option" | ||
| 726 | - @click="subQuestions.correctAnswer = option" | ||
| 727 | - >{{ option }}</span | ||
| 728 | - > | 375 | + <span class="answer-s" v-for="option in subQuestions.answerOptions.split(',')" :class="subQuestions.correctAnswer == option ? 'active' : '' |
| 376 | + " :key="option" @click="subQuestions.correctAnswer = option">{{ option }}</span> | ||
| 729 | </p> | 377 | </p> |
| 730 | </div> | 378 | </div> |
| 731 | </div> | 379 | </div> |
| 732 | </li> | 380 | </li> |
| 733 | </ul> | 381 | </ul> |
| 734 | </div> | 382 | </div> |
| 735 | - <el-dialog :close-on-click-modal="false" | ||
| 736 | - title="批量设置答案" | ||
| 737 | - :visible.sync="diaSetAns" | ||
| 738 | - width="400" | ||
| 739 | - :modal-append-to-body="false" | ||
| 740 | - > | 383 | + <el-dialog :close-on-click-modal="false" title="批量设置答案" :visible.sync="diaSetAns" width="400" |
| 384 | + :modal-append-to-body="false"> | ||
| 741 | <div class="qs-options"> | 385 | <div class="qs-options"> |
| 742 | <p class="dia-tips"> | 386 | <p class="dia-tips"> |
| 743 | 请点击选项按钮设置答案,多选题题目之间用“,”隔开,若添加5道题:“AC,AD,BD,AC,CD” | 387 | 请点击选项按钮设置答案,多选题题目之间用“,”隔开,若添加5道题:“AC,AD,BD,AC,CD” |
| 744 | </p> | 388 | </p> |
| 745 | <p>{{ setSubPro(formAns.qusType) }}:</p> | 389 | <p>{{ setSubPro(formAns.qusType) }}:</p> |
| 746 | <p class="ipt"> | 390 | <p class="ipt"> |
| 747 | - <el-input | ||
| 748 | - v-if="formAns.qusType == 2 || formAns.qusType == 3" | ||
| 749 | - ref="formAnsIpt" | ||
| 750 | - v-model="formAns.answerList" | 391 | + <el-input v-if="formAns.qusType == 2 || formAns.qusType == 3" ref="formAnsIpt" v-model="formAns.answerList" |
| 751 | @keydown.native="keydownAnswer($event, formAns.qusType)" | 392 | @keydown.native="keydownAnswer($event, formAns.qusType)" |
| 752 | - @input="setAllAnswer($event, formAns.qusType)" | ||
| 753 | - ></el-input> | ||
| 754 | - <el-input | ||
| 755 | - v-if="formAns.qusType == 4" | ||
| 756 | - v-model="formAns.answerList" | ||
| 757 | - readonly="" | ||
| 758 | - ></el-input> | 393 | + @input="setAllAnswer($event, formAns.qusType)"></el-input> |
| 394 | + <el-input v-if="formAns.qusType == 4" v-model="formAns.answerList" readonly=""></el-input> | ||
| 759 | </p> | 395 | </p> |
| 760 | <p class="answer-box"> | 396 | <p class="answer-box"> |
| 761 | <template v-if="formAns.qusType == 4"> | 397 | <template v-if="formAns.qusType == 4"> |
| 762 | - <span | ||
| 763 | - class="answer-s active" | ||
| 764 | - @click=" | ||
| 765 | - formAns.answerList.length < formAns.subNum | ||
| 766 | - ? (formAns.answerList += '✓') | ||
| 767 | - : '' | ||
| 768 | - " | ||
| 769 | - >✓</span | ||
| 770 | - > | ||
| 771 | - <span | ||
| 772 | - class="answer-s active" | ||
| 773 | - @click=" | ||
| 774 | - formAns.answerList.length < formAns.subNum | ||
| 775 | - ? (formAns.answerList += '✗') | ||
| 776 | - : '' | ||
| 777 | - " | ||
| 778 | - >✗</span | ||
| 779 | - > | 398 | + <span class="answer-s active" @click=" |
| 399 | + formAns.answerList.length < formAns.subNum | ||
| 400 | + ? (formAns.answerList += '✓') | ||
| 401 | + : '' | ||
| 402 | + ">✓</span> | ||
| 403 | + <span class="answer-s active" @click=" | ||
| 404 | + formAns.answerList.length < formAns.subNum | ||
| 405 | + ? (formAns.answerList += '✗') | ||
| 406 | + : '' | ||
| 407 | + ">✗</span> | ||
| 780 | </template> | 408 | </template> |
| 781 | <template v-if="formAns.qusType == 3"> | 409 | <template v-if="formAns.qusType == 3"> |
| 782 | - <span | ||
| 783 | - class="answer-s active" | ||
| 784 | - v-for="option in formAns.answerOptions.split(',')" | ||
| 785 | - :key="option" | ||
| 786 | - @click="setMultiple(formAns, option, 2)" | ||
| 787 | - >{{ option }}</span | ||
| 788 | - > | ||
| 789 | - <span | ||
| 790 | - class="answer-s active" | ||
| 791 | - @click="setMultiple(formAns, ',', 2)" | ||
| 792 | - >,</span | ||
| 793 | - > | 410 | + <span class="answer-s active" v-for="option in formAns.answerOptions.split(',')" :key="option" |
| 411 | + @click="setMultiple(formAns, option, 2)">{{ option }}</span> | ||
| 412 | + <span class="answer-s active" @click="setMultiple(formAns, ',', 2)">,</span> | ||
| 794 | </template> | 413 | </template> |
| 795 | <template v-if="formAns.qusType == 2"> | 414 | <template v-if="formAns.qusType == 2"> |
| 796 | - <span | ||
| 797 | - class="answer-s active" | ||
| 798 | - v-for="option in formAns.answerOptions.split(',')" | ||
| 799 | - :key="option" | ||
| 800 | - @click=" | ||
| 801 | - formAns.answerList.length < formAns.subNum | ||
| 802 | - ? (formAns.answerList += option) | ||
| 803 | - : '' | ||
| 804 | - " | ||
| 805 | - >{{ option }}</span | ||
| 806 | - > | 415 | + <span class="answer-s active" v-for="option in formAns.answerOptions.split(',')" :key="option" @click=" |
| 416 | + formAns.answerList.length < formAns.subNum | ||
| 417 | + ? (formAns.answerList += option) | ||
| 418 | + : '' | ||
| 419 | + ">{{ option }}</span> | ||
| 807 | </template> | 420 | </template> |
| 808 | - <span | ||
| 809 | - class="answer-s delButton" | ||
| 810 | - @click="formAns.answerList = formAns.answerList.slice(0, -1)" | ||
| 811 | - >x</span | ||
| 812 | - > | ||
| 813 | - <span class="answer-s ac" @click="formAns.answerList = ''" | ||
| 814 | - >ac</span | ||
| 815 | - > | 421 | + <span class="answer-s delButton" @click="formAns.answerList = formAns.answerList.slice(0, -1)">x</span> |
| 422 | + <span class="answer-s ac" @click="formAns.answerList = ''">ac</span> | ||
| 816 | </p> | 423 | </p> |
| 817 | </div> | 424 | </div> |
| 818 | <div class="dialog-footer" slot="footer"> | 425 | <div class="dialog-footer" slot="footer"> |
| @@ -821,13 +428,26 @@ | @@ -821,13 +428,26 @@ | ||
| 821 | </div> | 428 | </div> |
| 822 | </el-dialog> | 429 | </el-dialog> |
| 823 | <div class="btn-box"> | 430 | <div class="btn-box"> |
| 824 | - <el-button type="danger" plain round @click="linkBack" | ||
| 825 | - >取消</el-button | ||
| 826 | - > | 431 | + <el-button type="danger" plain round @click="linkBack">取消</el-button> |
| 827 | <el-button round @click="backStep1">上一步</el-button> | 432 | <el-button round @click="backStep1">上一步</el-button> |
| 828 | <el-button type="primary" round @click="save">保存</el-button> | 433 | <el-button type="primary" round @click="save">保存</el-button> |
| 829 | </div> | 434 | </div> |
| 830 | </div> | 435 | </div> |
| 436 | + <el-dialog :close-on-click-modal="false" title="上传题干" :visible.sync="dialogStem" v-if="dialogStem" width="500"> | ||
| 437 | + <div class="upload-box"> | ||
| 438 | + <img v-if="stem.screenshot" :src="stem.screenshotSrc" class="stem-pic" /> | ||
| 439 | + <el-upload class="upload-demo" action="http://121.40.127.171/file/uploadImg" :limit="1" :on-success="upSuccess" | ||
| 440 | + :on-error="upError" accept="image/*"> | ||
| 441 | + <el-button size="small" type="primary">{{ | ||
| 442 | + stem.screenshot ? "重新上传" : "选择照片" | ||
| 443 | + }}</el-button> | ||
| 444 | + </el-upload> | ||
| 445 | + </div> | ||
| 446 | + <div slot="footer"> | ||
| 447 | + <el-button @click="dialogStem = false">关闭弹窗</el-button> | ||
| 448 | + </div> | ||
| 449 | + </el-dialog> | ||
| 450 | + | ||
| 831 | </div> | 451 | </div> |
| 832 | </div> | 452 | </div> |
| 833 | </template> | 453 | </template> |
| @@ -872,29 +492,7 @@ export default { | @@ -872,29 +492,7 @@ export default { | ||
| 872 | }, | 492 | }, |
| 873 | data() { | 493 | data() { |
| 874 | return { | 494 | return { |
| 875 | - type: 1, //1-创建,2-复制答题卡 | ||
| 876 | - dialogVisible: false, //测验类型设置弹窗 | ||
| 877 | - addQuestionVisible: false, //添加大题弹窗 | ||
| 878 | - questionForm: { ...questionForm }, | ||
| 879 | - questionFormRules: { | ||
| 880 | - questionTitle: [ | ||
| 881 | - { required: true, message: "请输入大题名称", trigger: "blur" }, | ||
| 882 | - { | ||
| 883 | - min: 1, | ||
| 884 | - max: 30, | ||
| 885 | - message: "长度在 1 到 30 个字符", | ||
| 886 | - trigger: "blur", | ||
| 887 | - }, | ||
| 888 | - ], | ||
| 889 | - }, | ||
| 890 | - questionOptions: [ | ||
| 891 | - { label: "单选题", value: 2 }, | ||
| 892 | - { label: "多选题", value: 3 }, | ||
| 893 | - { label: "判断题", value: 4 }, | ||
| 894 | - { label: "主观题", value: 5 }, | ||
| 895 | - ], | ||
| 896 | - rightOptions: ["A", "B", "C", "D", "E", "F", "G"], | ||
| 897 | - addSubQuestionsType: "", | 495 | + role: "", |
| 898 | step: 0, //步骤 | 496 | step: 0, //步骤 |
| 899 | gradeList: [], //年级 | 497 | gradeList: [], //年级 |
| 900 | subjectList: [], //科目 | 498 | subjectList: [], //科目 |
| @@ -904,11 +502,11 @@ export default { | @@ -904,11 +502,11 @@ export default { | ||
| 904 | //答题卡详情 | 502 | //答题卡详情 |
| 905 | title: "", | 503 | title: "", |
| 906 | tagId: "", | 504 | tagId: "", |
| 907 | - gradeName: "", | ||
| 908 | subjectName: "", | 505 | subjectName: "", |
| 909 | examsDuration: 90, | 506 | examsDuration: 90, |
| 910 | - sharingType: 0, | ||
| 911 | questionList: [], | 507 | questionList: [], |
| 508 | + gradeName: "", | ||
| 509 | + sharingType: 0, | ||
| 912 | }, | 510 | }, |
| 913 | formRules: { | 511 | formRules: { |
| 914 | //答题卡验证 | 512 | //答题卡验证 |
| @@ -921,7 +519,6 @@ export default { | @@ -921,7 +519,6 @@ export default { | ||
| 921 | trigger: "blur", | 519 | trigger: "blur", |
| 922 | }, | 520 | }, |
| 923 | ], | 521 | ], |
| 924 | - gradeName: [{ required: true, message: "请选择年级", trigger: "blur" }], | ||
| 925 | subjectName: [ | 522 | subjectName: [ |
| 926 | { required: true, message: "请选择科目", trigger: "blur" }, | 523 | { required: true, message: "请选择科目", trigger: "blur" }, |
| 927 | ], | 524 | ], |
| @@ -930,7 +527,8 @@ export default { | @@ -930,7 +527,8 @@ export default { | ||
| 930 | ], | 527 | ], |
| 931 | }, | 528 | }, |
| 932 | tagList: [], | 529 | tagList: [], |
| 933 | - diaSetAns: false, | 530 | + diaSetAns: false, //答案开关 |
| 531 | + dialogStem: false, //截图开关 | ||
| 934 | formAns: { | 532 | formAns: { |
| 935 | listIndex: 0, //大题位置 | 533 | listIndex: 0, //大题位置 |
| 936 | endIndex: 0, //相同题目最后一位题目的questionIndex | 534 | endIndex: 0, //相同题目最后一位题目的questionIndex |
| @@ -940,11 +538,48 @@ export default { | @@ -940,11 +538,48 @@ export default { | ||
| 940 | answerOptions: [], //答案选项 | 538 | answerOptions: [], //答案选项 |
| 941 | answerList: "", //答案列表-字符串 | 539 | answerList: "", //答案列表-字符串 |
| 942 | }, | 540 | }, |
| 541 | + stem: { | ||
| 542 | + index: 0, //大题位置 | ||
| 543 | + indexs: 0, //小题位置 | ||
| 544 | + screenshot: "", //题干图片id | ||
| 545 | + screenshotSrc: "", //题干图片地址显示用保存时删除 | ||
| 546 | + }, | ||
| 547 | + type: 1, //1-创建,2-复制答题卡 | ||
| 548 | + dialogVisible: false, //测验类型设置弹窗 | ||
| 549 | + addQuestionVisible: false, //添加大题弹窗 | ||
| 550 | + questionForm: { ...questionForm }, | ||
| 551 | + questionFormRules: { | ||
| 552 | + questionTitle: [ | ||
| 553 | + { required: true, message: "请输入大题名称", trigger: "blur" }, | ||
| 554 | + { | ||
| 555 | + min: 1, | ||
| 556 | + max: 30, | ||
| 557 | + message: "长度在 1 到 30 个字符", | ||
| 558 | + trigger: "blur", | ||
| 559 | + }, | ||
| 560 | + ], | ||
| 561 | + }, | ||
| 562 | + questionOptions: [ | ||
| 563 | + { label: "单选题", value: 2 }, | ||
| 564 | + { label: "多选题", value: 3 }, | ||
| 565 | + { label: "判断题", value: 4 }, | ||
| 566 | + { label: "主观题", value: 5 }, | ||
| 567 | + ], | ||
| 568 | + rightOptions: ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J"], | ||
| 569 | + addSubQuestionsType: "", | ||
| 943 | }; | 570 | }; |
| 944 | }, | 571 | }, |
| 945 | async created() { | 572 | async created() { |
| 946 | this.type = this.$route.query.type ? this.$route.query.type : 1; | 573 | this.type = this.$route.query.type ? this.$route.query.type : 1; |
| 947 | - await this._GradeList(); | 574 | + this.role = |
| 575 | + this.$store.getters.info.showRole || | ||
| 576 | + this.$store.getters.info.permissions[0].role; | ||
| 577 | + if (this.role != "ROLE_PERSONAL") { | ||
| 578 | + this.formRules.gradeName = [ | ||
| 579 | + { required: true, message: "请选择年级", trigger: "blur" }, | ||
| 580 | + ]; | ||
| 581 | + await this._GradeList(); | ||
| 582 | + } | ||
| 948 | await this._QuerySubjectList(this.gradeList[0]); | 583 | await this._QuerySubjectList(this.gradeList[0]); |
| 949 | await this._TypeList(); | 584 | await this._TypeList(); |
| 950 | if (this.type == 2) { | 585 | if (this.type == 2) { |
| @@ -952,10 +587,43 @@ export default { | @@ -952,10 +587,43 @@ export default { | ||
| 952 | } | 587 | } |
| 953 | }, | 588 | }, |
| 954 | methods: { | 589 | methods: { |
| 590 | + //上传截图 | ||
| 591 | + openStem(obj, index, indexs) { | ||
| 592 | + this.stem.index = index; | ||
| 593 | + this.stem.indexs = indexs; | ||
| 594 | + if (type == 1) { | ||
| 595 | + this.stem.screenshot = obj.screenshot || ""; | ||
| 596 | + this.stem.screenshotSrc = obj.screenshotSrc || ""; | ||
| 597 | + } else { | ||
| 598 | + this.stem.screenshot = ""; | ||
| 599 | + this.stem.screenshotSrc = ""; | ||
| 600 | + } | ||
| 601 | + this.dialogStem = true; | ||
| 602 | + }, | ||
| 603 | + //图片上传成功 | ||
| 604 | + upSuccess(res, file) { | ||
| 605 | + if (res && res.status == 0) { | ||
| 606 | + this.stem.screenshotSrc = res.data.url; | ||
| 607 | + this.stem.screenshot = res.data.resId; | ||
| 608 | + this.form.questionList[this.stem.index].subQuestions[this.stem.indexs][ | ||
| 609 | + keys | ||
| 610 | + ] = this.stem.screenshot; | ||
| 611 | + this.form.questionList[this.stem.index].subQuestions[this.stem.indexs][ | ||
| 612 | + keys + "Src" | ||
| 613 | + ] = this.stem.screenshotSrc; | ||
| 614 | + this.$message.success("上传成功"); | ||
| 615 | + } else { | ||
| 616 | + this.$message.error(res.info); | ||
| 617 | + } | ||
| 618 | + }, | ||
| 619 | + | ||
| 620 | + upError(res) { | ||
| 621 | + this.$message.error("上传失败"); | ||
| 622 | + }, | ||
| 955 | linkBack() { | 623 | linkBack() { |
| 956 | this.$confirm( | 624 | this.$confirm( |
| 957 | (this.type == 2 ? "修改复制的" : "组建的") + | 625 | (this.type == 2 ? "修改复制的" : "组建的") + |
| 958 | - "答题卡未保存,确认退出吗?", | 626 | + "答题卡未保存,确认退出吗?", |
| 959 | "提示", | 627 | "提示", |
| 960 | { | 628 | { |
| 961 | confirmButtonText: "取消", | 629 | confirmButtonText: "取消", |
| @@ -968,7 +636,7 @@ export default { | @@ -968,7 +636,7 @@ export default { | ||
| 968 | type: "warning", | 636 | type: "warning", |
| 969 | } | 637 | } |
| 970 | ) | 638 | ) |
| 971 | - .then(() => {}) | 639 | + .then(() => { }) |
| 972 | .catch(() => { | 640 | .catch(() => { |
| 973 | this.$router.push({ | 641 | this.$router.push({ |
| 974 | path: "/examinationPaper", | 642 | path: "/examinationPaper", |
| @@ -1046,12 +714,12 @@ export default { | @@ -1046,12 +714,12 @@ export default { | ||
| 1046 | 714 | ||
| 1047 | return txt; | 715 | return txt; |
| 1048 | }, | 716 | }, |
| 717 | + //切换题型清空答案 | ||
| 1049 | setQuestionForm(val) { | 718 | setQuestionForm(val) { |
| 1050 | - //切换题型清空答案 | ||
| 1051 | this.questionForm.answerList = ""; | 719 | this.questionForm.answerList = ""; |
| 1052 | }, | 720 | }, |
| 721 | + //减少题数设置答案 | ||
| 1053 | changeQesNum(val) { | 722 | changeQesNum(val) { |
| 1054 | - //减少题数设置答案 | ||
| 1055 | if ( | 723 | if ( |
| 1056 | this.questionForm.questionType == 2 || | 724 | this.questionForm.questionType == 2 || |
| 1057 | this.questionForm.questionType == 4 | 725 | this.questionForm.questionType == 4 |
| @@ -1061,15 +729,14 @@ export default { | @@ -1061,15 +729,14 @@ export default { | ||
| 1061 | val | 729 | val |
| 1062 | ); | 730 | ); |
| 1063 | } else { | 731 | } else { |
| 1064 | - console.log(this.questionForm.answerList.split(",")); | ||
| 1065 | this.questionForm.answerList = this.questionForm.answerList | 732 | this.questionForm.answerList = this.questionForm.answerList |
| 1066 | .split(",") | 733 | .split(",") |
| 1067 | .splice(0, val) | 734 | .splice(0, val) |
| 1068 | .join(","); | 735 | .join(","); |
| 1069 | } | 736 | } |
| 1070 | }, | 737 | }, |
| 738 | + //初始化要修改的答案 | ||
| 1071 | setFormAns(indexs, index) { | 739 | setFormAns(indexs, index) { |
| 1072 | - //初始化要修改的答案 | ||
| 1073 | this.formAns = { ...this.form.questionList[index].subQuestions[indexs] }; | 740 | this.formAns = { ...this.form.questionList[index].subQuestions[indexs] }; |
| 1074 | this.formAns.listIndex = index; | 741 | this.formAns.listIndex = index; |
| 1075 | let startIndex = this.formAns.index + 1 - this.formAns.subNum; //批量设置大难开始位置 | 742 | let startIndex = this.formAns.index + 1 - this.formAns.subNum; //批量设置大难开始位置 |
| @@ -1108,8 +775,8 @@ export default { | @@ -1108,8 +775,8 @@ export default { | ||
| 1108 | }; | 775 | }; |
| 1109 | } | 776 | } |
| 1110 | }, | 777 | }, |
| 778 | + //多选答案设置 | ||
| 1111 | setMultiple(obj, answer, type) { | 779 | setMultiple(obj, answer, type) { |
| 1112 | - //多选答案设置 | ||
| 1113 | let elements = | 780 | let elements = |
| 1114 | type == 1 | 781 | type == 1 |
| 1115 | ? this.$refs["formAnsIpt2"].$el.children[0] | 782 | ? this.$refs["formAnsIpt2"].$el.children[0] |
| @@ -1136,8 +803,8 @@ export default { | @@ -1136,8 +803,8 @@ export default { | ||
| 1136 | elements.focus(); | 803 | elements.focus(); |
| 1137 | elements.selectionStart = resault.startPos; | 804 | elements.selectionStart = resault.startPos; |
| 1138 | }, | 805 | }, |
| 806 | + //批量修改答案 | ||
| 1139 | saveFormAns() { | 807 | saveFormAns() { |
| 1140 | - //批量修改答案 | ||
| 1141 | let EndIndex; | 808 | let EndIndex; |
| 1142 | let subNum = this.formAns.subNum - 1; | 809 | let subNum = this.formAns.subNum - 1; |
| 1143 | this.form.questionList[this.formAns.listIndex].subQuestions.some( | 810 | this.form.questionList[this.formAns.listIndex].subQuestions.some( |
| @@ -1160,8 +827,8 @@ export default { | @@ -1160,8 +827,8 @@ export default { | ||
| 1160 | this.formAns.answerList[subNum - i] == "✓" | 827 | this.formAns.answerList[subNum - i] == "✓" |
| 1161 | ? 1 | 828 | ? 1 |
| 1162 | : this.formAns.answerList[subNum - i] == "✗" | 829 | : this.formAns.answerList[subNum - i] == "✗" |
| 1163 | - ? 2 | ||
| 1164 | - : ""; | 830 | + ? 2 |
| 831 | + : ""; | ||
| 1165 | } | 832 | } |
| 1166 | this.form.questionList[this.formAns.listIndex].subQuestions[ | 833 | this.form.questionList[this.formAns.listIndex].subQuestions[ |
| 1167 | EndIndex - i | 834 | EndIndex - i |
| @@ -1169,31 +836,9 @@ export default { | @@ -1169,31 +836,9 @@ export default { | ||
| 1169 | } | 836 | } |
| 1170 | this.diaSetAns = false; | 837 | this.diaSetAns = false; |
| 1171 | }, | 838 | }, |
| 1172 | - // keydownAnswer(event) { | ||
| 1173 | - // //快速答案设置禁止输入 | ||
| 1174 | - // if ( | ||
| 1175 | - // event.key == "Meta" || | ||
| 1176 | - // event.key == "CapsLock" || | ||
| 1177 | - // event.key == "Shift" || | ||
| 1178 | - // event.key == "Enter" || | ||
| 1179 | - // event.key == "Alt" || | ||
| 1180 | - // event.key == "Backspace" || | ||
| 1181 | - // event.key == "Delete" || | ||
| 1182 | - // event.key == "ArrowUp" || | ||
| 1183 | - // event.key == "ArrowDown" || | ||
| 1184 | - // event.key == "ArrowLeft" || | ||
| 1185 | - // event.key == "v" || | ||
| 1186 | - // event.key == "V" || | ||
| 1187 | - // event.key == "ArrowRight" | ||
| 1188 | - // ) { | ||
| 1189 | - // return; | ||
| 1190 | - // } else { | ||
| 1191 | - // event.returnValue = ""; | ||
| 1192 | - // } | ||
| 1193 | - // }, | ||
| 1194 | keydownAnswer(event, type, isAddBig) { | 839 | keydownAnswer(event, type, isAddBig) { |
| 1195 | - let answerA = "ABCDEFG"; | ||
| 1196 | - let answer_a = "abcdefg"; | 840 | + let answerA = "ABCDEFGHIJ"; |
| 841 | + let answer_a = "abcdefghij"; | ||
| 1197 | if (isAddBig) { | 842 | if (isAddBig) { |
| 1198 | answerA = answerA.substring(0, this.questionForm.selectNum); | 843 | answerA = answerA.substring(0, this.questionForm.selectNum); |
| 1199 | answer_a = answer_a.substring(0, this.questionForm.selectNum); | 844 | answer_a = answer_a.substring(0, this.questionForm.selectNum); |
| @@ -1260,6 +905,10 @@ export default { | @@ -1260,6 +905,10 @@ export default { | ||
| 1260 | this.step = 1; | 905 | this.step = 1; |
| 1261 | }, | 906 | }, |
| 1262 | setStep1() { | 907 | setStep1() { |
| 908 | + if (this.subjectList.length == 0) { | ||
| 909 | + this.$message.warning("暂无绑定年级信息,请先联系管理员设置。"); | ||
| 910 | + return; | ||
| 911 | + } | ||
| 1263 | this.$refs["forms"].validate((valid) => { | 912 | this.$refs["forms"].validate((valid) => { |
| 1264 | // 验证通过:保存 | 913 | // 验证通过:保存 |
| 1265 | if (valid) { | 914 | if (valid) { |
| @@ -1275,13 +924,6 @@ export default { | @@ -1275,13 +924,6 @@ export default { | ||
| 1275 | this.$message.warning("请添加题目!"); | 924 | this.$message.warning("请添加题目!"); |
| 1276 | return; | 925 | return; |
| 1277 | } | 926 | } |
| 1278 | - // let valid = ""; | ||
| 1279 | - // this.form.questionList.map((item, index) => { | ||
| 1280 | - // if (!item.questionTitle) { | ||
| 1281 | - // valid += index + 1 + "、"; | ||
| 1282 | - // } | ||
| 1283 | - // }); | ||
| 1284 | - // if (!valid) { | ||
| 1285 | //添加题目ID、序号 | 927 | //添加题目ID、序号 |
| 1286 | this.form.questionList.map((item, index) => { | 928 | this.form.questionList.map((item, index) => { |
| 1287 | item.questionType = 0; | 929 | item.questionType = 0; |
| @@ -1346,16 +988,11 @@ export default { | @@ -1346,16 +988,11 @@ export default { | ||
| 1346 | ); | 988 | ); |
| 1347 | } | 989 | } |
| 1348 | } | 990 | } |
| 1349 | - console.log(types); | ||
| 1350 | }); | 991 | }); |
| 1351 | this.step = 2; | 992 | this.step = 2; |
| 1352 | return; | 993 | return; |
| 1353 | - // } else { | ||
| 1354 | - // this.$message.error( | ||
| 1355 | - // `大题名称不能为空,请检查第${valid.slice(0, -1)}大题!` | ||
| 1356 | - // ); | ||
| 1357 | - // } | ||
| 1358 | }, | 994 | }, |
| 995 | + //删除批量操作数据 | ||
| 1359 | formatQuestionList() { | 996 | formatQuestionList() { |
| 1360 | for (let i = 0; i < this.form.questionList.length; i++) { | 997 | for (let i = 0; i < this.form.questionList.length; i++) { |
| 1361 | for ( | 998 | for ( |
| @@ -1373,8 +1010,8 @@ export default { | @@ -1373,8 +1010,8 @@ export default { | ||
| 1373 | this.questionForm = { ...questionForm }; | 1010 | this.questionForm = { ...questionForm }; |
| 1374 | this.addQuestionVisible = true; | 1011 | this.addQuestionVisible = true; |
| 1375 | }, | 1012 | }, |
| 1013 | + //添加大题 | ||
| 1376 | addQuestion() { | 1014 | addQuestion() { |
| 1377 | - //添加大题 | ||
| 1378 | let subQuestions = []; | 1015 | let subQuestions = []; |
| 1379 | let questionsOptions = { | 1016 | let questionsOptions = { |
| 1380 | ...subQuesOptions, | 1017 | ...subQuesOptions, |
| @@ -1412,8 +1049,8 @@ export default { | @@ -1412,8 +1049,8 @@ export default { | ||
| 1412 | this.questionForm.answerList[i] == "✓" | 1049 | this.questionForm.answerList[i] == "✓" |
| 1413 | ? 1 | 1050 | ? 1 |
| 1414 | : this.questionForm.answerList[i] == "✗" | 1051 | : this.questionForm.answerList[i] == "✗" |
| 1415 | - ? 2 | ||
| 1416 | - : ""; | 1052 | + ? 2 |
| 1053 | + : ""; | ||
| 1417 | } else if (questionsOptions.questionType == 3) { | 1054 | } else if (questionsOptions.questionType == 3) { |
| 1418 | answer = this.questionForm.answerList.split(",")[i] || ""; | 1055 | answer = this.questionForm.answerList.split(",")[i] || ""; |
| 1419 | } else if (questionsOptions.questionType == 2) { | 1056 | } else if (questionsOptions.questionType == 2) { |
| @@ -1431,10 +1068,8 @@ export default { | @@ -1431,10 +1068,8 @@ export default { | ||
| 1431 | }); | 1068 | }); |
| 1432 | this.addQuestionVisible = false; | 1069 | this.addQuestionVisible = false; |
| 1433 | }, | 1070 | }, |
| 1071 | + //删除小题 | ||
| 1434 | delTabData(subIndex, index) { | 1072 | delTabData(subIndex, index) { |
| 1435 | - //删除小题 | ||
| 1436 | - console.log(subIndex); | ||
| 1437 | - console.log(index); | ||
| 1438 | this.form.questionList[index].subQuestions.splice(subIndex, 1); | 1073 | this.form.questionList[index].subQuestions.splice(subIndex, 1); |
| 1439 | }, | 1074 | }, |
| 1440 | setScore(question) { | 1075 | setScore(question) { |
| @@ -1443,21 +1078,6 @@ export default { | @@ -1443,21 +1078,6 @@ export default { | ||
| 1443 | }, 0); | 1078 | }, 0); |
| 1444 | return Number(score).toFixed(2); | 1079 | return Number(score).toFixed(2); |
| 1445 | }, | 1080 | }, |
| 1446 | - equalScore(question) { | ||
| 1447 | - let score = 0; | ||
| 1448 | - let bools = true; | ||
| 1449 | - for (let i = 0; i < question.subQuestions.length; i++) { | ||
| 1450 | - if (i == 0) { | ||
| 1451 | - score = question.subQuestions[i].score; | ||
| 1452 | - } else { | ||
| 1453 | - if (score != question.subQuestions[i].score) { | ||
| 1454 | - bools = false; | ||
| 1455 | - break; | ||
| 1456 | - } | ||
| 1457 | - } | ||
| 1458 | - } | ||
| 1459 | - return bools; | ||
| 1460 | - }, | ||
| 1461 | changeAddSubQuestions(val, question) { | 1081 | changeAddSubQuestions(val, question) { |
| 1462 | if (val) { | 1082 | if (val) { |
| 1463 | let questionsOptions = { | 1083 | let questionsOptions = { |
| @@ -1488,8 +1108,8 @@ export default { | @@ -1488,8 +1108,8 @@ export default { | ||
| 1488 | this.addSubQuestionsType = ""; | 1108 | this.addSubQuestionsType = ""; |
| 1489 | } | 1109 | } |
| 1490 | }, | 1110 | }, |
| 1111 | + //切换多题型-小题题型 | ||
| 1491 | changeSubQuestions(val, subQuestions) { | 1112 | changeSubQuestions(val, subQuestions) { |
| 1492 | - //切换多题型-小题题型 | ||
| 1493 | const that = this; | 1113 | const that = this; |
| 1494 | subQuestions.score = 1; | 1114 | subQuestions.score = 1; |
| 1495 | subQuestions.partScore = 0; | 1115 | subQuestions.partScore = 0; |
| @@ -1515,17 +1135,17 @@ export default { | @@ -1515,17 +1135,17 @@ export default { | ||
| 1515 | break; | 1135 | break; |
| 1516 | } | 1136 | } |
| 1517 | }, | 1137 | }, |
| 1138 | + //添加选项 | ||
| 1518 | addOptions(subQuestions) { | 1139 | addOptions(subQuestions) { |
| 1519 | - //添加选项 | ||
| 1520 | let length = subQuestions.answerOptions.split(",").length; | 1140 | let length = subQuestions.answerOptions.split(",").length; |
| 1521 | - if (length > 6) return; | 1141 | + if (length > 9) return; |
| 1522 | subQuestions.selectNum = length + 1; | 1142 | subQuestions.selectNum = length + 1; |
| 1523 | subQuestions.answerOptions = this.rightOptions | 1143 | subQuestions.answerOptions = this.rightOptions |
| 1524 | .slice(0, subQuestions.selectNum) | 1144 | .slice(0, subQuestions.selectNum) |
| 1525 | .join(","); | 1145 | .join(","); |
| 1526 | }, | 1146 | }, |
| 1147 | + //删除选项 | ||
| 1527 | removeOptions(subQuestions) { | 1148 | removeOptions(subQuestions) { |
| 1528 | - //删除选项 | ||
| 1529 | let length = subQuestions.answerOptions.split(",").length; | 1149 | let length = subQuestions.answerOptions.split(",").length; |
| 1530 | if (length < 3) return; | 1150 | if (length < 3) return; |
| 1531 | subQuestions.selectNum = length - 1; | 1151 | subQuestions.selectNum = length - 1; |
| @@ -1537,8 +1157,8 @@ export default { | @@ -1537,8 +1157,8 @@ export default { | ||
| 1537 | subQuestions.selectNum | 1157 | subQuestions.selectNum |
| 1538 | ); | 1158 | ); |
| 1539 | }, | 1159 | }, |
| 1160 | + //设置多选答案 | ||
| 1540 | changAnswer(sub, option) { | 1161 | changAnswer(sub, option) { |
| 1541 | - //设置多选答案 | ||
| 1542 | let str = new RegExp(option, "g"); | 1162 | let str = new RegExp(option, "g"); |
| 1543 | if (sub.correctAnswer?.includes(option)) { | 1163 | if (sub.correctAnswer?.includes(option)) { |
| 1544 | sub.correctAnswer = sub.correctAnswer.replace(str, ""); | 1164 | sub.correctAnswer = sub.correctAnswer.replace(str, ""); |
| @@ -1564,7 +1184,11 @@ export default { | @@ -1564,7 +1184,11 @@ export default { | ||
| 1564 | return; | 1184 | return; |
| 1565 | } | 1185 | } |
| 1566 | //修改测验类型 | 1186 | //修改测验类型 |
| 1567 | - const { data, status, info } = await this.$request.editPaperType({ | 1187 | + let editPaperType = |
| 1188 | + this.role == "ROLE_PERSONAL" | ||
| 1189 | + ? this.$request.pModifyPaperType | ||
| 1190 | + : this.$request.editPaperType; | ||
| 1191 | + const { data, status, info } = await editPaperType({ | ||
| 1568 | tagId: obj.id, | 1192 | tagId: obj.id, |
| 1569 | tag: obj.typeName, | 1193 | tag: obj.typeName, |
| 1570 | }); | 1194 | }); |
| @@ -1578,7 +1202,11 @@ export default { | @@ -1578,7 +1202,11 @@ export default { | ||
| 1578 | }, | 1202 | }, |
| 1579 | async removeTypeName(obj) { | 1203 | async removeTypeName(obj) { |
| 1580 | //删除测验类型 | 1204 | //删除测验类型 |
| 1581 | - const { data, status, info } = await this.$request.delPaperType({ | 1205 | + let delPaperType = |
| 1206 | + this.role == "ROLE_PERSONAL" | ||
| 1207 | + ? this.$request.pDelPaperType | ||
| 1208 | + : this.$request.delPaperType; | ||
| 1209 | + const { data, status, info } = await delPaperType({ | ||
| 1582 | tagId: obj.id, | 1210 | tagId: obj.id, |
| 1583 | }); | 1211 | }); |
| 1584 | if (status == 0) { | 1212 | if (status == 0) { |
| @@ -1606,7 +1234,11 @@ export default { | @@ -1606,7 +1234,11 @@ export default { | ||
| 1606 | return; | 1234 | return; |
| 1607 | } | 1235 | } |
| 1608 | //添加测验类型 | 1236 | //添加测验类型 |
| 1609 | - const { data, status, info } = await this.$request.addPaperType({ | 1237 | + let addPaperType = |
| 1238 | + this.role == "ROLE_PERSONAL" | ||
| 1239 | + ? this.$request.pAddPaperType | ||
| 1240 | + : this.$request.addPaperType; | ||
| 1241 | + const { data, status, info } = await addPaperType({ | ||
| 1610 | tag: this.answerTypeName, | 1242 | tag: this.answerTypeName, |
| 1611 | }); | 1243 | }); |
| 1612 | if (status == 0) { | 1244 | if (status == 0) { |
| @@ -1626,8 +1258,17 @@ export default { | @@ -1626,8 +1258,17 @@ export default { | ||
| 1626 | let formDatas = deepClone(this.form); | 1258 | let formDatas = deepClone(this.form); |
| 1627 | for (let i = 0; i < formDatas.questionList.length; i++) { | 1259 | for (let i = 0; i < formDatas.questionList.length; i++) { |
| 1628 | delete formDatas.questionList[i].show; | 1260 | delete formDatas.questionList[i].show; |
| 1261 | + for (let j = 0; j < formDatas.questionList[i].subQuestions; j++) { | ||
| 1262 | + if (!!formDatas.questionList[i].subQuestions[j].screenshotSrc) { | ||
| 1263 | + delete formDatas.questionList[i].subQuestions[j].screenshotSrc; | ||
| 1264 | + } | ||
| 1265 | + } | ||
| 1629 | } | 1266 | } |
| 1630 | - const { data, status, info } = await this.$request.addPaper({ | 1267 | + let addPaper = |
| 1268 | + this.role == "ROLE_PERSONAL" | ||
| 1269 | + ? this.$request.pAddPaper | ||
| 1270 | + : this.$request.addPaper; | ||
| 1271 | + const { data, status, info } = await addPaper({ | ||
| 1631 | ...formDatas, | 1272 | ...formDatas, |
| 1632 | }); | 1273 | }); |
| 1633 | this.saveLoading = false; | 1274 | this.saveLoading = false; |
| @@ -1645,8 +1286,11 @@ export default { | @@ -1645,8 +1286,11 @@ export default { | ||
| 1645 | }, | 1286 | }, |
| 1646 | async _TypeList() { | 1287 | async _TypeList() { |
| 1647 | //测验类型查询 | 1288 | //测验类型查询 |
| 1648 | - const { data, status, info } = await this.$request.fetchTypeNames({ | ||
| 1649 | - gradeName: this.form.gradeName, | 1289 | + let fetchTypeNames = |
| 1290 | + this.role == "ROLE_PERSONAL" | ||
| 1291 | + ? this.$request.pPaperTagList | ||
| 1292 | + : this.$request.fetchTypeNames; | ||
| 1293 | + const { data, status, info } = await fetchTypeNames({ | ||
| 1650 | type: 1, | 1294 | type: 1, |
| 1651 | }); | 1295 | }); |
| 1652 | if (status == 0) { | 1296 | if (status == 0) { |
| @@ -1678,38 +1322,67 @@ export default { | @@ -1678,38 +1322,67 @@ export default { | ||
| 1678 | }, | 1322 | }, |
| 1679 | async _QuerySubjectList(grade) { | 1323 | async _QuerySubjectList(grade) { |
| 1680 | //查询科目列表 | 1324 | //查询科目列表 |
| 1681 | - const { data, status, info } = await this.$request.fetchSubjectList({ | ||
| 1682 | - gradeName: grade, | ||
| 1683 | - }); | 1325 | + if (!grade) { |
| 1326 | + return; | ||
| 1327 | + } | ||
| 1328 | + let query = {}; | ||
| 1329 | + let fetchSubjectList = | ||
| 1330 | + this.role == "ROLE_PERSONAL" | ||
| 1331 | + ? this.$request.pSubjectList | ||
| 1332 | + : this.$request.fetchSubjectList; | ||
| 1333 | + if (this.role != "ROLE_PERSONAL") { | ||
| 1334 | + query.gradeName = grade; | ||
| 1335 | + } | ||
| 1336 | + const { data, status, info } = await fetchSubjectList({ ...query }); | ||
| 1684 | if (status === 0) { | 1337 | if (status === 0) { |
| 1685 | this.subjectList = | 1338 | this.subjectList = |
| 1686 | data.subjectNames?.map((item) => { | 1339 | data.subjectNames?.map((item) => { |
| 1687 | return { | 1340 | return { |
| 1688 | - value: item, | ||
| 1689 | - label: item, | 1341 | + value: this.role == "ROLE_PERSONAL" ? item.subjectName : item, |
| 1342 | + label: this.role == "ROLE_PERSONAL" ? item.subjectName : item, | ||
| 1690 | }; | 1343 | }; |
| 1691 | }) || []; | 1344 | }) || []; |
| 1692 | - console.log(this.subjectList); | ||
| 1693 | if (this.subjectList.length) { | 1345 | if (this.subjectList.length) { |
| 1694 | this.form.subjectName = this.subjectList[0].value; | 1346 | this.form.subjectName = this.subjectList[0].value; |
| 1695 | } | 1347 | } |
| 1696 | - console.log(this.form); | ||
| 1697 | } else { | 1348 | } else { |
| 1698 | this.$message.error(info); | 1349 | this.$message.error(info); |
| 1699 | } | 1350 | } |
| 1700 | }, | 1351 | }, |
| 1701 | async _QueryDetail() { | 1352 | async _QueryDetail() { |
| 1702 | //查询答题卡详情 | 1353 | //查询答题卡详情 |
| 1703 | - const { data, status, info } = await this.$request.fetchPaperDetail({ | 1354 | + let fetchPaperDetail = |
| 1355 | + this.role == "ROLE_PERSONAL" | ||
| 1356 | + ? this.$request.pPaperDetail | ||
| 1357 | + : this.$request.fetchPaperDetail; | ||
| 1358 | + const { data, status, info } = await fetchPaperDetail({ | ||
| 1704 | paperId: this.$route.query.paperId, | 1359 | paperId: this.$route.query.paperId, |
| 1705 | }); | 1360 | }); |
| 1706 | if (status == 0) { | 1361 | if (status == 0) { |
| 1707 | this.form.title = data.title + "_副本"; | 1362 | this.form.title = data.title + "_副本"; |
| 1708 | this.form.tagId = data.tagId === 0 ? "" : data.tagId; | 1363 | this.form.tagId = data.tagId === 0 ? "" : data.tagId; |
| 1709 | - this.form.subjectName = data.subjectName; | ||
| 1710 | - this.form.gradeName = data.gradeName; | 1364 | + if (this.subjectList.length) { |
| 1365 | + this.subjectList.map((item) => { | ||
| 1366 | + if (item.label == data.subjectName) { | ||
| 1367 | + this.form.subjectName = item.value; | ||
| 1368 | + } | ||
| 1369 | + }); | ||
| 1370 | + } else { | ||
| 1371 | + this.form.subjectName = ""; | ||
| 1372 | + } | ||
| 1711 | this.form.examsDuration = data.examsDuration; | 1373 | this.form.examsDuration = data.examsDuration; |
| 1712 | - this.form.sharingType = data.sharingType; | 1374 | + if (this.role != "ROLE_PERSONAL") { |
| 1375 | + this.form.sharingType = data.sharingType; | ||
| 1376 | + if (this.gradeList.length) { | ||
| 1377 | + this.gradeList.map((item) => { | ||
| 1378 | + if (item == data.gradeName) { | ||
| 1379 | + this.form.gradeName = data.gradeName; | ||
| 1380 | + } | ||
| 1381 | + }); | ||
| 1382 | + } else { | ||
| 1383 | + this.form.gradeName = ""; | ||
| 1384 | + } | ||
| 1385 | + } | ||
| 1713 | this.form.questionList = data.questionList?.map((item) => { | 1386 | this.form.questionList = data.questionList?.map((item) => { |
| 1714 | let subQuestions = | 1387 | let subQuestions = |
| 1715 | item.subQuestions?.map((items) => { | 1388 | item.subQuestions?.map((items) => { |
| @@ -1720,6 +1393,8 @@ export default { | @@ -1720,6 +1393,8 @@ export default { | ||
| 1720 | selectNum: items.answerOptions.split(",").length, | 1393 | selectNum: items.answerOptions.split(",").length, |
| 1721 | answerOptions: items.answerOptions || "A,B,C,D", | 1394 | answerOptions: items.answerOptions || "A,B,C,D", |
| 1722 | correctAnswer: items.correctAnswer, | 1395 | correctAnswer: items.correctAnswer, |
| 1396 | + screenshot: items.screenshot || "", | ||
| 1397 | + screenshotSrc: items.screenshot || "", | ||
| 1723 | }; | 1398 | }; |
| 1724 | }) || []; | 1399 | }) || []; |
| 1725 | return { | 1400 | return { |
| @@ -1740,30 +1415,42 @@ export default { | @@ -1740,30 +1415,42 @@ export default { | ||
| 1740 | .red { | 1415 | .red { |
| 1741 | color: #f30; | 1416 | color: #f30; |
| 1742 | } | 1417 | } |
| 1418 | + | ||
| 1743 | .qs-options { | 1419 | .qs-options { |
| 1744 | flex: 1; | 1420 | flex: 1; |
| 1421 | + | ||
| 1745 | .ipt { | 1422 | .ipt { |
| 1746 | margin-bottom: 5px; | 1423 | margin-bottom: 5px; |
| 1747 | } | 1424 | } |
| 1425 | + | ||
| 1748 | .answer-box { | 1426 | .answer-box { |
| 1749 | .answer-s { | 1427 | .answer-s { |
| 1750 | cursor: pointer; | 1428 | cursor: pointer; |
| 1751 | user-select: none; | 1429 | user-select: none; |
| 1430 | + margin-bottom: 10px; | ||
| 1431 | + | ||
| 1752 | &:first-of-type { | 1432 | &:first-of-type { |
| 1753 | margin-left: 0; | 1433 | margin-left: 0; |
| 1754 | } | 1434 | } |
| 1755 | } | 1435 | } |
| 1756 | } | 1436 | } |
| 1437 | + | ||
| 1438 | + .answer-box2 { | ||
| 1439 | + margin-bottom: 10px; | ||
| 1440 | + } | ||
| 1441 | + | ||
| 1757 | .delButton { | 1442 | .delButton { |
| 1758 | text-indent: -9999999px; | 1443 | text-indent: -9999999px; |
| 1759 | border-color: #ff6868; | 1444 | border-color: #ff6868; |
| 1760 | - background: #ff6868 url("../../../assets/images/arrow.png") no-repeat center; | 1445 | + background: #ff6868 url("../../assets/images/arrow.png") no-repeat center; |
| 1761 | background-size: 19px; | 1446 | background-size: 19px; |
| 1762 | color: transparent; | 1447 | color: transparent; |
| 1763 | } | 1448 | } |
| 1449 | + | ||
| 1764 | .answer-s.ac { | 1450 | .answer-s.ac { |
| 1765 | border: none; | 1451 | border: none; |
| 1766 | } | 1452 | } |
| 1453 | + | ||
| 1767 | .ac { | 1454 | .ac { |
| 1768 | border-color: #ff6868; | 1455 | border-color: #ff6868; |
| 1769 | background: #ff6868; | 1456 | background: #ff6868; |
| @@ -1774,6 +1461,7 @@ export default { | @@ -1774,6 +1461,7 @@ export default { | ||
| 1774 | .sel2 { | 1461 | .sel2 { |
| 1775 | width: 480px; | 1462 | width: 480px; |
| 1776 | } | 1463 | } |
| 1464 | + | ||
| 1777 | .set-ans-btn { | 1465 | .set-ans-btn { |
| 1778 | width: 100%; | 1466 | width: 100%; |
| 1779 | padding: 10px 0 10px 630px; | 1467 | padding: 10px 0 10px 630px; |
| @@ -1781,23 +1469,28 @@ export default { | @@ -1781,23 +1469,28 @@ export default { | ||
| 1781 | border-right: 1px solid #e2e2e2; | 1469 | border-right: 1px solid #e2e2e2; |
| 1782 | border-bottom: 1px solid #e2e2e2; | 1470 | border-bottom: 1px solid #e2e2e2; |
| 1783 | } | 1471 | } |
| 1472 | + | ||
| 1784 | .content-box { | 1473 | .content-box { |
| 1785 | width: 100%; | 1474 | width: 100%; |
| 1786 | height: 100%; | 1475 | height: 100%; |
| 1787 | overflow-y: auto; | 1476 | overflow-y: auto; |
| 1788 | } | 1477 | } |
| 1478 | + | ||
| 1789 | .content { | 1479 | .content { |
| 1790 | width: 100%; | 1480 | width: 100%; |
| 1791 | box-sizing: border-box; | 1481 | box-sizing: border-box; |
| 1792 | - padding: 0 50px; | 1482 | + padding: 0 24px; |
| 1483 | + | ||
| 1793 | .ml-20 { | 1484 | .ml-20 { |
| 1794 | margin-left: 20px; | 1485 | margin-left: 20px; |
| 1795 | } | 1486 | } |
| 1487 | + | ||
| 1796 | .btn-box { | 1488 | .btn-box { |
| 1797 | text-align: right; | 1489 | text-align: right; |
| 1798 | margin-left: 140px; | 1490 | margin-left: 140px; |
| 1799 | } | 1491 | } |
| 1800 | } | 1492 | } |
| 1493 | + | ||
| 1801 | .dia-content { | 1494 | .dia-content { |
| 1802 | .dia-tit { | 1495 | .dia-tit { |
| 1803 | font-size: 20px; | 1496 | font-size: 20px; |
| @@ -1805,27 +1498,33 @@ export default { | @@ -1805,27 +1498,33 @@ export default { | ||
| 1805 | font-weight: 700; | 1498 | font-weight: 700; |
| 1806 | text-align: center; | 1499 | text-align: center; |
| 1807 | } | 1500 | } |
| 1501 | + | ||
| 1808 | .add-type { | 1502 | .add-type { |
| 1809 | width: 100%; | 1503 | width: 100%; |
| 1810 | margin-bottom: 10px; | 1504 | margin-bottom: 10px; |
| 1505 | + | ||
| 1811 | .js-set { | 1506 | .js-set { |
| 1812 | margin: 2.5px 10px 0 0; | 1507 | margin: 2.5px 10px 0 0; |
| 1813 | font-size: 14px; | 1508 | font-size: 14px; |
| 1814 | } | 1509 | } |
| 1815 | } | 1510 | } |
| 1511 | + | ||
| 1816 | .add-btn { | 1512 | .add-btn { |
| 1817 | margin-left: 20px; | 1513 | margin-left: 20px; |
| 1818 | } | 1514 | } |
| 1819 | } | 1515 | } |
| 1516 | + | ||
| 1820 | .el-message-box { | 1517 | .el-message-box { |
| 1821 | :deep(.el-button--default) { | 1518 | :deep(.el-button--default) { |
| 1822 | color: #fff; | 1519 | color: #fff; |
| 1823 | } | 1520 | } |
| 1824 | } | 1521 | } |
| 1522 | + | ||
| 1825 | .add-box { | 1523 | .add-box { |
| 1826 | display: flex; | 1524 | display: flex; |
| 1827 | justify-content: center; | 1525 | justify-content: center; |
| 1828 | align-items: center; | 1526 | align-items: center; |
| 1527 | + | ||
| 1829 | .add-question { | 1528 | .add-question { |
| 1830 | display: flex; | 1529 | display: flex; |
| 1831 | justify-content: center; | 1530 | justify-content: center; |
| @@ -1834,84 +1533,103 @@ export default { | @@ -1834,84 +1533,103 @@ export default { | ||
| 1834 | font-weight: bolder; | 1533 | font-weight: bolder; |
| 1835 | padding: 2px; | 1534 | padding: 2px; |
| 1836 | cursor: pointer; | 1535 | cursor: pointer; |
| 1536 | + | ||
| 1837 | .s1 { | 1537 | .s1 { |
| 1838 | margin-left: 6px; | 1538 | margin-left: 6px; |
| 1839 | } | 1539 | } |
| 1540 | + | ||
| 1840 | :deep(.el-icon-plus) { | 1541 | :deep(.el-icon-plus) { |
| 1841 | font-size: 24px; | 1542 | font-size: 24px; |
| 1842 | font-weight: 900; | 1543 | font-weight: 900; |
| 1843 | } | 1544 | } |
| 1545 | + | ||
| 1844 | :deep(.el-button--mini.is-circle) { | 1546 | :deep(.el-button--mini.is-circle) { |
| 1845 | padding: 3px; | 1547 | padding: 3px; |
| 1846 | } | 1548 | } |
| 1847 | } | 1549 | } |
| 1848 | } | 1550 | } |
| 1551 | + | ||
| 1849 | .dialog-footer { | 1552 | .dialog-footer { |
| 1850 | text-align: center; | 1553 | text-align: center; |
| 1554 | + | ||
| 1851 | :deep(.el-button) { | 1555 | :deep(.el-button) { |
| 1852 | border-radius: 20px; | 1556 | border-radius: 20px; |
| 1853 | padding: 8px 20px 7px; | 1557 | padding: 8px 20px 7px; |
| 1854 | margin: 0 12px; | 1558 | margin: 0 12px; |
| 1855 | } | 1559 | } |
| 1856 | } | 1560 | } |
| 1561 | + | ||
| 1857 | .question-box { | 1562 | .question-box { |
| 1858 | margin-bottom: 20px; | 1563 | margin-bottom: 20px; |
| 1859 | } | 1564 | } |
| 1565 | + | ||
| 1860 | .question-title { | 1566 | .question-title { |
| 1861 | line-height: 40px; | 1567 | line-height: 40px; |
| 1862 | display: flex; | 1568 | display: flex; |
| 1863 | align-items: center; | 1569 | align-items: center; |
| 1864 | margin-bottom: 12px; | 1570 | margin-bottom: 12px; |
| 1571 | + | ||
| 1865 | .m20 { | 1572 | .m20 { |
| 1866 | - margin-left: 20px; | 1573 | + margin: 0 20px; |
| 1867 | } | 1574 | } |
| 1575 | + | ||
| 1868 | .ipt { | 1576 | .ipt { |
| 1869 | width: 300px; | 1577 | width: 300px; |
| 1870 | margin: 0 16px 0 10px; | 1578 | margin: 0 16px 0 10px; |
| 1579 | + | ||
| 1871 | :deep(.el-input__inner) { | 1580 | :deep(.el-input__inner) { |
| 1872 | border-radius: 20px; | 1581 | border-radius: 20px; |
| 1873 | border-color: #667ffd; | 1582 | border-color: #667ffd; |
| 1874 | background: rgba($color: #667ffd, $alpha: 0.05); | 1583 | background: rgba($color: #667ffd, $alpha: 0.05); |
| 1875 | } | 1584 | } |
| 1876 | } | 1585 | } |
| 1586 | + | ||
| 1877 | .delete { | 1587 | .delete { |
| 1878 | margin-right: 8px; | 1588 | margin-right: 8px; |
| 1879 | } | 1589 | } |
| 1590 | + | ||
| 1880 | .title-txt { | 1591 | .title-txt { |
| 1881 | margin-right: 20px; | 1592 | margin-right: 20px; |
| 1882 | font-size: 16px; | 1593 | font-size: 16px; |
| 1883 | font-weight: 700; | 1594 | font-weight: 700; |
| 1884 | } | 1595 | } |
| 1596 | + | ||
| 1885 | .el-icon-caret-right { | 1597 | .el-icon-caret-right { |
| 1886 | font-size: 24px; | 1598 | font-size: 24px; |
| 1887 | color: #888; | 1599 | color: #888; |
| 1888 | transition: all 0.4s; | 1600 | transition: all 0.4s; |
| 1889 | margin-right: 12px; | 1601 | margin-right: 12px; |
| 1890 | cursor: pointer; | 1602 | cursor: pointer; |
| 1603 | + | ||
| 1891 | &.active { | 1604 | &.active { |
| 1892 | transform: rotate(90deg); | 1605 | transform: rotate(90deg); |
| 1893 | } | 1606 | } |
| 1894 | } | 1607 | } |
| 1895 | } | 1608 | } |
| 1609 | + | ||
| 1896 | .questions-ul { | 1610 | .questions-ul { |
| 1897 | border-left: 1px solid #e2e2e2; | 1611 | border-left: 1px solid #e2e2e2; |
| 1898 | border-top: 1px solid #e2e2e2; | 1612 | border-top: 1px solid #e2e2e2; |
| 1899 | } | 1613 | } |
| 1614 | + | ||
| 1900 | .el-input-number { | 1615 | .el-input-number { |
| 1901 | width: 140px; | 1616 | width: 140px; |
| 1902 | } | 1617 | } |
| 1618 | + | ||
| 1903 | .answer-title { | 1619 | .answer-title { |
| 1904 | text-align: center; | 1620 | text-align: center; |
| 1905 | font-size: 20px; | 1621 | font-size: 20px; |
| 1906 | color: #333; | 1622 | color: #333; |
| 1907 | font-weight: 700; | 1623 | font-weight: 700; |
| 1908 | padding-bottom: 20px; | 1624 | padding-bottom: 20px; |
| 1625 | + | ||
| 1909 | .totals { | 1626 | .totals { |
| 1910 | font-size: 16px; | 1627 | font-size: 16px; |
| 1911 | color: #888; | 1628 | color: #888; |
| 1912 | font-weight: normal; | 1629 | font-weight: normal; |
| 1913 | } | 1630 | } |
| 1914 | } | 1631 | } |
| 1632 | + | ||
| 1915 | .answer-box { | 1633 | .answer-box { |
| 1916 | .answer-s { | 1634 | .answer-s { |
| 1917 | display: inline-block; | 1635 | display: inline-block; |
| @@ -1924,6 +1642,7 @@ export default { | @@ -1924,6 +1642,7 @@ export default { | ||
| 1924 | color: #333; | 1642 | color: #333; |
| 1925 | text-align: center; | 1643 | text-align: center; |
| 1926 | line-height: 30px; | 1644 | line-height: 30px; |
| 1645 | + | ||
| 1927 | &.active { | 1646 | &.active { |
| 1928 | background: #5e78fa; | 1647 | background: #5e78fa; |
| 1929 | border-color: #5e78fa; | 1648 | border-color: #5e78fa; |
| @@ -1931,6 +1650,7 @@ export default { | @@ -1931,6 +1650,7 @@ export default { | ||
| 1931 | } | 1650 | } |
| 1932 | } | 1651 | } |
| 1933 | } | 1652 | } |
| 1653 | + | ||
| 1934 | .qs-options { | 1654 | .qs-options { |
| 1935 | .answer-s { | 1655 | .answer-s { |
| 1936 | display: inline-block; | 1656 | display: inline-block; |
| @@ -1944,6 +1664,7 @@ export default { | @@ -1944,6 +1664,7 @@ export default { | ||
| 1944 | text-align: center; | 1664 | text-align: center; |
| 1945 | line-height: 30px; | 1665 | line-height: 30px; |
| 1946 | cursor: pointer; | 1666 | cursor: pointer; |
| 1667 | + | ||
| 1947 | &.active { | 1668 | &.active { |
| 1948 | background: #5e78fa; | 1669 | background: #5e78fa; |
| 1949 | border-color: #5e78fa; | 1670 | border-color: #5e78fa; |
| @@ -1951,11 +1672,13 @@ export default { | @@ -1951,11 +1672,13 @@ export default { | ||
| 1951 | } | 1672 | } |
| 1952 | } | 1673 | } |
| 1953 | } | 1674 | } |
| 1675 | + | ||
| 1954 | .sub-questions { | 1676 | .sub-questions { |
| 1955 | width: 100%; | 1677 | width: 100%; |
| 1956 | display: flex; | 1678 | display: flex; |
| 1957 | border-bottom: 1px solid #e2e2e2; | 1679 | border-bottom: 1px solid #e2e2e2; |
| 1958 | - & > div { | 1680 | + |
| 1681 | + &>div { | ||
| 1959 | min-height: 40px; | 1682 | min-height: 40px; |
| 1960 | padding: 5px; | 1683 | padding: 5px; |
| 1961 | flex-shrink: 0; | 1684 | flex-shrink: 0; |
| @@ -1964,30 +1687,38 @@ export default { | @@ -1964,30 +1687,38 @@ export default { | ||
| 1964 | justify-content: center; | 1687 | justify-content: center; |
| 1965 | align-items: center; | 1688 | align-items: center; |
| 1966 | } | 1689 | } |
| 1690 | + | ||
| 1967 | .qs-num { | 1691 | .qs-num { |
| 1968 | - width: 80px; | 1692 | + width: 70px; |
| 1969 | } | 1693 | } |
| 1694 | + | ||
| 1970 | .qs-type { | 1695 | .qs-type { |
| 1971 | width: 160px; | 1696 | width: 160px; |
| 1972 | } | 1697 | } |
| 1698 | + | ||
| 1973 | .qs-score, | 1699 | .qs-score, |
| 1974 | .qs-partScore { | 1700 | .qs-partScore { |
| 1975 | width: 160px; | 1701 | width: 160px; |
| 1976 | } | 1702 | } |
| 1703 | + | ||
| 1977 | .qs-options { | 1704 | .qs-options { |
| 1978 | flex: 1; | 1705 | flex: 1; |
| 1979 | } | 1706 | } |
| 1707 | + | ||
| 1980 | .qs-set { | 1708 | .qs-set { |
| 1981 | - width: 80px; | 1709 | + width: 60px; |
| 1982 | } | 1710 | } |
| 1711 | + | ||
| 1983 | .qs-options2 { | 1712 | .qs-options2 { |
| 1984 | text-align: left; | 1713 | text-align: left; |
| 1985 | justify-content: flex-start; | 1714 | justify-content: flex-start; |
| 1986 | padding-left: 20px; | 1715 | padding-left: 20px; |
| 1716 | + | ||
| 1987 | .answer-s { | 1717 | .answer-s { |
| 1988 | cursor: pointer; | 1718 | cursor: pointer; |
| 1989 | } | 1719 | } |
| 1990 | } | 1720 | } |
| 1721 | + | ||
| 1991 | :deep(.el-select) { | 1722 | :deep(.el-select) { |
| 1992 | .el-input__inner { | 1723 | .el-input__inner { |
| 1993 | border-radius: 20px; | 1724 | border-radius: 20px; |
| @@ -1997,9 +1728,23 @@ export default { | @@ -1997,9 +1728,23 @@ export default { | ||
| 1997 | line-height: 32px; | 1728 | line-height: 32px; |
| 1998 | background: rgba($color: #667ffd, $alpha: 0.05); | 1729 | background: rgba($color: #667ffd, $alpha: 0.05); |
| 1999 | } | 1730 | } |
| 1731 | + | ||
| 2000 | .el-input__icon { | 1732 | .el-input__icon { |
| 2001 | line-height: 32px; | 1733 | line-height: 32px; |
| 2002 | } | 1734 | } |
| 2003 | } | 1735 | } |
| 2004 | } | 1736 | } |
| 1737 | + | ||
| 1738 | +.upload-box { | ||
| 1739 | + .upload-demo { | ||
| 1740 | + text-align: center; | ||
| 1741 | + } | ||
| 1742 | + | ||
| 1743 | + .stem-pic { | ||
| 1744 | + display: block; | ||
| 1745 | + margin: 0 auto 20px; | ||
| 1746 | + height: 200px; | ||
| 1747 | + object-fit: cover; | ||
| 1748 | + } | ||
| 1749 | +} | ||
| 2005 | </style> | 1750 | </style> |
| 2006 | \ No newline at end of file | 1751 | \ No newline at end of file |
src/views/examinationPaper/edit.vue
| @@ -141,39 +141,6 @@ | @@ -141,39 +141,6 @@ | ||
| 141 | </template> | 141 | </template> |
| 142 | </p> | 142 | </p> |
| 143 | </div> | 143 | </div> |
| 144 | - <!-- <div class="qs-set"> | ||
| 145 | - <el-tooltip effect="dark" content="上传提干" placement="top"> | ||
| 146 | - <el-button | ||
| 147 | - type="primary" | ||
| 148 | - circle | ||
| 149 | - size="mini" | ||
| 150 | - icon="el-icon-tickets" | ||
| 151 | - @click="openStem(subQuestions, 1, index, indexs)" | ||
| 152 | - ></el-button> | ||
| 153 | - </el-tooltip> | ||
| 154 | - <el-tooltip effect="dark" content="题目打标" placement="top"> | ||
| 155 | - <el-button | ||
| 156 | - type="primary" | ||
| 157 | - circle | ||
| 158 | - size="mini" | ||
| 159 | - icon="el-icon-price-tag" | ||
| 160 | - @click="openTag(subQuestions, 3, index, indexs)" | ||
| 161 | - ></el-button> | ||
| 162 | - </el-tooltip> | ||
| 163 | - <el-tooltip | ||
| 164 | - effect="dark" | ||
| 165 | - content="上传题目解析" | ||
| 166 | - placement="top" | ||
| 167 | - > | ||
| 168 | - <el-button | ||
| 169 | - type="primary" | ||
| 170 | - circle | ||
| 171 | - size="mini" | ||
| 172 | - icon="el-icon-upload" | ||
| 173 | - @click="openStem(subQuestions, 2, index, indexs)" | ||
| 174 | - ></el-button> | ||
| 175 | - </el-tooltip> | ||
| 176 | - </div> --> | ||
| 177 | </div> | 144 | </div> |
| 178 | </li> | 145 | </li> |
| 179 | </ul> | 146 | </ul> |
| @@ -274,35 +241,6 @@ | @@ -274,35 +241,6 @@ | ||
| 274 | </template> | 241 | </template> |
| 275 | </p> | 242 | </p> |
| 276 | </div> | 243 | </div> |
| 277 | - <!-- <div class="qs-set"> | ||
| 278 | - <el-tooltip effect="dark" content="上传提干" placement="top"> | ||
| 279 | - <el-button | ||
| 280 | - type="primary" | ||
| 281 | - circle | ||
| 282 | - size="mini" | ||
| 283 | - icon="el-icon-tickets" | ||
| 284 | - @click="openStem(subQuestions, 1, indexs)" | ||
| 285 | - ></el-button> | ||
| 286 | - </el-tooltip> | ||
| 287 | - <el-tooltip effect="dark" content="题目打标" placement="top"> | ||
| 288 | - <el-button | ||
| 289 | - type="primary" | ||
| 290 | - circle | ||
| 291 | - size="mini" | ||
| 292 | - icon="el-icon-price-tag" | ||
| 293 | - @click="openTag(subQuestions, 3, indexs)" | ||
| 294 | - ></el-button> | ||
| 295 | - </el-tooltip> | ||
| 296 | - <el-tooltip effect="dark" content="上传题目解析" placement="top"> | ||
| 297 | - <el-button | ||
| 298 | - type="primary" | ||
| 299 | - circle | ||
| 300 | - size="mini" | ||
| 301 | - icon="el-icon-upload" | ||
| 302 | - @click="openStem(subQuestions, 2, indexs)" | ||
| 303 | - ></el-button> | ||
| 304 | - </el-tooltip> | ||
| 305 | - </div> --> | ||
| 306 | </div> | 244 | </div> |
| 307 | </li> | 245 | </li> |
| 308 | </ul> | 246 | </ul> |
| @@ -395,77 +333,6 @@ | @@ -395,77 +333,6 @@ | ||
| 395 | <el-button @click="diaSetAns = false">取 消</el-button> | 333 | <el-button @click="diaSetAns = false">取 消</el-button> |
| 396 | </div> | 334 | </div> |
| 397 | </el-dialog> | 335 | </el-dialog> |
| 398 | - <el-dialog | ||
| 399 | - :close-on-click-modal="false" | ||
| 400 | - :title="stem.type == 1 ? '上传题干' : '上传题目解析'" | ||
| 401 | - :visible.sync="dialogStem" | ||
| 402 | - v-if="dialogStem" | ||
| 403 | - width="500" | ||
| 404 | - > | ||
| 405 | - <div class="upload-box"> | ||
| 406 | - <img | ||
| 407 | - v-if="stem.screenshot || stem.answerScreenshot" | ||
| 408 | - :src=" | ||
| 409 | - stem.type == 1 | ||
| 410 | - ? stem.screenshotSrc || stem.screenshot | ||
| 411 | - : stem.answerScreenshotSrc || stem.answerScreenshot | ||
| 412 | - " | ||
| 413 | - class="stem-pic" | ||
| 414 | - /> | ||
| 415 | - <el-upload | ||
| 416 | - class="upload-demo" | ||
| 417 | - action="http://121.40.127.171/file/uploadImg" | ||
| 418 | - :limit="1" | ||
| 419 | - :on-success="upSuccess" | ||
| 420 | - :on-error="upError" | ||
| 421 | - accept="image/*" | ||
| 422 | - > | ||
| 423 | - <el-button size="small" type="primary">{{ | ||
| 424 | - stem.screenshot || stem.answerScreenshot ? "重新上传" : "选择照片" | ||
| 425 | - }}</el-button> | ||
| 426 | - </el-upload> | ||
| 427 | - </div> | ||
| 428 | - <div slot="footer"> | ||
| 429 | - <el-button @click="dialogStem = false">关闭弹窗</el-button> | ||
| 430 | - </div> | ||
| 431 | - </el-dialog> | ||
| 432 | - <el-dialog | ||
| 433 | - :close-on-click-modal="false" | ||
| 434 | - title="题目打标" | ||
| 435 | - :visible.sync="dialogTag" | ||
| 436 | - width="500" | ||
| 437 | - > | ||
| 438 | - <div> | ||
| 439 | - <el-form ref="form" :model="stem" label-width="160px"> | ||
| 440 | - <el-form-item label="题目难度:"> | ||
| 441 | - <el-select | ||
| 442 | - v-model="stem.difficultyFactor" | ||
| 443 | - placeholder="选择题目难度" | ||
| 444 | - > | ||
| 445 | - <el-option label="简单" value="简单"></el-option> | ||
| 446 | - <el-option label="正常" value="正常"></el-option> | ||
| 447 | - <el-option label="困难" value="困难"></el-option> | ||
| 448 | - </el-select> | ||
| 449 | - </el-form-item> | ||
| 450 | - <el-form-item label="知识点:"> | ||
| 451 | - <el-select | ||
| 452 | - v-model="stem.knowledge" | ||
| 453 | - multiple | ||
| 454 | - placeholder="选择知识点" | ||
| 455 | - > | ||
| 456 | - <el-option label="生字积累" value="生字积累"></el-option> | ||
| 457 | - <el-option label="字词运用" value="字词运用"></el-option> | ||
| 458 | - <el-option label="阅读理解" value="阅读理解"></el-option> | ||
| 459 | - <el-option label="写作方法" value="写作方法"></el-option> | ||
| 460 | - </el-select> | ||
| 461 | - </el-form-item> | ||
| 462 | - </el-form> | ||
| 463 | - </div> | ||
| 464 | - <div slot="footer"> | ||
| 465 | - <el-button @click="dialogTag = false">取 消</el-button> | ||
| 466 | - <el-button type="primary" @click="setKnowledge">确 定</el-button> | ||
| 467 | - </div> | ||
| 468 | - </el-dialog> | ||
| 469 | </div> | 336 | </div> |
| 470 | </div> | 337 | </div> |
| 471 | </template> | 338 | </template> |
| @@ -476,19 +343,6 @@ export default { | @@ -476,19 +343,6 @@ export default { | ||
| 476 | data() { | 343 | data() { |
| 477 | return { | 344 | return { |
| 478 | role: "", | 345 | role: "", |
| 479 | - dialogStem: false, | ||
| 480 | - dialogTag: false, | ||
| 481 | - stem: { | ||
| 482 | - type: 1, //类型 | ||
| 483 | - index: 0, //大题位置 | ||
| 484 | - indexs: 0, //小题位置 | ||
| 485 | - screenshot: "", //题干图片id | ||
| 486 | - answerScreenshot: "", //题干解析图片id | ||
| 487 | - screenshotSrc: "", //题干图片地址显示用保存时删除 | ||
| 488 | - answerScreenshotSrc: "", //题干解析图片地址显示用保存时删除 | ||
| 489 | - difficultyFactor: 0, //题目难度 | ||
| 490 | - knowledge: [], //知识点 | ||
| 491 | - }, | ||
| 492 | title: "", | 346 | title: "", |
| 493 | type: 1, | 347 | type: 1, |
| 494 | questionList: [], | 348 | questionList: [], |
| @@ -542,77 +396,6 @@ export default { | @@ -542,77 +396,6 @@ export default { | ||
| 542 | this._QueryDetail(); | 396 | this._QueryDetail(); |
| 543 | }, | 397 | }, |
| 544 | methods: { | 398 | methods: { |
| 545 | - openStem(obj, type, index, indexs) { | ||
| 546 | - //上传截图 | ||
| 547 | - this.stem.type = type; | ||
| 548 | - this.stem.index = index; | ||
| 549 | - this.stem.indexs = indexs; | ||
| 550 | - if (type == 1) { | ||
| 551 | - this.stem.screenshot = obj.screenshot || ""; | ||
| 552 | - this.stem.screenshotSrc = obj.screenshotSrc || ""; | ||
| 553 | - this.stem.answerScreenshot = ""; | ||
| 554 | - this.stem.answerScreenshotSrc = ""; | ||
| 555 | - } else { | ||
| 556 | - this.stem.screenshot = ""; | ||
| 557 | - this.stem.screenshotSrc = ""; | ||
| 558 | - this.stem.answerScreenshot = obj.answerScreenshot || ""; | ||
| 559 | - this.stem.answerScreenshotSrc = obj.answerScreenshotSrc || ""; | ||
| 560 | - } | ||
| 561 | - this.dialogStem = true; | ||
| 562 | - }, | ||
| 563 | - openTag(obj, type, index, indexs) { | ||
| 564 | - //难度,知识点 | ||
| 565 | - this.stem = { ...this.stem, obj }; | ||
| 566 | - this.stem.type = type; | ||
| 567 | - this.stem.index = index; | ||
| 568 | - this.stem.indexs = indexs; | ||
| 569 | - this.stem.knowledge = (obj.knowledge && obj.knowledge.split(",")) || []; | ||
| 570 | - this.stem.difficultyFactor = obj.difficultyFactor || ""; | ||
| 571 | - this.dialogTag = true; | ||
| 572 | - }, | ||
| 573 | - upSuccess(res, file) { | ||
| 574 | - //图片上传成功 | ||
| 575 | - if (res && res.status == 0) { | ||
| 576 | - let keys = this.stem.type == 1 ? "screenshot" : "answerScreenshot"; | ||
| 577 | - this.stem[keys + "Src"] = res.data.url; | ||
| 578 | - this.stem[keys] = res.data.resId; | ||
| 579 | - if (this.questionList[0].subQuestions) { | ||
| 580 | - this.questionList[this.stem.index].subQuestions[this.stem.indexs][ | ||
| 581 | - keys | ||
| 582 | - ] = this.stem[keys]; | ||
| 583 | - this.questionList[this.stem.index].subQuestions[this.stem.indexs][ | ||
| 584 | - keys + "Src" | ||
| 585 | - ] = this.stem[keys + "Src"]; | ||
| 586 | - } else { | ||
| 587 | - this.questionList[this.stem.index][keys] = this.stem[keys]; | ||
| 588 | - this.questionList[this.stem.index][keys + "Src"] = | ||
| 589 | - this.stem[keys + "Src"]; | ||
| 590 | - } | ||
| 591 | - this.$message.success("上传成功"); | ||
| 592 | - } else { | ||
| 593 | - this.$message.error(res.info); | ||
| 594 | - } | ||
| 595 | - }, | ||
| 596 | - setKnowledge() { | ||
| 597 | - //保存难度、知识点 | ||
| 598 | - if (typeof this.stem.indexs != undefined) { | ||
| 599 | - this.questionList[this.stem.index].subQuestions[ | ||
| 600 | - this.stem.indexs | ||
| 601 | - ].knowledge = this.stem.knowledge.join(","); | ||
| 602 | - this.questionList[this.stem.index].subQuestions[ | ||
| 603 | - this.stem.indexs | ||
| 604 | - ].difficultyFactor = this.stem.difficultyFactor; | ||
| 605 | - } else { | ||
| 606 | - this.questionList[this.stem.index].knowledge = | ||
| 607 | - this.stem.knowledge.join(","); | ||
| 608 | - this.questionList[this.stem.index].difficultyFactor = | ||
| 609 | - this.stem.difficultyFactor; | ||
| 610 | - } | ||
| 611 | - this.dialogTag = false; | ||
| 612 | - }, | ||
| 613 | - upError(res) { | ||
| 614 | - this.$message.error("上传失败"); | ||
| 615 | - }, | ||
| 616 | linkBack() { | 399 | linkBack() { |
| 617 | this.$router.go(-1); | 400 | this.$router.go(-1); |
| 618 | }, | 401 | }, |
| @@ -1255,15 +1038,4 @@ export default { | @@ -1255,15 +1038,4 @@ export default { | ||
| 1255 | } | 1038 | } |
| 1256 | } | 1039 | } |
| 1257 | } | 1040 | } |
| 1258 | -.upload-box { | ||
| 1259 | - .upload-demo { | ||
| 1260 | - text-align: center; | ||
| 1261 | - } | ||
| 1262 | - .stem-pic { | ||
| 1263 | - display: block; | ||
| 1264 | - margin: 0 auto 20px; | ||
| 1265 | - height: 200px; | ||
| 1266 | - object-fit: cover; | ||
| 1267 | - } | ||
| 1268 | -} | ||
| 1269 | </style> | 1041 | </style> |
| 1270 | \ No newline at end of file | 1042 | \ No newline at end of file |
src/views/basic/examinationPaper/edit.vue renamed to src/views/examinationPaper/editAsk.vue
| @@ -2,7 +2,7 @@ | @@ -2,7 +2,7 @@ | ||
| 2 | <div> | 2 | <div> |
| 3 | <back-box> | 3 | <back-box> |
| 4 | <template slot="title"> | 4 | <template slot="title"> |
| 5 | - <span>修改答案</span> | 5 | + <span>{{ type == 1 ? "修改试卷" : "修改答案" }}</span> |
| 6 | </template> | 6 | </template> |
| 7 | </back-box> | 7 | </back-box> |
| 8 | <div class="content"> | 8 | <div class="content"> |
| @@ -14,8 +14,12 @@ | @@ -14,8 +14,12 @@ | ||
| 14 | }}老师修改了答案 | 14 | }}老师修改了答案 |
| 15 | </p></template | 15 | </p></template |
| 16 | > | 16 | > |
| 17 | - <div class="answer-title"> | ||
| 18 | - <p class="name">{{ form.title || title }}</p> | 17 | + <div class="answer-title" :class="type == 1 ? 't-left' : ''"> |
| 18 | + <p class="name-box" v-if="type == 1"> | ||
| 19 | + <span>试卷名称:</span> | ||
| 20 | + <el-input class="ipt-name" v-model="form.title"></el-input> | ||
| 21 | + </p> | ||
| 22 | + <p class="name" v-else>{{ form.title }}</p> | ||
| 19 | <p class="totals">卷面总分:{{ allScore }}分</p> | 23 | <p class="totals">卷面总分:{{ allScore }}分</p> |
| 20 | </div> | 24 | </div> |
| 21 | <template v-if="questionList[0]?.subQuestions"> | 25 | <template v-if="questionList[0]?.subQuestions"> |
| @@ -37,6 +41,7 @@ | @@ -37,6 +41,7 @@ | ||
| 37 | <div class="qs-score">分数</div> | 41 | <div class="qs-score">分数</div> |
| 38 | <div class="qs-partScore">漏选得分</div> | 42 | <div class="qs-partScore">漏选得分</div> |
| 39 | <div class="qs-options qs-options2">选项设置</div> | 43 | <div class="qs-options qs-options2">选项设置</div> |
| 44 | + <!-- <div class="qs-set">操作</div> --> | ||
| 40 | </li> | 45 | </li> |
| 41 | <li | 46 | <li |
| 42 | v-for="(subQuestions, indexs) in question.subQuestions" | 47 | v-for="(subQuestions, indexs) in question.subQuestions" |
| @@ -136,6 +141,39 @@ | @@ -136,6 +141,39 @@ | ||
| 136 | </template> | 141 | </template> |
| 137 | </p> | 142 | </p> |
| 138 | </div> | 143 | </div> |
| 144 | + <div class="qs-set"> | ||
| 145 | + <el-tooltip effect="dark" content="上传提干" placement="top"> | ||
| 146 | + <el-button | ||
| 147 | + type="primary" | ||
| 148 | + circle | ||
| 149 | + size="mini" | ||
| 150 | + icon="el-icon-tickets" | ||
| 151 | + @click="openStem(subQuestions, 1, index, indexs)" | ||
| 152 | + ></el-button> | ||
| 153 | + </el-tooltip> | ||
| 154 | + <el-tooltip effect="dark" content="题目打标" placement="top"> | ||
| 155 | + <el-button | ||
| 156 | + type="primary" | ||
| 157 | + circle | ||
| 158 | + size="mini" | ||
| 159 | + icon="el-icon-price-tag" | ||
| 160 | + @click="openTag(subQuestions, 3, index, indexs)" | ||
| 161 | + ></el-button> | ||
| 162 | + </el-tooltip> | ||
| 163 | + <el-tooltip | ||
| 164 | + effect="dark" | ||
| 165 | + content="上传题目解析" | ||
| 166 | + placement="top" | ||
| 167 | + > | ||
| 168 | + <el-button | ||
| 169 | + type="primary" | ||
| 170 | + circle | ||
| 171 | + size="mini" | ||
| 172 | + icon="el-icon-upload" | ||
| 173 | + @click="openStem(subQuestions, 2, index, indexs)" | ||
| 174 | + ></el-button> | ||
| 175 | + </el-tooltip> | ||
| 176 | + </div> | ||
| 139 | </div> | 177 | </div> |
| 140 | </li> | 178 | </li> |
| 141 | </ul> | 179 | </ul> |
| @@ -147,7 +185,8 @@ | @@ -147,7 +185,8 @@ | ||
| 147 | <div class="qs-type">题型</div> | 185 | <div class="qs-type">题型</div> |
| 148 | <div class="qs-score">分数</div> | 186 | <div class="qs-score">分数</div> |
| 149 | <div class="qs-partScore">漏选得分</div> | 187 | <div class="qs-partScore">漏选得分</div> |
| 150 | - <div class="qs-options qs-options2">选项设置</div> | 188 | + <div class="qs-options qs-options2">答案</div> |
| 189 | + <!-- <div class="qs-set">操作</div> --> | ||
| 151 | </li> | 190 | </li> |
| 152 | <li v-for="(subQuestions, indexs) in questionList" :key="indexs"> | 191 | <li v-for="(subQuestions, indexs) in questionList" :key="indexs"> |
| 153 | <p | 192 | <p |
| @@ -158,7 +197,7 @@ | @@ -158,7 +197,7 @@ | ||
| 158 | subQuestions.subNum > 4 | 197 | subQuestions.subNum > 4 |
| 159 | " | 198 | " |
| 160 | > | 199 | > |
| 161 | - <el-button type="primary" @click="setFormAns(indexs, index)" | 200 | + <el-button type="primary" @click="setFormAns(indexs)" |
| 162 | >批量设置答案</el-button | 201 | >批量设置答案</el-button |
| 163 | > | 202 | > |
| 164 | </p> | 203 | </p> |
| @@ -235,6 +274,35 @@ | @@ -235,6 +274,35 @@ | ||
| 235 | </template> | 274 | </template> |
| 236 | </p> | 275 | </p> |
| 237 | </div> | 276 | </div> |
| 277 | + <div class="qs-set"> | ||
| 278 | + <el-tooltip effect="dark" content="上传提干" placement="top"> | ||
| 279 | + <el-button | ||
| 280 | + type="primary" | ||
| 281 | + circle | ||
| 282 | + size="mini" | ||
| 283 | + icon="el-icon-tickets" | ||
| 284 | + @click="openStem(subQuestions, 1, indexs)" | ||
| 285 | + ></el-button> | ||
| 286 | + </el-tooltip> | ||
| 287 | + <el-tooltip effect="dark" content="题目打标" placement="top"> | ||
| 288 | + <el-button | ||
| 289 | + type="primary" | ||
| 290 | + circle | ||
| 291 | + size="mini" | ||
| 292 | + icon="el-icon-price-tag" | ||
| 293 | + @click="openTag(subQuestions, 3, indexs)" | ||
| 294 | + ></el-button> | ||
| 295 | + </el-tooltip> | ||
| 296 | + <el-tooltip effect="dark" content="上传题目解析" placement="top"> | ||
| 297 | + <el-button | ||
| 298 | + type="primary" | ||
| 299 | + circle | ||
| 300 | + size="mini" | ||
| 301 | + icon="el-icon-upload" | ||
| 302 | + @click="openStem(subQuestions, 2, indexs)" | ||
| 303 | + ></el-button> | ||
| 304 | + </el-tooltip> | ||
| 305 | + </div> | ||
| 238 | </div> | 306 | </div> |
| 239 | </li> | 307 | </li> |
| 240 | </ul> | 308 | </ul> |
| @@ -242,7 +310,8 @@ | @@ -242,7 +310,8 @@ | ||
| 242 | <el-button type="danger" plain round @click="linkBack">取消</el-button> | 310 | <el-button type="danger" plain round @click="linkBack">取消</el-button> |
| 243 | <el-button type="primary" round @click="save">保存</el-button> | 311 | <el-button type="primary" round @click="save">保存</el-button> |
| 244 | </div> | 312 | </div> |
| 245 | - <el-dialog :close-on-click-modal="false" | 313 | + <el-dialog |
| 314 | + :close-on-click-modal="false" | ||
| 246 | title="批量设置答案" | 315 | title="批量设置答案" |
| 247 | :visible.sync="diaSetAns" | 316 | :visible.sync="diaSetAns" |
| 248 | width="400" | 317 | width="400" |
| @@ -326,6 +395,77 @@ | @@ -326,6 +395,77 @@ | ||
| 326 | <el-button @click="diaSetAns = false">取 消</el-button> | 395 | <el-button @click="diaSetAns = false">取 消</el-button> |
| 327 | </div> | 396 | </div> |
| 328 | </el-dialog> | 397 | </el-dialog> |
| 398 | + <el-dialog | ||
| 399 | + :close-on-click-modal="false" | ||
| 400 | + :title="stem.type == 1 ? '上传题干' : '上传题目解析'" | ||
| 401 | + :visible.sync="dialogStem" | ||
| 402 | + v-if="dialogStem" | ||
| 403 | + width="500" | ||
| 404 | + > | ||
| 405 | + <div class="upload-box"> | ||
| 406 | + <img | ||
| 407 | + v-if="stem.screenshot || stem.answerScreenshot" | ||
| 408 | + :src=" | ||
| 409 | + stem.type == 1 | ||
| 410 | + ? stem.screenshotSrc || stem.screenshot | ||
| 411 | + : stem.answerScreenshotSrc || stem.answerScreenshot | ||
| 412 | + " | ||
| 413 | + class="stem-pic" | ||
| 414 | + /> | ||
| 415 | + <el-upload | ||
| 416 | + class="upload-demo" | ||
| 417 | + action="http://121.40.127.171/file/uploadImg" | ||
| 418 | + :limit="1" | ||
| 419 | + :on-success="upSuccess" | ||
| 420 | + :on-error="upError" | ||
| 421 | + accept="image/*" | ||
| 422 | + > | ||
| 423 | + <el-button size="small" type="primary">{{ | ||
| 424 | + stem.screenshot || stem.answerScreenshot ? "重新上传" : "选择照片" | ||
| 425 | + }}</el-button> | ||
| 426 | + </el-upload> | ||
| 427 | + </div> | ||
| 428 | + <div slot="footer"> | ||
| 429 | + <el-button @click="dialogStem = false">关闭弹窗</el-button> | ||
| 430 | + </div> | ||
| 431 | + </el-dialog> | ||
| 432 | + <el-dialog | ||
| 433 | + :close-on-click-modal="false" | ||
| 434 | + title="题目打标" | ||
| 435 | + :visible.sync="dialogTag" | ||
| 436 | + width="500" | ||
| 437 | + > | ||
| 438 | + <div> | ||
| 439 | + <el-form ref="form" :model="stem" label-width="160px"> | ||
| 440 | + <el-form-item label="题目难度:"> | ||
| 441 | + <el-select | ||
| 442 | + v-model="stem.difficultyFactor" | ||
| 443 | + placeholder="选择题目难度" | ||
| 444 | + > | ||
| 445 | + <el-option label="简单" value="简单"></el-option> | ||
| 446 | + <el-option label="正常" value="正常"></el-option> | ||
| 447 | + <el-option label="困难" value="困难"></el-option> | ||
| 448 | + </el-select> | ||
| 449 | + </el-form-item> | ||
| 450 | + <el-form-item label="知识点:"> | ||
| 451 | + <el-select | ||
| 452 | + v-model="stem.knowledge" | ||
| 453 | + multiple | ||
| 454 | + placeholder="选择知识点" | ||
| 455 | + > | ||
| 456 | + <el-option label="生字积累" value="生字积累"></el-option> | ||
| 457 | + <el-option label="字词运用" value="字词运用"></el-option> | ||
| 458 | + <el-option label="阅读理解" value="阅读理解"></el-option> | ||
| 459 | + <el-option label="写作方法" value="写作方法"></el-option> | ||
| 460 | + </el-select> | ||
| 461 | + </el-form-item> | ||
| 462 | + </el-form> | ||
| 463 | + </div> | ||
| 464 | + <div slot="footer"> | ||
| 465 | + <el-button @click="dialogTag = false">取 消</el-button> | ||
| 466 | + <el-button type="primary" @click="setKnowledge">确 定</el-button> | ||
| 467 | + </div> | ||
| 468 | + </el-dialog> | ||
| 329 | </div> | 469 | </div> |
| 330 | </div> | 470 | </div> |
| 331 | </template> | 471 | </template> |
| @@ -336,6 +476,21 @@ export default { | @@ -336,6 +476,21 @@ export default { | ||
| 336 | data() { | 476 | data() { |
| 337 | return { | 477 | return { |
| 338 | role: "", | 478 | role: "", |
| 479 | + dialogStem: false, | ||
| 480 | + dialogTag: false, | ||
| 481 | + stem: { | ||
| 482 | + type: 1, //类型 | ||
| 483 | + index: 0, //大题位置 | ||
| 484 | + indexs: 0, //小题位置 | ||
| 485 | + screenshot: "", //题干图片id | ||
| 486 | + answerScreenshot: "", //题干解析图片id | ||
| 487 | + screenshotSrc: "", //题干图片地址显示用保存时删除 | ||
| 488 | + answerScreenshotSrc: "", //题干解析图片地址显示用保存时删除 | ||
| 489 | + difficultyFactor: 0, //题目难度 | ||
| 490 | + knowledge: [], //知识点 | ||
| 491 | + }, | ||
| 492 | + title: "", | ||
| 493 | + type: 1, | ||
| 339 | questionList: [], | 494 | questionList: [], |
| 340 | form: { | 495 | form: { |
| 341 | //答题卡详情 | 496 | //答题卡详情 |
| @@ -347,8 +502,6 @@ export default { | @@ -347,8 +502,6 @@ export default { | ||
| 347 | share: 1, | 502 | share: 1, |
| 348 | questionList: [], | 503 | questionList: [], |
| 349 | }, | 504 | }, |
| 350 | - title: "", | ||
| 351 | - type: 1, | ||
| 352 | paperModifyLog: { | 505 | paperModifyLog: { |
| 353 | realName: "", | 506 | realName: "", |
| 354 | modifiedTime: "", | 507 | modifiedTime: "", |
| @@ -374,7 +527,7 @@ export default { | @@ -374,7 +527,7 @@ export default { | ||
| 374 | return a + (Number(b.score) || 0); | 527 | return a + (Number(b.score) || 0); |
| 375 | }, 0); | 528 | }, 0); |
| 376 | } else { | 529 | } else { |
| 377 | - score += item.score; | 530 | + score += (item.score || 0); |
| 378 | } | 531 | } |
| 379 | }, 0); | 532 | }, 0); |
| 380 | return Number(score).toFixed(2); | 533 | return Number(score).toFixed(2); |
| @@ -385,14 +538,83 @@ export default { | @@ -385,14 +538,83 @@ export default { | ||
| 385 | this.$store.getters.info.showRole || | 538 | this.$store.getters.info.showRole || |
| 386 | this.$store.getters.info.permissions[0].role; | 539 | this.$store.getters.info.permissions[0].role; |
| 387 | this.type = this.$route.query.type || 1; | 540 | this.type = this.$route.query.type || 1; |
| 388 | - this.title = this.$route.query.title || ""; | 541 | + this.form.title = this.$route.query.title || ""; |
| 389 | this._QueryDetail(); | 542 | this._QueryDetail(); |
| 390 | }, | 543 | }, |
| 391 | methods: { | 544 | methods: { |
| 545 | + openStem(obj, type, index, indexs) { | ||
| 546 | + //上传截图 | ||
| 547 | + this.stem.type = type; | ||
| 548 | + this.stem.index = index; | ||
| 549 | + this.stem.indexs = indexs; | ||
| 550 | + if (type == 1) { | ||
| 551 | + this.stem.screenshot = obj.screenshot || ""; | ||
| 552 | + this.stem.screenshotSrc = obj.screenshotSrc || ""; | ||
| 553 | + this.stem.answerScreenshot = ""; | ||
| 554 | + this.stem.answerScreenshotSrc = ""; | ||
| 555 | + } else { | ||
| 556 | + this.stem.screenshot = ""; | ||
| 557 | + this.stem.screenshotSrc = ""; | ||
| 558 | + this.stem.answerScreenshot = obj.answerScreenshot || ""; | ||
| 559 | + this.stem.answerScreenshotSrc = obj.answerScreenshotSrc || ""; | ||
| 560 | + } | ||
| 561 | + this.dialogStem = true; | ||
| 562 | + }, | ||
| 563 | + openTag(obj, type, index, indexs) { | ||
| 564 | + //难度,知识点 | ||
| 565 | + this.stem = { ...this.stem, obj }; | ||
| 566 | + this.stem.type = type; | ||
| 567 | + this.stem.index = index; | ||
| 568 | + this.stem.indexs = indexs; | ||
| 569 | + this.stem.knowledge = (obj.knowledge && obj.knowledge.split(",")) || []; | ||
| 570 | + this.stem.difficultyFactor = obj.difficultyFactor || ""; | ||
| 571 | + this.dialogTag = true; | ||
| 572 | + }, | ||
| 573 | + upSuccess(res, file) { | ||
| 574 | + //图片上传成功 | ||
| 575 | + if (res && res.status == 0) { | ||
| 576 | + let keys = this.stem.type == 1 ? "screenshot" : "answerScreenshot"; | ||
| 577 | + this.stem[keys + "Src"] = res.data.url; | ||
| 578 | + this.stem[keys] = res.data.resId; | ||
| 579 | + if (this.questionList[0].subQuestions) { | ||
| 580 | + this.questionList[this.stem.index].subQuestions[this.stem.indexs][ | ||
| 581 | + keys | ||
| 582 | + ] = this.stem[keys]; | ||
| 583 | + this.questionList[this.stem.index].subQuestions[this.stem.indexs][ | ||
| 584 | + keys + "Src" | ||
| 585 | + ] = this.stem[keys + "Src"]; | ||
| 586 | + } else { | ||
| 587 | + this.questionList[this.stem.index][keys] = this.stem[keys]; | ||
| 588 | + this.questionList[this.stem.index][keys + "Src"] = | ||
| 589 | + this.stem[keys + "Src"]; | ||
| 590 | + } | ||
| 591 | + this.$message.success("上传成功"); | ||
| 592 | + } else { | ||
| 593 | + this.$message.error(res.info); | ||
| 594 | + } | ||
| 595 | + }, | ||
| 596 | + setKnowledge() { | ||
| 597 | + //保存难度、知识点 | ||
| 598 | + if (typeof this.stem.indexs != undefined) { | ||
| 599 | + this.questionList[this.stem.index].subQuestions[ | ||
| 600 | + this.stem.indexs | ||
| 601 | + ].knowledge = this.stem.knowledge.join(","); | ||
| 602 | + this.questionList[this.stem.index].subQuestions[ | ||
| 603 | + this.stem.indexs | ||
| 604 | + ].difficultyFactor = this.stem.difficultyFactor; | ||
| 605 | + } else { | ||
| 606 | + this.questionList[this.stem.index].knowledge = | ||
| 607 | + this.stem.knowledge.join(","); | ||
| 608 | + this.questionList[this.stem.index].difficultyFactor = | ||
| 609 | + this.stem.difficultyFactor; | ||
| 610 | + } | ||
| 611 | + this.dialogTag = false; | ||
| 612 | + }, | ||
| 613 | + upError(res) { | ||
| 614 | + this.$message.error("上传失败"); | ||
| 615 | + }, | ||
| 392 | linkBack() { | 616 | linkBack() { |
| 393 | - this.$router.push({ | ||
| 394 | - path: "/examinationPaper", | ||
| 395 | - }); | 617 | + this.$router.go(-1); |
| 396 | }, | 618 | }, |
| 397 | setSubPro(type) { | 619 | setSubPro(type) { |
| 398 | let tit; | 620 | let tit; |
| @@ -563,7 +785,7 @@ export default { | @@ -563,7 +785,7 @@ export default { | ||
| 563 | let startIndex = this.formAns.endIndex - this.formAns.subNum; | 785 | let startIndex = this.formAns.endIndex - this.formAns.subNum; |
| 564 | this.formAns.listIndex = indexs; | 786 | this.formAns.listIndex = indexs; |
| 565 | let answerList = ""; | 787 | let answerList = ""; |
| 566 | - this.questionList[index].map((item, subIdx) => { | 788 | + this.questionList.map((item, subIdx) => { |
| 567 | if (subIdx >= startIndex) { | 789 | if (subIdx >= startIndex) { |
| 568 | answerList += this.setAnswer(item.questionType, item.correctAnswer); | 790 | answerList += this.setAnswer(item.questionType, item.correctAnswer); |
| 569 | if (subIdx != indexs) { | 791 | if (subIdx != indexs) { |
| @@ -633,12 +855,25 @@ export default { | @@ -633,12 +855,25 @@ export default { | ||
| 633 | for (let j = 0; j < this.questionList[i].subQuestions.length; j++) { | 855 | for (let j = 0; j < this.questionList[i].subQuestions.length; j++) { |
| 634 | if (this.questionList[i].subQuestions[j].qusType) { | 856 | if (this.questionList[i].subQuestions[j].qusType) { |
| 635 | this.questionList[i].subQuestions.splice(j, 1); | 857 | this.questionList[i].subQuestions.splice(j, 1); |
| 858 | + } else { | ||
| 859 | + if (!!this.questionList[i].subQuestions[j].answerScreenshotSrc) { | ||
| 860 | + delete this.questionList[i].subQuestions[j].answerScreenshotSrc; | ||
| 861 | + } | ||
| 862 | + if (!!this.questionList[i].subQuestions[j].screenshotSrc) { | ||
| 863 | + delete this.questionList[i].subQuestions[j].screenshotSrc; | ||
| 864 | + } | ||
| 636 | } | 865 | } |
| 637 | } | 866 | } |
| 638 | } else { | 867 | } else { |
| 639 | if (this.questionList[i].qusType) { | 868 | if (this.questionList[i].qusType) { |
| 640 | this.questionList.splice(i, 1); | 869 | this.questionList.splice(i, 1); |
| 641 | i--; | 870 | i--; |
| 871 | + if (!!this.questionList[i].answerScreenshotSrc) { | ||
| 872 | + delete this.questionList[i].answerScreenshotSrc; | ||
| 873 | + } | ||
| 874 | + if (!!this.questionList[i].screenshotSrc) { | ||
| 875 | + delete this.questionList[i].screenshotSrc; | ||
| 876 | + } | ||
| 642 | } | 877 | } |
| 643 | } | 878 | } |
| 644 | } | 879 | } |
| @@ -678,11 +913,14 @@ export default { | @@ -678,11 +913,14 @@ export default { | ||
| 678 | questionList: questionList, | 913 | questionList: questionList, |
| 679 | }; | 914 | }; |
| 680 | } | 915 | } |
| 681 | - const { data, status, info } = await modifyPaper(params); | 916 | + const { data, status, info } = await modifyPaper({ |
| 917 | + title: this.form.title, | ||
| 918 | + ...params, | ||
| 919 | + }); | ||
| 682 | if (status == 0) { | 920 | if (status == 0) { |
| 683 | this.$router.go(-1); | 921 | this.$router.go(-1); |
| 684 | } else { | 922 | } else { |
| 685 | - this.$message.error(info); | 923 | + this.$message.error(message); |
| 686 | } | 924 | } |
| 687 | }, | 925 | }, |
| 688 | async _QueryDetail() { | 926 | async _QueryDetail() { |
| @@ -713,12 +951,18 @@ export default { | @@ -713,12 +951,18 @@ export default { | ||
| 713 | }; | 951 | }; |
| 714 | const { data, status, info } = await detail(params); | 952 | const { data, status, info } = await detail(params); |
| 715 | if (status == 0) { | 953 | if (status == 0) { |
| 716 | - this.form = deepClone(data); | ||
| 717 | - this.questionList = deepClone(this.form.questionList || data.list); | ||
| 718 | - this.paperModifyLog = { | ||
| 719 | - ...this.paperModifyLog, | ||
| 720 | - ...this.form.paperModifyLog, | ||
| 721 | - }; | 954 | + if (this.type == 1) { |
| 955 | + this.paperModifyLog = { | ||
| 956 | + ...this.paperModifyLog, | ||
| 957 | + ...this.form.paperModifyLog, | ||
| 958 | + }; | ||
| 959 | + this.form = deepClone(data); | ||
| 960 | + this.questionList = deepClone(this.form.questionList); | ||
| 961 | + } else { | ||
| 962 | + this.questionList = data.list.sort((a, b) => { | ||
| 963 | + return a.questionIndex - b.questionIndex; | ||
| 964 | + }); | ||
| 965 | + } | ||
| 722 | if (!!this.questionList[0]?.subQuestions) { | 966 | if (!!this.questionList[0]?.subQuestions) { |
| 723 | this.questionList?.map((item) => { | 967 | this.questionList?.map((item) => { |
| 724 | let types = [{}]; | 968 | let types = [{}]; |
| @@ -833,7 +1077,7 @@ export default { | @@ -833,7 +1077,7 @@ export default { | ||
| 833 | types[i].answerList = types[i].answerList.slice(0, -1); | 1077 | types[i].answerList = types[i].answerList.slice(0, -1); |
| 834 | } | 1078 | } |
| 835 | if (types[i].subNum >= 5) { | 1079 | if (types[i].subNum >= 5) { |
| 836 | - item.subQuestions.splice( | 1080 | + this.questionList.splice( |
| 837 | types[i].index + i + 1, | 1081 | types[i].index + i + 1, |
| 838 | 0, | 1082 | 0, |
| 839 | deepClone(types[i]) | 1083 | deepClone(types[i]) |
| @@ -841,7 +1085,6 @@ export default { | @@ -841,7 +1085,6 @@ export default { | ||
| 841 | } | 1085 | } |
| 842 | } | 1086 | } |
| 843 | } | 1087 | } |
| 844 | - console.log(this.questionList); | ||
| 845 | } else { | 1088 | } else { |
| 846 | this.$message.error(info); | 1089 | this.$message.error(info); |
| 847 | } | 1090 | } |
| @@ -854,7 +1097,7 @@ export default { | @@ -854,7 +1097,7 @@ export default { | ||
| 854 | .content { | 1097 | .content { |
| 855 | width: 100%; | 1098 | width: 100%; |
| 856 | box-sizing: border-box; | 1099 | box-sizing: border-box; |
| 857 | - padding: 0 50px; | 1100 | + padding: 0 50px 60px; |
| 858 | .ml-20 { | 1101 | .ml-20 { |
| 859 | margin-left: 20px; | 1102 | margin-left: 20px; |
| 860 | } | 1103 | } |
| @@ -863,7 +1106,7 @@ export default { | @@ -863,7 +1106,7 @@ export default { | ||
| 863 | position: fixed; | 1106 | position: fixed; |
| 864 | right: 40px; | 1107 | right: 40px; |
| 865 | bottom: 20px; | 1108 | bottom: 20px; |
| 866 | - padding: 10px 0 20px; | 1109 | + padding: 10px 0 5px; |
| 867 | background: #fff; | 1110 | background: #fff; |
| 868 | text-align: right; | 1111 | text-align: right; |
| 869 | margin-left: 140px; | 1112 | margin-left: 140px; |
| @@ -890,10 +1133,26 @@ export default { | @@ -890,10 +1133,26 @@ export default { | ||
| 890 | color: #333; | 1133 | color: #333; |
| 891 | font-weight: 700; | 1134 | font-weight: 700; |
| 892 | padding: 20px 0; | 1135 | padding: 20px 0; |
| 1136 | + &.t-left { | ||
| 1137 | + text-align: left; | ||
| 1138 | + } | ||
| 893 | .totals { | 1139 | .totals { |
| 894 | font-size: 16px; | 1140 | font-size: 16px; |
| 895 | - color: #888; | 1141 | + color: #666; |
| 1142 | + font-weight: normal; | ||
| 1143 | + } | ||
| 1144 | + .name-box { | ||
| 1145 | + display: flex; | ||
| 1146 | + white-space: nowrap; | ||
| 1147 | + align-items: center; | ||
| 1148 | + margin-bottom: 10px; | ||
| 1149 | + font-size: 16px; | ||
| 896 | font-weight: normal; | 1150 | font-weight: normal; |
| 1151 | + :deep(.el-input__inner) { | ||
| 1152 | + font-size: 16px; | ||
| 1153 | + color: #333; | ||
| 1154 | + font-weight: 700; | ||
| 1155 | + } | ||
| 897 | } | 1156 | } |
| 898 | } | 1157 | } |
| 899 | .question-title { | 1158 | .question-title { |
| @@ -926,7 +1185,9 @@ export default { | @@ -926,7 +1185,9 @@ export default { | ||
| 926 | .el-input-number { | 1185 | .el-input-number { |
| 927 | width: 140px; | 1186 | width: 140px; |
| 928 | } | 1187 | } |
| 929 | - | 1188 | +.delete { |
| 1189 | + margin-left: 8px; | ||
| 1190 | +} | ||
| 930 | .questions-ul { | 1191 | .questions-ul { |
| 931 | border-left: 1px solid #e2e2e2; | 1192 | border-left: 1px solid #e2e2e2; |
| 932 | border-top: 1px solid #e2e2e2; | 1193 | border-top: 1px solid #e2e2e2; |
| @@ -955,12 +1216,12 @@ export default { | @@ -955,12 +1216,12 @@ export default { | ||
| 955 | .qs-partScore { | 1216 | .qs-partScore { |
| 956 | width: 160px; | 1217 | width: 160px; |
| 957 | } | 1218 | } |
| 1219 | + .qs-set { | ||
| 1220 | + width: 180px; | ||
| 1221 | + } | ||
| 958 | .qs-options { | 1222 | .qs-options { |
| 959 | flex: 1; | 1223 | flex: 1; |
| 960 | } | 1224 | } |
| 961 | - .qs-set { | ||
| 962 | - width: 80px; | ||
| 963 | - } | ||
| 964 | .qs-options2 { | 1225 | .qs-options2 { |
| 965 | text-align: left; | 1226 | text-align: left; |
| 966 | justify-content: flex-start; | 1227 | justify-content: flex-start; |
| @@ -994,4 +1255,15 @@ export default { | @@ -994,4 +1255,15 @@ export default { | ||
| 994 | } | 1255 | } |
| 995 | } | 1256 | } |
| 996 | } | 1257 | } |
| 1258 | +.upload-box { | ||
| 1259 | + .upload-demo { | ||
| 1260 | + text-align: center; | ||
| 1261 | + } | ||
| 1262 | + .stem-pic { | ||
| 1263 | + display: block; | ||
| 1264 | + margin: 0 auto 20px; | ||
| 1265 | + height: 200px; | ||
| 1266 | + object-fit: cover; | ||
| 1267 | + } | ||
| 1268 | +} | ||
| 997 | </style> | 1269 | </style> |
| 998 | \ No newline at end of file | 1270 | \ No newline at end of file |
src/views/examinationPaper/index.vue
| @@ -5,88 +5,47 @@ | @@ -5,88 +5,47 @@ | ||
| 5 | <span>备题组卷</span> | 5 | <span>备题组卷</span> |
| 6 | </template> | 6 | </template> |
| 7 | <template slot="btns"> | 7 | <template slot="btns"> |
| 8 | - <el-tooltip | ||
| 9 | - v-if="!code && gdClass" | ||
| 10 | - effect="dark" | ||
| 11 | - content="已归档试卷" | ||
| 12 | - placement="bottom" | ||
| 13 | - > | ||
| 14 | - <el-button | ||
| 15 | - type="primary" | ||
| 16 | - icon="fa fa-archive" | ||
| 17 | - size="mini" | ||
| 18 | - plain | ||
| 19 | - circle | ||
| 20 | - @click="toArchiving" | ||
| 21 | - ></el-button> | 8 | + <el-tooltip v-if="!code && gdClass" effect="dark" content="已归档试卷" placement="bottom"> |
| 9 | + <el-button type="primary" icon="fa fa-archive" size="mini" plain circle @click="toArchiving"></el-button> | ||
| 22 | </el-tooltip> | 10 | </el-tooltip> |
| 23 | - <el-button | ||
| 24 | - type="primary" | ||
| 25 | - size="mini" | ||
| 26 | - icon="el-icon-plus" | ||
| 27 | - plain | ||
| 28 | - @click="toAdd({})" | ||
| 29 | - > | ||
| 30 | - 添加答题卡</el-button | ||
| 31 | - > | ||
| 32 | </template> | 11 | </template> |
| 33 | </back-box> | 12 | </back-box> |
| 13 | + <div class="examinationPaper-type"> | ||
| 14 | + <el-button-group> | ||
| 15 | + <el-button size="large" :type="examinationPaperType == 1 ? 'primary' : 'default'" | ||
| 16 | + @click="examinationPaperType = 1">备题</el-button> | ||
| 17 | + <el-button size="large" :type="examinationPaperType == 2 ? 'primary' : 'default'" | ||
| 18 | + @click="examinationPaperType = 2">组卷</el-button> | ||
| 19 | + </el-button-group> | ||
| 34 | 20 | ||
| 21 | + <p> | ||
| 22 | + <el-button v-if="examinationPaperType == 1" type="primary" size="mini" icon="el-icon-plus" round | ||
| 23 | + @click="diaUp = true"> | ||
| 24 | + 导入课件</el-button> | ||
| 25 | + | ||
| 26 | + <el-dropdown v-if="examinationPaperType == 2" trigger="click" @command="handleAdd"> | ||
| 27 | + <el-button type="primary" size="mini" icon="el-icon-plus" round>添加试卷</el-button> | ||
| 28 | + <el-dropdown-menu slot="dropdown"> | ||
| 29 | + <el-dropdown-item :command="1">导入试卷</el-dropdown-item> | ||
| 30 | + <el-dropdown-item :command="2">手动创建</el-dropdown-item> | ||
| 31 | + </el-dropdown-menu> | ||
| 32 | + </el-dropdown> | ||
| 33 | + </p> | ||
| 34 | + </div> | ||
| 35 | <div class="answer-header"> | 35 | <div class="answer-header"> |
| 36 | <div class="sel-box"> | 36 | <div class="sel-box"> |
| 37 | - <el-select | ||
| 38 | - class="sel" | ||
| 39 | - v-model="query.classId" | ||
| 40 | - placeholder="选择班级" | ||
| 41 | - @change="changClazz" | ||
| 42 | - > | ||
| 43 | - <el-option | ||
| 44 | - v-for="item in classList" | ||
| 45 | - :key="item.value" | ||
| 46 | - :label="item.label" | ||
| 47 | - :value="item.value" | ||
| 48 | - > | 37 | + <el-select class="sel" v-model="query.classId" placeholder="选择班级" @change="changClazz"> |
| 38 | + <el-option v-for="item in classList" :key="item.value" :label="item.label" :value="item.value"> | ||
| 49 | </el-option> | 39 | </el-option> |
| 50 | </el-select> | 40 | </el-select> |
| 51 | - <el-select | ||
| 52 | - class="sel" | ||
| 53 | - v-model="query.subjectName" | ||
| 54 | - placeholder="选择科目" | ||
| 55 | - @change="_QueryData()" | ||
| 56 | - > | ||
| 57 | - <el-option | ||
| 58 | - v-for="item in subjectList" | ||
| 59 | - :key="item.value" | ||
| 60 | - :label="item.label" | ||
| 61 | - :value="item.value" | ||
| 62 | - > | 41 | + <el-select class="sel" v-model="query.subjectName" placeholder="选择科目" @change="_QueryData()"> |
| 42 | + <el-option v-for="item in subjectList" :key="item.value" :label="item.label" :value="item.value"> | ||
| 63 | </el-option> | 43 | </el-option> |
| 64 | </el-select> | 44 | </el-select> |
| 65 | - <el-select | ||
| 66 | - class="sel" | ||
| 67 | - v-model="query.tagId" | ||
| 68 | - placeholder="选择类型" | ||
| 69 | - @change="_QueryData()" | ||
| 70 | - > | ||
| 71 | - <el-option | ||
| 72 | - v-for="item in typeList" | ||
| 73 | - :key="item.label" | ||
| 74 | - :label="item.label" | ||
| 75 | - :value="item.value" | ||
| 76 | - >{{ item.label }} | ||
| 77 | - </el-option> | ||
| 78 | - </el-select> | ||
| 79 | - <el-input | ||
| 80 | - placeholder="试卷名称" | ||
| 81 | - v-model="query.title" | ||
| 82 | - class="input-with-select" | ||
| 83 | - @keyup.enter.native="_QueryData(true)" | ||
| 84 | - > | ||
| 85 | - <el-button | ||
| 86 | - slot="append" | ||
| 87 | - icon="el-icon-search" | ||
| 88 | - @click="_QueryData(true)" | ||
| 89 | - ></el-button> | 45 | + |
| 46 | + <el-input placeholder="试卷名称" v-model="query.title" class="input-with-select" | ||
| 47 | + @keyup.enter.native="_QueryData(true)"> | ||
| 48 | + <el-button slot="append" icon="el-icon-search" @click="_QueryData(true)"></el-button> | ||
| 90 | </el-input> | 49 | </el-input> |
| 91 | </div> | 50 | </div> |
| 92 | </div> | 51 | </div> |
| @@ -94,6 +53,7 @@ | @@ -94,6 +53,7 @@ | ||
| 94 | <span>回收站内已有{{ archivedTotal }}份答题卡,</span> | 53 | <span>回收站内已有{{ archivedTotal }}份答题卡,</span> |
| 95 | <router-link to="/examinationPaperRecycle">点击查看>></router-link> | 54 | <router-link to="/examinationPaperRecycle">点击查看>></router-link> |
| 96 | </p> | 55 | </p> |
| 56 | + | ||
| 97 | <ul class="content" v-if="tableData && tableData.length"> | 57 | <ul class="content" v-if="tableData && tableData.length"> |
| 98 | <li class="item" v-for="item in tableData" :key="item.id"> | 58 | <li class="item" v-for="item in tableData" :key="item.id"> |
| 99 | <div class="pic-box"> | 59 | <div class="pic-box"> |
| @@ -112,62 +72,31 @@ | @@ -112,62 +72,31 @@ | ||
| 112 | <em class="s-line">|</em> | 72 | <em class="s-line">|</em> |
| 113 | <template v-if="role != 'ROLE_PERSONAL'"> | 73 | <template v-if="role != 'ROLE_PERSONAL'"> |
| 114 | 授课端同步: | 74 | 授课端同步: |
| 115 | - <span | ||
| 116 | - class="clazz" | ||
| 117 | - v-for="(clazzChild, indexs) in item.classList" | ||
| 118 | - :key="clazzChild.classId" | ||
| 119 | - :class="clazzChild.keepStatus == 1 ? 'active' : ''" | ||
| 120 | - >{{ | ||
| 121 | - `${clazzChild.className}${ | ||
| 122 | - indexs != item.classList.length - 1 ? "、" : "" | ||
| 123 | - }` | 75 | + <span class="clazz" v-for="(clazzChild, indexs) in item.classList" :key="clazzChild.classId" |
| 76 | + :class="clazzChild.keepStatus == 1 ? 'active' : ''">{{ | ||
| 77 | + `${clazzChild.className}${indexs != item.classList.length - 1 ? "、" : "" | ||
| 78 | + }` | ||
| 124 | }} | 79 | }} |
| 125 | - <i v-if="clazzChild.keepStatus == 1" class="el-icon-success"></i | ||
| 126 | - ></span> | ||
| 127 | - <el-tooltip | ||
| 128 | - effect="dark" | ||
| 129 | - content="刷新同步状态" | ||
| 130 | - placement="right" | ||
| 131 | - > | ||
| 132 | - <i | ||
| 133 | - class="icon-refresh el-icon-refresh" | ||
| 134 | - @click="refreshStic" | ||
| 135 | - ></i> | 80 | + <i v-if="clazzChild.keepStatus == 1" class="el-icon-success"></i></span> |
| 81 | + <el-tooltip effect="dark" content="刷新同步状态" placement="right"> | ||
| 82 | + <i class="icon-refresh el-icon-refresh" @click="refreshStic"></i> | ||
| 136 | </el-tooltip> | 83 | </el-tooltip> |
| 137 | </template> | 84 | </template> |
| 138 | </p> | 85 | </p> |
| 139 | <p class="person"> | 86 | <p class="person"> |
| 140 | - {{ item.realName }}<em class="s-line">|</em | ||
| 141 | - ><span class="date">{{ item.modifiedTime }}</span> | 87 | + {{ item.realName }}<em class="s-line">|</em><span class="date">{{ item.modifiedTime }}</span> |
| 142 | </p> | 88 | </p> |
| 143 | </div> | 89 | </div> |
| 144 | <div class="btn-box"> | 90 | <div class="btn-box"> |
| 145 | <el-tooltip effect="dark" content="修改答案" placement="bottom"> | 91 | <el-tooltip effect="dark" content="修改答案" placement="bottom"> |
| 146 | - <el-button | ||
| 147 | - class="edit" | ||
| 148 | - type="primary" | ||
| 149 | - size="mini" | ||
| 150 | - circle | ||
| 151 | - icon="el-icon-edit" | ||
| 152 | - @click="toEdit(item)" | ||
| 153 | - ></el-button> | 92 | + <el-button class="edit" type="primary" size="mini" circle icon="el-icon-edit" |
| 93 | + @click="toEdit(item)"></el-button> | ||
| 154 | </el-tooltip> | 94 | </el-tooltip> |
| 155 | - <el-dropdown | ||
| 156 | - trigger="click" | ||
| 157 | - @command="handleDropdownClick($event, item)" | ||
| 158 | - > | ||
| 159 | - <el-button | ||
| 160 | - type="info" | ||
| 161 | - size="mini" | ||
| 162 | - circle | ||
| 163 | - icon="el-icon-more" | ||
| 164 | - ></el-button> | 95 | + <el-dropdown trigger="click" @command="handleDropdownClick($event, item)"> |
| 96 | + <el-button type="info" size="mini" circle icon="el-icon-more"></el-button> | ||
| 165 | <el-dropdown-menu slot="dropdown"> | 97 | <el-dropdown-menu slot="dropdown"> |
| 166 | - <el-dropdown-item | ||
| 167 | - :command="1" | ||
| 168 | - v-if="userName == item.realName && role != 'ROLE_PERSONAL'" | ||
| 169 | - >修改分享范围</el-dropdown-item | ||
| 170 | - > | 98 | + <el-dropdown-item :command="1" |
| 99 | + v-if="userName == item.realName && role != 'ROLE_PERSONAL'">修改分享范围</el-dropdown-item> | ||
| 171 | <el-dropdown-item :command="2">复制</el-dropdown-item> | 100 | <el-dropdown-item :command="2">复制</el-dropdown-item> |
| 172 | <el-dropdown-item :command="3">放入回收站</el-dropdown-item> | 101 | <el-dropdown-item :command="3">放入回收站</el-dropdown-item> |
| 173 | </el-dropdown-menu> | 102 | </el-dropdown-menu> |
| @@ -176,22 +105,11 @@ | @@ -176,22 +105,11 @@ | ||
| 176 | </li> | 105 | </li> |
| 177 | </ul> | 106 | </ul> |
| 178 | <div class="pagination-box"> | 107 | <div class="pagination-box"> |
| 179 | - <el-pagination | ||
| 180 | - small="" | ||
| 181 | - layout="total,prev, pager, next" | ||
| 182 | - :hide-on-single-page="true" | ||
| 183 | - :total="total" | ||
| 184 | - @current-change="changePage" | ||
| 185 | - :current-page="page" | ||
| 186 | - :page-size="size" | ||
| 187 | - > | 108 | + <el-pagination small="" layout="total,prev, pager, next" :hide-on-single-page="true" :total="total" |
| 109 | + @current-change="changePage" :current-page="page" :page-size="size"> | ||
| 188 | </el-pagination> | 110 | </el-pagination> |
| 189 | </div> | 111 | </div> |
| 190 | - <el-empty | ||
| 191 | - v-if="!loading && tableData.length == 0" | ||
| 192 | - content="没有更多数据" | ||
| 193 | - :image-size="100" | ||
| 194 | - ></el-empty> | 112 | + <el-empty v-if="!loading && tableData.length == 0" content="没有更多数据" :image-size="100"></el-empty> |
| 195 | <el-dialog :close-on-click-modal="false" title="选择分享范围" :visible.sync="dialogVisible" width="400"> | 113 | <el-dialog :close-on-click-modal="false" title="选择分享范围" :visible.sync="dialogVisible" width="400"> |
| 196 | <el-form :model="shareForm" :rules="shareRulesForm" label-width="160px"> | 114 | <el-form :model="shareForm" :rules="shareRulesForm" label-width="160px"> |
| 197 | <el-form-item prop="share" label="分享范围:"> | 115 | <el-form-item prop="share" label="分享范围:"> |
| @@ -206,6 +124,19 @@ | @@ -206,6 +124,19 @@ | ||
| 206 | <el-button @click="dialogVisible = false">取 消</el-button> | 124 | <el-button @click="dialogVisible = false">取 消</el-button> |
| 207 | </div> | 125 | </div> |
| 208 | </el-dialog> | 126 | </el-dialog> |
| 127 | + <el-dialog :close-on-click-modal="false" title="上传word文档" :visible.sync="diaUp" width="600"> | ||
| 128 | + <upload id="upWords" :url="url" @upSuccess="upSuccess" fileName="下载"> | ||
| 129 | + <div class="down-box" slot="down"> | ||
| 130 | + <p>第一步:导出菁优网试卷或 | ||
| 131 | + <el-link type="danger" @click="downExcel">模板下载</el-link> 。 | ||
| 132 | + </p> | ||
| 133 | + <p>第二步:上传完成编辑好的试卷。</p> | ||
| 134 | + </div> | ||
| 135 | + </upload> | ||
| 136 | + <div class="dialog-footer" slot="footer"> | ||
| 137 | + <el-button @click="diaUp = false">取 消</el-button> | ||
| 138 | + </div> | ||
| 139 | + </el-dialog> | ||
| 209 | </div> | 140 | </div> |
| 210 | </template> | 141 | </template> |
| 211 | 142 | ||
| @@ -222,14 +153,12 @@ export default { | @@ -222,14 +153,12 @@ export default { | ||
| 222 | query: { | 153 | query: { |
| 223 | classId: "", | 154 | classId: "", |
| 224 | subjectName: "", | 155 | subjectName: "", |
| 225 | - tagId: "", | ||
| 226 | title: "", | 156 | title: "", |
| 227 | }, | 157 | }, |
| 228 | classList: [], | 158 | classList: [], |
| 229 | subjectList: [], | 159 | subjectList: [], |
| 230 | - typeList: [], | ||
| 231 | archivedTotal: 0, //已归档答题卡数量 | 160 | archivedTotal: 0, //已归档答题卡数量 |
| 232 | - tableData: null, | 161 | + tableData: [], |
| 233 | shareForm: { | 162 | shareForm: { |
| 234 | id: "", | 163 | id: "", |
| 235 | sharingType: 0, //0-任课班级/1-全年级 | 164 | sharingType: 0, //0-任课班级/1-全年级 |
| @@ -242,6 +171,11 @@ export default { | @@ -242,6 +171,11 @@ export default { | ||
| 242 | total: 0, | 171 | total: 0, |
| 243 | page: 1, | 172 | page: 1, |
| 244 | size: 20, | 173 | size: 20, |
| 174 | + | ||
| 175 | + // v1.5 | ||
| 176 | + diaUp: false, | ||
| 177 | + examinationPaperType: 1,//题型类型 | ||
| 178 | + url: "xxxxx",//上传文档地址 | ||
| 245 | }; | 179 | }; |
| 246 | }, | 180 | }, |
| 247 | async created() { | 181 | async created() { |
| @@ -250,14 +184,13 @@ export default { | @@ -250,14 +184,13 @@ export default { | ||
| 250 | this.$store.getters.info.showRole || | 184 | this.$store.getters.info.showRole || |
| 251 | this.$store.getters.info.permissions[0].role; | 185 | this.$store.getters.info.permissions[0].role; |
| 252 | this.userName = this.$store.getters.info.name || ""; | 186 | this.userName = this.$store.getters.info.name || ""; |
| 253 | - this._QueryClassList2() | ||
| 254 | - await this._QueryClassList(); | ||
| 255 | - if (!this.query.classId) { | ||
| 256 | - return; | ||
| 257 | - } | ||
| 258 | - await this._QuerySubjectList(); | ||
| 259 | - this._QueryData(); | ||
| 260 | - this._QueryTypeList(); | 187 | + // this._QueryClassList2() |
| 188 | + // await this._QueryClassList(); | ||
| 189 | + // if (!this.query.classId) { | ||
| 190 | + // return; | ||
| 191 | + // } | ||
| 192 | + // await this._QuerySubjectList(); | ||
| 193 | + // this._QueryData(); | ||
| 261 | }, | 194 | }, |
| 262 | methods: { | 195 | methods: { |
| 263 | refreshStic() { | 196 | refreshStic() { |
| @@ -352,34 +285,6 @@ export default { | @@ -352,34 +285,6 @@ export default { | ||
| 352 | await this._QuerySubjectList(); | 285 | await this._QuerySubjectList(); |
| 353 | this._QueryData(false); | 286 | this._QueryData(false); |
| 354 | }, | 287 | }, |
| 355 | - // 查找答题卡类型 | ||
| 356 | - async _QueryTypeList() { | ||
| 357 | - if (!this.query.classId) return; | ||
| 358 | - let fetchTypeNames = | ||
| 359 | - this.role == "ROLE_PERSONAL" | ||
| 360 | - ? this.$request.pPaperTagList | ||
| 361 | - : this.$request.fetchTypeNames; | ||
| 362 | - | ||
| 363 | - const { data, status, info } = await fetchTypeNames({ | ||
| 364 | - classId: this.query.classId, | ||
| 365 | - type: 0, | ||
| 366 | - }); | ||
| 367 | - if (status === 0) { | ||
| 368 | - this.typeList = | ||
| 369 | - data.list.map((item) => { | ||
| 370 | - return { | ||
| 371 | - value: item.tagId, | ||
| 372 | - label: item.tag, | ||
| 373 | - }; | ||
| 374 | - }) || []; | ||
| 375 | - this.typeList.unshift({ | ||
| 376 | - value: "", | ||
| 377 | - label: "请选择标签", | ||
| 378 | - }); | ||
| 379 | - } else { | ||
| 380 | - this.$message.error(info); | ||
| 381 | - } | ||
| 382 | - }, | ||
| 383 | // 查找班级 | 288 | // 查找班级 |
| 384 | async _QueryClassList2() { | 289 | async _QueryClassList2() { |
| 385 | this.loading = true; | 290 | this.loading = true; |
| @@ -453,8 +358,6 @@ export default { | @@ -453,8 +358,6 @@ export default { | ||
| 453 | query = { ...this.query }; | 358 | query = { ...this.query }; |
| 454 | } else { | 359 | } else { |
| 455 | query = { title: this.query.title }; | 360 | query = { title: this.query.title }; |
| 456 | - this.query.tagId = ""; | ||
| 457 | - // this.query.subjectName = ""; | ||
| 458 | } | 361 | } |
| 459 | query.classId = this.query.classId; | 362 | query.classId = this.query.classId; |
| 460 | query.subjectName = this.query.subjectName; | 363 | query.subjectName = this.query.subjectName; |
| @@ -490,6 +393,41 @@ export default { | @@ -490,6 +393,41 @@ export default { | ||
| 490 | this.$message.error(info); | 393 | this.$message.error(info); |
| 491 | } | 394 | } |
| 492 | }, | 395 | }, |
| 396 | + | ||
| 397 | + | ||
| 398 | + //v1.5 | ||
| 399 | + upSuccess(res) { | ||
| 400 | + //导入成功 | ||
| 401 | + this.$message.closeAll(); | ||
| 402 | + this.$message({ | ||
| 403 | + showClose: true, | ||
| 404 | + message: `成功(${res.data.success})`, | ||
| 405 | + type: "success", | ||
| 406 | + duration: 5000, | ||
| 407 | + }); | ||
| 408 | + this.diaUp = false; | ||
| 409 | + | ||
| 410 | + }, | ||
| 411 | + handleAdd(value) { | ||
| 412 | + if (value == 2) { | ||
| 413 | + this.toAdd() | ||
| 414 | + } else { | ||
| 415 | + this.diaUp = true | ||
| 416 | + } | ||
| 417 | + }, | ||
| 418 | + | ||
| 419 | + | ||
| 420 | + async downExcel() { | ||
| 421 | + let data = await this.$request.teacherTemplate(); | ||
| 422 | + if (data && !data.code) { | ||
| 423 | + let blob = new Blob([data], { | ||
| 424 | + type: "application/vnd.ms-excel;charset=utf-8", | ||
| 425 | + }); | ||
| 426 | + downloadFile(`试卷模版.xlsx`, blob); | ||
| 427 | + } else { | ||
| 428 | + this.$message.error(data.info); | ||
| 429 | + } | ||
| 430 | + }, | ||
| 493 | }, | 431 | }, |
| 494 | }; | 432 | }; |
| 495 | </script> | 433 | </script> |
| @@ -503,11 +441,13 @@ export default { | @@ -503,11 +441,13 @@ export default { | ||
| 503 | color: #999; | 441 | color: #999; |
| 504 | margin-bottom: 10px; | 442 | margin-bottom: 10px; |
| 505 | } | 443 | } |
| 444 | + | ||
| 506 | .content { | 445 | .content { |
| 507 | margin: 0 20px; | 446 | margin: 0 20px; |
| 508 | background: #f8f8f8; | 447 | background: #f8f8f8; |
| 509 | padding: 12px; | 448 | padding: 12px; |
| 510 | border-radius: 20px; | 449 | border-radius: 20px; |
| 450 | + | ||
| 511 | .item { | 451 | .item { |
| 512 | display: flex; | 452 | display: flex; |
| 513 | align-items: center; | 453 | align-items: center; |
| @@ -518,9 +458,11 @@ export default { | @@ -518,9 +458,11 @@ export default { | ||
| 518 | border-radius: 20px; | 458 | border-radius: 20px; |
| 519 | background: #fff; | 459 | background: #fff; |
| 520 | margin-bottom: 12px; | 460 | margin-bottom: 12px; |
| 461 | + | ||
| 521 | &:last-of-type { | 462 | &:last-of-type { |
| 522 | margin-bottom: 0; | 463 | margin-bottom: 0; |
| 523 | } | 464 | } |
| 465 | + | ||
| 524 | .pic-box { | 466 | .pic-box { |
| 525 | width: 80px; | 467 | width: 80px; |
| 526 | height: 80px; | 468 | height: 80px; |
| @@ -531,12 +473,14 @@ export default { | @@ -531,12 +473,14 @@ export default { | ||
| 531 | text-align: center; | 473 | text-align: center; |
| 532 | color: #fff; | 474 | color: #fff; |
| 533 | font-weight: 500; | 475 | font-weight: 500; |
| 476 | + | ||
| 534 | .i-box { | 477 | .i-box { |
| 535 | padding-top: 10px; | 478 | padding-top: 10px; |
| 536 | font-size: 32px; | 479 | font-size: 32px; |
| 537 | margin-bottom: 3px; | 480 | margin-bottom: 3px; |
| 538 | } | 481 | } |
| 539 | } | 482 | } |
| 483 | + | ||
| 540 | .info { | 484 | .info { |
| 541 | min-height: 80px; | 485 | min-height: 80px; |
| 542 | flex: 1; | 486 | flex: 1; |
| @@ -544,14 +488,17 @@ export default { | @@ -544,14 +488,17 @@ export default { | ||
| 544 | display: flex; | 488 | display: flex; |
| 545 | flex-direction: column; | 489 | flex-direction: column; |
| 546 | justify-content: space-between; | 490 | justify-content: space-between; |
| 491 | + | ||
| 547 | .s-line { | 492 | .s-line { |
| 548 | padding: 0 5px; | 493 | padding: 0 5px; |
| 549 | color: #e2e2e2; | 494 | color: #e2e2e2; |
| 550 | } | 495 | } |
| 496 | + | ||
| 551 | .title { | 497 | .title { |
| 552 | font-size: 16px; | 498 | font-size: 16px; |
| 553 | color: #222; | 499 | color: #222; |
| 554 | font-weight: 500; | 500 | font-weight: 500; |
| 501 | + | ||
| 555 | .label { | 502 | .label { |
| 556 | display: inline-block; | 503 | display: inline-block; |
| 557 | font-size: 12px; | 504 | font-size: 12px; |
| @@ -563,61 +510,83 @@ export default { | @@ -563,61 +510,83 @@ export default { | ||
| 563 | transform: translateY(-2px); | 510 | transform: translateY(-2px); |
| 564 | } | 511 | } |
| 565 | } | 512 | } |
| 513 | + | ||
| 566 | .person { | 514 | .person { |
| 567 | color: #666; | 515 | color: #666; |
| 568 | } | 516 | } |
| 569 | } | 517 | } |
| 518 | + | ||
| 570 | .clazz { | 519 | .clazz { |
| 571 | font-size: 14px; | 520 | font-size: 14px; |
| 572 | font-weight: 500; | 521 | font-weight: 500; |
| 573 | position: relative; | 522 | position: relative; |
| 574 | position: relative; | 523 | position: relative; |
| 524 | + | ||
| 575 | &.active { | 525 | &.active { |
| 576 | color: #667ffd; | 526 | color: #667ffd; |
| 577 | } | 527 | } |
| 528 | + | ||
| 578 | .el-icon-success { | 529 | .el-icon-success { |
| 579 | position: absolute; | 530 | position: absolute; |
| 580 | right: 0; | 531 | right: 0; |
| 581 | top: -5px; | 532 | top: -5px; |
| 582 | color: #667ffd; | 533 | color: #667ffd; |
| 583 | } | 534 | } |
| 535 | + | ||
| 584 | &:last-of-type { | 536 | &:last-of-type { |
| 585 | .el-icon-success { | 537 | .el-icon-success { |
| 586 | right: -18px; | 538 | right: -18px; |
| 587 | } | 539 | } |
| 588 | } | 540 | } |
| 589 | } | 541 | } |
| 542 | + | ||
| 590 | .btn-box { | 543 | .btn-box { |
| 591 | flex-shrink: 0; | 544 | flex-shrink: 0; |
| 545 | + | ||
| 592 | .edit { | 546 | .edit { |
| 593 | margin-right: 12px; | 547 | margin-right: 12px; |
| 594 | } | 548 | } |
| 595 | } | 549 | } |
| 550 | + | ||
| 596 | .icon-refresh { | 551 | .icon-refresh { |
| 597 | margin-left: 20px; | 552 | margin-left: 20px; |
| 598 | cursor: pointer; | 553 | cursor: pointer; |
| 554 | + | ||
| 599 | &:hover { | 555 | &:hover { |
| 600 | color: #2e9afe; | 556 | color: #2e9afe; |
| 601 | } | 557 | } |
| 602 | } | 558 | } |
| 603 | } | 559 | } |
| 604 | } | 560 | } |
| 561 | + | ||
| 605 | .answer-header { | 562 | .answer-header { |
| 606 | .sel-box { | 563 | .sel-box { |
| 607 | .sel { | 564 | .sel { |
| 608 | min-width: 160px; | 565 | min-width: 160px; |
| 609 | } | 566 | } |
| 567 | + | ||
| 610 | :deep(.el-cascader__tags) { | 568 | :deep(.el-cascader__tags) { |
| 611 | flex-wrap: nowrap; | 569 | flex-wrap: nowrap; |
| 612 | } | 570 | } |
| 613 | } | 571 | } |
| 614 | } | 572 | } |
| 573 | + | ||
| 615 | .dialog-footer { | 574 | .dialog-footer { |
| 616 | text-align: center; | 575 | text-align: center; |
| 576 | + | ||
| 617 | :deep(.el-button) { | 577 | :deep(.el-button) { |
| 618 | border-radius: 20px; | 578 | border-radius: 20px; |
| 619 | padding: 8px 20px 7px; | 579 | padding: 8px 20px 7px; |
| 620 | margin: 0 12px; | 580 | margin: 0 12px; |
| 621 | } | 581 | } |
| 622 | } | 582 | } |
| 583 | + | ||
| 584 | +// v1.5 | ||
| 585 | +.examinationPaper-type { | ||
| 586 | + padding: 16px 40px 0 20px; | ||
| 587 | + width: 100%; | ||
| 588 | + box-sizing: border-box; | ||
| 589 | + display: flex; | ||
| 590 | + justify-content: space-between; | ||
| 591 | +} | ||
| 623 | </style> | 592 | </style> |
| 624 | \ No newline at end of file | 593 | \ No newline at end of file |
src/views/layout/layout.vue
| @@ -42,10 +42,6 @@ export default { | @@ -42,10 +42,6 @@ export default { | ||
| 42 | code: "", | 42 | code: "", |
| 43 | }; | 43 | }; |
| 44 | }, | 44 | }, |
| 45 | - created() { | ||
| 46 | - // this.initRouter(); | ||
| 47 | - console.log(this.$route.meta.keepAlive) | ||
| 48 | - }, | ||
| 49 | methods: { | 45 | methods: { |
| 50 | initRouter() { | 46 | initRouter() { |
| 51 | this.code = getURLParams("code") || this.$store.getters.code; | 47 | this.code = getURLParams("code") || this.$store.getters.code; |
src/views/personal/setUp/student.vue
| @@ -195,12 +195,12 @@ | @@ -195,12 +195,12 @@ | ||
| 195 | </div> | 195 | </div> |
| 196 | </el-dialog> | 196 | </el-dialog> |
| 197 | <el-dialog :close-on-click-modal="false" title="学生导入" :visible.sync="diaUp" width="600"> | 197 | <el-dialog :close-on-click-modal="false" title="学生导入" :visible.sync="diaUp" width="600"> |
| 198 | - <up-load :url="url" @upSuccess="upSuccess" fileName="学生模板"> | 198 | + <upload :url="url" @upSuccess="upSuccess" fileName="学生模板"> |
| 199 | <p class="down-txt" slot="down"> | 199 | <p class="down-txt" slot="down"> |
| 200 | 通过Excel名单导入学生模板,点击 | 200 | 通过Excel名单导入学生模板,点击 |
| 201 | <el-link type="danger" @click="downExcel">模板下载</el-link> 。 | 201 | <el-link type="danger" @click="downExcel">模板下载</el-link> 。 |
| 202 | </p> | 202 | </p> |
| 203 | - </up-load> | 203 | + </upload> |
| 204 | <div class="dialog-footer" slot="footer"> | 204 | <div class="dialog-footer" slot="footer"> |
| 205 | <el-button @click="diaUp = false">取 消</el-button> | 205 | <el-button @click="diaUp = false">取 消</el-button> |
| 206 | </div> | 206 | </div> |
src/views/personal/test/analysis.vue
| @@ -403,7 +403,7 @@ | @@ -403,7 +403,7 @@ | ||
| 403 | </div> | 403 | </div> |
| 404 | </div> | 404 | </div> |
| 405 | <el-dialog :close-on-click-modal="false" title="导入主观题分数" :visible.sync="diaUp" width="600"> | 405 | <el-dialog :close-on-click-modal="false" title="导入主观题分数" :visible.sync="diaUp" width="600"> |
| 406 | - <up-load :url="url" :examId="id" @upSuccess="upSuccess"> | 406 | + <upload :url="url" :examId="id" @upSuccess="upSuccess"> |
| 407 | <template slot="down"> | 407 | <template slot="down"> |
| 408 | <p class="down-txt"> | 408 | <p class="down-txt"> |
| 409 | 第一步:下载模板并编辑完成学生分数 | 409 | 第一步:下载模板并编辑完成学生分数 |
| @@ -411,7 +411,7 @@ | @@ -411,7 +411,7 @@ | ||
| 411 | </p> | 411 | </p> |
| 412 | <p class="down-txt">第二步:上传完成编辑的模板文件并导入。</p> | 412 | <p class="down-txt">第二步:上传完成编辑的模板文件并导入。</p> |
| 413 | </template> | 413 | </template> |
| 414 | - </up-load> | 414 | + </upload> |
| 415 | <div class="dialog-footer" slot="footer"> | 415 | <div class="dialog-footer" slot="footer"> |
| 416 | <el-button @click="diaUp = false">取 消</el-button> | 416 | <el-button @click="diaUp = false">取 消</el-button> |
| 417 | </div> | 417 | </div> |
src/views/personal/test/index.vue
| @@ -413,7 +413,7 @@ | @@ -413,7 +413,7 @@ | ||
| 413 | </p> | 413 | </p> |
| 414 | </div> | 414 | </div> |
| 415 | <el-dialog :close-on-click-modal="false" title="导入主观题分数" :visible.sync="diaUp" width="600"> | 415 | <el-dialog :close-on-click-modal="false" title="导入主观题分数" :visible.sync="diaUp" width="600"> |
| 416 | - <up-load | 416 | + <upload |
| 417 | :url="url" | 417 | :url="url" |
| 418 | :examId="examId" | 418 | :examId="examId" |
| 419 | @upSuccess="upSuccess" | 419 | @upSuccess="upSuccess" |
| @@ -427,7 +427,7 @@ | @@ -427,7 +427,7 @@ | ||
| 427 | </p> | 427 | </p> |
| 428 | <p class="down-txt">第二步:上传完成编辑的模板文件并导入。</p> | 428 | <p class="down-txt">第二步:上传完成编辑的模板文件并导入。</p> |
| 429 | </template> | 429 | </template> |
| 430 | - </up-load> | 430 | + </upload> |
| 431 | <div class="dialog-footer" slot="footer"> | 431 | <div class="dialog-footer" slot="footer"> |
| 432 | <el-button @click="diaUp = false">取 消</el-button> | 432 | <el-button @click="diaUp = false">取 消</el-button> |
| 433 | </div> | 433 | </div> |