Browse Source

fix: change appraisePlan

DESKTOP-USV654P\pc 2 months ago
parent
commit
b149e76892
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/views/canteenEvaluation/plan/components/review.vue

+ 2 - 2
src/views/canteenEvaluation/plan/components/review.vue

@@ -109,12 +109,12 @@
   const getData = (data) => {
     const arr = [] as any;
     if (data.resultList) {
-      const total = data.resultList.reduce((pre, cur) => pre + cur.count, 0);
+      // const total = data.resultList.reduce((pre, cur) => pre + cur.count, 0);
       data.resultList.forEach((item) => {
         arr.push({
           name: item.name,
           count: item.count || 0,
-          process: (((item.count ? item.count : 0) / total) * 100).toFixed(2),
+          process: (((item.count ? item.count : 0) / item.percentage) * 100).toFixed(2),
         });
       });
     }