Forráskód Böngészése

增加年份和假数据和销毁图表

zhbyyy 2 éve
szülő
commit
9e48826eac
2 módosított fájl, 141 hozzáadás és 117 törlés
  1. 1 1
      investmentPort/investHomeGroup.html
  2. 140 116
      investmentPort/js/investHomeGroup.js

+ 1 - 1
investmentPort/investHomeGroup.html

@@ -28,7 +28,7 @@
 
 <body>
   <!-- <dv-full-screen-container> -->
-  <div id="app" class="w-full h-full" v-if="changeYear">
+  <div id="app" class="w-full h-full" >
     <div class="LeftBox">
       <header class="my-header">
         <span class="pointer" @click.stop="showTitlePop('2.png','投前管理')">投前管理</span>

+ 140 - 116
investmentPort/js/investHomeGroup.js

@@ -2,9 +2,9 @@ let app = new Vue({
   el: '#app',
   data () {
     return {
-      changeYear: true,
       pullShow: false, // 选择年份弹窗
       pollList: [2021, 2022, 2023, 2024],
+      mockData:false,// 是否使用修改的数据
       year: 2023, // 选择的年份
       boardUrl: '', // 跳转路径
       boardTipShow: false, // 项目看板弹窗专用
@@ -176,14 +176,40 @@ let app = new Vue({
     },
     chooseTime (value) {
       let that = this
-      this.changeYear = false
       this.year = value
+      that.destroyCharts()
       this.pullShow = false
       setTimeout(item => {
-        that.changeYear = true
         that.comeIn()
       })
     },
+    destroyCharts(){
+      this.left10Chart ? this.left10Chart.dispose() : ''
+      this.left1Chart ? this.left1Chart.destroy() : ''
+      this.left2Chart ? this.left2Chart.destroy() : ''
+      this.left3Chart ? this.left3Chart.destroy() : ''
+      this.left4Chart ? this.left4Chart.destroy() : ''
+      this.left5Chart ? this.left5Chart.destroy() : ''
+      this.left6Chart ? this.left6Chart.destroy() : ''
+      this.left7Chart ? this.left7Chart.dispose() : ''
+      this.left8Chart ? this.left8Chart.dispose() : ''
+      this.left9Chart ? this.left9Chart.dispose() : ''
+      this.chartCarousel ? this.chartCarousel.dispose() : ''
+      this.myChartTip1 ? this.myChartTip1.dispose() : ''
+      this.myChartTip2 ? this.myChartTip2.dispose() : ''
+      this.myChartTip3 ? this.myChartTip3.dispose() : ''
+      this.left11Chart ? this.left11Chart.dispose() : ''
+      this.right1Chart ? this.right1Chart.dispose() : ''
+      this.right2Chart ? this.right2Chart.dispose() : ''
+      this.right3Chart ? this.right3Chart.dispose() : ''
+      this.echartR4Chart ? this.echartR4Chart.dispose() : ''
+      this.echartR5Chart ? this.echartR5Chart.dispose() : ''
+      this.center1Chart ? this.center1Chart.destroy() : ''
+      this.center2Chart ? this.center2Chart.dispose() : ''
+      this.center3Chart ? this.center3Chart.dispose() : ''
+      this.center4Chart ? this.center4Chart.destroy() : ''
+      this.mapChart ? this.mapChart.dispose() : ''
+    },
     // 获取token
     getAppToken () {
       let value = {
@@ -659,7 +685,7 @@ let app = new Vue({
         let value = {
           access_token: this.access_token,
           "request": {
-            isInsert: '0'
+            isInsert: this.mockData?'1':'0'
           },
           pageSize: 1000
         }
@@ -683,7 +709,7 @@ let app = new Vue({
         let value = {
           access_token: this.access_token,
           "request": {
-            isInsert: '0',
+            isInsert:  this.mockData?'1':'0',
             modelName,
             substraction,
             orgName
@@ -712,12 +738,12 @@ let app = new Vue({
         let value = {
           access_token: this.access_token,
           "data": {
-            mdnb_combofield: 'A',
+            mdnb_combofield: this.mockData?'B':'A',
             mdnb_textfield11,
             mdnb_textfield13,
             mdnb_textfield16,
             mdnb_textfield23,
-            mdnb_datefield: '2022-01-01'
+            mdnb_datefield: this.year+'-01-01'
           },
           pageSize: 1000
         }
@@ -749,8 +775,8 @@ let app = new Vue({
           let value = {
             access_token: this.access_token,
             "data": {
-              mdnb_combofield: 'A',
-              mdnb_datefield: '2022-03-03',
+              mdnb_combofield: this.mockData?'B':'A',
+              mdnb_datefield: this.year+'-03-03',
               mdnb_textfield12,
               mdnb_textfield19,
               mdnb_textfield15,
@@ -797,8 +823,8 @@ let app = new Vue({
       return new Promise((resolve, err) => {
         let value = {
           access_token: this.access_token,
-          mock: false,
-          presetYear: 2023,
+          mock: this.mockData,
+          presetYear: this.year,
           type,
           param
         }
@@ -887,8 +913,8 @@ let app = new Vue({
       return new Promise((resolve, err) => {
         let value = {
           access_token: this.access_token,
-          mock: true,
-          presetYear: 2023,
+          mock: this.mockData,
+          presetYear: this.year,
           type,
           param,
           orgNum
@@ -1599,7 +1625,7 @@ let app = new Vue({
       this.initChartL9()
     },
     initChartBall () {
-      let myChart = echarts.init(this.$refs['echartBall'])
+      this.left11Chart = echarts.init(this.$refs['echartBall'])
       option = {
         series: [
           {
@@ -1706,10 +1732,10 @@ let app = new Vue({
           },
         ],
       };
-      myChart.setOption(option)
+      this.left11Chart.setOption(option)
     },
     initChartL1 () {
-      let myChart = echarts.init(this.$refs['echartL1'])
+      this.left9Chart = echarts.init(this.$refs['echartL1'])
       option = {
         series: [
           {
@@ -1820,7 +1846,7 @@ let app = new Vue({
         ],
       };
 
-      myChart.setOption(option)
+      this.left9Chart.setOption(option)
     },
     initChartL2 () {
       var chartData = left5
@@ -1856,7 +1882,7 @@ let app = new Vue({
                     // item.selected = true
                   }
                 })
-                chart.update({
+                that.left1Chart.update({
                   series: [{
                     type: 'pie',
                     name: '占比',
@@ -1877,7 +1903,7 @@ let app = new Vue({
                     // item.sliced = false
                     // item.selected = false
                   })
-                  chart.update({
+                  that.left1Chart.update({
                     series: [{
                       type: 'pie',
                       name: '占比',
@@ -1982,7 +2008,7 @@ let app = new Vue({
                 })
                 // chartData[e.target.index].sliced = true
                 // chartData[e.target.index].selected = true
-                chart.update({
+                that.left1Chart.update({
                   series: [{
                     type: 'pie',
                     name: '占比',
@@ -1999,7 +2025,7 @@ let app = new Vue({
                 timer && clearInterval(timer);
               },
               mouseOut: function () { // 鼠标移出后需要继续执行轮播
-                var points = chart.series[0].points;
+                var points = that.left1Chart.series[0].points;
                 var len = points.length;
 
                 timer && clearInterval(timer);
@@ -2013,7 +2039,7 @@ let app = new Vue({
                       // item.selected = true
                     }
                   })
-                  chart.update({
+                  that.left1Chart.update({
                     series: [{
                       type: 'pie',
                       name: '占比',
@@ -2034,7 +2060,7 @@ let app = new Vue({
                       item.sliced = false
                       item.selected = false
                     })
-                    chart.update({
+                    that.left1Chart.update({
                       series: [{
                         type: 'pie',
                         name: '占比',
@@ -2068,7 +2094,7 @@ let app = new Vue({
       var i = 0;
 
       let that = this
-      var chart = Highcharts.chart('echartL3', {
+      that.left2Chart = Highcharts.chart('echartL3', {
         colors: ['#064F78', '#623726', '#955773', , '#B57C63', '#BDB35D', '#73A88E', '#09736D', '#13400B', '#0D3265'],
         chart: {
           type: 'pie',
@@ -2097,7 +2123,7 @@ let app = new Vue({
                     // item.selected = true
                   }
                 })
-                chart.update({
+                that.left2Chart.update({
                   series: [{
                     type: 'pie',
                     name: '占比',
@@ -2118,7 +2144,7 @@ let app = new Vue({
                     // item.sliced = false
                     // item.selected = false
                   })
-                  chart.update({
+                  that.left2Chart.update({
                     series: [{
                       type: 'pie',
                       name: '占比',
@@ -2225,7 +2251,7 @@ let app = new Vue({
                 })
                 // chartData[e.target.index].sliced = true
                 // chartData[e.target.index].selected = true
-                chart.update({
+                that.left2Chart.update({
                   series: [{
                     type: 'pie',
                     name: '占比',
@@ -2242,7 +2268,7 @@ let app = new Vue({
                 timer && clearInterval(timer);
               },
               mouseOut: function () { // 鼠标移出后需要继续执行轮播
-                var points = chart.series[0].points;
+                var points = that.left2Chart.series[0].points;
                 var len = points.length;
 
                 timer && clearInterval(timer);
@@ -2256,7 +2282,7 @@ let app = new Vue({
                       // item.selected = true
                     }
                   })
-                  chart.update({
+                  that.left2Chart.update({
                     series: [{
                       type: 'pie',
                       name: '占比',
@@ -2277,7 +2303,7 @@ let app = new Vue({
                       item.sliced = false
                       item.selected = false
                     })
-                    chart.update({
+                    that.left2Chart.update({
                       series: [{
                         type: 'pie',
                         name: '占比',
@@ -2301,11 +2327,11 @@ let app = new Vue({
       });
 
       function autoTooltip (point) {
-        chart.tooltip.refresh(point);
+        that.left2Chart.tooltip.refresh(point);
       }
     },
     initChartL4 (dataList) {
-      let myChart = echarts.init(document.getElementById("echartL4"));
+      this.left10Chart = echarts.init(document.getElementById("echartL4"));
       let option = {
         grid: {
           top: 45,
@@ -2457,12 +2483,12 @@ let app = new Vue({
           // 小图标的宽高
         },
       };
-      tools.loopShowTooltip(myChart, option, {
+      let that = this
+      tools.loopShowTooltip(that.left10Chart, option, {
         nterval: 2000,
         loopSeries: true,
       })
-      let that = this
-      myChart.on('click', function (param) {
+      that.left10Chart.on('click', function (param) {
         that.titleName = param.name
         that.echartEnterpriseShow = true
         // 如果是接口版数据版
@@ -2482,15 +2508,13 @@ let app = new Vue({
           that.initChartBall()
         });
       })
-      myChart.setOption(option);
+      that.left10Chart.setOption(option);
     },
     initChartL5 () {
       var chartData = left7
       var timer = null;
       var i = 0;
-
       let that = this
-
       var option = {
         colors: ['#064F78', '#623726', '#955773', , '#B57C63', '#BDB35D', '#73A88E', '#09736D', '#13400B', '#0D3265'],
         chart: {
@@ -2520,7 +2544,7 @@ let app = new Vue({
                     item.selected = true
                   }
                 })
-                chart.update({
+                that.left3Chart.update({
                   series: [{
                     type: 'pie',
                     name: '占比',
@@ -2631,7 +2655,7 @@ let app = new Vue({
                 })
                 chartData[e.target.index].sliced = true
                 chartData[e.target.index].selected = true
-                chart.update({
+                that.left3Chart.update({
                   series: [{
                     type: 'pie',
                     name: '占比',
@@ -2648,7 +2672,7 @@ let app = new Vue({
                 timer && clearInterval(timer);
               },
               mouseOut: function () { // 鼠标移出后需要继续执行轮播
-                var points = chart.series[0].points;
+                var points = that.left3Chart.series[0].points;
                 var len = points.length;
 
                 timer && clearInterval(timer);
@@ -2662,7 +2686,7 @@ let app = new Vue({
                       item.selected = true
                     }
                   })
-                  chart.update({
+                  that.left3Chart.update({
                     series: [{
                       type: 'pie',
                       name: '占比',
@@ -2688,10 +2712,10 @@ let app = new Vue({
         }]
       }
 
-      var chart = Highcharts.chart('echartL5', option);
+      that.left3Chart = Highcharts.chart('echartL5', option);
 
       function autoTooltip (point) {
-        chart.tooltip.refresh(point);
+        that.left3Chart.tooltip.refresh(point);
       }
     },
     initChartL6 () {
@@ -2730,7 +2754,7 @@ let app = new Vue({
                     item.selected = true
                   }
                 })
-                chart.update({
+                that.left4Chart.update({
                   series: [{
                     type: 'pie',
                     name: '占比',
@@ -2841,7 +2865,7 @@ let app = new Vue({
                 })
                 chartData[e.target.index].sliced = true
                 chartData[e.target.index].selected = true
-                chart.update({
+                that.left4Chart.update({
                   series: [{
                     type: 'pie',
                     name: '占比',
@@ -2858,7 +2882,7 @@ let app = new Vue({
                 timer && clearInterval(timer);
               },
               mouseOut: function () { // 鼠标移出后需要继续执行轮播
-                var points = chart.series[0].points;
+                var points = that.left4Chart.series[0].points;
                 var len = points.length;
 
                 timer && clearInterval(timer);
@@ -2872,7 +2896,7 @@ let app = new Vue({
                       item.selected = true
                     }
                   })
-                  chart.update({
+                  that.left4Chart.update({
                     series: [{
                       type: 'pie',
                       name: '占比',
@@ -2898,10 +2922,10 @@ let app = new Vue({
         }]
       }
 
-      var chart = Highcharts.chart('echartL6', option);
+      that.left4Chart = Highcharts.chart('echartL6', option);
 
       function autoTooltip (point) {
-        chart.tooltip.refresh(point);
+        that.left4Chart.tooltip.refresh(point);
       }
     },
     initChartL7 () {
@@ -2940,7 +2964,7 @@ let app = new Vue({
                     item.selected = true
                   }
                 })
-                chart.update({
+                that.left5Chart.update({
                   series: [{
                     type: 'pie',
                     name: '占比',
@@ -3051,7 +3075,7 @@ let app = new Vue({
                 })
                 chartData[e.target.index].sliced = true
                 chartData[e.target.index].selected = true
-                chart.update({
+                that.left5Chart.update({
                   series: [{
                     type: 'pie',
                     name: '占比',
@@ -3068,7 +3092,7 @@ let app = new Vue({
                 timer && clearInterval(timer);
               },
               mouseOut: function () { // 鼠标移出后需要继续执行轮播
-                var points = chart.series[0].points;
+                var points = that.left5Chart.series[0].points;
                 var len = points.length;
 
                 timer && clearInterval(timer);
@@ -3082,7 +3106,7 @@ let app = new Vue({
                       item.selected = true
                     }
                   })
-                  chart.update({
+                  that.left5Chart.update({
                     series: [{
                       type: 'pie',
                       name: '占比',
@@ -3108,10 +3132,10 @@ let app = new Vue({
         }]
       }
 
-      var chart = Highcharts.chart('echartL7', option);
+      that.left5Chart = Highcharts.chart('echartL7', option);
 
       function autoTooltip (point) {
-        chart.tooltip.refresh(point);
+        that.left5Chart.tooltip.refresh(point);
       }
 
     },
@@ -3151,7 +3175,7 @@ let app = new Vue({
                     item.selected = true
                   }
                 })
-                chart.update({
+                that.left6Chart.update({
                   series: [{
                     type: 'pie',
                     name: '占比',
@@ -3262,7 +3286,7 @@ let app = new Vue({
                 })
                 chartData[e.target.index].sliced = true
                 chartData[e.target.index].selected = true
-                chart.update({
+                that.left6Chart.update({
                   series: [{
                     type: 'pie',
                     name: '占比',
@@ -3279,7 +3303,7 @@ let app = new Vue({
                 timer && clearInterval(timer);
               },
               mouseOut: function () { // 鼠标移出后需要继续执行轮播
-                var points = chart.series[0].points;
+                var points = that.left6Chart.series[0].points;
                 var len = points.length;
 
                 timer && clearInterval(timer);
@@ -3293,7 +3317,7 @@ let app = new Vue({
                       item.selected = true
                     }
                   })
-                  chart.update({
+                  that.left6Chart.update({
                     series: [{
                       type: 'pie',
                       name: '占比',
@@ -3319,10 +3343,10 @@ let app = new Vue({
         }]
       }
 
-      var chart = Highcharts.chart('echartL8', option);
+      that.left6Chart = Highcharts.chart('echartL8', option);
 
       function autoTooltip (point) {
-        chart.tooltip.refresh(point);
+        that.left6Chart.tooltip.refresh(point);
       }
     },
     initChartL9 () {
@@ -3480,7 +3504,7 @@ let app = new Vue({
       // })
     },
     initChartL10 () {
-      let myChart = echarts.init(document.getElementById("echartL10"));
+      this.left7Chart = echarts.init(document.getElementById("echartL10"));
       let option = {
         title: {
           text: '固定资产进度分布',
@@ -3622,17 +3646,17 @@ let app = new Vue({
         ]
       }
       let that = this
-      myChart.on('click', function (param) {
+      that.left7Chart.on('click', function (param) {
         that.showChartLTipDouble(param.name, 'left', '项目阶段分析', '固定资产进度分布', param.name, param.seriesName)
       })
-      myChart.setOption(option)
-      tools.loopShowTooltip(myChart, option, {
+      that.left7Chart.setOption(option)
+      tools.loopShowTooltip(that.left7Chart, option, {
         nterval: 2000,
         loopSeries: true,
       })
     },
     initChartL11 () {
-      let myChart = echarts.init(document.getElementById("echartL11"));
+      this.left8Chart = echarts.init(document.getElementById("echartL11"));
       let option = {
         title: {
           text: '股权类进度分布',
@@ -3773,11 +3797,11 @@ let app = new Vue({
         ]
       }
       let that = this
-      myChart.on('click', function (param) {
+      that.left8Chart.on('click', function (param) {
         that.showChartLTipDouble(param.name, 'left', '项目阶段分析', '股权类进度分布', param.name, param.seriesName)
       })
-      myChart.setOption(option)
-      tools.loopShowTooltip(myChart, option, {
+      that.left8Chart.setOption(option)
+      tools.loopShowTooltip(that.left8Chart, option, {
         nterval: 2000,
         loopSeries: true,
       })
@@ -3817,7 +3841,7 @@ let app = new Vue({
                     item.selected = true
                   }
                 })
-                chart.update({
+                that.center1Chart.update({
                   series: [{
                     type: 'pie',
                     name: '占比',
@@ -3918,7 +3942,7 @@ let app = new Vue({
                 })
                 chartData[e.target.index].sliced = true
                 chartData[e.target.index].selected = true
-                chart.update({
+                that.center1Chart.update({
                   series: [{
                     type: 'pie',
                     name: '占比',
@@ -3935,7 +3959,7 @@ let app = new Vue({
                 timer && clearInterval(timer);
               },
               mouseOut: function () { // 鼠标移出后需要继续执行轮播
-                var points = chart.series[0].points;
+                var points = that.center1Chart.series[0].points;
                 var len = points.length;
 
                 timer && clearInterval(timer);
@@ -3949,7 +3973,7 @@ let app = new Vue({
                       item.selected = true
                     }
                   })
-                  chart.update({
+                  that.center1Chart.update({
                     series: [{
                       type: 'pie',
                       name: '占比',
@@ -3975,23 +3999,23 @@ let app = new Vue({
         }]
       }
 
-      var chart = Highcharts.chart('echartC1', option);
+      that.center1Chart = Highcharts.chart('echartC1', option);
 
       function autoTooltip (point) {
-        chart.tooltip.refresh(point);
+        that.center1Chart.tooltip.refresh(point);
       }
     },
     initChartC2 () {
       let that = this
-      let myChart = echarts.init(this.$refs['echartC2'])
-      myChart.on('showTip', (params) => {
+      that.center2Chart = echarts.init(this.$refs['echartC2'])
+      that.center2Chart.on('showTip', (params) => {
         // 如果是7或者15并且满足防抖则切换
         if ((params.dataIndex == 5 || params.dataIndex == 11) && that.echartC2Fd) {
           that.echartC2Fd = false
           setTimeout(() => {
             option.dataZoom[0].endValue = option.dataZoom[0].endValue + 6
             option.dataZoom[0].startValue = option.dataZoom[0].startValue + 6
-            myChart.setOption(option);
+            that.center2Chart.setOption(option);
             // 防止勿刷新做的防抖
             setTimeout(() => {
               that.echartC2Fd = true
@@ -4003,7 +4027,7 @@ let app = new Vue({
           setTimeout(() => {
             option.dataZoom[0].endValue = 0
             option.dataZoom[0].startValue = 5
-            myChart.setOption(option);
+            that.center2Chart.setOption(option);
             // 防止勿刷新做的防抖
             setTimeout(() => {
               that.echartC2Fd = true
@@ -4169,12 +4193,12 @@ let app = new Vue({
           },
         ],
       }
-      myChart.on('click', function (param) {
+      that.center2Chart.on('click', function (param) {
         that.projectListTipShow = true
         that.centerPenetrateTwo('', '', that.findCode(param.name), param.seriesName == '计划投资' ? 2 : 1)
       })
-      myChart.setOption(option)
-      tools.loopShowTooltip(myChart, option, {
+      that.center2Chart.setOption(option)
+      tools.loopShowTooltip(that.center2Chart, option, {
         nterval: 2000,
         loopSeries: true,
       })
@@ -4548,7 +4572,7 @@ let app = new Vue({
       this.mapChart.setOption(option)
     },
     initChartC3 () {
-      let myChart = echarts.init(this.$refs['echartC3'])
+      this.center3Chart = echarts.init(this.$refs['echartC3'])
       let option = {
         tooltip: {
           trigger: 'axis',
@@ -4668,7 +4692,7 @@ let app = new Vue({
         ],
       }
       let that = this
-      myChart.on('click', function (param) {
+      that.center3Chart.on('click', function (param) {
         if (param.name == '煤炭和煤电') {
           that.showChartLTipSingle(param.name, 'center', 'keyIndicators', 'ceiamount', '', '', '', '', 'five', '1', 2)
         } else if (param.name == '煤电和新能源') {
@@ -4681,8 +4705,8 @@ let app = new Vue({
           that.showChartLTipSingle(param.name, 'center', 'keyIndicators', 'cciamount', '', '', '', '', 'five', '5', 2)
         }
       })
-      myChart.setOption(option)
-      tools.loopShowTooltip(myChart, option, {
+      that.center3Chart.setOption(option)
+      tools.loopShowTooltip(that.center3Chart, option, {
         nterval: 2000,
         loopSeries: true,
       })
@@ -4706,7 +4730,7 @@ let app = new Vue({
         chartData.push(obj)
       })
       let that = this
-      var chart = Highcharts.chart('echartC4', {
+      that.center4Chart = Highcharts.chart('echartC4', {
         chart: {
           type: 'pie',
           backgroundColor: 'rgba(0,0,0,0)',
@@ -4734,7 +4758,7 @@ let app = new Vue({
                     item.selected = true
                   }
                 })
-                chart.update({
+                that.center4Chart.update({
                   series: [{
                     type: 'pie',
                     name: '占比',
@@ -4755,7 +4779,7 @@ let app = new Vue({
                     item.sliced = false
                     item.selected = false
                   })
-                  chart.update({
+                  that.center4Chart.update({
                     series: [{
                       type: 'pie',
                       name: '占比',
@@ -4850,7 +4874,7 @@ let app = new Vue({
                 })
                 chartData[e.target.index].sliced = true
                 chartData[e.target.index].selected = true
-                chart.update({
+                that.center4Chart.update({
                   series: [{
                     type: 'pie',
                     name: '占比',
@@ -4867,7 +4891,7 @@ let app = new Vue({
                 timer && clearInterval(timer);
               },
               mouseOut: function () { // 鼠标移出后需要继续执行轮播
-                var points = chart.series[0].points;
+                var points = that.center4Chart.series[0].points;
                 var len = points.length;
 
                 timer && clearInterval(timer);
@@ -4881,7 +4905,7 @@ let app = new Vue({
                       item.selected = true
                     }
                   })
-                  chart.update({
+                  that.center4Chart.update({
                     series: [{
                       type: 'pie',
                       name: '占比',
@@ -4902,7 +4926,7 @@ let app = new Vue({
                       item.sliced = false
                       item.selected = false
                     })
-                    chart.update({
+                    that.center4Chart.update({
                       series: [{
                         type: 'pie',
                         name: '占比',
@@ -4926,7 +4950,7 @@ let app = new Vue({
       });
 
       function autoTooltip (point) {
-        chart.tooltip.refresh(point);
+        that.center4Chart.tooltip.refresh(point);
       }
     },
     initProjectList () {
@@ -4944,15 +4968,15 @@ let app = new Vue({
     // 大屏三
     initChartR1 () {
       let that = this
-      let myChart = echarts.init(this.$refs['echartR1'])
-      myChart.on('showTip', (params) => {
+      that.right1Chart = echarts.init(this.$refs['echartR1'])
+      that.right1Chart.on('showTip', (params) => {
         // 如果是7或者15并且满足防抖则切换
         if ((params.dataIndex == 5 || params.dataIndex == 11) && that.echartR1Fd) {
           that.echartR1Fd = false
           setTimeout(() => {
             option.dataZoom[0].endValue = option.dataZoom[0].endValue + 6
             option.dataZoom[0].startValue = option.dataZoom[0].startValue + 6
-            myChart.setOption(option);
+            that.right1Chart.setOption(option);
             // 防止勿刷新做的防抖
             setTimeout(() => {
               that.echartR1Fd = true
@@ -4964,7 +4988,7 @@ let app = new Vue({
           setTimeout(() => {
             option.dataZoom[0].endValue = 0
             option.dataZoom[0].startValue = 5
-            myChart.setOption(option);
+            that.right1Chart.setOption(option);
             // 防止勿刷新做的防抖
             setTimeout(() => {
               that.echartR1Fd = true
@@ -5194,15 +5218,15 @@ let app = new Vue({
           },
         ],
       }
-      myChart.on('click', function (param) {
+      that.right1Chart.on('click', function (param) {
         if (that.versions) {
           that.rightPenetrateTwo(2, '', param.name, 'right')
         } else {
           that.projectListTipShow = true
         }
       })
-      myChart.setOption(option)
-      tools.loopShowTooltip(myChart, option, {
+      that.right1Chart.setOption(option)
+      tools.loopShowTooltip(that.right1Chart, option, {
         interval: 2000,
         loopSeries: true,
       })
@@ -5216,15 +5240,15 @@ let app = new Vue({
         shadowOffsetY: 0,
         shadowColor: 'rgba(0,0,0,0.3)'
       };
-      let myChart = echarts.init(this.$refs['echartR2'])
-      myChart.on('showTip', (params) => {
+      that.right2Chart = echarts.init(this.$refs['echartR2'])
+      that.right2Chart.on('showTip', (params) => {
         // 如果是7或者15并且满足防抖则切换
         if ((params.dataIndex == 5 || params.dataIndex == 11) && that.echartR2Fd) {
           that.echartR2Fd = false
           setTimeout(() => {
             option.dataZoom[0].endValue = option.dataZoom[0].endValue + 6
             option.dataZoom[0].startValue = option.dataZoom[0].startValue + 6
-            myChart.setOption(option);
+            that.right2Chart.setOption(option);
             // 防止勿刷新做的防抖
             setTimeout(() => {
               that.echartR2Fd = true
@@ -5236,7 +5260,7 @@ let app = new Vue({
           setTimeout(() => {
             option.dataZoom[0].endValue = 0
             option.dataZoom[0].startValue = 5
-            myChart.setOption(option);
+            that.right2Chart.setOption(option);
             // 防止勿刷新做的防抖
             setTimeout(() => {
               that.echartR2Fd = true
@@ -5397,23 +5421,23 @@ let app = new Vue({
           }
         ]
       }
-      myChart.on('click', function (param) {
+      that.right2Chart.on('click', function (param) {
         if (that.versions) {
           that.rightPenetrateTwo(1, param.seriesName == '正偏差' ? 1 : param.seriesName == '容差' ? 2 : 3, param.name, 'right')
         } else {
           that.projectListTipShow = true
         }
       })
-      myChart.setOption(option)
-      tools.loopShowTooltip(myChart, option, {
+      that.right2Chart.setOption(option)
+      tools.loopShowTooltip(that.right2Chart, option, {
         interval: 2000,
         loopSeries: true,
       })
     },
     initChartR3 () {
       let that = this
-      let myChart = echarts.init(this.$refs['echartR3'])
-      myChart.on('showTip', (params) => {
+      that.right3Chart = echarts.init(this.$refs['echartR3'])
+      that.right3Chart.on('showTip', (params) => {
         this.echartR4Chart ? this.echartR4Chart.dispose() : ''
         this.echartR5Chart ? this.echartR5Chart.dispose() : ''
         that.initChartR4(params.dataIndex)
@@ -5424,7 +5448,7 @@ let app = new Vue({
           setTimeout(() => {
             option.dataZoom[0].endValue = option.dataZoom[0].endValue + 6
             option.dataZoom[0].startValue = option.dataZoom[0].startValue + 6
-            myChart.setOption(option);
+            that.right3Chart.setOption(option);
             // 防止勿刷新做的防抖
             setTimeout(() => {
               that.echartR3Fd = true
@@ -5436,7 +5460,7 @@ let app = new Vue({
           setTimeout(() => {
             option.dataZoom[0].endValue = 0
             option.dataZoom[0].startValue = 5
-            myChart.setOption(option);
+            that.right3Chart.setOption(option);
             // 防止勿刷新做的防抖
             setTimeout(() => {
               that.echartR3Fd = true
@@ -5634,15 +5658,15 @@ let app = new Vue({
           },
         ],
       }
-      myChart.on('click', function (param) {
+      that.right3Chart.on('click', function (param) {
         if (that.versions) {
           that.rightPenetrateTwo('', '', param.name, 'right')
         } else {
           that.projectListTipShow = true
         }
       })
-      myChart.setOption(option)
-      tools.loopShowTooltip(myChart, option, {
+      that.right3Chart.setOption(option)
+      tools.loopShowTooltip(that.right3Chart, option, {
         interval: 8000,
         loopSeries: true,
       })