From 3282e95db0207ee133d1e98d9771dec9d83b0fc4 Mon Sep 17 00:00:00 2001
From: riku <risaku@163.com>
Date: 星期四, 02 四月 2026 16:24:38 +0800
Subject: [PATCH] 2026.4.2 新增专题管理功能

---
 pages/inspection/problems-proxy.js |   20 ++++++++++++++++----
 1 files changed, 16 insertions(+), 4 deletions(-)

diff --git a/pages/inspection/problems-proxy.js b/pages/inspection/problems-proxy.js
index 80fb2fa..c8fb781 100644
--- a/pages/inspection/problems-proxy.js
+++ b/pages/inspection/problems-proxy.js
@@ -25,7 +25,17 @@
         label: {
           show: true,
           position: 'inside',
-          formatter: '{d}%',
+          // formatter: '{d}%',
+          formatter: function (params) {
+            let perStr = params.percent + '';
+            if (perStr.indexOf('.') != -1) {
+              let percent = params.percent.toFixed(1); // 淇濈暀涓や綅灏忔暟
+              return `${percent}%`;
+            } else {
+              let percent = params.percent.toFixed(0);
+              return `${percent}%`;
+            }
+          },
         },
       },
     ],
@@ -94,7 +104,7 @@
     },
 
     summaryAnalysis(data) {
-      const {time, inspection: v} = this.data
+      const { time, inspection: v } = this.data;
       // 缁勫悎琛屾斂鍖哄垝
       let loc = '';
       loc += v.provinceName ? v.provinceName : '';
@@ -102,7 +112,7 @@
       loc += v.districtName ? `${v.districtName}` : '';
       loc += v.townName ? `${v.townName}` : '';
       // 鏃堕棿
-      const timeText = dayjs(time).format('YYYY骞碝M鏈�')
+      const timeText = dayjs(time).format('YYYY骞碝M鏈�');
 
       // 鎬荤粨
       let summaryText = '';
@@ -113,7 +123,9 @@
         totalC += p.changeCount;
       });
       const cPer = totalP == 0 ? '--' : Math.round((totalC / totalP) * 1000) / 10 + '%';
-      summaryText = `${loc+timeText}鍏卞彂鐜�${data.length}绉嶇被鍨嬮棶棰橈紝闂鎬昏${totalP}涓紝鏁存敼鐜�${cPer}`;
+      summaryText = `${loc + timeText}鍏卞彂鐜�${
+        data.length
+      }绉嶇被鍨嬮棶棰橈紝闂鎬昏${totalP}涓紝鏁存敼鐜�${cPer}`;
       this.setData({ summaryText });
     },
   },

--
Gitblit v1.9.3