Browse Source

资金统计图表自适应

ellisran 9 tháng trước cách đây
mục cha
commit
5036c66f2b
1 tập tin đã thay đổi với 14 bổ sung0 xóa
  1. 14 0
      app/public/js/financial_summary.js

+ 14 - 0
app/public/js/financial_summary.js

@@ -118,6 +118,20 @@ $(document).ready(function() {
         },
     }
 
+    let resizeTimer = null;
+    $(window).bind('resize', function () {
+        if (resizeTimer) clearTimeout(resizeTimer);
+        resizeTimer = setTimeout(function () {
+            echartsReset();
+        }, 500);
+    })
+
+    function echartsReset() {
+        tenderChart.resize();
+        payUsedChart.resize();
+        paySeChart.resize();
+    }
+
     //标段占比
     const tenderChart = echarts.init(document.getElementById('jlchart3'));
     const tenderOption = {