| | |
| | | factorType: defaultOptions(TYPE0).value, |
| | | // 监测数据 |
| | | factorDatas: new FactorDatas(), |
| | | // 污染溯源结果 |
| | | pollutionData: undefined, |
| | | // 决定绘制3D图形时是否与原图像合并 |
| | | merge: false, |
| | | // 决定绘制完3D图形后地图视角是否自动回中 |
| | |
| | | watch: { |
| | | factorType(nValue, oValue) { |
| | | if (nValue != oValue && this.status == 0) { |
| | | Layer.clear(); |
| | | this.draw(); |
| | | this.drawHighlightPollution(); |
| | | } |
| | | } |
| | | }, |
| | |
| | | } |
| | | ); |
| | | }, |
| | | drawHighlightPollution() { |
| | | this.pollutionData.forEach((e) => { |
| | | if (this.factorType == e.factorId + '') { |
| | | const fDatas = this.factorDatas.getByDate(e.startDate, e.endDate); |
| | | Layer.drawHighLight3DLayer(fDatas, fDatas.factor[this.factorType]); |
| | | } |
| | | }); |
| | | }, |
| | | onFetchData(deviceType, data) { |
| | | if (this.isUnmounted) return; |
| | | // todo 根据设备类型切换地图监测因子展示单选框、折线图复选框、数据表格复选框的因子类型 |
| | | this.deviceType = deviceType; |
| | | this.factorDatas.setData(data, this.drawMode, () => { |
| | | this.factorDatas.refreshHeight(this.factorType); |
| | | Layer.clear(); |
| | | this.draw(); |
| | | }); |
| | | }, |
| | |
| | | handleClick() { |
| | | const { missionCode } = this.mission; |
| | | dataAnalysisApi.pollutionTrace(missionCode).then((res) => { |
| | | res.data.forEach((e) => { |
| | | const fDatas = new FactorDatas(); |
| | | fDatas.setData(e.dataVoList, this.drawMode, () => { |
| | | fDatas.refreshHeight(this.factorType); |
| | | Layer.drawHighLight3DLayer(fDatas, fDatas.factor[this.factorType]); |
| | | console.log(e.dataVoList); |
| | | }); |
| | | }); |
| | | this.pollutionData = res.data; |
| | | this.drawHighlightPollution(); |
| | | }); |
| | | } |
| | | }, |