| | |
| | | @table-click="handelIndexChange" |
| | | :factor-datas="factorDatas" |
| | | :device-type="deviceType" |
| | | :device-code="deviceCode" |
| | | ></DataSheet> |
| | | </div> |
| | | </template> |
| | |
| | | mapUtil.setCenter(pr.p); |
| | | // mapUtil.setFitSector(pr); |
| | | // 2. 绘制对话框 |
| | | DialogUtil.openNewWindow(this.deviceCode, this.factorDatas, index, () => { |
| | | // 移除扇形区域 |
| | | sector.clearSector(); |
| | | }); |
| | | DialogUtil.openNewWindow( |
| | | this.deviceType, |
| | | this.deviceCode, |
| | | this.factorDatas, |
| | | index, |
| | | () => { |
| | | // 移除扇形区域 |
| | | 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() { |