Commit d44087bd32d32a0ec0fd6b46b39d0dc0a4157415
1 parent
f1b55bc6
分数去零,班主任切换班级多次添加科目
Showing
7 changed files
with
12 additions
and
11 deletions
src/views/examinationPaper/add.vue
| ... | ... | @@ -955,7 +955,7 @@ export default { |
| 955 | 955 | return a + Number(b.score ? b.score : 0); |
| 956 | 956 | }, 0); |
| 957 | 957 | }, 0); |
| 958 | - return Number(score).toFixed(2); | |
| 958 | + return Number(score); | |
| 959 | 959 | }, |
| 960 | 960 | }, |
| 961 | 961 | watch: { |
| ... | ... | @@ -1582,7 +1582,7 @@ export default { |
| 1582 | 1582 | let score = question.subQuestions.reduce((a, b) => { |
| 1583 | 1583 | return a + (b.score ? b.score : 0); |
| 1584 | 1584 | }, 0); |
| 1585 | - return Number(score).toFixed(2); | |
| 1585 | + return Number(score); | |
| 1586 | 1586 | }, |
| 1587 | 1587 | changeAddSubQuestions(val, question) { |
| 1588 | 1588 | if (val) { | ... | ... |
src/views/examinationPaper/edit.vue
| ... | ... | @@ -530,7 +530,7 @@ export default { |
| 530 | 530 | score += (item.score || 0); |
| 531 | 531 | } |
| 532 | 532 | }, 0); |
| 533 | - return Number(score).toFixed(2); | |
| 533 | + return Number(score); | |
| 534 | 534 | }, |
| 535 | 535 | }, |
| 536 | 536 | created() { |
| ... | ... | @@ -666,7 +666,7 @@ export default { |
| 666 | 666 | let score = question.subQuestions.reduce((a, b) => { |
| 667 | 667 | return a + (b.score || 0); |
| 668 | 668 | }, 0); |
| 669 | - return Number(score).toFixed(2); | |
| 669 | + return Number(score); | |
| 670 | 670 | }, |
| 671 | 671 | changAnswer(sub, option) { |
| 672 | 672 | //设置多选答案 | ... | ... |
src/views/personal/test/analysis.vue
| ... | ... | @@ -592,7 +592,7 @@ export default { |
| 592 | 592 | detail.map((items, index) => { |
| 593 | 593 | params["que" + items.id] = items.id; |
| 594 | 594 | params["score" + items.id] = String(items.score).includes(".") |
| 595 | - ? Number(items.score).toFixed(2) | |
| 595 | + ? Number(items.score) | |
| 596 | 596 | : items.score; |
| 597 | 597 | params["answer" + items.id] = |
| 598 | 598 | items.answer == 1 ? "✓" : items.answer == 2 ? "✗" : items.answer; | ... | ... |
src/views/standard/examinationPaper/add.vue
| ... | ... | @@ -860,7 +860,7 @@ export default { |
| 860 | 860 | return a + Number(b.score ? b.score : 0); |
| 861 | 861 | }, 0); |
| 862 | 862 | }, 0); |
| 863 | - return Number(score).toFixed(2); | |
| 863 | + return Number(score); | |
| 864 | 864 | }, |
| 865 | 865 | }, |
| 866 | 866 | watch: { |
| ... | ... | @@ -1441,7 +1441,7 @@ export default { |
| 1441 | 1441 | let score = question.subQuestions.reduce((a, b) => { |
| 1442 | 1442 | return a + (b.score ? b.score : 0); |
| 1443 | 1443 | }, 0); |
| 1444 | - return Number(score).toFixed(2); | |
| 1444 | + return Number(score); | |
| 1445 | 1445 | }, |
| 1446 | 1446 | equalScore(question) { |
| 1447 | 1447 | let score = 0; | ... | ... |
src/views/standard/examinationPaper/edit.vue
| ... | ... | @@ -377,7 +377,7 @@ export default { |
| 377 | 377 | score += item.score; |
| 378 | 378 | } |
| 379 | 379 | }, 0); |
| 380 | - return Number(score).toFixed(2); | |
| 380 | + return Number(score); | |
| 381 | 381 | }, |
| 382 | 382 | }, |
| 383 | 383 | created() { |
| ... | ... | @@ -444,7 +444,7 @@ export default { |
| 444 | 444 | let score = question.subQuestions.reduce((a, b) => { |
| 445 | 445 | return a + (b.score || 0); |
| 446 | 446 | }, 0); |
| 447 | - return Number(score).toFixed(2); | |
| 447 | + return Number(score); | |
| 448 | 448 | }, |
| 449 | 449 | changAnswer(sub, option) { |
| 450 | 450 | //设置多选答案 | ... | ... |
src/views/standard/test/analysis.vue
| ... | ... | @@ -745,7 +745,7 @@ export default { |
| 745 | 745 | detail.map((items, index) => { |
| 746 | 746 | params["que" + items.id] = items.id; |
| 747 | 747 | params["score" + items.id] = String(items.score).includes(".") |
| 748 | - ? Number(items.score).toFixed(2) | |
| 748 | + ? Number(items.score) | |
| 749 | 749 | : items.score; |
| 750 | 750 | params["answer" + items.id] = |
| 751 | 751 | items.answer == 1 ? "✓" : items.answer == 2 ? "✗" : items.answer; | ... | ... |
src/views/standard/test/index.vue
| ... | ... | @@ -364,6 +364,7 @@ |
| 364 | 364 | ></el-button> |
| 365 | 365 | </el-tooltip> |
| 366 | 366 | <el-popconfirm |
| 367 | + v-if="role != 'ROLE_BANZHUREN'" | |
| 367 | 368 | title="确定删除吗?" |
| 368 | 369 | @confirm="removeReport(scoped.row, scoped.$index)" |
| 369 | 370 | > |
| ... | ... | @@ -1042,7 +1043,7 @@ export default { |
| 1042 | 1043 | value: "全部", |
| 1043 | 1044 | label: "全部", |
| 1044 | 1045 | }); |
| 1045 | - this.query.subjectNames.push(this.subjectList[0]?.value); | |
| 1046 | + this.query.subjectNames = [this.subjectList[0]?.value]; | |
| 1046 | 1047 | } else { |
| 1047 | 1048 | this.query.subjectNames = this.subjectList[0]?.value; |
| 1048 | 1049 | } | ... | ... |