feat:overview地图增加加减控制缩放
This commit is contained in:
@@ -112,7 +112,12 @@
|
||||
<div class="content-col-box">
|
||||
<div class="content-col-title">{{$t("dashboard.overview.dataCenter.dataCenter")}}</div>
|
||||
<div class="content-col-content">
|
||||
<chart-box chart-type="map" :tooltip-formatter="mapTooltipFormatter" :map="map" ref="dataCenterMap" @is-loading="(isLoading)=>{this.mapLoading = isLoading}"></chart-box>
|
||||
<chart-box chart-type="map" :tooltip-formatter="mapTooltipFormatter" :map="map" ref="dataCenterMap" @is-loading="(isLoading)=>{this.mapLoading = isLoading}"></chart-box>
|
||||
<div class="right-bottom-zoom">
|
||||
<div class="zoom-option" style="border-bottom: 1px solid #c5c8cb;" @click="zoomMap(1)"><span><i class="nz-icon nz-icon-enlarge"></i></span></div>
|
||||
<div class="zoom-option" @click="zoomMap(-1)"><span><i class="nz-icon nz-icon-narrow"></i></span></div>
|
||||
<div></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1145,6 +1150,14 @@
|
||||
}
|
||||
});
|
||||
},
|
||||
zoomMap:function(val){
|
||||
let geo=this.$refs.dataCenterMap.getOption().geo;
|
||||
if(geo&&geo.length>0){
|
||||
let zoom=geo[0].zoom
|
||||
this.$refs.dataCenterMap.setOption({geo:{zoom:zoom+val}})
|
||||
}
|
||||
console.log(geo)
|
||||
},
|
||||
trendTool(type, param1, param2, param3) {
|
||||
if (type == 'difference') { //两个数组的差集
|
||||
return trendSelectDifference(param1, param2);
|
||||
|
||||
Reference in New Issue
Block a user