| | |
| | | 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) { |
| | |
| | | } |
| | | 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() { |