Prechádzať zdrojové kódy

地图数据轮播显示 开启缩放

bihuisong 1 rok pred
rodič
commit
db162f3f41
1 zmenil súbory, kde vykonal 25 pridanie a 2 odobranie
  1. 25 2
      zhsq_qk-ui/src/views/supermap/qkmap.vue

+ 25 - 2
zhsq_qk-ui/src/views/supermap/qkmap.vue

@@ -344,8 +344,8 @@ export default {
           ],
           geo: {
             map: opt.mapName,
-            // roam: true, //是否缩放--在移动端无效
-            zoom: 1,
+            roam: true, //是否缩放--在移动端无效
+            zoom: 0.8,
             // selectedMode:true,  //多选地图区域
             label: {
               normal: {
@@ -564,9 +564,32 @@ export default {
         // 数据展示
         data: data
       });
+      let timeOut4 = null
+      clearInterval(timeOut4)
+      myChart.clear();
       if (option) {
         myChart.setOption(option);
       }
+      var currentIndex = -1;
+      timeOut4 = setInterval(() => {
+        var dataLen = option.series[0].data.length;
+        myChart.dispatchAction({
+          type: 'downplay',
+          seriesIndex: 0,
+          dataIndex: currentIndex
+        });
+        currentIndex = (currentIndex + 1) % dataLen;
+        myChart.dispatchAction({
+          type: 'highlight',
+          seriesIndex: 0,
+          dataIndex: currentIndex,
+        });
+        myChart.dispatchAction({
+          type: 'showTip',
+          seriesIndex: 0,
+          dataIndex: currentIndex
+        });
+      }, 1500)
     }
   }
 }