| | |
| | | * @Author: shuishen 1109946754@qq.com |
| | | * @Date: 2024-11-09 15:41:35 |
| | | * @LastEditors: shuishen 1109946754@qq.com |
| | | * @LastEditTime: 2025-02-12 20:00:22 |
| | | * @FilePath: \bigScreen\src\views\pd\components\dynamicPanel.vue |
| | | * @LastEditTime: 2025-08-06 00:09:39 |
| | | * @FilePath: \jsProject\bigScreen\src\views\pd\components\dynamicPanel.vue |
| | | * @Description: |
| | | * |
| | | * Copyright (c) 2024 by shuishen, All Rights Reserved. |
| | | --> |
| | | <script setup> |
| | | import EventBus from 'utils/bus' |
| | | |
| | | import qysgwslx from "@/assets/json/qysgwslx" |
| | | const { VITE_APP_BASE } = import.meta.env |
| | | |
| | | const emit = defineEmits(['closePanel']) |
| | |
| | | let dynamicVectorLayer = new DC.VectorLayer('dynamicVectorLayer').addTo(window.$viewer) |
| | | let dynamicHtmlLayer = new DC.HtmlLayer('dynamicHtmlLayer').addTo(window.$viewer) |
| | | let dynamicLineVectorLayer = new DC.VectorLayer('dynamicLineVectorLayer').addTo(window.$viewer) |
| | | let qyWsLayer = new DC.VectorLayer('qyWsLayer').addTo(window.$viewer) |
| | | |
| | | let modelPosition = [ |
| | | { |
| | |
| | | |
| | | EventBus.on('wxEntityClick', wxEntityClick) |
| | | |
| | | |
| | | |
| | | const schemeStart = (item, type) => { |
| | | emit('closePanel') |
| | | clearAll() |
| | |
| | | EventBus.emit('restHandleDelChange', `4-3`) |
| | | EventBus.emit('restHandleDelChange', `4-9`) |
| | | } |
| | | |
| | | // let polyline = new DC.Polyline(qysgwslx.features[0].geometry.coordinates.join(';')) |
| | | // polyline.setStyle({ |
| | | // width: 5, |
| | | // material: new DC.PolylineTrailMaterialProperty({ |
| | | // color: DC.Color.RED, |
| | | // speed: 10 |
| | | // }), |
| | | // clampToGround: true |
| | | // }) |
| | | // qyWsLayer.addOverlay(polyline) |
| | | |
| | | if (item.showModel) { |
| | | window.$viewer.flyToPosition("115.10587903,27.28374884,400,0,-90", () => { |
| | |
| | | // } |
| | | }) |
| | | |
| | | dynamicVectorLayer.clear() |
| | | dynamicHtmlLayer.clear() |
| | | dynamicLineVectorLayer.clear() |
| | | dynamicVectorLayer?.clear() |
| | | dynamicHtmlLayer?.clear() |
| | | dynamicLineVectorLayer?.clear() |
| | | qyWsLayer?.clear() |
| | | } |
| | | |
| | | onUnmounted(() => { |
| | |
| | | dynamicVectorLayer && window.$viewer && window.$viewer.removeLayer(dynamicVectorLayer) |
| | | dynamicHtmlLayer && window.$viewer && window.$viewer.removeLayer(dynamicHtmlLayer) |
| | | dynamicLineVectorLayer && window.$viewer && window.$viewer.removeLayer(dynamicLineVectorLayer) |
| | | qyWsLayer && window.$viewer && window.$viewer.removeLayer(qyWsLayer) |
| | | |
| | | tc = null |
| | | track = null |
| | | dynamicVectorLayer = null |
| | | dynamicHtmlLayer = null |
| | | dynamicLineVectorLayer = null |
| | | qyWsLayer = null |
| | | }) |
| | | </script> |
| | | |