修正错误数据

This commit is contained in:
Xiaoyu 2025-03-12 20:44:46 +08:00
parent 21773a046a
commit 5294c003fb

View File

@ -154,11 +154,11 @@ const getSensorTypeName = (type, name) => {
const getSensorDataItems = (sensor) => { const getSensorDataItems = (sensor) => {
// 线"---" // 线"---"
if (sensor.status === 0) { 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, status: isOnline ? 0 : 1,
updated_at: new Date().toISOString(), updated_at: new Date().toISOString(),
data: { data: {
pds: null, tds: null,
}, },
})); }));
@ -210,15 +210,15 @@ const handleKeyPress = (event) => {
const substanceData = { const substanceData = {
h: { h: {
// (1000-1370) // (1000-1370)
pds: 1185, tds: 1185,
}, },
c: { c: {
// (200-248) // (200-248)
pds: 224, tds: 224,
}, },
f: { f: {
// (450-490) // (450-490)
pds: 470, tds: 470,
}, },
}; };
@ -231,7 +231,7 @@ const handleKeyPress = (event) => {
sensorList.value = sensorList.value.map((sensor) => ({ sensorList.value = sensorList.value.map((sensor) => ({
...sensor, ...sensor,
data: { data: {
pds: null, tds: null,
}, },
})); }));
return; return;
@ -271,7 +271,7 @@ const handleKeyPress = (event) => {
status: 1, status: 1,
updated_at: new Date().toISOString(), updated_at: new Date().toISOString(),
data: { data: {
pds: randomValue, tds: randomValue,
}, },
})); }));
}, 1000); // }, 1000); //