From c788166a1fb219bbacf9395ec1f45b5d28a258c1 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期三, 16 四月 2025 15:22:33 +0800
Subject: [PATCH] 人员获取第三方人员-页面bug修改

---
 src/views/statisticalCharts/inspectionItemWarning/index.vue |   31 ++++++++++++++++++++++---------
 1 files changed, 22 insertions(+), 9 deletions(-)

diff --git a/src/views/statisticalCharts/inspectionItemWarning/index.vue b/src/views/statisticalCharts/inspectionItemWarning/index.vue
index 2199965..448aa29 100644
--- a/src/views/statisticalCharts/inspectionItemWarning/index.vue
+++ b/src/views/statisticalCharts/inspectionItemWarning/index.vue
@@ -50,13 +50,12 @@
       tableLoading: false,
       column: [
         { label: '鏍峰搧缂栧彿', prop: 'sampleCode',width: 150 },
-        { label: '鏍峰搧鍚嶇О', prop: 'sampleName',width: 150 },
-        { label: '鍨嬪彿', prop: 'sampleModel' },
+        { label: '鏍峰搧鍚嶇О', prop: 'sampleName'},
+        { label: '鍨嬪彿', prop: 'sampleModel',width: 150  },
         { label: '渚涘簲鍟嗗悕绉�', prop: 'supplierName',width: 150 },
-        { label: '妫�楠岄」鍚嶇О', prop: 'inspectionItemName',width: 150 },
-        { label: '渚涘簲鍟嗗悕绉�', prop: 'supplierName',width: 150 },
+        { label: '妫�楠岄」鍚嶇О', prop: 'inspectionItemName'},
         {
-          label: "鍋忓樊鍊�",
+          label: "鍋忓樊鍊�%",
           prop: "deviationValue",
           width: 150,
           dataType: "tag",
@@ -89,14 +88,17 @@
       column1: [
         { label: '鏍峰搧缂栧彿', prop: 'sampleCode'},
         { label: '渚涘簲鍟嗗悕绉�', prop: 'supplierName'},
-        { label: '渚涘簲鍟嗗悕绉�', prop: 'supplierName'},
         {
           label: "妫�娴嬪��",
           prop: "testValue",
           width: 150,
           dataType: "tag",
           formatType: (params) => {
-            return 'danger'
+            if (this.tableData1.find((m) => m.testValue == params).isIssue == 1) {
+              return 'danger'
+            } else {
+              return 'success'
+            }
           },
         },
         { label: '妫�娴嬫椂闂�', prop: 'detectionTime',width: 160 },
@@ -115,7 +117,7 @@
       echartsOptions: {},
       echartsSeries: [
         {
-          name: '鍋忓樊鍊�',
+          name: '妫�娴嬪��',
           type: 'line',
           smooth: true,
           tooltip: {
@@ -193,9 +195,20 @@
         let xAxis = []
         let markAreas = []; // 瀛樺偍 markArea 鐨勬暟缁�
         let markPoints = [];
+        const sampleCodeCount = {};
         res.data.forEach((item, index) => {
           lineData.push(item.testValue)
-          xAxis.push(item.sampleCode)
+          // 娣诲姞绱㈠紩浠ョ‘淇濆敮涓�鎬�
+          // 妫�鏌ユ槸鍚﹂渶瑕佸尯鍒� sampleCode
+          if (!sampleCodeCount[item.sampleCode]) {
+            sampleCodeCount[item.sampleCode] = 1; // 绗竴娆″嚭鐜�
+            xAxis.push(item.sampleCode); // 鐩存帴浣跨敤鍘熷 sampleCode
+          } else {
+            sampleCodeCount[item.sampleCode]++; // 澧炲姞璁℃暟
+            const uniqueSampleCode = `${item.sampleCode}-${sampleCodeCount[item.sampleCode]}`;
+            xAxis.push(uniqueSampleCode); // 娣诲姞鍚庣紑浠ュ尯鍒�
+          }
+
           // 濡傛灉 isIssue 涓� 1锛屽垯鍦ㄦ绱㈠紩澶勬坊鍔犱竴涓� markArea
           if (item.isIssue == 1) {
             const startColumn = index > 0 ? xAxis[index - 1] : xAxis[index]; // 璧风偣锛氬墠涓�鍒楁垨褰撳墠鍒�

--
Gitblit v1.9.3