修复保存报错
This commit is contained in:
parent
86f4712c05
commit
b3e8d5bdeb
|
@ -144,10 +144,10 @@ export default {
|
||||||
deep: true,
|
deep: true,
|
||||||
handler: function() {
|
handler: function() {
|
||||||
let sum = 0
|
let sum = 0
|
||||||
this.tableData.forEach(element => {
|
this.tableData.forEach(t => {
|
||||||
if (element.totalScore) {
|
if (t.topicNum && t.topicScore) {
|
||||||
console.log('单条总分数', element.totalScore)
|
let score = t.topicNum * t.topicScore;
|
||||||
sum = sum + element.totalScore
|
sum = sum + score;
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
this.form.totalScore = sum
|
this.form.totalScore = sum
|
||||||
|
@ -158,13 +158,13 @@ export default {
|
||||||
methods: {
|
methods: {
|
||||||
//保存
|
//保存
|
||||||
toSave() {
|
toSave() {
|
||||||
this.form.testPaperTactics = { ...this.tableData }
|
this.form.testPaperTactics = this.tableData;
|
||||||
this.form.projectStatus = 1
|
this.form.projectStatus = 1
|
||||||
this.$emit('executeSave', this.form)
|
this.$emit('executeSave', this.form)
|
||||||
},
|
},
|
||||||
//发布
|
//发布
|
||||||
toIssue() {
|
toIssue() {
|
||||||
this.form.testPaperTactics = { ...this.tableData }
|
this.form.testPaperTactics = this.tableData
|
||||||
this.form.projectStatus = 2
|
this.form.projectStatus = 2
|
||||||
this.$emit('executeIssue', this.form)
|
this.$emit('executeIssue', this.form)
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue