|
@@ -5,14 +5,14 @@
|
|
|
<tiandituMap ref="tiandituMapRefs" @handleSearch="$refs.searchRef.onSearchFocus()" @clickMap="handleClickMap"
|
|
|
@moveMap="moveMapSearch" @onLoadTianDiTu="initMaps" @onSelect="selectPoint" :apiKey="apiKey"
|
|
|
@handleMapSite="handleMapSite" @centre-text-callback="e => centreText = e" :siteListArr='siteListArr'
|
|
|
- :searchDot="searchDot" />
|
|
|
+ :searchDot="searchDot" @openHint="$refs.HintContentRef.open()" />
|
|
|
|
|
|
|
|
|
<Touchbox ref="TouchboxRef" :maxHeight="0.8" v-if="showMap && siteListArr && siteListArr.length > 0"
|
|
|
:zIndex="1001" @currentHeight="e => TouchHeight = e">
|
|
|
<template #touchSlot>
|
|
|
<!-- v-if="centreText" -->
|
|
|
- <view class="centre-box" v-if="centreText">
|
|
|
+ <view class="centre-box" v-if="centreText">
|
|
|
<svg t="1734080022350" class="position-icon" viewBox="0 0 1024 1024" version="1.1"
|
|
|
xmlns="http://www.w3.org/2000/svg" p-id="4287" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
|
<path d="M512 512m-80 0a80 80 0 1 0 160 0 80 80 0 1 0-160 0Z" p-id="4288"></path>
|
|
@@ -26,16 +26,18 @@
|
|
|
</view>
|
|
|
</template>
|
|
|
<template #contentSlot>
|
|
|
- <!-- <scroll-view :style="{'height': getScrollHeight(TouchHeight , centreText)}" scroll-y="true" -->
|
|
|
- <scroll-view :style="{'height': TouchHeight + 'px'}" scroll-y="true" :show-scrollbar="false">
|
|
|
- <template v-for="(item , index) in siteListArr">
|
|
|
- <siteListModel :index="index" :info="item" @checkSiteDetails="handleMapSite" />
|
|
|
- </template>
|
|
|
- </scroll-view>
|
|
|
+ <!-- <scroll-view :style="{'height': getScrollHeight(TouchHeight , centreText)}" scroll-y="true" -->
|
|
|
+ <scroll-view :style="{'height': TouchHeight + 'px'}" scroll-y="true" :show-scrollbar="false">
|
|
|
+ <template v-for="(item , index) in siteListArr">
|
|
|
+ <siteListModel :index="index" :info="item" @checkSiteDetails="handleMapSite" />
|
|
|
+ </template>
|
|
|
+ </scroll-view>
|
|
|
</template>
|
|
|
</Touchbox>
|
|
|
|
|
|
<siteDetails ref="siteDetailsRef" />
|
|
|
+ <!-- 提示 -->
|
|
|
+ <HintContent ref="HintContentRef" />
|
|
|
</view>
|
|
|
</template>
|
|
|
<script>
|
|
@@ -48,13 +50,15 @@
|
|
|
import { EventBus } from "@/utils/vueBus.js"
|
|
|
import { getLocation } from "@/utils/tool.js"
|
|
|
import serviceCenter from "./model/service-center.vue"
|
|
|
+ import HintContent from "./model/hint.vue"
|
|
|
export default {
|
|
|
name: 'tdtmap',
|
|
|
components: {
|
|
|
search,
|
|
|
siteListModel,
|
|
|
serviceCenter,
|
|
|
- siteDetails
|
|
|
+ siteDetails,
|
|
|
+ HintContent
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
@@ -113,7 +117,7 @@
|
|
|
}
|
|
|
},
|
|
|
watch: {
|
|
|
-
|
|
|
+
|
|
|
},
|
|
|
methods: {
|
|
|
// 获取地图中心点
|
|
@@ -124,7 +128,7 @@
|
|
|
const { longitude, latitude, mapTypeIcon } = res || {};
|
|
|
this.longitude = longitude;
|
|
|
this.latitude = latitude;
|
|
|
- this.open(longitude, latitude, mapTypeIcon);
|
|
|
+ this.open(longitude, latitude, mapTypeIcon);
|
|
|
}).catch(err => { this.open(null, null) }).finally(() => {
|
|
|
uni.hideLoading()
|
|
|
})
|
|
@@ -245,12 +249,12 @@
|
|
|
this.checkSiteDetails(item);
|
|
|
this.$refs.tiandituMapRefs.Trenderjs.handleSiteList(this.siteListArr)
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
},
|
|
|
// 查看点位详情
|
|
|
- checkSiteDetails(info) {
|
|
|
+ checkSiteDetails(info) {
|
|
|
if (info) {
|
|
|
- this.$refs.tiandituMapRefs.Trenderjs.SelectedDot(info, true)
|
|
|
+ this.$refs.tiandituMapRefs.Trenderjs.SelectedDot(info, true)
|
|
|
this.handleClickMap();
|
|
|
this.$refs.siteDetailsRef.openDetails(info)
|
|
|
}
|