From 5294c003fbfdf979e8e3e5cef274f9986c610dfd Mon Sep 17 00:00:00 2001 From: Xiaoyu <3306310490@qq.com> Date: Wed, 12 Mar 2025 20:44:46 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E9=94=99=E8=AF=AF=E6=95=B0?= =?UTF-8?q?=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/AIPatrol/sensor/index.vue | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/views/AIPatrol/sensor/index.vue b/src/views/AIPatrol/sensor/index.vue index d4ff645..fe866ba 100644 --- a/src/views/AIPatrol/sensor/index.vue +++ b/src/views/AIPatrol/sensor/index.vue @@ -154,11 +154,11 @@ const getSensorTypeName = (type, name) => { const getSensorDataItems = (sensor) => { // 如果设备离线,所有数据项显示"---" if (sensor.status === 0) { - return [{ label: "PDS值", value: "---", unit: "" }]; + return [{ label: "TDS值", value: "---", unit: "" }]; } // 设备在线时显示正常数据 - return [{ label: "PDS值", value: sensor.data?.pds, unit: "mg/L" }]; + return [{ label: "TDS值", value: sensor.data?.tds, unit: "mg/L" }]; }; // 添加数据刷新定时器引用 @@ -180,7 +180,7 @@ const handleKeyPress = (event) => { status: isOnline ? 0 : 1, updated_at: new Date().toISOString(), data: { - pds: null, + tds: null, }, })); @@ -210,15 +210,15 @@ const handleKeyPress = (event) => { const substanceData = { h: { // 海水参考值 (1000-1370) - pds: 1185, + tds: 1185, }, c: { // 茶水参考值 (200-248) - pds: 224, + tds: 224, }, f: { // 芬达参考值 (450-490) - pds: 470, + tds: 470, }, }; @@ -231,7 +231,7 @@ const handleKeyPress = (event) => { sensorList.value = sensorList.value.map((sensor) => ({ ...sensor, data: { - pds: null, + tds: null, }, })); return; @@ -271,7 +271,7 @@ const handleKeyPress = (event) => { status: 1, updated_at: new Date().toISOString(), data: { - pds: randomValue, + tds: randomValue, }, })); }, 1000); // 每秒更新一次