Commit f26ecfa444084f8ce6ec5f7c7a8b81e05fe8bb18

Authored by 阿宝
1 parent d5987f6a

测试bug

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 7 \ No newline at end of file
... ...
src/assets/css/index.scss
... ... @@ -112,4 +112,8 @@
112 112 overflow: hidden;
113 113 text-overflow: ellipsis;
114 114 white-space: nowrap;
  115 +}
  116 +.pagination-box{
  117 + text-align:center;
  118 + margin:10px;
115 119 }
116 120 \ No newline at end of file
... ...
src/views/examinationPaper/add.vue
... ... @@ -86,7 +86,9 @@
86 86 <el-input-number
87 87 size="medium"
88 88 :min="1"
89   - :max="240"
  89 + :max="140"
  90 + :step-strictly="true"
  91 + :step="1"
90 92 v-model="form.examsDuration"
91 93 label="考试时长"
92 94 ></el-input-number>
... ... @@ -291,7 +293,12 @@
291 293 >取消</el-button
292 294 >
293 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 302 </div>
296 303 <el-dialog
297 304 title="添加大题"
... ... @@ -329,7 +336,9 @@
329 336 <el-input-number
330 337 v-model="questionForm.number"
331 338 :min="1"
332   - :max="50"
  339 + :max="100"
  340 + :step-strictly="true"
  341 + :step="1"
333 342 label="label"
334 343 ></el-input-number>
335 344 </el-form-item>
... ... @@ -342,6 +351,10 @@
342 351 </el-dialog>
343 352 </div>
344 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 358 <div v-for="(question, index) in form.questionList" :key="index">
346 359 <p class="question-title">
347 360 <span>{{ setBigNum(index) }}、</span>
... ... @@ -350,7 +363,8 @@
350 363 </p>
351 364 <ul class="questions-ul">
352 365 <li class="sub-questions">
353   - <div class="qs-num">题号</div>
  366 + <div class="qs-num">题号</div>
  367 + <div class="qs-type">题型</div>
354 368 <div class="qs-score">分数</div>
355 369 <div class="qs-options qs-options2">选项设置</div>
356 370 </li>
... ... @@ -448,6 +462,17 @@ const subQuesOptions = {
448 462 correctAnswer: "",
449 463 };
450 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 476 data() {
452 477 return {
453 478 type: 1, //1-创建,2-复制答题卡
... ... @@ -456,7 +481,7 @@ export default {
456 481 questionForm: { ...questionForm },
457 482 questionFormRules: {
458 483 questionTitle: [
459   - { required: true, message: "请输入答题卡名称", trigger: "blur" },
  484 + { required: true, message: "请输入大题名称", trigger: "blur" },
460 485 {
461 486 min: 1,
462 487 max: 30,
... ... @@ -484,7 +509,7 @@ export default {
484 509 tagId: "",
485 510 gradeName: "",
486 511 subjectName: "",
487   - examsDuration: 0,
  512 + examsDuration: 90,
488 513 sharingType: 1,
489 514 questionList: [],
490 515 },
... ... @@ -510,10 +535,10 @@ export default {
510 535 };
511 536 },
512 537 async created() {
  538 + this.type = this.$route.query.type ? this.$route.query.type : 1;
513 539 await this._GradeList();
514 540 await this._QuerySubjectList(this.gradeList[0]);
515 541 await this._TypeList();
516   - this.type = this.$route.query.type ? this.$route.query.type : 1;
517 542 if (this.type == 2) {
518 543 this._QueryDetail();
519 544 }
... ... @@ -608,16 +633,23 @@ export default {
608 633 });
609 634 },
610 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 642 if (!item.questionTitle) {
614   - valid = false;
  643 + valid += index + 1 + "、";
615 644 }
616 645 });
617   - if (valid) {
  646 + if (!valid) {
618 647 this.step = 2;
  648 + return;
619 649 } else {
620   - this.$message.error("大题名称不能为空,请检查!");
  650 + this.$message.error(
  651 + `大题名称不能为空,请检查第${valid.slice(0,-1)}大题!`
  652 + );
621 653 }
622 654 },
623 655 openQuestion() {
... ... @@ -640,7 +672,6 @@ export default {
640 672 questionsOptions.answerOptions = this.rightOptions
641 673 .slice(0, questionsOptions.selectNum)
642 674 .join(",");
643   - questionsOptions.partScore = 0.5;
644 675 break;
645 676 case 4:
646 677 case 5:
... ... @@ -686,7 +717,7 @@ export default {
686 717 questionsOptions.answerOptions = this.rightOptions
687 718 .slice(0, questionsOptions.selectNum)
688 719 .join(",");
689   - questionsOptions.partScore = 0.5;
  720 + questionsOptions.partScore = 0;
690 721 break;
691 722 case 4:
692 723 case 5:
... ... @@ -714,7 +745,6 @@ export default {
714 745 subQuestions.answerOptions = that.rightOptions
715 746 .slice(0, subQuestions.selectNum)
716 747 .join(",");
717   - subQuestions.partScore = 0.5;
718 748 break;
719 749 case 4:
720 750 case 5:
... ... @@ -734,7 +764,7 @@ export default {
734 764 removeOptions(subQuestions) {
735 765 //删除选项
736 766 let length = subQuestions.answerOptions.split(",").length;
737   - if (length < 2) return;
  767 + if (length < 3) return;
738 768 subQuestions.selectNum = length - 1;
739 769 subQuestions.answerOptions = this.rightOptions
740 770 .slice(0, subQuestions.selectNum)
... ... @@ -824,7 +854,7 @@ export default {
824 854 //查询年级列表
825 855 const { data, status, info } = await this.$request.fetchGradeList();
826 856 if (status == 0) {
827   - this.gradeList = data.gradeNames&&[...data.gradeNames] || [];
  857 + this.gradeList = (data.gradeNames && [...data.gradeNames]) || [];
828 858 if (this.type != 2) {
829 859 this.form.gradeName = this.gradeList[0];
830 860 }
... ... @@ -838,12 +868,13 @@ export default {
838 868 gradeName: grade,
839 869 });
840 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 878 console.log(this.subjectList);
848 879 if (this.subjectList.length) {
849 880 this.form.subjectName = this.subjectList[0].value;
... ... @@ -859,8 +890,8 @@ export default {
859 890 paperId: this.$route.query.paperId,
860 891 });
861 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 895 this.form.subjectName = data.subjectName;
865 896 this.form.gradeName = data.gradeName;
866 897 this.form.examsDuration = data.examsDuration;
... ... @@ -980,6 +1011,18 @@ export default {
980 1011 .el-input-number {
981 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 1026 .answer-box {
984 1027 .answer-s {
985 1028 display: inline-block;
... ...
src/views/examinationPaper/edit.vue
... ... @@ -7,7 +7,8 @@
7 7 </back-box>
8 8 <div class="content">
9 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 12 </p>
12 13 <div class="answer-title">
13 14 <p class="name">{{ form.title }}</p>
... ... @@ -115,6 +116,8 @@ export default {
115 116 examsDuration: 90,
116 117 gradeName: "",
117 118 share: 1,
  119 + realName:"",
  120 + modifiedTime:"",
118 121 questionList: [],
119 122 },
120 123 };
... ... @@ -189,7 +192,7 @@ export default {
189 192 let score = question.subQuestions.reduce((a, b) => {
190 193 return a + b.score;
191 194 }, 0);
192   - return score;
  195 + return Number(score).toFixed(2);
193 196 },
194 197 changAnswer(sub, option) {
195 198 //设置多选答案
... ... @@ -203,6 +206,16 @@ export default {
203 206 }
204 207 },
205 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 219 let questionList = this.form.questionList.map((item) => {
207 220 item.score = null;
208 221 // item.questionId = "";
... ... @@ -232,6 +245,7 @@ export default {
232 245 this.form.questionList.map((item) => {
233 246 item.score = "";
234 247 });
  248 + this.paperModifyLog ={...this.paperModifyLog,...this.form.paperModifyLog}
235 249 } else {
236 250 this.$message.error(info);
237 251 }
... ...
src/views/examinationPaper/index.vue
... ... @@ -75,11 +75,11 @@
75 75 </el-input>
76 76 </div>
77 77 </div>
78   - <p class="tips">
  78 + <p class="tips" v-show="archivedTotal">
79 79 <span>另有{{ archivedTotal }}份已经归档的答题卡,</span>
80 80 <router-link to="/examinationPaperRecycle">点击查看&gt;&gt;</router-link>
81 81 </p>
82   - <ul class="content">
  82 + <ul class="content" v-if="tableData && tableData.length">
83 83 <li class="item" v-for="item in tableData" :key="item.id">
84 84 <div class="pic-box">
85 85 <p class="i-box"><i class="fa fa-map-o"></i></p>
... ... @@ -87,7 +87,8 @@
87 87 </div>
88 88 <div class="info">
89 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 92 </p>
92 93 <p class="num">
93 94 总题数:{{ item.questionNum }}
... ... @@ -101,7 +102,7 @@
101 102 :key="clazzChild.classId"
102 103 >{{
103 104 `${clazzChild.className}${
104   - indexs != item.classList.length-1? "、" : ""
  105 + indexs != item.classList.length - 1 ? "、" : ""
105 106 }`
106 107 }}
107 108 <i v-if="clazzChild.keepStatus == 1" class="el-icon-success"></i
... ... @@ -144,6 +145,23 @@
144 145 </div>
145 146 </li>
146 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 165 <el-dialog title="选择分享范围" :visible.sync="dialogVisible" width="400">
148 166 <el-form :model="shareForm" :rules="shareRulesForm" label-width="160px">
149 167 <el-form-item prop="share" label="分享范围:">
... ... @@ -166,6 +184,7 @@ export default {
166 184 name: "examinationPaper",
167 185 data() {
168 186 return {
  187 + loading: false,
169 188 userName: "",
170 189 dialogVisible: false,
171 190 query: {
... ... @@ -178,14 +197,17 @@ export default {
178 197 subjectList: [],
179 198 typeList: [],
180 199 archivedTotal: 0, //已归档答题卡数量
181   - tableData: [],
  200 + tableData: null,
182 201 shareForm: {
183 202 id: "",
184   - sharingType: 1,//0-任课班级/1-全年级
  203 + sharingType: 1, //0-任课班级/1-全年级
185 204 },
186 205 shareRulesForm: {
187   - sharingType: [{ required: true, message: "选择分享范围", trigger: "blur" }],
  206 + sharingType: [
  207 + { required: true, message: "选择分享范围", trigger: "blur" },
  208 + ],
188 209 },
  210 + total: 0,
189 211 page: 1,
190 212 size: 20,
191 213 };
... ... @@ -233,18 +255,21 @@ export default {
233 255 break;
234 256 }
235 257 },
  258 + changePage(page){
  259 + this.page = page
  260 + this._QueryData(this.query.title)
  261 + },
236 262 async saveShare() {
237 263 //修改分享范围
238 264 const { data, status, info } = await this.$request.modifyPaper({
239 265 paperId: this.shareForm.id,
240 266 sharingType: this.shareForm.sharingType,
241 267 });
242   - this.loading = false;
243 268 if (status === 0) {
244 269 this.shareForm.id = "";
245 270 this.shareForm.sharingType = 1;
246 271 this.dialogVisible = false;
247   - this.$message.success(info)
  272 + this.$message.success(info);
248 273 } else {
249 274 this.$message.error(info);
250 275 }
... ... @@ -272,7 +297,7 @@ export default {
272 297 async _QueryTypeList() {
273 298 const { data, status, info } = await this.$request.fetchTypeNames({
274 299 classId: this.query.classId,
275   - type:0
  300 + type: 0,
276 301 });
277 302 if (status === 0) {
278 303 this.typeList =
... ... @@ -284,7 +309,7 @@ export default {
284 309 }) || [];
285 310 this.typeList.unshift({
286 311 value: "",
287   - label: "--",
  312 + label: "请选择标签",
288 313 });
289 314 } else {
290 315 this.$message.error(info);
... ... @@ -292,16 +317,18 @@ export default {
292 317 },
293 318 // 查找班级
294 319 async _QueryClassList() {
  320 + this.loading = true;
295 321 const { data, status, info } = await this.$request.fetchClassList();
296   - console.log(status)
  322 + console.log(status);
297 323 if (status === 0) {
298 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 332 this.query.classId = this.classList[0]?.value;
306 333 }
307 334 } else {
... ... @@ -314,18 +341,20 @@ export default {
314 341 classId: this.query.classId,
315 342 });
316 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 351 this.query.subjectName = this.subjectList[0]?.value;
324 352 } else {
325 353 this.$message.error(info);
326 354 }
327 355 },
328 356 async _QueryData(type) {
  357 + this.loading = true;
329 358 //获取答题卡列表
330 359 let query = {};
331 360 if (!type) {
... ... @@ -352,12 +381,12 @@ export default {
352 381 const { data, status, info } = await this.$request.fetchPaperList({
353 382 ...query,
354 383 status: 1,
355   - page: this.page,
356   - size: this.size,
  384 + // page: this.page,
  385 + // size: this.size,
357 386 });
358 387 this.loading = false;
359 388 if (status === 0) {
360   - this.archivedTotal = data.archivedTotal
  389 + this.archivedTotal = data.archivedTotal;
361 390 this.total = data.total;
362 391 this.tableData = (data.list && [...data.list]) || [];
363 392 } else {
... ... @@ -447,7 +476,7 @@ export default {
447 476 font-weight: 500;
448 477 position: relative;
449 478 position: relative;
450   - &.active:after{
  479 + &.active:after {
451 480 content: "\e79c";
452 481 color: #667ffd;
453 482 }
... ...
src/views/examinationPaper/recycle.vue
... ... @@ -124,6 +124,18 @@
124 124 </div>
125 125 </li>
126 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 139 <el-empty :image-size="100" v-if="!tableData.length&&loading==false" description="没有更多数据"></el-empty>
128 140 </div>
129 141 </template>
... ... @@ -173,8 +185,10 @@ export default {
173 185 classList: [],
174 186 subjectList: [],
175 187 typeList: [],
176   - tableData: null,
  188 + tableData: [],
177 189 total: 0,
  190 + page:1,
  191 + size:20
178 192 };
179 193 },
180 194 async created() {
... ... @@ -214,6 +228,10 @@ export default {
214 228 await this._QuerySubjectList();
215 229 this._QueryData(false);
216 230 },
  231 + changePage(page){
  232 + this.page = page
  233 + this._QueryData(this.query.title)
  234 + },
217 235 async _QueryData(type) {
218 236 //获取答题卡列表
219 237 this.loading=true
... ... @@ -234,7 +252,9 @@ export default {
234 252 }
235 253 const { data, status, info } = await this.$request.fetchPaperList({
236 254 ...query,
237   - status:2
  255 + status:2,
  256 + page:this.page,
  257 + size:this.size
238 258 });
239 259 this.loading = false;
240 260 if (status === 0) {
... ... @@ -295,7 +315,7 @@ export default {
295 315 }) || [];
296 316 this.typeList.unshift({
297 317 value: "",
298   - label: "--",
  318 + label: "请选择标签",
299 319 });
300 320 } else {
301 321 this.$message.error(info);
... ...