| | |
| | | hdDataList: [], |
| | | //洪水分析表格数据 |
| | | analysisTableList: [], |
| | | dgridSelectEvent:null, |
| | | //历史风险图表格数据 |
| | | historyTableList: [ |
| | | {name: "5年洪水淹没图"}, |
| | |
| | | startup: function startup() { |
| | | var self = this |
| | | this.bindHtmlElement() |
| | | //收起展开按钮点击事件 |
| | | $(".fold-btn").click(function () { |
| | | if (self.isOpen) { |
| | | $(this).addClass('close') |
| | | $(this).removeClass('open') |
| | | $('.content').hide() |
| | | self.isOpen = false |
| | | } else { |
| | | $(this).addClass('open') |
| | | $(this).removeClass('close') |
| | | $('.content').show() |
| | | self.isOpen = true |
| | | } |
| | | }) |
| | | |
| | | //实时、预测改变事件 |
| | | $('input[type=radio][name=middleRadio]').change(function () { |
| | |
| | | $('#analysis-pagination').hide() |
| | | $('#history-pagination').show() |
| | | |
| | | //获取历史数据 |
| | | self.getHistoryList() |
| | | }) |
| | | |
| | |
| | | $('#hd-input').val("") |
| | | //清空表格数据 |
| | | $('.location-box-list').empty(); |
| | | $('.history-box-list').empty(); |
| | | |
| | | $('#analysis-pagination').hide() |
| | | |
| | | this.analysisTableList = [] |
| | |
| | | this.currentSmxcode = "" |
| | | //获取河段数据 |
| | | this.getHdData() |
| | | //获取历史数据 |
| | | this.getHistoryList() |
| | | |
| | | }, |
| | | |
| | | //获取河段下拉数据 |
| | |
| | | grid.startup(); |
| | | |
| | | //change事件 |
| | | grid.on("dgrid-datachange", function(evt){ |
| | | //获取行数据 |
| | | let data = evt.cell.row.data |
| | | }); |
| | | // grid.on("dgrid-datachange", function(evt){ |
| | | // //获取行数据 |
| | | // let data = evt.cell.row.data |
| | | // }); |
| | | |
| | | grid.on("dgrid-select", function(evt){ |
| | | if (this.dgridSelectEvent){ |
| | | this.dgridSelectEvent.remove() |
| | | } |
| | | |
| | | this.dgridSelectEvent = grid.on("dgrid-select", function(evt){ |
| | | //获取行数据 |
| | | let data = evt.rows[0].data |
| | | console.log(data) |