From 333d98a8ffa718aaa903632525f16e4aecb92638 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期四, 17 四月 2025 14:18:22 +0800
Subject: [PATCH] 设备维护保养页面开发、联调
---
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