赣州市洪水风险预警系统三维版本
guoshilong
2023-02-21 ad150cbe52b98add2a0461d35d11dbd2b8675fb8
洪水淹没-实时,预测水位计算
1 files modified
14 ■■■■■ changed files
widgets/FloodAnalysis/Widget.js 14 ●●●●● patch | view | raw | blame | history
widgets/FloodAnalysis/Widget.js
@@ -64,7 +64,7 @@
            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",
        },
@@ -176,7 +176,7 @@
            //水位输入事件
            $('#sw-input').on("input", function (e,v) {
                // self.getYcSub($('#sw-input').val())
                self.getYcSw($('#sw-input').val())
            })
            //河段选择框改变事件
@@ -404,7 +404,7 @@
                        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)
                    }
                }
            });
@@ -537,12 +537,13 @@
        },
        //预测水位计算
        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)
@@ -554,6 +555,7 @@
        //减法函数
        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
@@ -599,7 +601,7 @@
                    }
                });
            } else {
                // self.getYcSub($('#sw-input').val())
                self.getYcSw($('#sw-input').val())
            }
        },