From b3e8d5bdeb4e42bc129fe8d53f3af21bba9e28d0 Mon Sep 17 00:00:00 2001 From: hbzgyjh Date: Fri, 24 Dec 2021 16:23:27 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BF=9D=E5=AD=98=E6=8A=A5?= =?UTF-8?q?=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../form/ProjectTestPaperFormationStrategy.vue | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/views/project/form/ProjectTestPaperFormationStrategy.vue b/src/views/project/form/ProjectTestPaperFormationStrategy.vue index aabe488..d9e176d 100644 --- a/src/views/project/form/ProjectTestPaperFormationStrategy.vue +++ b/src/views/project/form/ProjectTestPaperFormationStrategy.vue @@ -144,10 +144,10 @@ export default { deep: true, handler: function() { let sum = 0 - this.tableData.forEach(element => { - if (element.totalScore) { - console.log('单条总分数', element.totalScore) - sum = sum + element.totalScore + this.tableData.forEach(t => { + if (t.topicNum && t.topicScore) { + let score = t.topicNum * t.topicScore; + sum = sum + score; } }) this.form.totalScore = sum @@ -158,13 +158,13 @@ export default { methods: { //保存 toSave() { - this.form.testPaperTactics = { ...this.tableData } + this.form.testPaperTactics = this.tableData; this.form.projectStatus = 1 this.$emit('executeSave', this.form) }, //发布 toIssue() { - this.form.testPaperTactics = { ...this.tableData } + this.form.testPaperTactics = this.tableData this.form.projectStatus = 2 this.$emit('executeIssue', this.form) },