| | |
| | | childpage: "http://localhost:82/blade-ycreal/water/childpage", |
| | | getCzByGlCodeByGlQdj: "http://localhost:82/blade-ycreal/waterline/getCzByGlCodeByGlQdj", |
| | | getRealTimeWaterByhdId: "http://localhost:82/blade-ycreal/waterline/getRealTimeWaterByhdId", |
| | | getHistoryList: "http://192.168.0.207:82/blade-ycreal/inundationResult/list", |
| | | getHistoryList: "http://localhost:82/blade-ycreal/inundationResult/list", |
| | | saveHistoryData: "http://localhost:82/blade-ycreal/inundationResult/save", |
| | | getCoordinatesMinQdj: "http://localhost:82/blade-ycreal/water/getCoordinatesMinQdj", |
| | | }, |
| | |
| | | |
| | | //水位输入事件 |
| | | $('#sw-input').on("input", function (e,v) { |
| | | // self.getYcSub($('#sw-input').val()) |
| | | self.getYcSw($('#sw-input').val()) |
| | | }) |
| | | |
| | | //河段选择框改变事件 |
| | |
| | | let data = res.data.records |
| | | self.createPointAndLine(data,self.pointEntities) |
| | | self.analysisTableList = data |
| | | self.getSub(self.currentHd.id, self.currentSmxcode) |
| | | self.getRealTimeWaterByhdId(self.currentHd.id) |
| | | } |
| | | } |
| | | }); |
| | |
| | | }, |
| | | |
| | | //预测水位计算 |
| | | getYcSub(val) { |
| | | getYcSw(val) { |
| | | const self = this |
| | | let chazhi = self.accSub(val,self.currentNearPoint.water) |
| | | self.analysisTableList.forEach(e => { |
| | | e.lng = Number(e.lng).toFixed(4) |
| | | e.lat = Number(e.lat).toFixed(4) |
| | | e.sw = self.calculateSw(e.water, val) |
| | | e.sw = self.calculateSw(e.water, chazhi) |
| | | |
| | | e.water = Number(e.water).toFixed(2) |
| | | e.sw = Number(e.sw).toFixed(2) |
| | |
| | | //减法函数 |
| | | accSub(arg1,arg2){ |
| | | var r1,r2,m,n; |
| | | r1 = arg1.toString().length |
| | | try{r2=arg2.toString().split(".")[1].length}catch(e){r2=0} |
| | | m=Math.pow(10,Math.max(r1,r2)); |
| | | //last modify by deeka |
| | |
| | | } |
| | | }); |
| | | } else { |
| | | // self.getYcSub($('#sw-input').val()) |
| | | self.getYcSw($('#sw-input').val()) |
| | | } |
| | | |
| | | }, |