Commit f26ecfa444084f8ce6ec5f7c7a8b81e05fe8bb18
1 parent
d5987f6a
测试bug
Showing
6 changed files
with
174 additions
and
58 deletions
E/system-commandline-sentinel-files/dotnet-suggest-registration-git-credential-manager-core, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null
0 → 100644
| 1 | +Exception during registration: | ||
| 2 | +System.ComponentModel.Win32Exception (0x80004005): 系统找不到指定的文件。 | ||
| 3 | + 在 System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo) | ||
| 4 | + 在 System.Diagnostics.Process.Start() | ||
| 5 | + 在 System.CommandLine.Invocation.Process.StartProcess(String command, String args, String workingDir, Action`1 stdOut, Action`1 stdErr, ValueTuple`2[] environmentVariables) | ||
| 6 | + 在 System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<RegisterWithDotnetSuggest>b__10_1>d.MoveNext() | ||
| 0 | \ No newline at end of file | 7 | \ No newline at end of file |
src/assets/css/index.scss
| @@ -112,4 +112,8 @@ | @@ -112,4 +112,8 @@ | ||
| 112 | overflow: hidden; | 112 | overflow: hidden; |
| 113 | text-overflow: ellipsis; | 113 | text-overflow: ellipsis; |
| 114 | white-space: nowrap; | 114 | white-space: nowrap; |
| 115 | +} | ||
| 116 | +.pagination-box{ | ||
| 117 | + text-align:center; | ||
| 118 | + margin:10px; | ||
| 115 | } | 119 | } |
| 116 | \ No newline at end of file | 120 | \ No newline at end of file |
src/views/examinationPaper/add.vue
| @@ -86,7 +86,9 @@ | @@ -86,7 +86,9 @@ | ||
| 86 | <el-input-number | 86 | <el-input-number |
| 87 | size="medium" | 87 | size="medium" |
| 88 | :min="1" | 88 | :min="1" |
| 89 | - :max="240" | 89 | + :max="140" |
| 90 | + :step-strictly="true" | ||
| 91 | + :step="1" | ||
| 90 | v-model="form.examsDuration" | 92 | v-model="form.examsDuration" |
| 91 | label="考试时长" | 93 | label="考试时长" |
| 92 | ></el-input-number> | 94 | ></el-input-number> |
| @@ -291,7 +293,12 @@ | @@ -291,7 +293,12 @@ | ||
| 291 | >取消</el-button | 293 | >取消</el-button |
| 292 | > | 294 | > |
| 293 | <el-button round @click="step = 0">上一步</el-button> | 295 | <el-button round @click="step = 0">上一步</el-button> |
| 294 | - <el-button type="primary" round @click="setStep2">下一步</el-button> | 296 | + <el-button |
| 297 | + :type="form.questionList.length == 0 ? 'info' : 'primary'" | ||
| 298 | + round | ||
| 299 | + @click="setStep2" | ||
| 300 | + >下一步</el-button | ||
| 301 | + > | ||
| 295 | </div> | 302 | </div> |
| 296 | <el-dialog | 303 | <el-dialog |
| 297 | title="添加大题" | 304 | title="添加大题" |
| @@ -329,7 +336,9 @@ | @@ -329,7 +336,9 @@ | ||
| 329 | <el-input-number | 336 | <el-input-number |
| 330 | v-model="questionForm.number" | 337 | v-model="questionForm.number" |
| 331 | :min="1" | 338 | :min="1" |
| 332 | - :max="50" | 339 | + :max="100" |
| 340 | + :step-strictly="true" | ||
| 341 | + :step="1" | ||
| 333 | label="label" | 342 | label="label" |
| 334 | ></el-input-number> | 343 | ></el-input-number> |
| 335 | </el-form-item> | 344 | </el-form-item> |
| @@ -342,6 +351,10 @@ | @@ -342,6 +351,10 @@ | ||
| 342 | </el-dialog> | 351 | </el-dialog> |
| 343 | </div> | 352 | </div> |
| 344 | <div v-show="step == 2"> | 353 | <div v-show="step == 2"> |
| 354 | + <div class="answer-title"> | ||
| 355 | + <p class="name">{{ form.title }}</p> | ||
| 356 | + <p class="totals">卷面总分:{{ allScore }}分</p> | ||
| 357 | + </div> | ||
| 345 | <div v-for="(question, index) in form.questionList" :key="index"> | 358 | <div v-for="(question, index) in form.questionList" :key="index"> |
| 346 | <p class="question-title"> | 359 | <p class="question-title"> |
| 347 | <span>{{ setBigNum(index) }}、</span> | 360 | <span>{{ setBigNum(index) }}、</span> |
| @@ -350,7 +363,8 @@ | @@ -350,7 +363,8 @@ | ||
| 350 | </p> | 363 | </p> |
| 351 | <ul class="questions-ul"> | 364 | <ul class="questions-ul"> |
| 352 | <li class="sub-questions"> | 365 | <li class="sub-questions"> |
| 353 | - <div class="qs-num">题号</div> | 366 | + <div class="qs-num">题号</div> |
| 367 | + <div class="qs-type">题型</div> | ||
| 354 | <div class="qs-score">分数</div> | 368 | <div class="qs-score">分数</div> |
| 355 | <div class="qs-options qs-options2">选项设置</div> | 369 | <div class="qs-options qs-options2">选项设置</div> |
| 356 | </li> | 370 | </li> |
| @@ -448,6 +462,17 @@ const subQuesOptions = { | @@ -448,6 +462,17 @@ const subQuesOptions = { | ||
| 448 | correctAnswer: "", | 462 | correctAnswer: "", |
| 449 | }; | 463 | }; |
| 450 | export default { | 464 | export default { |
| 465 | + computed: { | ||
| 466 | + allScore: function () { | ||
| 467 | + let score = 0; | ||
| 468 | + this.form.questionList.map((item) => { | ||
| 469 | + score += item.subQuestions.reduce((a, b) => { | ||
| 470 | + return a + Number(b.score); | ||
| 471 | + }, 0); | ||
| 472 | + }, 0); | ||
| 473 | + return Number(score).toFixed(2); | ||
| 474 | + }, | ||
| 475 | + }, | ||
| 451 | data() { | 476 | data() { |
| 452 | return { | 477 | return { |
| 453 | type: 1, //1-创建,2-复制答题卡 | 478 | type: 1, //1-创建,2-复制答题卡 |
| @@ -456,7 +481,7 @@ export default { | @@ -456,7 +481,7 @@ export default { | ||
| 456 | questionForm: { ...questionForm }, | 481 | questionForm: { ...questionForm }, |
| 457 | questionFormRules: { | 482 | questionFormRules: { |
| 458 | questionTitle: [ | 483 | questionTitle: [ |
| 459 | - { required: true, message: "请输入答题卡名称", trigger: "blur" }, | 484 | + { required: true, message: "请输入大题名称", trigger: "blur" }, |
| 460 | { | 485 | { |
| 461 | min: 1, | 486 | min: 1, |
| 462 | max: 30, | 487 | max: 30, |
| @@ -484,7 +509,7 @@ export default { | @@ -484,7 +509,7 @@ export default { | ||
| 484 | tagId: "", | 509 | tagId: "", |
| 485 | gradeName: "", | 510 | gradeName: "", |
| 486 | subjectName: "", | 511 | subjectName: "", |
| 487 | - examsDuration: 0, | 512 | + examsDuration: 90, |
| 488 | sharingType: 1, | 513 | sharingType: 1, |
| 489 | questionList: [], | 514 | questionList: [], |
| 490 | }, | 515 | }, |
| @@ -510,10 +535,10 @@ export default { | @@ -510,10 +535,10 @@ export default { | ||
| 510 | }; | 535 | }; |
| 511 | }, | 536 | }, |
| 512 | async created() { | 537 | async created() { |
| 538 | + this.type = this.$route.query.type ? this.$route.query.type : 1; | ||
| 513 | await this._GradeList(); | 539 | await this._GradeList(); |
| 514 | await this._QuerySubjectList(this.gradeList[0]); | 540 | await this._QuerySubjectList(this.gradeList[0]); |
| 515 | await this._TypeList(); | 541 | await this._TypeList(); |
| 516 | - this.type = this.$route.query.type ? this.$route.query.type : 1; | ||
| 517 | if (this.type == 2) { | 542 | if (this.type == 2) { |
| 518 | this._QueryDetail(); | 543 | this._QueryDetail(); |
| 519 | } | 544 | } |
| @@ -608,16 +633,23 @@ export default { | @@ -608,16 +633,23 @@ export default { | ||
| 608 | }); | 633 | }); |
| 609 | }, | 634 | }, |
| 610 | setStep2() { | 635 | setStep2() { |
| 611 | - let valid = true; | ||
| 612 | - this.form.questionList.map((item) => { | 636 | + if (!this.form.questionList.length) { |
| 637 | + this.$message.warning("请添加题目!"); | ||
| 638 | + return; | ||
| 639 | + } | ||
| 640 | + let valid = ""; | ||
| 641 | + this.form.questionList.map((item, index) => { | ||
| 613 | if (!item.questionTitle) { | 642 | if (!item.questionTitle) { |
| 614 | - valid = false; | 643 | + valid += index + 1 + "、"; |
| 615 | } | 644 | } |
| 616 | }); | 645 | }); |
| 617 | - if (valid) { | 646 | + if (!valid) { |
| 618 | this.step = 2; | 647 | this.step = 2; |
| 648 | + return; | ||
| 619 | } else { | 649 | } else { |
| 620 | - this.$message.error("大题名称不能为空,请检查!"); | 650 | + this.$message.error( |
| 651 | + `大题名称不能为空,请检查第${valid.slice(0,-1)}大题!` | ||
| 652 | + ); | ||
| 621 | } | 653 | } |
| 622 | }, | 654 | }, |
| 623 | openQuestion() { | 655 | openQuestion() { |
| @@ -640,7 +672,6 @@ export default { | @@ -640,7 +672,6 @@ export default { | ||
| 640 | questionsOptions.answerOptions = this.rightOptions | 672 | questionsOptions.answerOptions = this.rightOptions |
| 641 | .slice(0, questionsOptions.selectNum) | 673 | .slice(0, questionsOptions.selectNum) |
| 642 | .join(","); | 674 | .join(","); |
| 643 | - questionsOptions.partScore = 0.5; | ||
| 644 | break; | 675 | break; |
| 645 | case 4: | 676 | case 4: |
| 646 | case 5: | 677 | case 5: |
| @@ -686,7 +717,7 @@ export default { | @@ -686,7 +717,7 @@ export default { | ||
| 686 | questionsOptions.answerOptions = this.rightOptions | 717 | questionsOptions.answerOptions = this.rightOptions |
| 687 | .slice(0, questionsOptions.selectNum) | 718 | .slice(0, questionsOptions.selectNum) |
| 688 | .join(","); | 719 | .join(","); |
| 689 | - questionsOptions.partScore = 0.5; | 720 | + questionsOptions.partScore = 0; |
| 690 | break; | 721 | break; |
| 691 | case 4: | 722 | case 4: |
| 692 | case 5: | 723 | case 5: |
| @@ -714,7 +745,6 @@ export default { | @@ -714,7 +745,6 @@ export default { | ||
| 714 | subQuestions.answerOptions = that.rightOptions | 745 | subQuestions.answerOptions = that.rightOptions |
| 715 | .slice(0, subQuestions.selectNum) | 746 | .slice(0, subQuestions.selectNum) |
| 716 | .join(","); | 747 | .join(","); |
| 717 | - subQuestions.partScore = 0.5; | ||
| 718 | break; | 748 | break; |
| 719 | case 4: | 749 | case 4: |
| 720 | case 5: | 750 | case 5: |
| @@ -734,7 +764,7 @@ export default { | @@ -734,7 +764,7 @@ export default { | ||
| 734 | removeOptions(subQuestions) { | 764 | removeOptions(subQuestions) { |
| 735 | //删除选项 | 765 | //删除选项 |
| 736 | let length = subQuestions.answerOptions.split(",").length; | 766 | let length = subQuestions.answerOptions.split(",").length; |
| 737 | - if (length < 2) return; | 767 | + if (length < 3) return; |
| 738 | subQuestions.selectNum = length - 1; | 768 | subQuestions.selectNum = length - 1; |
| 739 | subQuestions.answerOptions = this.rightOptions | 769 | subQuestions.answerOptions = this.rightOptions |
| 740 | .slice(0, subQuestions.selectNum) | 770 | .slice(0, subQuestions.selectNum) |
| @@ -824,7 +854,7 @@ export default { | @@ -824,7 +854,7 @@ export default { | ||
| 824 | //查询年级列表 | 854 | //查询年级列表 |
| 825 | const { data, status, info } = await this.$request.fetchGradeList(); | 855 | const { data, status, info } = await this.$request.fetchGradeList(); |
| 826 | if (status == 0) { | 856 | if (status == 0) { |
| 827 | - this.gradeList = data.gradeNames&&[...data.gradeNames] || []; | 857 | + this.gradeList = (data.gradeNames && [...data.gradeNames]) || []; |
| 828 | if (this.type != 2) { | 858 | if (this.type != 2) { |
| 829 | this.form.gradeName = this.gradeList[0]; | 859 | this.form.gradeName = this.gradeList[0]; |
| 830 | } | 860 | } |
| @@ -838,12 +868,13 @@ export default { | @@ -838,12 +868,13 @@ export default { | ||
| 838 | gradeName: grade, | 868 | gradeName: grade, |
| 839 | }); | 869 | }); |
| 840 | if (status === 0) { | 870 | if (status === 0) { |
| 841 | - this.subjectList = data.subjectNames?.map((item) => { | ||
| 842 | - return { | ||
| 843 | - value: item, | ||
| 844 | - label: item, | ||
| 845 | - }; | ||
| 846 | - })||[]; | 871 | + this.subjectList = |
| 872 | + data.subjectNames?.map((item) => { | ||
| 873 | + return { | ||
| 874 | + value: item, | ||
| 875 | + label: item, | ||
| 876 | + }; | ||
| 877 | + }) || []; | ||
| 847 | console.log(this.subjectList); | 878 | console.log(this.subjectList); |
| 848 | if (this.subjectList.length) { | 879 | if (this.subjectList.length) { |
| 849 | this.form.subjectName = this.subjectList[0].value; | 880 | this.form.subjectName = this.subjectList[0].value; |
| @@ -859,8 +890,8 @@ export default { | @@ -859,8 +890,8 @@ export default { | ||
| 859 | paperId: this.$route.query.paperId, | 890 | paperId: this.$route.query.paperId, |
| 860 | }); | 891 | }); |
| 861 | if (status == 0) { | 892 | if (status == 0) { |
| 862 | - this.form.title = data.title+'_副本'; | ||
| 863 | - this.form.tagId = data.tagId; | 893 | + this.form.title = data.title + "_副本"; |
| 894 | + this.form.tagId = data.tagId===0?"":data.tagId; | ||
| 864 | this.form.subjectName = data.subjectName; | 895 | this.form.subjectName = data.subjectName; |
| 865 | this.form.gradeName = data.gradeName; | 896 | this.form.gradeName = data.gradeName; |
| 866 | this.form.examsDuration = data.examsDuration; | 897 | this.form.examsDuration = data.examsDuration; |
| @@ -980,6 +1011,18 @@ export default { | @@ -980,6 +1011,18 @@ export default { | ||
| 980 | .el-input-number { | 1011 | .el-input-number { |
| 981 | width: 140px; | 1012 | width: 140px; |
| 982 | } | 1013 | } |
| 1014 | +.answer-title { | ||
| 1015 | + text-align: center; | ||
| 1016 | + font-size: 20px; | ||
| 1017 | + color: #333; | ||
| 1018 | + font-weight: 700; | ||
| 1019 | + padding-bottom: 20px; | ||
| 1020 | + .totals { | ||
| 1021 | + font-size: 16px; | ||
| 1022 | + color: #888; | ||
| 1023 | + font-weight: normal; | ||
| 1024 | + } | ||
| 1025 | +} | ||
| 983 | .answer-box { | 1026 | .answer-box { |
| 984 | .answer-s { | 1027 | .answer-s { |
| 985 | display: inline-block; | 1028 | display: inline-block; |
src/views/examinationPaper/edit.vue
| @@ -7,7 +7,8 @@ | @@ -7,7 +7,8 @@ | ||
| 7 | </back-box> | 7 | </back-box> |
| 8 | <div class="content"> | 8 | <div class="content"> |
| 9 | <p class="tips"> | 9 | <p class="tips"> |
| 10 | - <i class="fa fa-bell-o"></i> 2022-11-24 14:30张老师修改了答案。 | 10 | + <i class="fa fa-bell-o"></i> |
| 11 | + {{`${form.modifiedTime} ${form.realName}`}}老师修改了答案 | ||
| 11 | </p> | 12 | </p> |
| 12 | <div class="answer-title"> | 13 | <div class="answer-title"> |
| 13 | <p class="name">{{ form.title }}</p> | 14 | <p class="name">{{ form.title }}</p> |
| @@ -115,6 +116,8 @@ export default { | @@ -115,6 +116,8 @@ export default { | ||
| 115 | examsDuration: 90, | 116 | examsDuration: 90, |
| 116 | gradeName: "", | 117 | gradeName: "", |
| 117 | share: 1, | 118 | share: 1, |
| 119 | + realName:"", | ||
| 120 | + modifiedTime:"", | ||
| 118 | questionList: [], | 121 | questionList: [], |
| 119 | }, | 122 | }, |
| 120 | }; | 123 | }; |
| @@ -189,7 +192,7 @@ export default { | @@ -189,7 +192,7 @@ export default { | ||
| 189 | let score = question.subQuestions.reduce((a, b) => { | 192 | let score = question.subQuestions.reduce((a, b) => { |
| 190 | return a + b.score; | 193 | return a + b.score; |
| 191 | }, 0); | 194 | }, 0); |
| 192 | - return score; | 195 | + return Number(score).toFixed(2); |
| 193 | }, | 196 | }, |
| 194 | changAnswer(sub, option) { | 197 | changAnswer(sub, option) { |
| 195 | //设置多选答案 | 198 | //设置多选答案 |
| @@ -203,6 +206,16 @@ export default { | @@ -203,6 +206,16 @@ export default { | ||
| 203 | } | 206 | } |
| 204 | }, | 207 | }, |
| 205 | async save() { | 208 | async save() { |
| 209 | + let valid = ""; | ||
| 210 | + this.form.questionList.map((item, index) => { | ||
| 211 | + if (!item.questionTitle) { | ||
| 212 | + valid += ((index + 1)+'、'); | ||
| 213 | + } | ||
| 214 | + }); | ||
| 215 | + if (valid) { | ||
| 216 | + this.$message.error(`大题名称不能为空,请检查第${valid.slice(0,-1)}题!`); | ||
| 217 | + return; | ||
| 218 | + } | ||
| 206 | let questionList = this.form.questionList.map((item) => { | 219 | let questionList = this.form.questionList.map((item) => { |
| 207 | item.score = null; | 220 | item.score = null; |
| 208 | // item.questionId = ""; | 221 | // item.questionId = ""; |
| @@ -232,6 +245,7 @@ export default { | @@ -232,6 +245,7 @@ export default { | ||
| 232 | this.form.questionList.map((item) => { | 245 | this.form.questionList.map((item) => { |
| 233 | item.score = ""; | 246 | item.score = ""; |
| 234 | }); | 247 | }); |
| 248 | + this.paperModifyLog ={...this.paperModifyLog,...this.form.paperModifyLog} | ||
| 235 | } else { | 249 | } else { |
| 236 | this.$message.error(info); | 250 | this.$message.error(info); |
| 237 | } | 251 | } |
src/views/examinationPaper/index.vue
| @@ -75,11 +75,11 @@ | @@ -75,11 +75,11 @@ | ||
| 75 | </el-input> | 75 | </el-input> |
| 76 | </div> | 76 | </div> |
| 77 | </div> | 77 | </div> |
| 78 | - <p class="tips"> | 78 | + <p class="tips" v-show="archivedTotal"> |
| 79 | <span>另有{{ archivedTotal }}份已经归档的答题卡,</span> | 79 | <span>另有{{ archivedTotal }}份已经归档的答题卡,</span> |
| 80 | <router-link to="/examinationPaperRecycle">点击查看>></router-link> | 80 | <router-link to="/examinationPaperRecycle">点击查看>></router-link> |
| 81 | </p> | 81 | </p> |
| 82 | - <ul class="content"> | 82 | + <ul class="content" v-if="tableData && tableData.length"> |
| 83 | <li class="item" v-for="item in tableData" :key="item.id"> | 83 | <li class="item" v-for="item in tableData" :key="item.id"> |
| 84 | <div class="pic-box"> | 84 | <div class="pic-box"> |
| 85 | <p class="i-box"><i class="fa fa-map-o"></i></p> | 85 | <p class="i-box"><i class="fa fa-map-o"></i></p> |
| @@ -87,7 +87,8 @@ | @@ -87,7 +87,8 @@ | ||
| 87 | </div> | 87 | </div> |
| 88 | <div class="info"> | 88 | <div class="info"> |
| 89 | <p class="title"> | 89 | <p class="title"> |
| 90 | - {{ item.title }} <span class="label" v-if="!!item.tag">{{ item.tag }}</span> | 90 | + {{ item.title }} |
| 91 | + <span class="label" v-if="!!item.tag">{{ item.tag }}</span> | ||
| 91 | </p> | 92 | </p> |
| 92 | <p class="num"> | 93 | <p class="num"> |
| 93 | 总题数:{{ item.questionNum }} | 94 | 总题数:{{ item.questionNum }} |
| @@ -101,7 +102,7 @@ | @@ -101,7 +102,7 @@ | ||
| 101 | :key="clazzChild.classId" | 102 | :key="clazzChild.classId" |
| 102 | >{{ | 103 | >{{ |
| 103 | `${clazzChild.className}${ | 104 | `${clazzChild.className}${ |
| 104 | - indexs != item.classList.length-1? "、" : "" | 105 | + indexs != item.classList.length - 1 ? "、" : "" |
| 105 | }` | 106 | }` |
| 106 | }} | 107 | }} |
| 107 | <i v-if="clazzChild.keepStatus == 1" class="el-icon-success"></i | 108 | <i v-if="clazzChild.keepStatus == 1" class="el-icon-success"></i |
| @@ -144,6 +145,23 @@ | @@ -144,6 +145,23 @@ | ||
| 144 | </div> | 145 | </div> |
| 145 | </li> | 146 | </li> |
| 146 | </ul> | 147 | </ul> |
| 148 | + <div class="pagination-box"> | ||
| 149 | + <el-pagination | ||
| 150 | + small="" | ||
| 151 | + layout="total,prev, pager, next" | ||
| 152 | + :hide-on-single-page="true" | ||
| 153 | + :total="total" | ||
| 154 | + @current-change="changePage" | ||
| 155 | + :current-page="page" | ||
| 156 | + :page-size="size" | ||
| 157 | + > | ||
| 158 | + </el-pagination> | ||
| 159 | + </div> | ||
| 160 | + <el-empty | ||
| 161 | + v-if="!loading && tableData.length == 0" | ||
| 162 | + content="没有更多数据" | ||
| 163 | + :image-size="100" | ||
| 164 | + ></el-empty> | ||
| 147 | <el-dialog title="选择分享范围" :visible.sync="dialogVisible" width="400"> | 165 | <el-dialog title="选择分享范围" :visible.sync="dialogVisible" width="400"> |
| 148 | <el-form :model="shareForm" :rules="shareRulesForm" label-width="160px"> | 166 | <el-form :model="shareForm" :rules="shareRulesForm" label-width="160px"> |
| 149 | <el-form-item prop="share" label="分享范围:"> | 167 | <el-form-item prop="share" label="分享范围:"> |
| @@ -166,6 +184,7 @@ export default { | @@ -166,6 +184,7 @@ export default { | ||
| 166 | name: "examinationPaper", | 184 | name: "examinationPaper", |
| 167 | data() { | 185 | data() { |
| 168 | return { | 186 | return { |
| 187 | + loading: false, | ||
| 169 | userName: "", | 188 | userName: "", |
| 170 | dialogVisible: false, | 189 | dialogVisible: false, |
| 171 | query: { | 190 | query: { |
| @@ -178,14 +197,17 @@ export default { | @@ -178,14 +197,17 @@ export default { | ||
| 178 | subjectList: [], | 197 | subjectList: [], |
| 179 | typeList: [], | 198 | typeList: [], |
| 180 | archivedTotal: 0, //已归档答题卡数量 | 199 | archivedTotal: 0, //已归档答题卡数量 |
| 181 | - tableData: [], | 200 | + tableData: null, |
| 182 | shareForm: { | 201 | shareForm: { |
| 183 | id: "", | 202 | id: "", |
| 184 | - sharingType: 1,//0-任课班级/1-全年级 | 203 | + sharingType: 1, //0-任课班级/1-全年级 |
| 185 | }, | 204 | }, |
| 186 | shareRulesForm: { | 205 | shareRulesForm: { |
| 187 | - sharingType: [{ required: true, message: "选择分享范围", trigger: "blur" }], | 206 | + sharingType: [ |
| 207 | + { required: true, message: "选择分享范围", trigger: "blur" }, | ||
| 208 | + ], | ||
| 188 | }, | 209 | }, |
| 210 | + total: 0, | ||
| 189 | page: 1, | 211 | page: 1, |
| 190 | size: 20, | 212 | size: 20, |
| 191 | }; | 213 | }; |
| @@ -233,18 +255,21 @@ export default { | @@ -233,18 +255,21 @@ export default { | ||
| 233 | break; | 255 | break; |
| 234 | } | 256 | } |
| 235 | }, | 257 | }, |
| 258 | + changePage(page){ | ||
| 259 | + this.page = page | ||
| 260 | + this._QueryData(this.query.title) | ||
| 261 | + }, | ||
| 236 | async saveShare() { | 262 | async saveShare() { |
| 237 | //修改分享范围 | 263 | //修改分享范围 |
| 238 | const { data, status, info } = await this.$request.modifyPaper({ | 264 | const { data, status, info } = await this.$request.modifyPaper({ |
| 239 | paperId: this.shareForm.id, | 265 | paperId: this.shareForm.id, |
| 240 | sharingType: this.shareForm.sharingType, | 266 | sharingType: this.shareForm.sharingType, |
| 241 | }); | 267 | }); |
| 242 | - this.loading = false; | ||
| 243 | if (status === 0) { | 268 | if (status === 0) { |
| 244 | this.shareForm.id = ""; | 269 | this.shareForm.id = ""; |
| 245 | this.shareForm.sharingType = 1; | 270 | this.shareForm.sharingType = 1; |
| 246 | this.dialogVisible = false; | 271 | this.dialogVisible = false; |
| 247 | - this.$message.success(info) | 272 | + this.$message.success(info); |
| 248 | } else { | 273 | } else { |
| 249 | this.$message.error(info); | 274 | this.$message.error(info); |
| 250 | } | 275 | } |
| @@ -272,7 +297,7 @@ export default { | @@ -272,7 +297,7 @@ export default { | ||
| 272 | async _QueryTypeList() { | 297 | async _QueryTypeList() { |
| 273 | const { data, status, info } = await this.$request.fetchTypeNames({ | 298 | const { data, status, info } = await this.$request.fetchTypeNames({ |
| 274 | classId: this.query.classId, | 299 | classId: this.query.classId, |
| 275 | - type:0 | 300 | + type: 0, |
| 276 | }); | 301 | }); |
| 277 | if (status === 0) { | 302 | if (status === 0) { |
| 278 | this.typeList = | 303 | this.typeList = |
| @@ -284,7 +309,7 @@ export default { | @@ -284,7 +309,7 @@ export default { | ||
| 284 | }) || []; | 309 | }) || []; |
| 285 | this.typeList.unshift({ | 310 | this.typeList.unshift({ |
| 286 | value: "", | 311 | value: "", |
| 287 | - label: "--", | 312 | + label: "请选择标签", |
| 288 | }); | 313 | }); |
| 289 | } else { | 314 | } else { |
| 290 | this.$message.error(info); | 315 | this.$message.error(info); |
| @@ -292,16 +317,18 @@ export default { | @@ -292,16 +317,18 @@ export default { | ||
| 292 | }, | 317 | }, |
| 293 | // 查找班级 | 318 | // 查找班级 |
| 294 | async _QueryClassList() { | 319 | async _QueryClassList() { |
| 320 | + this.loading = true; | ||
| 295 | const { data, status, info } = await this.$request.fetchClassList(); | 321 | const { data, status, info } = await this.$request.fetchClassList(); |
| 296 | - console.log(status) | 322 | + console.log(status); |
| 297 | if (status === 0) { | 323 | if (status === 0) { |
| 298 | if (!!data.list) { | 324 | if (!!data.list) { |
| 299 | - this.classList = data.list?.map((item) => { | ||
| 300 | - return { | ||
| 301 | - value: item.classId, | ||
| 302 | - label: item.className, | ||
| 303 | - }; | ||
| 304 | - })||[]; | 325 | + this.classList = |
| 326 | + data.list?.map((item) => { | ||
| 327 | + return { | ||
| 328 | + value: item.classId, | ||
| 329 | + label: item.className, | ||
| 330 | + }; | ||
| 331 | + }) || []; | ||
| 305 | this.query.classId = this.classList[0]?.value; | 332 | this.query.classId = this.classList[0]?.value; |
| 306 | } | 333 | } |
| 307 | } else { | 334 | } else { |
| @@ -314,18 +341,20 @@ export default { | @@ -314,18 +341,20 @@ export default { | ||
| 314 | classId: this.query.classId, | 341 | classId: this.query.classId, |
| 315 | }); | 342 | }); |
| 316 | if (status === 0) { | 343 | if (status === 0) { |
| 317 | - this.subjectList = data.subjectNames?.map((item) => { | ||
| 318 | - return { | ||
| 319 | - value: item, | ||
| 320 | - label: item, | ||
| 321 | - }; | ||
| 322 | - })||[]; | 344 | + this.subjectList = |
| 345 | + data.subjectNames?.map((item) => { | ||
| 346 | + return { | ||
| 347 | + value: item, | ||
| 348 | + label: item, | ||
| 349 | + }; | ||
| 350 | + }) || []; | ||
| 323 | this.query.subjectName = this.subjectList[0]?.value; | 351 | this.query.subjectName = this.subjectList[0]?.value; |
| 324 | } else { | 352 | } else { |
| 325 | this.$message.error(info); | 353 | this.$message.error(info); |
| 326 | } | 354 | } |
| 327 | }, | 355 | }, |
| 328 | async _QueryData(type) { | 356 | async _QueryData(type) { |
| 357 | + this.loading = true; | ||
| 329 | //获取答题卡列表 | 358 | //获取答题卡列表 |
| 330 | let query = {}; | 359 | let query = {}; |
| 331 | if (!type) { | 360 | if (!type) { |
| @@ -352,12 +381,12 @@ export default { | @@ -352,12 +381,12 @@ export default { | ||
| 352 | const { data, status, info } = await this.$request.fetchPaperList({ | 381 | const { data, status, info } = await this.$request.fetchPaperList({ |
| 353 | ...query, | 382 | ...query, |
| 354 | status: 1, | 383 | status: 1, |
| 355 | - page: this.page, | ||
| 356 | - size: this.size, | 384 | + // page: this.page, |
| 385 | + // size: this.size, | ||
| 357 | }); | 386 | }); |
| 358 | this.loading = false; | 387 | this.loading = false; |
| 359 | if (status === 0) { | 388 | if (status === 0) { |
| 360 | - this.archivedTotal = data.archivedTotal | 389 | + this.archivedTotal = data.archivedTotal; |
| 361 | this.total = data.total; | 390 | this.total = data.total; |
| 362 | this.tableData = (data.list && [...data.list]) || []; | 391 | this.tableData = (data.list && [...data.list]) || []; |
| 363 | } else { | 392 | } else { |
| @@ -447,7 +476,7 @@ export default { | @@ -447,7 +476,7 @@ export default { | ||
| 447 | font-weight: 500; | 476 | font-weight: 500; |
| 448 | position: relative; | 477 | position: relative; |
| 449 | position: relative; | 478 | position: relative; |
| 450 | - &.active:after{ | 479 | + &.active:after { |
| 451 | content: "\e79c"; | 480 | content: "\e79c"; |
| 452 | color: #667ffd; | 481 | color: #667ffd; |
| 453 | } | 482 | } |
src/views/examinationPaper/recycle.vue
| @@ -124,6 +124,18 @@ | @@ -124,6 +124,18 @@ | ||
| 124 | </div> | 124 | </div> |
| 125 | </li> | 125 | </li> |
| 126 | </ul> | 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> | ||
| 127 | <el-empty :image-size="100" v-if="!tableData.length&&loading==false" description="没有更多数据"></el-empty> | 139 | <el-empty :image-size="100" v-if="!tableData.length&&loading==false" description="没有更多数据"></el-empty> |
| 128 | </div> | 140 | </div> |
| 129 | </template> | 141 | </template> |
| @@ -173,8 +185,10 @@ export default { | @@ -173,8 +185,10 @@ export default { | ||
| 173 | classList: [], | 185 | classList: [], |
| 174 | subjectList: [], | 186 | subjectList: [], |
| 175 | typeList: [], | 187 | typeList: [], |
| 176 | - tableData: null, | 188 | + tableData: [], |
| 177 | total: 0, | 189 | total: 0, |
| 190 | + page:1, | ||
| 191 | + size:20 | ||
| 178 | }; | 192 | }; |
| 179 | }, | 193 | }, |
| 180 | async created() { | 194 | async created() { |
| @@ -214,6 +228,10 @@ export default { | @@ -214,6 +228,10 @@ export default { | ||
| 214 | await this._QuerySubjectList(); | 228 | await this._QuerySubjectList(); |
| 215 | this._QueryData(false); | 229 | this._QueryData(false); |
| 216 | }, | 230 | }, |
| 231 | + changePage(page){ | ||
| 232 | + this.page = page | ||
| 233 | + this._QueryData(this.query.title) | ||
| 234 | + }, | ||
| 217 | async _QueryData(type) { | 235 | async _QueryData(type) { |
| 218 | //获取答题卡列表 | 236 | //获取答题卡列表 |
| 219 | this.loading=true | 237 | this.loading=true |
| @@ -234,7 +252,9 @@ export default { | @@ -234,7 +252,9 @@ export default { | ||
| 234 | } | 252 | } |
| 235 | const { data, status, info } = await this.$request.fetchPaperList({ | 253 | const { data, status, info } = await this.$request.fetchPaperList({ |
| 236 | ...query, | 254 | ...query, |
| 237 | - status:2 | 255 | + status:2, |
| 256 | + page:this.page, | ||
| 257 | + size:this.size | ||
| 238 | }); | 258 | }); |
| 239 | this.loading = false; | 259 | this.loading = false; |
| 240 | if (status === 0) { | 260 | if (status === 0) { |
| @@ -295,7 +315,7 @@ export default { | @@ -295,7 +315,7 @@ export default { | ||
| 295 | }) || []; | 315 | }) || []; |
| 296 | this.typeList.unshift({ | 316 | this.typeList.unshift({ |
| 297 | value: "", | 317 | value: "", |
| 298 | - label: "--", | 318 | + label: "请选择标签", |
| 299 | }); | 319 | }); |
| 300 | } else { | 320 | } else { |
| 301 | this.$message.error(info); | 321 | this.$message.error(info); |