Bläddra i källkod

资金统计图表自适应

ellisran 9 månader sedan
förälder
incheckning
5036c66f2b
1 ändrade filer med 14 tillägg och 0 borttagningar
  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 = {