| | |
| | | isOpen: true, |
| | | //api接口 |
| | | url: { |
| | | riverwaySelectName: "http://192.168.0.103:82/blade-ycreal/riverway/selectName", |
| | | waterlineSelectName: "http://192.168.0.103:82/blade-ycreal/waterline/selectName", |
| | | childpage: "http://192.168.0.103:82/blade-ycreal/water/childpage", |
| | | getCzByGlCodeByGlQdj: "http://192.168.0.103:82/blade-ycreal/waterline/getCzByGlCodeByGlQdj", |
| | | riverwaySelectName: "http://192.168.0.207:82/blade-ycreal/riverway/selectName", |
| | | waterlineSelectName: "http://192.168.0.207:82/blade-ycreal/waterline/selectName", |
| | | childpage: "http://192.168.0.207:82/blade-ycreal/water/childpage", |
| | | getCzByGlCodeByGlQdj: "http://192.168.0.207:82/blade-ycreal/waterline/getCzByGlCodeByGlQdj", |
| | | getHistoryList: "", |
| | | saveHistoryData: "", |
| | | getCoordinatesMinQdj: "http://192.168.0.103:82/blade-ycreal/water/getCoordinatesMinQdj", |
| | | getCoordinatesMinQdj: "http://192.168.0.207:82/blade-ycreal/water/getCoordinatesMinQdj", |
| | | }, |
| | | evaluateData: [ |
| | | { |
| | |
| | | //开始分析按钮点击事件 |
| | | $('#start-analysis-btn').click(function () { |
| | | if (self.currentHd && self.currentSmxcode) { |
| | | self.evaluatePopup() |
| | | // self.evaluatePopup() |
| | | self.drawWater() |
| | | } else { |
| | | alert("请先选择河段和水面线") |
| | | } |
| | |
| | | }); |
| | | grid.renderArray(dataList); |
| | | }, |
| | | |
| | | // 洪水淹没效果 |
| | | drawWater() { |
| | | //地图定位 |
| | | // this.map.camera.flyTo({ |
| | | // destination: Cesium.Cartesian3.fromDegrees(115.93791, 25.989108, 5000), |
| | | // }); |
| | | this.showWater = true |
| | | this.waterEntity && this.map.entities.remove(this.waterEntity) |
| | | const waterCoord = [116.0072, 25.9058, 100, 116.0546, 25.9012, 100 , 116.0457, 25.8611, 100, 115.9859, 25.8740 ,100] |
| | | let startHeight = 169 |
| | | const targetHeight = 200 |
| | | this.waterEntity = this.map.entities.add({ |
| | | polygon: { |
| | | hierarchy: Cesium.Cartesian3.fromDegreesArrayHeights(waterCoord), |
| | | material: Cesium.Color.fromBytes(64, 157, 253, 200), |
| | | perPositionHeight: true, |
| | | extrudedHeight: new Cesium.CallbackProperty(() => { return startHeight }, false) |
| | | } |
| | | }) |
| | | const waterInterval = setInterval(() => { |
| | | if (startHeight < targetHeight) { |
| | | startHeight += 5 |
| | | if (startHeight >= targetHeight) { |
| | | startHeight = targetHeight |
| | | clearInterval(waterInterval) |
| | | this.showWater = false |
| | | this.evaluatePopup() |
| | | } |
| | | // 使用该方式会闪烁,改用 Cesium.CallbackProperty 平滑 |
| | | // this.waterEntity.polygon.extrudedHeight = startHeight |
| | | } |
| | | }, 1000*0.5) |
| | | } |
| | | |
| | | }); |
| | | }); |