linwenxin 1 yıl önce
ebeveyn
işleme
13bc921c59

+ 1 - 1
src/views/bigViews/dataView1/components/mapDataStatistics.vue

@@ -122,7 +122,7 @@ export default {
   },
   methods: {
    getBigGetLarge1(pam){
-    bigGetLarge2(pam).then(res=>{
+    bigGetLarge1(pam).then(res=>{
       this.info = res.data
       console.log(this.info,"niunpionpoimo;i")
     })

+ 31 - 15
src/views/bigViews/dataView1/components/mapdata.vue

@@ -114,11 +114,9 @@ export default {
         this.echart_7();
       })
     },
-    echart_7(pam={
-        country: 100000,
-        // province:"广东省",
-        // city: "广州市"
-      }) {
+    echart_7(pam={ 
+      country: 100000, // province:"广东省", // city: "广州市"
+    }) {
         var that = this;
         if (that.myChart) {
           that.myChart.dispose();
@@ -147,13 +145,14 @@ export default {
               itemStyle: {
                 normal: {
                   areaColor: cityColors[city],
-                  borderColor: 'rgba(0,0,0,0)'
+                  borderColor: 'none'
                 },
                 emphasis: {
                   areaColor: cityColors[city],
-                  borderColor: 'rgba(0,0,0,0)'
+                  borderColor: 'none'
                 }
-              }
+              },
+              silent: true
             };
           });
           // 配置项
@@ -169,7 +168,7 @@ export default {
               center: center,
               itemStyle: {
                 normal: {
-                  areaColor: 'rgba(0,0,0,0)',
+                  areaColor: 'none',
                   borderColor: '#096DF3'
                 },
                 emphasis: {
@@ -198,6 +197,7 @@ export default {
               data: seriesData
             }]
           };
+
           // 使用配置项生成图表
           that.myChart.setOption(option);
 
@@ -211,29 +211,45 @@ export default {
                   itemStyle: {
                     normal: {
                       areaColor: 'red',
-                      borderColor: 'rgba(0,0,0,0)'
+                      borderColor: 'none'
                     },
                     emphasis: {
                       areaColor: 'none',
                     }
-                  }
+                  },
+                  silent: true
                 };
               } else {
                 return {
                   name: item.name,
                   itemStyle: {
                     normal: {
-                      areaColor: cityColors[item.name] || 'rgba(0,0,0,0)',
-                      borderColor: 'rgba(0,0,0,0)'
+                      areaColor: cityColors[item.name] || 'none',
+                      borderColor: 'none'
                     },
                     emphasis: {
                       areaColor: 'none',
                     }
-                  }
+                  },
+                  silent: true
                 };
               }
             });
-
+            if(!updatedSeriesData.find(item=>item.name === params.name)){
+              updatedSeriesData.push({
+                name: params.name,
+                itemStyle: {
+                  normal: {
+                    areaColor: 'red',
+                    borderColor: 'none'
+                  },
+                  emphasis: {
+                    areaColor: 'none',
+                  }
+                },
+                silent: true
+              })
+            };
             // 更新图表
             that.myChart.setOption({
               geo: {