提交修改

pg_adapter
dshclm 6 months ago
parent 4ef4370755
commit c0699926d7

@ -336,7 +336,7 @@
row.realScore = max; row.realScore = max;
} }
this.calculateTotalScore('realScore') this.calculateTotalScore('realScore')
this.postForm.percentageScore = this.postForm.realScore / this.postForm.totalScore * 100; this.postForm.percentageScore = (this.postForm.realScore / this.postForm.totalScore * 100).toFixed(2);
}, },
handleInput(row, props) { handleInput(row, props) {
row.realScore = row.realScore.replace(/[^0-9.]/g, ''); row.realScore = row.realScore.replace(/[^0-9.]/g, '');

@ -133,6 +133,18 @@
title: '创建时间', title: '创建时间',
sortable: true sortable: true
}, },
{
field: 'totalScore',
title: '实有项目总分',
},
{
field: 'realScore',
title: '实有项目得分',
},
{
field: 'percentageScore',
title: '得分占比(%)',
},
{ {
title: '操作', title: '操作',
align: 'center', align: 'center',

@ -385,7 +385,7 @@
} }
let realScore = parseFloat(this.postForm.realScore) let realScore = parseFloat(this.postForm.realScore)
this.postForm.realScore = realScore + parseFloat(row.realScore) this.postForm.realScore = realScore + parseFloat(row.realScore)
this.postForm.percentageScore = this.postForm.realScore / this.postForm.totalScore * 100; this.postForm.percentageScore = (this.postForm.realScore / this.postForm.totalScore * 100).toFixed(2);
}, },
handleInput(row, props) { handleInput(row, props) {
row.realScore = row.realScore.replace(/[^0-9.]/g, ''); row.realScore = row.realScore.replace(/[^0-9.]/g, '');

Loading…
Cancel
Save