修复保存报错

This commit is contained in:
hbzgyjh 2021-12-24 16:23:27 +08:00
parent 86f4712c05
commit b3e8d5bdeb
1 changed files with 6 additions and 6 deletions

View File

@ -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)
},