Commit aeac66d4fb3caf29c2e84b36b06502efc29c625f
1 parent
a37317f4
飞书测试bug
Showing
8 changed files
with
105 additions
and
52 deletions
src/assets/css/base.css
| ... | ... | @@ -20,6 +20,15 @@ a { |
| 20 | 20 | text-decoration: none; |
| 21 | 21 | } |
| 22 | 22 | |
| 23 | +input[type="number"] { | |
| 24 | + -moz-appearance: textfield; | |
| 25 | +} | |
| 26 | +input[type="number"]::-webkit-inner-spin-button, | |
| 27 | +input[type="number"]::-webkit-outer-spin-button { | |
| 28 | + -webkit-appearance: none; | |
| 29 | + margin: 0; | |
| 30 | +} | |
| 31 | + | |
| 23 | 32 | /* element-style */ |
| 24 | 33 | .el-button--default { |
| 25 | 34 | color: #667ffd; |
| ... | ... | @@ -31,7 +40,7 @@ a { |
| 31 | 40 | border-color: #667ffd; |
| 32 | 41 | } |
| 33 | 42 | |
| 34 | -.el-radio__input.is-checked+.el-radio__label { | |
| 43 | +.el-radio__input.is-checked + .el-radio__label { | |
| 35 | 44 | color: #667ffd; |
| 36 | 45 | } |
| 37 | 46 | |
| ... | ... | @@ -41,5 +50,5 @@ a { |
| 41 | 50 | } |
| 42 | 51 | |
| 43 | 52 | .el-message-box .el-button--default { |
| 44 | - color: #fff | |
| 53 | + color: #fff; | |
| 45 | 54 | } | ... | ... |
src/store/index.js
| ... | ... | @@ -4,6 +4,7 @@ import Cookies from "js-cookie"; |
| 4 | 4 | import layoutStore from "./modules/layout/index"; |
| 5 | 5 | import { defaultRouter } from "@/router/index"; |
| 6 | 6 | import { encryptLoginPassword } from "@/utils"; |
| 7 | +import { Message } from "element-ui"; | |
| 7 | 8 | |
| 8 | 9 | import request from "@/api/index"; |
| 9 | 10 | import router from "@/router/index"; |
| ... | ... | @@ -69,25 +70,41 @@ const store = new Vuex.Store({ |
| 69 | 70 | let response = res; |
| 70 | 71 | if (response.status == 0) { |
| 71 | 72 | const userInfo = { ...response.data }; |
| 72 | - userInfo.showRoleName = response.data.permissions[0]?.roleName; | |
| 73 | - commit("setToken", "isLogin"); | |
| 74 | - commit("setInfo", { ...userInfo }); | |
| 75 | - commit("setRouters", [...userInfo.permissions[0]?.authorityRouter]); | |
| 76 | - state.addRouters.forEach((res) => { | |
| 77 | - router.addRoute(res); | |
| 78 | - }); | |
| 79 | - router.addRoute({ | |
| 80 | - path: "*", | |
| 81 | - redirect: "/404", | |
| 82 | - hidden: true, | |
| 83 | - children: [], | |
| 84 | - }); | |
| 85 | - console.log(Cookies.get("ZT_YIJIAO_TOKEN")); | |
| 86 | - if (params.url) { | |
| 87 | - window.location.href = params.url; | |
| 73 | + if (userInfo.permissions && userInfo.permissions.length) { | |
| 74 | + userInfo.showRoleName = response.data.permissions[0]?.roleName; | |
| 75 | + commit("setToken", "isLogin"); | |
| 76 | + commit("setInfo", { ...userInfo }); | |
| 77 | + commit("setRouters", [ | |
| 78 | + ...userInfo.permissions[0]?.authorityRouter, | |
| 79 | + ]); | |
| 80 | + state.addRouters.forEach((res) => { | |
| 81 | + router.addRoute(res); | |
| 82 | + }); | |
| 83 | + router.addRoute({ | |
| 84 | + path: "*", | |
| 85 | + redirect: "/404", | |
| 86 | + hidden: true, | |
| 87 | + children: [], | |
| 88 | + }); | |
| 89 | + console.log(Cookies.get("ZT_YIJIAO_TOKEN")); | |
| 90 | + if (params.url) { | |
| 91 | + window.location.href = params.url; | |
| 92 | + } else { | |
| 93 | + router.push({ path: "/" }); | |
| 94 | + } | |
| 88 | 95 | } else { |
| 89 | - router.push({ path: "/" }); | |
| 96 | + Message({ | |
| 97 | + message: "该账号暂无权限,请联系管理员~", | |
| 98 | + type: "error", | |
| 99 | + duration: 3 * 1000, | |
| 100 | + }); | |
| 90 | 101 | } |
| 102 | + } else { | |
| 103 | + Message({ | |
| 104 | + message: response.info, | |
| 105 | + type: "error", | |
| 106 | + duration: 3 * 1000, | |
| 107 | + }); | |
| 91 | 108 | } |
| 92 | 109 | }) |
| 93 | 110 | .catch(() => {}); |
| ... | ... | @@ -98,7 +115,7 @@ const store = new Vuex.Store({ |
| 98 | 115 | let authorityRouterObj = userInfo.permissions.filter((item) => { |
| 99 | 116 | return item.role == role; |
| 100 | 117 | }); |
| 101 | - userInfo.showRoleName = authorityRouterObj[0]?.roleName | |
| 118 | + userInfo.showRoleName = authorityRouterObj[0]?.roleName; | |
| 102 | 119 | commit("setInfo", userInfo); |
| 103 | 120 | commit("setRouters", [...authorityRouterObj[0]?.authorityRouter]); |
| 104 | 121 | state.addRouters.forEach((res) => { | ... | ... |
src/views/down/client.vue
| ... | ... | @@ -56,7 +56,7 @@ |
| 56 | 56 | </div> |
| 57 | 57 | </div> |
| 58 | 58 | <div class="form-box"> |
| 59 | - <el-form :model="formData" :rules="ruleForm" label-width="180px"> | |
| 59 | + <el-form :model="formData" label-width="180px"> | |
| 60 | 60 | <el-form-item label="主菜单设置:" prop="configName" v-if="type == 1"> |
| 61 | 61 | <el-col :span="12"> |
| 62 | 62 | <el-input |
| ... | ... | @@ -153,13 +153,14 @@ |
| 153 | 153 | <el-radio :label="2">老师选择</el-radio> |
| 154 | 154 | </el-radio-group> |
| 155 | 155 | <el-input-number |
| 156 | + v-show="formData.viesAnswerSet != 2" | |
| 156 | 157 | size="small" |
| 157 | 158 | class="count-down" |
| 158 | 159 | v-model="formData.countdown" |
| 159 | 160 | :step="1" |
| 160 | 161 | :step-strictly="true" |
| 161 | 162 | ></el-input-number |
| 162 | - >秒 | |
| 163 | + > <span v-show="formData.viesAnswerSet != 2">秒</span> | |
| 163 | 164 | </el-form-item> |
| 164 | 165 | <el-form-item label="抽答设置:" prop="ballotAnswerSet"> |
| 165 | 166 | <el-radio-group v-model="formData.ballotAnswerSet"> |
| ... | ... | @@ -179,11 +180,11 @@ |
| 179 | 180 | ></el-input-number |
| 180 | 181 | >个 |
| 181 | 182 | </el-form-item> |
| 182 | - <el-form-item label="多选题选项默认个数:" prop="countdown"> | |
| 183 | + <el-form-item label="多选题选项默认个数:" prop="multipleChoiceNum"> | |
| 183 | 184 | <el-input-number |
| 184 | 185 | size="small" |
| 185 | 186 | class="count-down count-down2" |
| 186 | - v-model="formData.countdown" | |
| 187 | + v-model="formData.multipleChoiceNum" | |
| 187 | 188 | :min="2" |
| 188 | 189 | :max="7" |
| 189 | 190 | :step="1" |
| ... | ... | @@ -196,8 +197,8 @@ |
| 196 | 197 | size="small" |
| 197 | 198 | class="count-down count-down2" |
| 198 | 199 | v-model="formData.singleTypeNum" |
| 199 | - :min="1" | |
| 200 | - :max="100" | |
| 200 | + :min="2" | |
| 201 | + :max="25" | |
| 201 | 202 | :step="1" |
| 202 | 203 | :step-strictly="true" |
| 203 | 204 | ></el-input-number |
| ... | ... | @@ -275,7 +276,7 @@ const defaultForm = { |
| 275 | 276 | ballotAnswerSet: 0, |
| 276 | 277 | singleChoiceNum: 4, |
| 277 | 278 | multipleChoiceNum: 4, |
| 278 | - singleTypeNum: 20, | |
| 279 | + singleTypeNum: 25, | |
| 279 | 280 | askCountdown: 30, |
| 280 | 281 | examsDuration: 5400, |
| 281 | 282 | displayModel: 0, |
| ... | ... | @@ -325,7 +326,7 @@ export default { |
| 325 | 326 | ballotAnswerSet: 0, |
| 326 | 327 | singleChoiceNum: 4, |
| 327 | 328 | multipleChoiceNum: 4, |
| 328 | - singleTypeNum: 20, | |
| 329 | + singleTypeNum: 25, | |
| 329 | 330 | askCountdown: 30, |
| 330 | 331 | examsDuration: 90, |
| 331 | 332 | displayModel: 0, | ... | ... |
src/views/examinationPaper/add.vue
| ... | ... | @@ -159,7 +159,7 @@ |
| 159 | 159 | <div class="qs-num">题号</div> |
| 160 | 160 | <div class="qs-type">题型</div> |
| 161 | 161 | <div class="qs-score">分数</div> |
| 162 | - <div class="qs-partScore">部分分值</div> | |
| 162 | + <div class="qs-partScore">漏选得分</div> | |
| 163 | 163 | <div class="qs-options">选项设置</div> |
| 164 | 164 | <div class="qs-set">操作</div> |
| 165 | 165 | </li> |
| ... | ... | @@ -172,7 +172,7 @@ |
| 172 | 172 | <div class="qs-type"> |
| 173 | 173 | <el-select |
| 174 | 174 | v-model="subQuestions.questionType" |
| 175 | - placeholder="选择答题卡类型" | |
| 175 | + placeholder="选择题目类型" | |
| 176 | 176 | @change="changeSubQuestions($event, subQuestions)" |
| 177 | 177 | > |
| 178 | 178 | <el-option label="单选题" :value="2"></el-option> |
| ... | ... | @@ -203,7 +203,7 @@ |
| 203 | 203 | :max="subQuestions.score" |
| 204 | 204 | :step="0.5" |
| 205 | 205 | v-model="subQuestions.partScore" |
| 206 | - label="部分分值" | |
| 206 | + label="漏选得分" | |
| 207 | 207 | ></el-input-number> |
| 208 | 208 | </div> |
| 209 | 209 | <div class="qs-options"> |
| ... | ... | @@ -260,7 +260,7 @@ |
| 260 | 260 | <div class="qs-type"> |
| 261 | 261 | <el-select |
| 262 | 262 | v-model="addSubQuestionsType" |
| 263 | - placeholder="选择答题卡类型" | |
| 263 | + placeholder="选择题目类型" | |
| 264 | 264 | @change="changeAddSubQuestions($event, question)" |
| 265 | 265 | > |
| 266 | 266 | <el-option label="单选题" :value="2"></el-option> |
| ... | ... | @@ -365,6 +365,7 @@ |
| 365 | 365 | <div class="qs-num">题号</div> |
| 366 | 366 | <div class="qs-type">题型</div> |
| 367 | 367 | <div class="qs-score">分数</div> |
| 368 | + <div class="qs-partScore">漏选得分</div> | |
| 368 | 369 | <div class="qs-options qs-options2">选项设置</div> |
| 369 | 370 | </li> |
| 370 | 371 | <li |
| ... | ... | @@ -387,6 +388,20 @@ |
| 387 | 388 | label="单题分值" |
| 388 | 389 | ></el-input-number> |
| 389 | 390 | </div> |
| 391 | + <div class="qs-partScore"> | |
| 392 | + <p v-if="subQuestions.questionType != 3">--</p> | |
| 393 | + <el-input-number | |
| 394 | + class="number-ipt" | |
| 395 | + v-else | |
| 396 | + size="medium" | |
| 397 | + :min="0" | |
| 398 | + :precision="2" | |
| 399 | + :max="subQuestions.score" | |
| 400 | + :step="0.5" | |
| 401 | + v-model="subQuestions.partScore" | |
| 402 | + label="漏选得分" | |
| 403 | + ></el-input-number> | |
| 404 | + </div> | |
| 390 | 405 | <div class="qs-options qs-options2"> |
| 391 | 406 | <p v-if="subQuestions.questionType == 5">--</p> |
| 392 | 407 | <p v-if="subQuestions.questionType == 4" class="answer-box"> |
| ... | ... | @@ -509,7 +524,7 @@ export default { |
| 509 | 524 | gradeName: "", |
| 510 | 525 | subjectName: "", |
| 511 | 526 | examsDuration: 90, |
| 512 | - sharingType: 1, | |
| 527 | + sharingType: 0, | |
| 513 | 528 | questionList: [], |
| 514 | 529 | }, |
| 515 | 530 | formRules: { |
| ... | ... | @@ -801,7 +816,8 @@ export default { |
| 801 | 816 | tag: this.answerTypeName, |
| 802 | 817 | }); |
| 803 | 818 | if (status == 0) { |
| 804 | - this._TypeList(); | |
| 819 | + await this._TypeList(); | |
| 820 | + this.form.tagId = data || ""; | |
| 805 | 821 | this.dialogVisible = false; |
| 806 | 822 | this.answerTypeName = ""; |
| 807 | 823 | this.$message.success("添加成功"); |
| ... | ... | @@ -853,7 +869,7 @@ export default { |
| 853 | 869 | }; |
| 854 | 870 | }) || []; |
| 855 | 871 | if (this.type != 2) { |
| 856 | - this.form.tagId = this.answerTypeList[0].id || ""; | |
| 872 | + this.form.tagId = this.answerTypeList[0]?.id || ""; | |
| 857 | 873 | } |
| 858 | 874 | } else { |
| 859 | 875 | this.$message.error(info); | ... | ... |
src/views/examinationPaper/index.vue
| ... | ... | @@ -5,15 +5,9 @@ |
| 5 | 5 | <span>备题组卷</span> |
| 6 | 6 | </template> |
| 7 | 7 | <template slot="btns"> |
| 8 | - <el-tooltip effect="dark" content="创建答题卡" placement="left"> | |
| 9 | - <el-button | |
| 10 | - type="primary" | |
| 11 | - icon="el-icon-plus" | |
| 12 | - plain | |
| 13 | - circle | |
| 14 | - @click="toAdd({})" | |
| 15 | - ></el-button> | |
| 16 | - </el-tooltip> | |
| 8 | + <el-button type="primary" size="mini" icon="el-icon-plus" plain @click="toAdd({})"> | |
| 9 | + 添加答题卡</el-button | |
| 10 | + > | |
| 17 | 11 | </template> |
| 18 | 12 | </back-box> |
| 19 | 13 | |
| ... | ... | @@ -255,9 +249,9 @@ export default { |
| 255 | 249 | break; |
| 256 | 250 | } |
| 257 | 251 | }, |
| 258 | - changePage(page){ | |
| 259 | - this.page = page | |
| 260 | - this._QueryData(this.query.title) | |
| 252 | + changePage(page) { | |
| 253 | + this.page = page; | |
| 254 | + this._QueryData(this.query.title); | |
| 261 | 255 | }, |
| 262 | 256 | async saveShare() { |
| 263 | 257 | //修改分享范围 |
| ... | ... | @@ -270,6 +264,7 @@ export default { |
| 270 | 264 | this.shareForm.sharingType = 1; |
| 271 | 265 | this.dialogVisible = false; |
| 272 | 266 | this.$message.success(info); |
| 267 | + this._QueryData(this.query.title == ""); | |
| 273 | 268 | } else { |
| 274 | 269 | this.$message.error(info); |
| 275 | 270 | } | ... | ... |
src/views/setUp/account.vue
| ... | ... | @@ -84,7 +84,7 @@ |
| 84 | 84 | </el-table-column> |
| 85 | 85 | <el-table-column prop="available" label="状态" align="center" |
| 86 | 86 | ><template slot-scope="scoped">{{ |
| 87 | - `${scoped.row.available == 0 ? "可用" : "不可用"}` | |
| 87 | + `${scoped.row.available == 0 ? "正常" : "禁用"}` | |
| 88 | 88 | }}</template></el-table-column |
| 89 | 89 | > |
| 90 | 90 | <el-table-column |
| ... | ... | @@ -143,7 +143,7 @@ |
| 143 | 143 | :image-size="100" |
| 144 | 144 | ></el-empty> |
| 145 | 145 | </div> |
| 146 | - <el-dialog title="修改年级信息" :visible.sync="diaCount" width="400"> | |
| 146 | + <el-dialog title="修改账号信息" :visible.sync="diaCount" width="400"> | |
| 147 | 147 | <el-form |
| 148 | 148 | class="form-box" |
| 149 | 149 | :model="formCount" | ... | ... |
src/views/setUp/student.vue
| ... | ... | @@ -126,12 +126,12 @@ |
| 126 | 126 | </el-form-item> |
| 127 | 127 | <el-form-item label="长学号:" prop="studentCode"> |
| 128 | 128 | <el-col :span="10"> |
| 129 | - <el-input maxlength="30" v-model.trim="formStu.studentCode" /> | |
| 129 | + <el-input maxlength="12" v-model.trim="formStu.studentCode" /> | |
| 130 | 130 | </el-col> |
| 131 | 131 | </el-form-item> |
| 132 | 132 | <el-form-item label="短学号:"> |
| 133 | 133 | <el-col :span="10"> |
| 134 | - <el-input maxlength="30" v-model.trim="formStu.shortNumber" /> | |
| 134 | + <el-input maxlength="12" v-model.trim="formStu.shortNumber" /> | |
| 135 | 135 | </el-col> |
| 136 | 136 | </el-form-item> |
| 137 | 137 | <el-form-item label="性别:"> |
| ... | ... | @@ -142,7 +142,7 @@ |
| 142 | 142 | </el-form-item> |
| 143 | 143 | <el-form-item label="答题器编码:"> |
| 144 | 144 | <el-col :span="10"> |
| 145 | - <el-input maxlength="30" v-model.trim="formStu.clickerSn" /> | |
| 145 | + <el-input maxlength="8" v-model.trim="formStu.clickerSn" /> | |
| 146 | 146 | </el-col> |
| 147 | 147 | </el-form-item> |
| 148 | 148 | </el-form> |
| ... | ... | @@ -296,6 +296,7 @@ export default { |
| 296 | 296 | if (status === 0) { |
| 297 | 297 | this.$message.success("删除成功"); |
| 298 | 298 | this.studentList.splice(index, 1); |
| 299 | + this._QueryClass() | |
| 299 | 300 | } else { |
| 300 | 301 | this.$message.error(info); |
| 301 | 302 | } |
| ... | ... | @@ -322,6 +323,7 @@ export default { |
| 322 | 323 | if (status === 0) { |
| 323 | 324 | this.$message.success(info); |
| 324 | 325 | this.diaStu = false; |
| 326 | + this._QueryClass() | |
| 325 | 327 | this._QueryData(); |
| 326 | 328 | } else { |
| 327 | 329 | this.$message.error(info); |
| ... | ... | @@ -340,6 +342,8 @@ export default { |
| 340 | 342 | } else if (type == 3) { |
| 341 | 343 | this.query.studentName = ""; |
| 342 | 344 | this.query.studentCode = ""; |
| 345 | + }else{ | |
| 346 | + query = this.query | |
| 343 | 347 | } |
| 344 | 348 | this.loading = true; |
| 345 | 349 | const { data, status, info } = await this.$request.studentList({ | ... | ... |
src/views/setUp/teacher.vue
| ... | ... | @@ -48,6 +48,7 @@ |
| 48 | 48 | placeholder="请输入老师姓名" |
| 49 | 49 | v-model="query.teacherName" |
| 50 | 50 | class="input-with-select" |
| 51 | + maxlength="30" | |
| 51 | 52 | @keyup.enter.native="_QueryData(2)" |
| 52 | 53 | > |
| 53 | 54 | <el-button |
| ... | ... | @@ -60,6 +61,7 @@ |
| 60 | 61 | type="number" |
| 61 | 62 | placeholder="请输入老师手机号" |
| 62 | 63 | v-model="query.phone" |
| 64 | + maxlength="11" | |
| 63 | 65 | class="input-with-select" |
| 64 | 66 | @keyup.enter.native="_QueryData(3)" |
| 65 | 67 | > |
| ... | ... | @@ -578,13 +580,22 @@ export default { |
| 578 | 580 | this.query.teacherName = ""; |
| 579 | 581 | this.query.phone = ""; |
| 580 | 582 | } else if (type == 2) { |
| 583 | + if(this.query.teacherName == ""){ | |
| 584 | + this.$message.warning('请输入老师姓名') | |
| 585 | + return | |
| 586 | + } | |
| 581 | 587 | query.teacherName = this.query.teacherName; |
| 582 | 588 | this.query.gradeName = ""; |
| 583 | 589 | this.query.phone = ""; |
| 584 | 590 | } else if (type == 3) { |
| 591 | + if(this.query.phone == ""){ | |
| 592 | + this.$message.warning('请输入老师手机') | |
| 593 | + return | |
| 594 | + } | |
| 585 | 595 | query.phone = this.query.phone; |
| 586 | 596 | this.query.teacherName = ""; |
| 587 | 597 | this.query.gradeName = ""; |
| 598 | + | |
| 588 | 599 | } else if (type == 10) { |
| 589 | 600 | query = { ...this.query }; |
| 590 | 601 | } | ... | ... |