From c0699926d7db5eadfa7c3cc8f68efc0e0a646be4 Mon Sep 17 00:00:00 2001 From: dshclm <3321914460@qq.com> Date: Sun, 29 Sep 2024 09:55:13 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/templates/system/checkReport/add.html | 2 +- .../templates/system/checkReport/checkReport.html | 12 ++++++++++++ .../resources/templates/system/checkReport/edit.html | 2 +- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/ruoyi-admin/src/main/resources/templates/system/checkReport/add.html b/ruoyi-admin/src/main/resources/templates/system/checkReport/add.html index c963a86..47099a2 100644 --- a/ruoyi-admin/src/main/resources/templates/system/checkReport/add.html +++ b/ruoyi-admin/src/main/resources/templates/system/checkReport/add.html @@ -336,7 +336,7 @@ row.realScore = max; } 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) { row.realScore = row.realScore.replace(/[^0-9.]/g, ''); diff --git a/ruoyi-admin/src/main/resources/templates/system/checkReport/checkReport.html b/ruoyi-admin/src/main/resources/templates/system/checkReport/checkReport.html index 70426af..f82bfa6 100644 --- a/ruoyi-admin/src/main/resources/templates/system/checkReport/checkReport.html +++ b/ruoyi-admin/src/main/resources/templates/system/checkReport/checkReport.html @@ -133,6 +133,18 @@ title: '创建时间', sortable: true }, + { + field: 'totalScore', + title: '实有项目总分', + }, + { + field: 'realScore', + title: '实有项目得分', + }, + { + field: 'percentageScore', + title: '得分占比(%)', + }, { title: '操作', align: 'center', diff --git a/ruoyi-admin/src/main/resources/templates/system/checkReport/edit.html b/ruoyi-admin/src/main/resources/templates/system/checkReport/edit.html index 2c3532e..06533c7 100644 --- a/ruoyi-admin/src/main/resources/templates/system/checkReport/edit.html +++ b/ruoyi-admin/src/main/resources/templates/system/checkReport/edit.html @@ -385,7 +385,7 @@ } let realScore = parseFloat(this.postForm.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) { row.realScore = row.realScore.replace(/[^0-9.]/g, '');