| | |
| | | import EventBus from 'utils/bus' |
| | | import { usePointStore } from 'store/usepoint' |
| | | const pointStore = usePointStore() |
| | | import { useRouter } from 'vue-router'; |
| | | const router = useRouter(); |
| | | |
| | | const { VITE_APP_BASE } = import.meta.env |
| | | // , '7', |
| | |
| | | addPupoLayers[attrParams.name] = new DC.HtmlLayer(attrParams.name) |
| | | window.$viewer.addLayer(addPupoLayers[attrParams.name]) |
| | | let iconEl = `<div class="marsBlueGradientPnl"> |
| | | <li>${attrParams.firmName || ''}</li> |
| | | <li>${attrParams.riskLevelName || ''}</li> |
| | | <li>${attrParams.name || ''}</li> |
| | | </div>` |
| | | let divIcon = new DC.DivIcon( |
| | | new DC.Position(attrParams.lng, attrParams.lat, attrParams.ele || 64), |
| | |
| | | destroy() |
| | | addPupoLayers[attrParams.name] = new DC.HtmlLayer(attrParams.name) |
| | | window.$viewer.addLayer(addPupoLayers[attrParams.name]) |
| | | let iconEl = `<div class="marsBlueGradientPnl"> |
| | | <li>${attrParams.firmName || ''}</li> |
| | | <li>${attrParams.riskLevelName || ''}</li> |
| | | let iconEl = `<div class="marsBlueGradientPnl"> |
| | | <li>${attrParams.name || ''}</li> |
| | | </div>` |
| | | let divIcon = new DC.DivIcon( |
| | | new DC.Position(attrParams.lng, attrParams.lat, attrParams.ele || 64), |
| | |
| | | |
| | | onMounted(() => { |
| | | setTimeout(() => { |
| | | handleCheckChange(data.filter(i => indexPoint.value.includes(i.id))) |
| | | // handleCheckChange(data.filter(i => indexPoint.value.includes(i.id))) |
| | | }, 3000) |
| | | }) |
| | | |
| | |
| | | // watch(sharedData, (newValue) => { |
| | | // }); |
| | | |
| | | // 关闭所有选中的,除了倾斜,园区分布,空中全景 |
| | | const closeAll = () => { |
| | | EventBus.emit('restHandleDelChange', `2`) |
| | | EventBus.emit('restHandleDelChange', `3`) |
| | | EventBus.emit('restHandleDelChange', `3-1`) |
| | | EventBus.emit('restHandleDelChange', `3-2`) |
| | | EventBus.emit('restHandleDelChange', `3-3`) |
| | | EventBus.emit('restHandleDelChange', `3-3-1`) |
| | | EventBus.emit('restHandleDelChange', `3-3-2`) |
| | | EventBus.emit('restHandleDelChange', `3-3-3`) |
| | | EventBus.emit('restHandleDelChange', `3-3-4`) |
| | | EventBus.emit('restHandleDelChange', `3-4`) |
| | | EventBus.emit('restHandleDelChange', `3-5`) |
| | | EventBus.emit('restHandleDelChange', `3-6`) |
| | | EventBus.emit('restHandleDelChange', `3-7`) |
| | | EventBus.emit('restHandleDelChange', `3-8`) |
| | | EventBus.emit('restHandleDelChange', `3-9`) |
| | | EventBus.emit('restHandleDelChange', `4`) |
| | | EventBus.emit('restHandleDelChange', `4-1`) |
| | | EventBus.emit('restHandleDelChange', `4-2`) |
| | | EventBus.emit('restHandleDelChange', `8`) |
| | | destroy() |
| | | } |
| | | |
| | | // const sharedData = computed(() => pointStore.sharedData); |
| | | // watch(sharedData, (newValue) => { |
| | | // }); |
| | | // 监听当前路由路径的变化 |
| | | watch(() => router.currentRoute.value.path, |
| | | (newPath, oldPath) => { |
| | | console.log(`Current path changed from ${oldPath} to ${newPath}`); |
| | | closeAll() |
| | | }, |
| | | { immediate: true } |
| | | ) |
| | | |
| | | // 销毁 |
| | | function destroy () { |
| | | let arr = Object.keys(addPupoLayers) |