From 4062c04655d19366ca5e4c772d8a8e9c5690ef7d Mon Sep 17 00:00:00 2001
From: xiebin <123456>
Date: Tue, 21 Feb 2023 09:08:24 +0800
Subject: [PATCH] UI修改

---
 corelib/common/popup/js/evaluateAnalysis.js |   75 ++++++++++++++++++++++++-------------
 1 files changed, 49 insertions(+), 26 deletions(-)

diff --git a/corelib/common/popup/js/evaluateAnalysis.js b/corelib/common/popup/js/evaluateAnalysis.js
index 473254b..6bddf96 100644
--- a/corelib/common/popup/js/evaluateAnalysis.js
+++ b/corelib/common/popup/js/evaluateAnalysis.js
@@ -22,22 +22,30 @@
     //初始化
     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 () {
@@ -129,7 +137,7 @@
             verticalAlign: app.config.verticalAlign,
             rotate: app.config.rotate,
             formatter: '{c}  {name|{a}}',
-            fontSize: 16,
+            fontSize: 13,
             rich: {
                 name: {}
             }
@@ -199,8 +207,8 @@
     }
 
     function recharts_z() {
-        var width = $(window).width() * 0.45;
-        var height = ($(window).height() - 50) - 80;
+        var width = $(window).width();
+        var height = $(window).height() - 400
 
         $('#evaluate-echarts').empty();
         $('#evaluate-echarts').removeAttr("_echarts_instance_").empty();
@@ -240,8 +248,12 @@
 
     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) {
@@ -281,11 +293,22 @@
             money = floatAdd(money, evaluateData[i].value)
         }
 
-        $(".house").html(house + '户')
-        $(".people").html(people + '人')
-        $(".area").html(area + 'km²')
-        $(".money").html(money + '万元')
-        $('.description').html("该站位于" + hd.riverway + ",河段长" + 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("&nbsp&nbsp该站位于" + hd.riverway + ",靠近"+hd.stnm.trim()+"水文站,起始距为"+hd.gl_qdj+"m,河段长" + hd.river_length + "m,预计会造成受灾户数" + house + "户,受灾人口" + people + "人,受灾面积" + area + "km²,房屋价值" + money + "万元")
     }
 
     function loadPagination() {
@@ -356,7 +379,7 @@
             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',

--
Gitblit v1.9.3