| | |
| | | //初始化 |
| | | init() |
| | | |
| | | // change事件 |
| | | $('input[type=radio][name=value]').change(function () { |
| | | if (this.value == 'list') { |
| | | $('.evaluate-echarts').hide() |
| | | // $('.evaluate-box-top-left').css('visibility', 'visible') |
| | | $('.evaluate-table').show() |
| | | $('.flood-analysis-pagination').show() |
| | | } else { |
| | | $('.evaluate-table').hide() |
| | | // $('.evaluate-box-top-left').css('visibility', 'hidden') |
| | | $('.flood-analysis-pagination').hide() |
| | | recharts_z() |
| | | loadEcharts() |
| | | $('.evaluate-echarts').show() |
| | | } |
| | | }); |
| | | $('#list').click(function () { |
| | | $('.evaluate-echarts').hide() |
| | | $('.evaluate-table').show() |
| | | $('.flood-analysis-pagination').show() |
| | | $('.list').addClass('choose-button') |
| | | $('.list').removeClass('unchoose-button') |
| | | $('.echarts').addClass('unchoose-button') |
| | | $('.echarts').removeClass('choose-button') |
| | | }) |
| | | |
| | | $('#echarts').click(function () { |
| | | $('.evaluate-table').hide() |
| | | $('.flood-analysis-pagination').hide() |
| | | recharts_z() |
| | | loadEcharts() |
| | | $('.evaluate-echarts').show() |
| | | |
| | | $('.echarts').addClass('choose-button') |
| | | $('.echarts').removeClass('unchoose-button') |
| | | $('.list').addClass('unchoose-button') |
| | | $('.list').removeClass('choose-button') |
| | | }) |
| | | |
| | | |
| | | |
| | | //淹没图弹窗事件 |
| | | $('#create-flood-image').click(function () { |
| | |
| | | legend: {}, |
| | | xAxis: [ |
| | | { |
| | | type: 'value', |
| | | type: 'category', |
| | | axisTick: {show: false}, |
| | | } |
| | | ], |
| | | yAxis: [ |
| | | { |
| | | type: 'category', |
| | | type: 'value', |
| | | data: nameData |
| | | } |
| | | ], |
| | |
| | | } |
| | | |
| | | function recharts_z() { |
| | | var width = $(window).width() * 0.45; |
| | | var height = ($(window).height() - 50) - 80; |
| | | var width = $(window).width() * 0.8; |
| | | var height = $(window).height() - 400 |
| | | |
| | | $('#evaluate-echarts').empty(); |
| | | $('#evaluate-echarts').removeAttr("_echarts_instance_").empty(); |
| | |
| | | |
| | | function init() { |
| | | $('#show-img').prop('src', 'image/floodAnalysisEvaluate-2.png') |
| | | loadSumData() |
| | | $('.list').addClass('choose-button') |
| | | $('.list').removeClass('unchoose-button') |
| | | $('.echarts').addClass('unchoose-button') |
| | | $('.echarts').removeClass('choose-button') |
| | | loadPagination() |
| | | loadSumData() |
| | | |
| | | } |
| | | |
| | | function loadTable(listData) { |
| | |
| | | money = floatAdd(money, evaluateData[i].value) |
| | | } |
| | | |
| | | $(".house").html(house + '户') |
| | | $(".people").html(people + '人') |
| | | $(".area").html(area + 'km²') |
| | | $(".money").html(money + '万元') |
| | | $('.description').html("该站位于" + hd.riverway + ",靠近"+hd.stnm.trim()+"水文站,起始距为"+hd.gl_qdj+",河段长" + hd.river_length + "m,预计会造成受灾户数" + house + "户,受灾人口" + people + "人,受灾面积" + area + "km²,房屋价值" + money + "万元") |
| | | let table = '<tr>' + |
| | | '<td><div>合计</div></td>' + |
| | | '<td><div>' + house + '</div></td>' + |
| | | '<td><div>' + people + '</div></td>' + |
| | | '<td><div>' + area + '</div></td>' + |
| | | '<td><div>' + money + '</div></td>' + |
| | | '</tr>' |
| | | |
| | | $('#evaluate-tbody').append(table) |
| | | |
| | | // $(".house").html(house + '户') |
| | | // $(".people").html(people + '人') |
| | | // $(".area").html(area + 'km²') |
| | | // $(".money").html(money + '万元') |
| | | |
| | | $('.description').html("该站位于" + hd.riverway + ",靠近"+hd.stnm.trim()+"水文站,起始距为"+hd.gl_qdj+"m,河段长" + hd.river_length + "m,预计会造成受灾户数" + house + "户,受灾人口" + people + "人,受灾面积" + area + "km²,房屋价值" + money + "万元") |
| | | } |
| | | |
| | | function loadPagination() { |
| | |
| | | point:data.point |
| | | } |
| | | $.ajax({ |
| | | url: 'http://localhost:82/blade-ycreal/inundationResult/save', |
| | | url: 'http://192.168.0.207:82/blade-ycreal/inundationResult/save', |
| | | type: 'post', |
| | | dataType: 'json', |
| | | jsonp: 'callback', |