From 683abba93d8ca11f1e07a46c4c7366a182f89464 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期一, 31 三月 2025 16:01:34 +0800
Subject: [PATCH] 检验想偏差预警-修改
---
src/views/statisticalCharts/inspectionItemWarning/index.vue | 19 +++++++++++++++++--
1 files changed, 17 insertions(+), 2 deletions(-)
diff --git a/src/views/statisticalCharts/inspectionItemWarning/index.vue b/src/views/statisticalCharts/inspectionItemWarning/index.vue
index 2199965..1840d04 100644
--- a/src/views/statisticalCharts/inspectionItemWarning/index.vue
+++ b/src/views/statisticalCharts/inspectionItemWarning/index.vue
@@ -96,7 +96,11 @@
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 },
@@ -193,9 +197,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