| | |
| | | self.getPointData(selected) |
| | | }) |
| | | |
| | | //水位输入框按下回车事件 |
| | | $('#sw-input').keypress(function (event) { |
| | | if (event.which == 13) { |
| | | self.analysisTableList.forEach(e => { |
| | | e.sw = self.calculateSw(e.water, sw) |
| | | }) |
| | | self.loadPagination(self.analysisTableList, "analysis-pagination") |
| | | } |
| | | }) |
| | | // //水位输入框按下回车事件 |
| | | // $('#sw-input').keypress(function (event) { |
| | | // if (event.which == 13) { |
| | | // self.analysisTableList.forEach(e => { |
| | | // e.sw = self.calculateSw(e.water, sw) |
| | | // }) |
| | | // self.loadPagination(self.analysisTableList, "analysis-pagination") |
| | | // } |
| | | // }) |
| | | |
| | | //搜索按钮点击事件 |
| | | $('#search-button').click(function () { |
| | |
| | | if (val > 0) { |
| | | chazhi = self.accSub(val,self.currentNearPoint.water) |
| | | } |
| | | self.analysisTableList.forEach(e => { |
| | | |
| | | let list = JSON.parse(JSON.stringify(self.analysisTableList)) |
| | | |
| | | list.forEach(e => { |
| | | e.lng = Number(e.lng).toFixed(4) |
| | | e.lat = Number(e.lat).toFixed(4) |
| | | e.sw = self.calculateSw(e.water, chazhi) |
| | | e.water = Number(e.water).toFixed(2) |
| | | e.sw = Number(e.sw).toFixed(2) |
| | | }) |
| | | self.loadPagination(self.analysisTableList, "analysis-pagination") |
| | | self.loadPagination(list, "analysis-pagination") |
| | | }, |
| | | |
| | | //获取最接近水文站的值 |
| | |
| | | min: function(layero,index){ |
| | | setTimeout(function(){ |
| | | layero.css({ |
| | | // 'width':'206px', |
| | | 'width':'50px', |
| | | 'top': '83px', |
| | | 'left':'inherit', |
| | | 'right':'0px', |
| | |
| | | }) |
| | | //显示最大化icon |
| | | $('.layui-layer-max').css("display","") |
| | | //标题背景改变 |
| | | $('.layui-layer-title').css({ |
| | | 'background-color':'rgb(255,255,255)' |
| | | }) |
| | | }, |
| | | restore: function(layero,index) { |
| | | //隐藏最大化icon |
| | |
| | | 'width':'465px', |
| | | 'height':'818px' |
| | | }) |
| | | //还原标题背景色 |
| | | $('.layui-layer-title').css({ |
| | | 'background-color':'rgb(0, 73, 135)' |
| | | }) |
| | | }, |
| | | success:function (layero,index) { |
| | | |
| | | $('.layui-layer-setwin .layui-layer-min cite').css("background-color",'white') |
| | | |
| | | //绑定父子之间的关系,用于数据传递,缺少则无法传递 |
| | | var body = layer.getChildFrame("body", index); |
| | | //得到iframe页的窗口对象 |