歷史資料過濾NaN和0
This commit is contained in:
parent
c4f175d379
commit
c3ceba4433
@ -56,10 +56,8 @@ const useElecStore = defineStore("elecDist", () => {
|
|||||||
.format("YYYY-MM-DDTHH:mm:ss.000+08:00"); // 現在時間前2個小時
|
.format("YYYY-MM-DDTHH:mm:ss.000+08:00"); // 現在時間前2個小時
|
||||||
const endTime = dayjs().format("YYYY-MM-DDTHH:mm:ss.000+08:00"); // 現在的時間
|
const endTime = dayjs().format("YYYY-MM-DDTHH:mm:ss.000+08:00"); // 現在的時間
|
||||||
const id = item.id;
|
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')`;
|
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
|
// @ts-ignore
|
||||||
window.require &&
|
window.require &&
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
|
@ -123,6 +123,7 @@ const useElecReportStore = defineStore("elecReportData", () => {
|
|||||||
const timestamp = record.get("timestamp").$cEncStr;
|
const timestamp = record.get("timestamp").$cEncStr;
|
||||||
if (
|
if (
|
||||||
currentValue !== null &&
|
currentValue !== null &&
|
||||||
|
!isNaN(currentValue) &&
|
||||||
currentValue !== 0 &&
|
currentValue !== 0 &&
|
||||||
timestamp !== null
|
timestamp !== null
|
||||||
) {
|
) {
|
||||||
|
@ -40,7 +40,7 @@ const useElecStore = defineStore("elecData", () => {
|
|||||||
eleclist.push({
|
eleclist.push({
|
||||||
slotPath: record.get("slotPath"),
|
slotPath: record.get("slotPath"),
|
||||||
displayName: record.get("parent$2edisplayName"),
|
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,
|
out: record.get("out")?.get("value") ?? null,
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -85,6 +85,7 @@ const useElecStore = defineStore("elecData", () => {
|
|||||||
const timestamp = record.get("timestamp").$cEncStr;
|
const timestamp = record.get("timestamp").$cEncStr;
|
||||||
if (
|
if (
|
||||||
currentValue !== null &&
|
currentValue !== null &&
|
||||||
|
!isNaN(currentValue) &&
|
||||||
currentValue !== 0 &&
|
currentValue !== 0 &&
|
||||||
timestamp !== null
|
timestamp !== null
|
||||||
) {
|
) {
|
||||||
|
Loading…
Reference in New Issue
Block a user