增加地图是否只显示指定区域的地图
This commit is contained in:
@@ -23,7 +23,7 @@
|
||||
:data="values"
|
||||
:ops="chartList[data.config]"/>
|
||||
<ai-map v-else-if="data.type=='map'" :mask="data.mask === '1'" :areaId="data.areaId || user.info.areaId" :is3d="data.is3d==1"
|
||||
:map-style="`amap://styles/${data.mapStyle}`" :pulseLines="data.pulseLines==1" :map.sync="map" :lib.sync="lib"/>
|
||||
:map-style="`amap://styles/${data.mapStyle}`" :pulseLines="data.pulseLines==1" :map.sync="map" :lib.sync="lib" :onlyShowArea="data.limitArea==1"/>
|
||||
<ai-monitor :src="data.src" v-else-if="data.type === 'monitor'" :type="data.monitorType"/>
|
||||
<video style="width: 100%; height: 100%; object-fit: fill;" loop :src="data.src" autoplay v-else-if="data.type === 'video'"/>
|
||||
<AiDvPartyOrg style="width: 100%; height: 100%;" v-else-if="data.type === 'partyOrg'" :instance="instance"/>
|
||||
@@ -127,7 +127,7 @@ export default {
|
||||
if (AMap) {
|
||||
let infoWin = new AMap.InfoWindow({content: ""})
|
||||
map.clearMap()
|
||||
let markers = this.values.filter(e => e.lng).map(e => {
|
||||
this.values.filter(e => e.lng).map(e => {
|
||||
return new AMap.Marker({
|
||||
map,
|
||||
content: e.content || `<div class="marker ${this.data.alwaysShow ? 'showLabel' : ''}">
|
||||
@@ -148,7 +148,6 @@ export default {
|
||||
}
|
||||
})
|
||||
})
|
||||
map.setFitView(markers)
|
||||
this.data.is3d && map.setPitch(65)
|
||||
if (this.data.is3dAround == 1) {
|
||||
this.timer = setInterval(() => map?.setRotation(360, false, 16000))
|
||||
|
||||
@@ -101,6 +101,12 @@
|
||||
<AiAreaGet :instance="instance" :valueLevel="3" v-model="config.areaId" placeholder="地图展示的中心"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layout-config__item">
|
||||
<label>限制显示地区</label>
|
||||
<div class="layout-config__item--right">
|
||||
<ai-select v-model="config.limitArea" :selectList="dict.getDict('yesOrNo')"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layout-config__item">
|
||||
<label>显示标签</label>
|
||||
<div class="layout-config__item--right">
|
||||
|
||||
@@ -540,7 +540,8 @@ const components = [
|
||||
],
|
||||
api: '',
|
||||
thumb: 'https://cdn.cunwuyun.cn/dvcp/dv/tpl/map.png',
|
||||
is3dAround: '0'
|
||||
is3dAround: '0',
|
||||
limitArea: '0',
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user