From 6b6eff08baa3d052b66fd2e68f1ac0d8495f6f8a Mon Sep 17 00:00:00 2001 From: riku <risaku@163.com> Date: 星期四, 29 八月 2024 17:35:33 +0800 Subject: [PATCH] 修改历史数据获取逻辑 --- src/views/historymode/HistoryMode.vue | 10 ++++++---- 1 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/views/historymode/HistoryMode.vue b/src/views/historymode/HistoryMode.vue index 9df700d..d75c5b2 100644 --- a/src/views/historymode/HistoryMode.vue +++ b/src/views/historymode/HistoryMode.vue @@ -157,16 +157,17 @@ sector.clearSector(); }); }, - onFetchData(type, data) { + onFetchData(deviceType, data) { // todo 鏍规嵁璁惧绫诲瀷鍒囨崲鍦板浘鐩戞祴鍥犲瓙灞曠ず鍗曢�夋銆佹姌绾垮浘澶嶉�夋銆佹暟鎹〃鏍煎閫夋鐨勫洜瀛愮被鍨� - this.deviceType = type; + this.deviceType = deviceType; this.factorDatas.setData(data, this.drawMode, () => { this.factorDatas.refreshHeight(this.factorType); this.draw(); }); }, fetchHistroyData(option) { - const { deviceCode, type, timeArray } = option; + const { deviceType, deviceCode, timeArray } = option; + this.deviceType = deviceType; this.deviceCode = deviceCode; let startTime, endTime; if (timeArray && timeArray.length == 2) { @@ -175,12 +176,13 @@ } this.fetchData((page, pageSize) => { return fetchHistoryData({ + deviceType, deviceCode, startTime, endTime, page, perPage: pageSize - }).then((res) => this.onFetchData(type, res.data)); + }).then((res) => this.onFetchData(deviceType, res.data)); }); } // fetchRealTimeData() { -- Gitblit v1.9.3