From c3ceba4433c5fc1cfb3f5edf2ce0a23f5b1be59d Mon Sep 17 00:00:00 2001 From: huliang <1539398430@qq.com> Date: Tue, 13 May 2025 10:31:26 +0800 Subject: [PATCH] =?UTF-8?q?=E6=AD=B7=E5=8F=B2=E8=B3=87=E6=96=99=E9=81=8E?= =?UTF-8?q?=E6=BF=BENaN=E5=92=8C0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/stores/useElecDistStore.ts | 4 +--- src/stores/useElecReportStore.ts | 1 + src/stores/useElecTotalMeterStore.ts | 3 ++- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/stores/useElecDistStore.ts b/src/stores/useElecDistStore.ts index 0a58d0d..753a177 100644 --- a/src/stores/useElecDistStore.ts +++ b/src/stores/useElecDistStore.ts @@ -56,10 +56,8 @@ const useElecStore = defineStore("elecDist", () => { .format("YYYY-MM-DDTHH:mm:ss.000+08:00"); // 現在時間前2個小時 const endTime = dayjs().format("YYYY-MM-DDTHH:mm:ss.000+08:00"); // 現在的時間 const id = item.id; - console.log( - `local:|foxs:4918|history:${id}?period=timerange;start=${startTime};end=${endTime}|bql:history:HistoryRollup.rollup(baja:RelTime '3600000')` - ); const ordString = `local:|foxs:4918|history:${id}?period=timerange;start=${startTime};end=${endTime}|bql:history:HistoryRollup.rollup(baja:RelTime '3600000')`; + console.log(ordString); // @ts-ignore window.require && // @ts-ignore diff --git a/src/stores/useElecReportStore.ts b/src/stores/useElecReportStore.ts index e36e304..360abba 100644 --- a/src/stores/useElecReportStore.ts +++ b/src/stores/useElecReportStore.ts @@ -123,6 +123,7 @@ const useElecReportStore = defineStore("elecReportData", () => { const timestamp = record.get("timestamp").$cEncStr; if ( currentValue !== null && + !isNaN(currentValue) && currentValue !== 0 && timestamp !== null ) { diff --git a/src/stores/useElecTotalMeterStore.ts b/src/stores/useElecTotalMeterStore.ts index 3624ef4..995cb64 100644 --- a/src/stores/useElecTotalMeterStore.ts +++ b/src/stores/useElecTotalMeterStore.ts @@ -40,7 +40,7 @@ const useElecStore = defineStore("elecData", () => { eleclist.push({ slotPath: record.get("slotPath"), displayName: record.get("parent$2edisplayName"), - id: record.get("NumericInterval$2ehistoryConfig$2eid").$cEncStr, + id: record.get("NumericInterval$2ehistoryConfig$2eid"), out: record.get("out")?.get("value") ?? null, }); }, @@ -85,6 +85,7 @@ const useElecStore = defineStore("elecData", () => { const timestamp = record.get("timestamp").$cEncStr; if ( currentValue !== null && + !isNaN(currentValue) && currentValue !== 0 && timestamp !== null ) {