From 11c0c969f05fd3c546b44898a0020eed9ba65fbe Mon Sep 17 00:00:00 2001
From: zouyu <2723363702@qq.com>
Date: 星期四, 22 一月 2026 13:15:24 +0800
Subject: [PATCH] 业务管理:IFS域字段显示

---
 src/views/statisticalCharts/qualificationRateStatistics/index.vue |   65 ++++++++++++++++++++++++--------
 1 files changed, 48 insertions(+), 17 deletions(-)

diff --git a/src/views/statisticalCharts/qualificationRateStatistics/index.vue b/src/views/statisticalCharts/qualificationRateStatistics/index.vue
index 3456973..a1e8649 100644
--- a/src/views/statisticalCharts/qualificationRateStatistics/index.vue
+++ b/src/views/statisticalCharts/qualificationRateStatistics/index.vue
@@ -180,7 +180,7 @@
           data: [],
           label: {
             show: true,
-            formatter: (v) => v.value + '%'
+            formatter: (v) =>  v.value + '%'
           }
         }
       ],
@@ -203,7 +203,7 @@
         }
       },
       lineColors: ['#91A0FC'],
-      barColors: ['#13ce66', '#F56C6C'], // 鍚堟牸缁� / 涓嶅悎鏍肩孩
+      barColors: ['#9fe080', '#ff994d'], // 鍚堟牸缁� / 涓嶅悎鏍肩孩
       barColors2: ['#A4EEDA'],
       pieTooltip: {
         trigger: 'item'
@@ -214,7 +214,7 @@
       },
       rawPieSeries: [
         {
-          name: 'Access From',
+          name: '',
           type: 'pie',
           radius: '70%',
           center: ['50%', '50%'],
@@ -224,7 +224,7 @@
             borderWidth: 2
           },
           label: {
-            alignTo: 'edge',
+            alignTo: 'labelLine',
             formatter: '{name|{b}}\n{time|{c}}',
             edgeDistance: 10,
             lineHeight: 15,
@@ -240,14 +240,14 @@
             length2: 40
           },
           data: [
-            { value: 0, name: '涓嶅悎鏍兼暟閲�', itemStyle: { color: '#F56C6C' } },
-            { value: 0, name: '鍚堟牸鏁伴噺', itemStyle: { color: '#67C23A' } }
+            { value: 0, name: '涓嶅悎鏍兼暟閲�', itemStyle: {color: '#ff994d'} },
+            { value: 0, name: '鍚堟牸鏁伴噺', itemStyle: { color: '#9fe080' } }
           ]
         }
       ],
       conductorPieSeries: [
         {
-          name: 'Access From',
+          name: '',
           type: 'pie',
           radius: '70%',
           center: ['50%', '50%'],
@@ -257,7 +257,7 @@
             borderWidth: 2
           },
           label: {
-            alignTo: 'edge',
+            alignTo: 'labelLine',
             formatter: '{name|{b}}\n{time|{c}}',
             edgeDistance: 10,
             lineHeight: 15,
@@ -273,14 +273,14 @@
             length2: 40,
           },
           data: [
-            { value: 0, name: '涓嶅悎鏍兼暟閲�', itemStyle: { color: '#F56C6C' } },
-            { value: 0, name: '鍚堟牸鏁伴噺', itemStyle: { color: '#67C23A' } },
+            { value: 0, name: '涓嶅悎鏍兼暟閲�', itemStyle: { color: '#ff994d' } },
+            { value: 0, name: '鍚堟牸鏁伴噺', itemStyle: { color: '#9fe080' } },
           ]
         }
       ],
       dlanPieSeries: [
         {
-          name: 'Access From',
+          name: '',
           type: 'pie',
           radius: '70%',
           center: ['50%', '50%'],
@@ -290,7 +290,7 @@
             borderWidth: 2
           },
           label: {
-            alignTo: 'edge',
+            alignTo: 'labelLine',
             formatter: '{name|{b}}\n{time|{c}}',
             edgeDistance: 10,
             lineHeight: 15,
@@ -306,8 +306,8 @@
             length2: 40,
           },
           data: [
-            { value: 0, name: '涓嶅悎鏍兼暟閲�', itemStyle: { color: '#F56C6C' } },
-            { value: 0, name: '鍚堟牸鏁伴噺', itemStyle: { color: '#67C23A' } },
+            { value: 0, name: '涓嶅悎鏍兼暟閲�', itemStyle: { color: '#ff994d' } },
+            { value: 0, name: '鍚堟牸鏁伴噺', itemStyle: { color: '#9fe080' } },
           ]
         }
       ],
@@ -418,11 +418,9 @@
   // 鏂规硶闆嗗悎
   methods: {
     // 鑾峰彇鍚堟牸鐜囧浘琛ㄦ暟鎹�
-
     setBarChartTitle() {
       this.echartsOptions.title.text = `${this.inspectionTitle}鍚堟牸鐜囪秼鍔縛;
     },
-
     getBar() {
       const types = this.currentMaterialProp.split(',');
       const requests = types.map(t => {
@@ -454,12 +452,44 @@
           }
         });
 
-        const sortedDates = Object.keys(dateMap).sort();
+        const weekOrderMap = {
+          "鏄熸湡涓�": 0,
+          "鏄熸湡浜�": 1,
+          "鏄熸湡涓�": 2,
+          "鏄熸湡鍥�": 3,
+          "鏄熸湡浜�": 4,
+          "鏄熸湡鍏�": 5,
+          "鏄熸湡鏃�": 6
+        };
+        const yearOrderMap = {
+          "1鏈�": 0,
+          "2鏈�": 1,
+          "3鏈�": 2,
+          "4鏈�": 3,
+          "5鏈�": 4,
+          "6鏈�": 5,
+          "7鏈�": 6,
+          "8鏈�": 7,
+          "9鏈�": 8,
+          "10鏈�": 9,
+          "11鏈�": 10,
+          "12鏈�": 11
+        };
+        const sortedDates = Object.keys(dateMap).sort((a, b) => {
+          if(a.includes("鏄熸湡") && b.includes("鏄熸湡")) {
+            return weekOrderMap[a] - weekOrderMap[b];
+          } else if(a.includes("鏈�") && b.includes("鏈�")) {
+            return yearOrderMap[a] - yearOrderMap[b];
+          } else {
+            return new Date(a) - new Date(b);
+          }
+        });
         let qualifiedData = [];
         let unQualifiedData = [];
         let lineData = [];
         let xAxis = [];
 
+        console.log(sortedDates)
         sortedDates.forEach(date => {
           const { qualified, unQualified } = dateMap[date];
           const total = qualified + unQualified;
@@ -475,6 +505,7 @@
         this.echartsSeries[1].data = unQualifiedData;
         this.echartsSeries[2].data = lineData;
         this.xAxis[0].data = xAxis;
+        console.log(xAxis)
       });
     },
 

--
Gitblit v1.9.3