PrinceLee 5 年之前
父节点
当前提交
db2384e0fc
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      src/views/quality/defectStatistics.vue

+ 3 - 1
src/views/quality/defectStatistics.vue

@@ -443,9 +443,10 @@ export default {
               let total = 0
               let backString = ``
               params.map((item, index) => {
-                total = (total + item.value).fixed(2)
+                total = total + item.value
                 backString = backString + `<span style="color: ${colorArr[index] || ''}">${item.seriesName}</span>:${item.value}%</br>`
               })
+              total = total.toFixed(2)
               backString = backString + `<span style="color: #F04864">总和</span>:${total}%`
               return backString
             }
@@ -469,6 +470,7 @@ export default {
                 total = total + item.value
                 backString = backString + `<span style="color: ${colorArr[index] || ''}">${item.seriesName}</span>:${item.value}%</br>`
               })
+              total = total.toFixed(2)
               backString = backString + `<span style="color: #F04864">总和</span>:${total}%`
               return backString
             }