From 293cc038aef227332161532621b97c987d1b1661 Mon Sep 17 00:00:00 2001 From: wangyawei <1796609990@qq.com> Date: 星期五, 18 四月 2025 14:19:53 +0800 Subject: [PATCH] 接入视频流 --- src/components/tools/LayerTree.vue | 1992 +++++++++++++++++++++++++++--------------------------- src/components/menu/TimeLine.vue | 137 ++- public/video/waters-1024.webm | 0 3 files changed, 1,085 insertions(+), 1,044 deletions(-) diff --git a/public/video/waters-1024.webm b/public/video/waters-1024.webm new file mode 100644 index 0000000..9fbdf50 --- /dev/null +++ b/public/video/waters-1024.webm Binary files differ diff --git a/src/components/menu/TimeLine.vue b/src/components/menu/TimeLine.vue index c18c8b1..4d0fb73 100644 --- a/src/components/menu/TimeLine.vue +++ b/src/components/menu/TimeLine.vue @@ -1,32 +1,21 @@ <template> <div class="timeline-container"> <div class="controls"> - <!-- <div @click="endSimulate">缁撴潫妯℃嫙</div> --> + <!-- <div @click="endSimulate">缁撴潫妯℃嫙</div> --> <div class="control-btn" @click="skipBackward"> - <img - src="@/assets/img/timeline/left.png" - class="fas fa-step-backward" - /> + <img src="@/assets/img/timeline/left.png" class="fas fa-step-backward" /> </div> <div class="control-btn play-btn" @click="togglePlay"> <img v-show="isPlaying" src="@/assets/img/timeline/stop.png" /> <img v-show="!isPlaying" src="@/assets/img/timeline/start.png" /> </div> <div class="control-btn" @click="skipForward"> - <img - src="@/assets/img/timeline/right.png" - class="fas fa-step-forward" - /> + <img src="@/assets/img/timeline/right.png" class="fas fa-step-forward" /> </div> <div class="speed-control"> <div @click="toggleSpeedMenu">{{ playbackRate }}X</div> <div class="speed-menu" v-show="showSpeedMenu"> - <div - v-for="rate in playbackRates" - :key="rate" - @click.capture="setPlaybackRate(rate)" - :class="{ active: playbackRate === rate }" - > + <div v-for="rate in playbackRates" :key="rate" @click.capture="setPlaybackRate(rate)" :class="{ active: playbackRate === rate }"> {{ rate }}X </div> </div> @@ -35,35 +24,24 @@ <div class="timeline"> <div class="dates"> - <div - v-for="(date, index) in visibleDates" - :key="index" - class="date-label" - > + <div v-for="(date, index) in visibleDates" :key="index" class="date-label"> {{ formatDate(date) }} </div> </div> <div class="timeline-track" ref="timelineTrack" @click="seekToPosition"> - <div - class="timeline-progress" - :style="{ width: progressPercentage + '%' }" - ></div> - <div - class="timeline-cursor" - :style="{ left: progressPercentage + '%' }" - ></div> + <div class="timeline-progress" :style="{ width: progressPercentage + '%' }"></div> + <div class="timeline-cursor" :style="{ left: progressPercentage + '%' }"></div> <div class="time-markers"> - <div - v-for="(time, index) in timeMarkers" - :key="index" - class="time-marker" - > + <div v-for="(time, index) in timeMarkers" :key="index" class="time-marker"> {{ time }} </div> </div> </div> </div> + <video id="video" width="200px" height="200px" controls loop autoplay style="display: none;" crossorigin="anonymous"> + <source src="/video/waters-1024.webm" type="video/webm" /> + </video> </div> </template> @@ -71,6 +49,7 @@ import { ref, computed, + nextTick, onUnmounted, onMounted, watch, @@ -118,6 +97,7 @@ return dayjs(props.waterSimulateParams.date[1]); }); let playInterval = null; +let hlsEntity = null; // 璁$畻灞炴�� const progressPercentage = computed(() => { @@ -142,7 +122,37 @@ const currentTimeFormatted = computed(() => { return formatTime(currentTime.value); }); +// 浣跨敤瑙嗛鍒涘缓Cesium瀹炰綋 +const createVideoEntity = () => { + // 鑾峰彇瑙嗛鍏冪礌 + const videoElement = document.getElementById('video'); + if (!videoElement) { + console.error("鏈壘鍒拌棰戝厓绱�"); + return; + } + // 绉婚櫎鍙兘瀛樺湪鐨勬棫瀹炰綋 + const existingEntity = window.earthCtrl.viewer.entities.getById('hls'); + if (existingEntity) { + window.earthCtrl.viewer.entities.remove(existingEntity); + } + + // 纭繚瑙嗛鍙 + videoElement.style.display = 'block'; + + // 鍒涘缓鏂扮殑瑙嗛瀹炰綋 + hlsEntity = window.earthCtrl.viewer.entities.add({ + id: 'hls', + rectangle: { + coordinates: window.SmartEarth.Cesium.Rectangle.fromDegrees( + 116.546665, 40.507452, 116.7757891, 40.6834562 + ), + material: videoElement, + outline: true, + outlineColor: window.SmartEarth.Cesium.Color.BLACK, + }, + }); +}; const togglePlay = () => { // 濡傛灉褰撳墠鏄仠姝㈢姸鎬佷笖宸茬粡鎾斁瀹屾瘯锛岀偣鍑绘椂閲嶇疆鏃堕棿 if (!isPlaying.value && currentTime.value >= duration.value) { @@ -153,15 +163,43 @@ isPlaying.value = !isPlaying.value; emit("isPlaying", isPlaying.value); - if (isPlaying.value) { - startPlayback(); - // 濡傛灉鏄粠澶村紑濮嬫挱鏀� - if (currentTime.value === 0) { - emit("playbackFinished", false); + // if (isPlaying.value) { + // startPlayback(); + // // 濡傛灉鏄粠澶村紑濮嬫挱鏀� + // if (currentTime.value === 0) { + // emit("playbackFinished", false); + // } + // } else { + // stopPlayback(); + // } + // 鏂板浠g爜:鍔犺棰戞祦 + nextTick(() => { + // 澶勭悊瑙嗛鎾斁 + const videoElement = document.getElementById('video'); + if (videoElement) { + if (isPlaying.value) { + // 纭繚宸插垱寤鸿棰戝疄浣� + createVideoEntity(); + // 鎾斁瑙嗛 + videoElement.play().catch(e => { + console.error("瑙嗛鎾斁澶辫触:", e); + }); + } else { + // 鏆傚仠瑙嗛 + videoElement.pause(); + } } - } else { - stopPlayback(); - } + + if (isPlaying.value) { + startPlayback(); + // 濡傛灉鏄粠澶村紑濮嬫挱鏀� + if (currentTime.value === 0) { + emit("playbackFinished", false); + } + } else { + stopPlayback(); + } + }); }; const startPlayback = () => { @@ -179,7 +217,13 @@ emit("isPlaying", isPlaying.value); // 閫氱煡鎾斁鐘舵�佸彉鍖� emit("playbackFinished", true); // 閫氱煡鎾斁瀹屾垚 emit("timeUpdate", progressPercentage.value); // 鏇存柊杩涘害鏉′綅缃� + // 鎾斁缁撴潫鏃舵殏鍋滆棰� + const videoElement = document.getElementById('video'); + if (videoElement) { + videoElement.pause(); + } } + // 鏆傚仠瑙嗛 emit("timeUpdate", progressPercentage.value); }, 1000); @@ -209,6 +253,11 @@ playbackRate.value = rate; showSpeedMenu.value = false; + // 鍚屾瑙嗛鎾斁閫熺巼 + const videoElement = document.getElementById('video'); + if (videoElement) { + videoElement.playbackRate = rate; + } if (isPlaying.value) { stopPlayback(); startPlayback(); @@ -239,7 +288,7 @@ }; const rainFallData = ref([]); -function getRainfallData() { +function getRainfallData () { getRainfall().then((res) => { // rainFallData.value = res.data.map(item => { // return dayjs(item.time).format("HH:mm") @@ -254,7 +303,7 @@ let mockTimer = null; let currentRainfall = ref(0.0001); -function randomMockWater() { +function randomMockWater () { let delay = (3 / playbackRate.value) * 1000; if (delay < 1000) { delay = 1000; @@ -271,7 +320,7 @@ if (rainfall && rainfall.total) { // console.log(rainfall.total); - createWaterPrimitive(rainfall.total / 50000); + // createWaterPrimitive(rainfall.total / 50000); } }, delay); } diff --git a/src/components/tools/LayerTree.vue b/src/components/tools/LayerTree.vue index fb3e20e..5955992 100644 --- a/src/components/tools/LayerTree.vue +++ b/src/components/tools/LayerTree.vue @@ -1,15 +1,7 @@ <template> - <div class="layer-tree"> - <el-tree - ref="treeRef" - style="max-width: 600px" - show-checkbox - node-key="label" - :default-checked-keys="defaultSelectedKeys" - @check-change="handleCheckChange" - :data="treeData" - /> - </div> + <div class="layer-tree"> + <el-tree ref="treeRef" style="max-width: 600px" show-checkbox node-key="label" :default-checked-keys="defaultSelectedKeys" @check-change="handleCheckChange" :data="treeData" /> + </div> </template> <script setup> @@ -22,1053 +14,1053 @@ import { getDuanMainData } from '@/api/index.js' const route = useRoute() const treeData = ref([ - { - label: "涓夌淮鏈嶅姟", - children: [{ label: "妯″瀷鏁版嵁" }, { label: "鍦板舰鏁版嵁" }, { label: "褰卞儚鏁版嵁" }], - }, - { - label: "鍥惧眰鏁版嵁", - children: [ - { - label: "鍖椾含甯傞殣鎮g偣", - }, - { - label: "瀛欒儭娌熼殣鎮g偣", - }, - // { - // label: "娉ョ煶娴侀殣鎮g偣闈㈡暟鎹�", - // }, - { - label: "缁煎悎鐩戞祴璁惧淇℃伅", - }, - { - label: "瀛欒儭娌熶豢鐪熸爣娉ㄥ湴鐗�", - }, - { - label: "閬块櫓鐐�", - }, - ], - }, + { + label: "涓夌淮鏈嶅姟", + children: [{ label: "妯″瀷鏁版嵁" }, { label: "鍦板舰鏁版嵁" }, { label: "褰卞儚鏁版嵁" }], + }, + { + label: "鍥惧眰鏁版嵁", + children: [ + { + label: "鍖椾含甯傞殣鎮g偣", + }, + { + label: "瀛欒儭娌熼殣鎮g偣", + }, + // { + // label: "娉ョ煶娴侀殣鎮g偣闈㈡暟鎹�", + // }, + { + label: "缁煎悎鐩戞祴璁惧淇℃伅", + }, + { + label: "瀛欒儭娌熶豢鐪熸爣娉ㄥ湴鐗�", + }, + { + label: "閬块櫓鐐�", + }, + ], + }, ]) const treeRef = ref(null) const treeMap = new Map() const defaultSelectedKeys = ref(["妯″瀷鏁版嵁", "褰卞儚鏁版嵁", "鍦板舰鏁版嵁"]) -function handleCheckChange(data, checked, indeterminate) { - const label = data.label - const list = treeMap.get(label) - if (list) { - toggleLayerVisible(label, checked) - return - } - switch (label) { - case "妯″瀷鏁版嵁": - list.show = checked - break - case "鍖椾含甯傞殣鎮g偣": - console.log("鍖椾含甯傞殣鎮g偣", checked, indeterminate) - break - case "瀛欒儭娌熼殣鎮g偣": - console.log("瀛欒儭娌熼殣鎮g偣", checked, indeterminate) - break - case "娉ョ煶娴侀殣鎮g偣闈㈡暟鎹�": - console.log("娉ョ煶娴侀殣鎮g偣闈㈡暟鎹�", checked, indeterminate) - break - case "缁煎悎鐩戞祴璁惧淇℃伅": - console.log("缁煎悎鐩戞祴璁惧淇℃伅", checked, indeterminate) - break - case "瀛欒儭娌熶豢鐪熸爣娉ㄥ湴鐗�": - console.log("瀛欒儭娌熶豢鐪熸爣娉ㄥ湴鐗�", checked, indeterminate) - break - case "閬块櫓鐐�": - addTetrahedron() - break +function handleCheckChange (data, checked, indeterminate) { + const label = data.label + const list = treeMap.get(label) + if (list) { + toggleLayerVisible(label, checked) + return + } + switch (label) { + case "妯″瀷鏁版嵁": + list.show = checked + break + case "鍖椾含甯傞殣鎮g偣": + console.log("鍖椾含甯傞殣鎮g偣", checked, indeterminate) + break + case "瀛欒儭娌熼殣鎮g偣": + console.log("瀛欒儭娌熼殣鎮g偣", checked, indeterminate) + break + case "娉ョ煶娴侀殣鎮g偣闈㈡暟鎹�": + console.log("娉ョ煶娴侀殣鎮g偣闈㈡暟鎹�", checked, indeterminate) + break + case "缁煎悎鐩戞祴璁惧淇℃伅": + console.log("缁煎悎鐩戞祴璁惧淇℃伅", checked, indeterminate) + break + case "瀛欒儭娌熶豢鐪熸爣娉ㄥ湴鐗�": + console.log("瀛欒儭娌熶豢鐪熸爣娉ㄥ湴鐗�", checked, indeterminate) + break + case "閬块櫓鐐�": + addTetrahedron() + break - } + } } -function initMap() { - // let modelPromise = addTileset( - // `http://106.120.22.26:9103/gisserver/c3dserver/sunhugou3d/tileset.json` - // ) - // modelPromise.then(model => { - // treeMap.set("妯″瀷鏁版嵁", model) - // }) - // let ImageryLayer = earthCtrl.factory.createImageryLayer({ - // sourceType: "tms", - // url: "http://106.120.22.26:9103/gisserver/tmsserver/sunhugoudom", - // }) - let TerrainLayer = earthCtrl.factory.createTerrainLayer({ - sourceType: "ctb", - url: "http://106.120.22.26:9103/gisserver/ctsserver/sungugoudem", - }) - // treeMap.set("褰卞儚鏁版嵁", ImageryLayer) - treeMap.set("鍦板舰鏁版嵁", TerrainLayer) +function initMap () { + // let modelPromise = addTileset( + // `http://106.120.22.26:9103/gisserver/c3dserver/sunhugou3d/tileset.json` + // ) + // modelPromise.then(model => { + // treeMap.set("妯″瀷鏁版嵁", model) + // }) + // let ImageryLayer = earthCtrl.factory.createImageryLayer({ + // sourceType: "tms", + // url: "http://106.120.22.26:9103/gisserver/tmsserver/sunhugoudom", + // }) + let TerrainLayer = earthCtrl.factory.createTerrainLayer({ + sourceType: "ctb", + url: "http://106.120.22.26:9103/gisserver/ctsserver/llmbdem", + }) + // treeMap.set("褰卞儚鏁版嵁", ImageryLayer) + treeMap.set("鍦板舰鏁版嵁", TerrainLayer) } const devicetList = ref([ - { - deviceCode: "303A9016", - deviceId: "1821067878870257666", - deviceName: "瀛欒儭娌�(澧掓儏)", - dictDeviceType: "1437295822", - latitude: 40.56476666, - longitude: 116.5955361, - }, - { - deviceCode: "01303A9016", - deviceId: "1821067850122498049", - deviceName: "瀛欒儭娌�(澧掓儏)", - dictDeviceType: "14372958380", - latitude: 40.56476666, - longitude: 116.5955361, - }, - { - deviceCode: "1101161102180100010063", - deviceId: "1554360510040182786", - deviceName: "鎬�鏌斿尯鐞夌拑搴欓晣瀛欒儭娌熷肮瀹惰タ娌熼洦閲忚0063", - dictDeviceType: "1437295810", - latitude: 40.556589, - longitude: 116.579459, - }, - { - deviceCode: "1101161102180100194030", - deviceId: "1554361328692826114", - deviceName: "鎬�鏌斿尯鐞夌拑搴欓晣瀛欒儭娌熸潙涓婂彴瀛愭渤涓滃崡娌熺紪鐮佸櫒4030", - dictDeviceType: "1437295815", - latitude: 40.554272, - longitude: 116.592583, - }, - { - deviceCode: "1101161102180100031041", - deviceId: "1554360448702681089", - deviceName: "鎬�鏌斿尯鐞夌拑搴欓晣瀛欒儭娌熸潙涓婂彴瀛愭渤涓滃崡娌熸澹颁华1041", - dictDeviceType: "1437295832", - latitude: 40.553236, - longitude: 116.592304, - }, - { - deviceCode: "1101161102180100022007", - deviceId: "1554360273959587842", - deviceName: "鎬�鏌斿尯鐞夌拑搴欓晣瀛欒儭娌熸潙涓婂彴瀛愭渤涓滃崡娌熷惈姘寸巼2007", - dictDeviceType: "1437295822", - latitude: 40.545821, - longitude: 116.586354, - }, - { - deviceCode: "1101161102180100225406", - deviceId: "1554360478494822402", - deviceName: "鎬�鏌斿尯鐞夌拑搴欓晣瀛欒儭娌熸潙涓婂彴瀛愭渤涓滃崡娌熸祦閫熶华5406", - dictDeviceType: "1437295821", - latitude: 40.554368, - longitude: 116.592989, - }, - { - deviceCode: "1101161102180100055006", - deviceId: "1554360276627165185", - deviceName: "鎬�鏌斿尯鐞夌拑搴欓晣瀛欒儭娌熸潙涓婂彴瀛愭渤涓滃崡娌熸偿浣嶈5006", - dictDeviceType: "1437295811", - latitude: 40.554398, - longitude: 116.592929, - }, - { - deviceCode: "1101161102180100010064", - deviceId: "1554360452670492674", - deviceName: "鎬�鏌斿尯鐞夌拑搴欓晣瀛欒儭娌熸潙涓婂彴瀛愭渤涓滃崡娌熼洦閲忚0064", - dictDeviceType: "1437295810", - latitude: 40.545741, - longitude: 116.586304, - }, - { - deviceCode: "1101161102180100183030", - deviceId: "1554360533087883265", - deviceName: "鎬�鏌斿尯鐞夌拑搴欓晣瀛欒儭娌熸潙涓婂彴瀛愭渤涓滃崡娌熸憚鍍忓ご3030", - dictDeviceType: "1437295825", - latitude: 40.554272, - longitude: 116.592583, - }, - { - deviceCode: "1101161102180100194031", - deviceId: "1554361328877375489", - deviceName: "鎬�鏌斿尯鐞夌拑搴欓晣瀛欒儭娌熸ご鏍戝簳涓嬩笢娌熺紪鐮佸櫒4031", - dictDeviceType: "1437295815", - latitude: 40.554035, - longitude: 116.59786, - }, - { - deviceCode: "1101161102180100055007", - deviceId: "1554360509775941634", - deviceName: "鎬�鏌斿尯鐞夌拑搴欓晣瀛欒儭娌熸ご鏍戝簳涓嬩笢娌熸偿浣嶈5007", - dictDeviceType: "1437295811", - latitude: 40.554729, - longitude: 116.598165, - }, - { - deviceCode: "1101161102180100031042", - deviceId: "1554360448916590593", - deviceName: "鎬�鏌斿尯鐞夌拑搴欓晣瀛欒儭娌熸ご鏍戝簳涓嬩笢娌熸澹颁华1042", - dictDeviceType: "1437295832", - latitude: 40.549398, - longitude: 116.600387, - }, - { - deviceCode: "1101161102180100225407", - deviceId: "1554360478658400257", - deviceName: "鎬�鏌斿尯鐞夌拑搴欓晣瀛欒儭娌熸ご鏍戝簳涓嬩笢娌熸祦閫熶华5407", - dictDeviceType: "1437295821", - latitude: 40.55481, - longitude: 116.598025, - }, - { - deviceCode: "1101161102180100022008", - deviceId: "1554360274165108737", - deviceName: "鎬�鏌斿尯鐞夌拑搴欓晣瀛欒儭娌熸ご鏍戝簳涓嬩笢娌熷惈姘寸巼2008", - dictDeviceType: "1437295822", - latitude: 40.544645, - longitude: 116.596511, - }, - { - deviceCode: "1101161102180100183031", - deviceId: "1554360533255655426", - deviceName: "鎬�鏌斿尯鐞夌拑搴欓晣瀛欒儭娌熸ご鏍戝簳涓嬩笢娌熸憚鍍忓ご3031", - dictDeviceType: "1437295825", - latitude: 40.554035, - longitude: 116.59786, - }, - { - deviceCode: "1101161102180100010065", - deviceId: "1554360452888596482", - deviceName: "鎬�鏌斿尯鐞夌拑搴欓晣瀛欒儭娌熸ご鏍戝簳涓嬩笢娌熼洦閲忚0065", - dictDeviceType: "1437295810", - latitude: 40.543104, - longitude: 116.59585, - }, - { - deviceCode: "1101161102180100031040", - deviceId: "1554360448383913986", - deviceName: "鎬�鏌斿尯鐞夌拑搴欓晣瀛欒儭娌熸潙浜庡瑗挎矡娆″0浠�1040", - dictDeviceType: "1437295832", - latitude: 40.563822, - longitude: 116.592648, - }, - { - deviceCode: "1101161102180100010062", - deviceId: "1554360452519497730", - deviceName: "鎬�鏌斿尯鐞夌拑搴欓晣瀛欒儭娌熸潙浜庡瑗挎矡闆ㄩ噺璁�0062", - dictDeviceType: "1437295810", - latitude: 40.558778, - longitude: 116.586892, - }, - { - deviceCode: "1101160042160100010005", - deviceId: "1554360582698110977", - deviceName: "鎬�鏌斿尯闆佹爾闀囧寳婀炬潙鍖楁灄澶х煶闂ㄦ矡闆ㄩ噺璁�0005", - dictDeviceType: "1437295810", - latitude: 40.533623, - longitude: 116.602406, - }, + { + deviceCode: "303A9016", + deviceId: "1821067878870257666", + deviceName: "瀛欒儭娌�(澧掓儏)", + dictDeviceType: "1437295822", + latitude: 40.56476666, + longitude: 116.5955361, + }, + { + deviceCode: "01303A9016", + deviceId: "1821067850122498049", + deviceName: "瀛欒儭娌�(澧掓儏)", + dictDeviceType: "14372958380", + latitude: 40.56476666, + longitude: 116.5955361, + }, + { + deviceCode: "1101161102180100010063", + deviceId: "1554360510040182786", + deviceName: "鎬�鏌斿尯鐞夌拑搴欓晣瀛欒儭娌熷肮瀹惰タ娌熼洦閲忚0063", + dictDeviceType: "1437295810", + latitude: 40.556589, + longitude: 116.579459, + }, + { + deviceCode: "1101161102180100194030", + deviceId: "1554361328692826114", + deviceName: "鎬�鏌斿尯鐞夌拑搴欓晣瀛欒儭娌熸潙涓婂彴瀛愭渤涓滃崡娌熺紪鐮佸櫒4030", + dictDeviceType: "1437295815", + latitude: 40.554272, + longitude: 116.592583, + }, + { + deviceCode: "1101161102180100031041", + deviceId: "1554360448702681089", + deviceName: "鎬�鏌斿尯鐞夌拑搴欓晣瀛欒儭娌熸潙涓婂彴瀛愭渤涓滃崡娌熸澹颁华1041", + dictDeviceType: "1437295832", + latitude: 40.553236, + longitude: 116.592304, + }, + { + deviceCode: "1101161102180100022007", + deviceId: "1554360273959587842", + deviceName: "鎬�鏌斿尯鐞夌拑搴欓晣瀛欒儭娌熸潙涓婂彴瀛愭渤涓滃崡娌熷惈姘寸巼2007", + dictDeviceType: "1437295822", + latitude: 40.545821, + longitude: 116.586354, + }, + { + deviceCode: "1101161102180100225406", + deviceId: "1554360478494822402", + deviceName: "鎬�鏌斿尯鐞夌拑搴欓晣瀛欒儭娌熸潙涓婂彴瀛愭渤涓滃崡娌熸祦閫熶华5406", + dictDeviceType: "1437295821", + latitude: 40.554368, + longitude: 116.592989, + }, + { + deviceCode: "1101161102180100055006", + deviceId: "1554360276627165185", + deviceName: "鎬�鏌斿尯鐞夌拑搴欓晣瀛欒儭娌熸潙涓婂彴瀛愭渤涓滃崡娌熸偿浣嶈5006", + dictDeviceType: "1437295811", + latitude: 40.554398, + longitude: 116.592929, + }, + { + deviceCode: "1101161102180100010064", + deviceId: "1554360452670492674", + deviceName: "鎬�鏌斿尯鐞夌拑搴欓晣瀛欒儭娌熸潙涓婂彴瀛愭渤涓滃崡娌熼洦閲忚0064", + dictDeviceType: "1437295810", + latitude: 40.545741, + longitude: 116.586304, + }, + { + deviceCode: "1101161102180100183030", + deviceId: "1554360533087883265", + deviceName: "鎬�鏌斿尯鐞夌拑搴欓晣瀛欒儭娌熸潙涓婂彴瀛愭渤涓滃崡娌熸憚鍍忓ご3030", + dictDeviceType: "1437295825", + latitude: 40.554272, + longitude: 116.592583, + }, + { + deviceCode: "1101161102180100194031", + deviceId: "1554361328877375489", + deviceName: "鎬�鏌斿尯鐞夌拑搴欓晣瀛欒儭娌熸ご鏍戝簳涓嬩笢娌熺紪鐮佸櫒4031", + dictDeviceType: "1437295815", + latitude: 40.554035, + longitude: 116.59786, + }, + { + deviceCode: "1101161102180100055007", + deviceId: "1554360509775941634", + deviceName: "鎬�鏌斿尯鐞夌拑搴欓晣瀛欒儭娌熸ご鏍戝簳涓嬩笢娌熸偿浣嶈5007", + dictDeviceType: "1437295811", + latitude: 40.554729, + longitude: 116.598165, + }, + { + deviceCode: "1101161102180100031042", + deviceId: "1554360448916590593", + deviceName: "鎬�鏌斿尯鐞夌拑搴欓晣瀛欒儭娌熸ご鏍戝簳涓嬩笢娌熸澹颁华1042", + dictDeviceType: "1437295832", + latitude: 40.549398, + longitude: 116.600387, + }, + { + deviceCode: "1101161102180100225407", + deviceId: "1554360478658400257", + deviceName: "鎬�鏌斿尯鐞夌拑搴欓晣瀛欒儭娌熸ご鏍戝簳涓嬩笢娌熸祦閫熶华5407", + dictDeviceType: "1437295821", + latitude: 40.55481, + longitude: 116.598025, + }, + { + deviceCode: "1101161102180100022008", + deviceId: "1554360274165108737", + deviceName: "鎬�鏌斿尯鐞夌拑搴欓晣瀛欒儭娌熸ご鏍戝簳涓嬩笢娌熷惈姘寸巼2008", + dictDeviceType: "1437295822", + latitude: 40.544645, + longitude: 116.596511, + }, + { + deviceCode: "1101161102180100183031", + deviceId: "1554360533255655426", + deviceName: "鎬�鏌斿尯鐞夌拑搴欓晣瀛欒儭娌熸ご鏍戝簳涓嬩笢娌熸憚鍍忓ご3031", + dictDeviceType: "1437295825", + latitude: 40.554035, + longitude: 116.59786, + }, + { + deviceCode: "1101161102180100010065", + deviceId: "1554360452888596482", + deviceName: "鎬�鏌斿尯鐞夌拑搴欓晣瀛欒儭娌熸ご鏍戝簳涓嬩笢娌熼洦閲忚0065", + dictDeviceType: "1437295810", + latitude: 40.543104, + longitude: 116.59585, + }, + { + deviceCode: "1101161102180100031040", + deviceId: "1554360448383913986", + deviceName: "鎬�鏌斿尯鐞夌拑搴欓晣瀛欒儭娌熸潙浜庡瑗挎矡娆″0浠�1040", + dictDeviceType: "1437295832", + latitude: 40.563822, + longitude: 116.592648, + }, + { + deviceCode: "1101161102180100010062", + deviceId: "1554360452519497730", + deviceName: "鎬�鏌斿尯鐞夌拑搴欓晣瀛欒儭娌熸潙浜庡瑗挎矡闆ㄩ噺璁�0062", + dictDeviceType: "1437295810", + latitude: 40.558778, + longitude: 116.586892, + }, + { + deviceCode: "1101160042160100010005", + deviceId: "1554360582698110977", + deviceName: "鎬�鏌斿尯闆佹爾闀囧寳婀炬潙鍖楁灄澶х煶闂ㄦ矡闆ㄩ噺璁�0005", + dictDeviceType: "1437295810", + latitude: 40.533623, + longitude: 116.602406, + }, ]) -function initDevicePoint() { - let list = [] +function initDevicePoint () { + let list = [] - devicetList.value.forEach(item => { - item.type = getDictName(deviceDictList, item.dictDeviceType) - item.name = item.type - item.id = item.deviceId - item.className = "device" - item.showLabel = true - const entity = createPoint(item) - entity.show = false + devicetList.value.forEach(item => { + item.type = getDictName(deviceDictList, item.dictDeviceType) + item.name = item.type + item.id = item.deviceId + item.className = "device" + item.showLabel = true + const entity = createPoint(item) + entity.show = false - list.push(entity) - }) - treeMap.set("缁煎悎鐩戞祴璁惧淇℃伅", list) + list.push(entity) + }) + treeMap.set("缁煎悎鐩戞祴璁惧淇℃伅", list) } const districtList = ref([ - { - activeStatus: "", - areaCode: "", - areaName: "", - brookLength: 0, - checkId: "", - city: "鍖椾含甯�", - codeProvince: "110116", - county: "鎬�鏌�", - dangerLevel: "", - disasterStatus: "", - drainageArea: "", - elevation: 0, - featureDes: "", - groupMonitor: "鏉庢姊�,瀛欐鍜�,鑼冩弧鐢�,绉﹀缓鏉�,瀛欐姹�,瀛欐浼�", - hasPlan: "", - id: "110116020058", - latitude: 40.56652778, - length: 0, - district: "鐞夌拑搴欓晣瀛欒儭娌熸潙灏瑰瑗挎矡灏瑰缓鐕曞灞嬪悗", - longitude: 116.5803889, - monitor: "", - monitorAdvice: "", - name: "灏瑰瑗挎矡灏瑰缓鐕曞灞嬪悗宕╁闅愭偅鐐�", - number: "13716108909,13716029391,13716291714,13716191943,13716427398,13124792612", - preventionDes: "", - preventionLevel: "", - preventionPlan: "瀹氭湡宸℃煡锛岄璀﹁浆绉伙紝绔嬭绀虹墝", - preventionUnit: "涔¢晣", - principal: "", - province: "鍖椾含甯�", - qp: "", - reason: "", - responsibleUnit: "", - riskLevel: "", - scale: "灏忓瀷", - stableLevel: "", - status: "", - thickness: 0, - threatenFamily: 2, - threatenMoney: 0, - threatenPopulation: "3", - threatenType: "", - town: "鐞夌拑搴欓晣", - trigger: "", - type: "宕╁", - village: "瀛欒儭娌熸潙", - volume: "", - volumePotential: "", - width: 0, - }, - { - activeStatus: "", - areaCode: "", - areaName: "", - brookLength: 0, - checkId: "", - city: "鍖椾含甯�", - codeProvince: "110116", - county: "鎬�鏌�", - dangerLevel: "", - disasterStatus: "", - drainageArea: "", - elevation: 0, - featureDes: "", - groupMonitor: "鏉庢姊�,瀛欐鍜�,鑼冩弧鐢�,绉﹀缓鏉�,瀛欐姹�,瀛欐浼�", - hasPlan: "", - id: "110116020078", - latitude: 40.56497222, - length: 0, - district: "鐞夌拑搴欓晣瀛欒儭娌熸潙娌宠タ浜庡嚖鑻卞灞嬪悗", - longitude: 116.5955278, - monitor: "", - monitorAdvice: "", - name: "娌宠タ浜庡嚖鑻卞灞嬪悗宕╁闅愭偅鐐�", - number: "13716108909,13716029391,13716291714,13716191943,13716427398,13124792612", - preventionDes: "", - preventionLevel: "", - preventionPlan: "瀹氭湡宸℃煡锛岄璀﹁浆绉伙紝绔嬭绀虹墝", - preventionUnit: "涔¢晣", - principal: "", - province: "鍖椾含甯�", - qp: "", - reason: "", - responsibleUnit: "", - riskLevel: "", - scale: "灏忓瀷", - stableLevel: "", - status: "", - thickness: 0, - threatenFamily: 4, - threatenMoney: 0, - threatenPopulation: "6", - threatenType: "", - town: "鐞夌拑搴欓晣", - trigger: "", - type: "宕╁", - village: "瀛欒儭娌熸潙", - volume: "", - volumePotential: "", - width: 0, - }, - { - activeStatus: "", - areaCode: "", - areaName: "", - brookLength: 0, - checkId: "", - city: "鍖椾含甯�", - codeProvince: "110116", - county: "鎬�鏌�", - dangerLevel: "", - disasterStatus: "", - drainageArea: "", - elevation: 0, - featureDes: "", - groupMonitor: "鏉庢姊�,瀛欐鍜�,鑼冩弧鐢�,绉﹀缓鏉�,瀛欐姹�,瀛欐浼�", - hasPlan: "", - id: "110116030041", - latitude: 40.55369444, - length: 0, - district: "鐞夌拑搴欓晣瀛欒儭娌熷叕璺�", - longitude: 116.6002778, - monitor: "", - monitorAdvice: "", - name: "鍗楁灏忎笢娌熸偿鐭虫祦闅愭偅鐐�", - number: "13716108909,13716029391,13716291714,13716191943,13716427398,13124792612", - preventionDes: "", - preventionLevel: "", - preventionPlan: "瀹氭湡宸℃煡,绔嬭绀虹墝", - preventionUnit: "涔¢晣", - principal: "", - province: "鍖椾含甯�", - qp: "", - reason: "", - responsibleUnit: "", - riskLevel: "", - scale: "灏忓瀷", - stableLevel: "", - status: "", - thickness: 0, - threatenFamily: 0, - threatenMoney: 0, - threatenPopulation: "", - threatenType: "", - town: "鐞夌拑搴欓晣", - trigger: "", - type: "娉ョ煶娴�", - village: "瀛欒儭娌熸潙", - volume: "", - volumePotential: "", - width: 0, - }, - { - activeStatus: "", - areaCode: "", - areaName: "", - brookLength: 0, - checkId: "", - city: "鍖椾含甯�", - codeProvince: "110116", - county: "鎬�鏌�", - dangerLevel: "", - disasterStatus: "", - drainageArea: "", - elevation: 0, - featureDes: "", - groupMonitor: "鏉庢姊�,瀛欐鍜�,鑼冩弧鐢�,绉﹀缓鏉�,瀛欐姹�,瀛欐浼�", - hasPlan: "", - id: "110116030015", - latitude: 40.55277778, - length: 0, - district: "鐞夌拑搴欓晣瀛欒儭娌熸潙鍗楁鏉戝ぇ绐戞矡", - longitude: 116.5994722, - monitor: "", - monitorAdvice: "", - name: "澶х獞娌熸偿鐭虫祦闅愭偅鐐�", - number: "13716108909,13716029391,13716291714,13716191943,13716427398,13124792612", - preventionDes: "宸茬洃娴嬨�佸凡娌荤悊", - preventionLevel: "", - preventionPlan: "瀹氭湡宸℃煡锛岄璀﹁浆绉伙紝绔嬭绀虹墝", - preventionUnit: "涔¢晣", - principal: "", - province: "鍖椾含甯�", - qp: "", - reason: "", - responsibleUnit: "", - riskLevel: "", - scale: "涓瀷", - stableLevel: "", - status: "", - thickness: 0, - threatenFamily: 5, - threatenMoney: 0, - threatenPopulation: "11", - threatenType: "", - town: "鐞夌拑搴欓晣", - trigger: "", - type: "娉ョ煶娴�", - village: "瀛欒儭娌熸潙", - volume: "", - volumePotential: "", - width: 0, - }, - { - activeStatus: "", - areaCode: "", - areaName: "", - brookLength: 0, - checkId: "", - city: "鍖椾含甯�", - codeProvince: "110116", - county: "鎬�鏌�", - dangerLevel: "", - disasterStatus: "", - drainageArea: "", - elevation: 0, - featureDes: "", - groupMonitor: "鏉庢姊�,瀛欐鍜�,鑼冩弧鐢�,绉﹀缓鏉�,瀛欐姹�,瀛欐浼�", - hasPlan: "", - id: "110116030076", - latitude: 40.55972222, - length: 0, - district: "鐞夌拑搴欓晣瀛欒儭娌熸潙涓滃潕澶т笢娌�", - longitude: 116.5916667, - monitor: "", - monitorAdvice: "", - name: "澶т笢娌熸偿鐭虫祦闅愭偅鐐�", - number: "13716108909,13716029391,13716291714,13716191943,13716427398,13124792612", - preventionDes: "宸叉不鐞�", - preventionLevel: "", - preventionPlan: "瀹氭湡宸℃煡锛岄璀﹁浆绉�", - preventionUnit: "涔¢晣", - principal: "", - province: "鍖椾含甯�", - qp: "", - reason: "", - responsibleUnit: "", - riskLevel: "", - scale: "灏忓瀷", - stableLevel: "", - status: "", - thickness: 0, - threatenFamily: 1, - threatenMoney: 0, - threatenPopulation: "2", - threatenType: "", - town: "鐞夌拑搴欓晣", - trigger: "", - type: "娉ョ煶娴�", - village: "瀛欒儭娌熸潙", - volume: "", - volumePotential: "", - width: 0, - }, - { - activeStatus: "", - areaCode: "", - areaName: "", - brookLength: 0, - checkId: "", - city: "鍖椾含甯�", - codeProvince: "110116", - county: "鎬�鏌�", - dangerLevel: "", - disasterStatus: "", - drainageArea: "", - elevation: 0, - featureDes: "", - groupMonitor: "鏉庢姊�,瀛欐鍜�,鑼冩弧鐢�,绉﹀缓鏉�,瀛欐姹�,瀛欐浼�", - hasPlan: "", - id: "110116030074", - latitude: 40.56580556, - length: 0, - district: "鐞夌拑搴欓晣瀛欒儭娌熸潙灏瑰瑗挎矡", - longitude: 116.59, - monitor: "", - monitorAdvice: "", - name: "灏瑰瑗挎矡娉ョ煶娴侀殣鎮g偣", - number: "13716108909,13716029391,13716291714,13716191943,13716427398,13124792612", - preventionDes: "宸茬洃娴嬶紱鐏惧浣撳彉鍖栵細4澶勫潯绉墿鍨锛屽爢绉嚦鍧¤剼锛屾柟閲忕害20m鲁銆�", - preventionLevel: "", - preventionPlan: "瀹氭湡宸℃煡锛岄璀﹁浆绉�", - preventionUnit: "涔¢晣", - principal: "", - province: "鍖椾含甯�", - qp: "", - reason: "", - responsibleUnit: "", - riskLevel: "", - scale: "涓瀷", - stableLevel: "", - status: "", - thickness: 0, - threatenFamily: 7, - threatenMoney: 0, - threatenPopulation: "12", - threatenType: "", - town: "鐞夌拑搴欓晣", - trigger: "", - type: "娉ョ煶娴�", - village: "瀛欒儭娌熸潙", - volume: "", - volumePotential: "", - width: 0, - }, - { - activeStatus: "", - areaCode: "", - areaName: "", - brookLength: 0, - checkId: "", - city: "鍖椾含甯�", - codeProvince: "110116", - county: "鎬�鏌�", - dangerLevel: "", - disasterStatus: "", - drainageArea: "", - elevation: 0, - featureDes: "", - groupMonitor: "鏉庢姊�,瀛欐鍜�,鑼冩弧鐢�,绉﹀缓鏉�,瀛欐姹�,瀛欐浼�", - hasPlan: "", - id: "110116030053", - latitude: 40.57361111, - length: 0, - district: "鐞夌拑搴欓晣瀛欒儭娌熸潙鍖楀ぇ鍦拌タ娲煎瓙娌�", - longitude: 116.5897222, - monitor: "", - monitorAdvice: "", - name: "鍖楀ぇ鍦拌タ娲煎瓙娌熸偿鐭虫祦闅愭偅鐐�", - number: "13716108909,13716029391,13716291714,13716191943,13716427398,13124792612", - preventionDes: "娌熷彛姝e鎴垮眿锛岄檷闆ㄦ椂鍑烘按閲忓ぇ锛屽缓璁不鐞嗭紝姹涙湡鍔犲己宸℃煡", - preventionLevel: "", - preventionPlan: "瀹氭湡宸℃煡锛岄璀﹁浆绉伙紝绔嬭绀虹墝", - preventionUnit: "涔¢晣", - principal: "", - province: "鍖椾含甯�", - qp: "", - reason: "", - responsibleUnit: "", - riskLevel: "", - scale: "涓瀷", - stableLevel: "", - status: "", - thickness: 0, - threatenFamily: 6, - threatenMoney: 0, - threatenPopulation: "10", - threatenType: "", - town: "鐞夌拑搴欓晣", - trigger: "", - type: "娉ョ煶娴�", - village: "瀛欒儭娌熸潙", - volume: "", - volumePotential: "", - width: 0, - }, - { - activeStatus: "", - areaCode: "", - areaName: "", - brookLength: 0, - checkId: "", - city: "鍖椾含甯�", - codeProvince: "110116", - county: "鎬�鏌�", - dangerLevel: "", - disasterStatus: "", - drainageArea: "", - elevation: 0, - featureDes: "", - groupMonitor: "鏉庢姊�,瀛欐鍜�,鑼冩弧鐢�,绉﹀缓鏉�,瀛欐姹�,瀛欐浼�", - hasPlan: "", - id: "110116020102", - latitude: 40.55972222, - length: 0, - district: "鐞夌拑搴欓晣瀛欒儭娌熸潙鑼冨搴勭帇绉�鑾插灞嬪悗", - longitude: 116.5922222, - monitor: "", - monitorAdvice: "", - name: "鑼冨搴勭帇绉�鑾插灞嬪悗宕╁闅愭偅鐐�", - number: "13716108909,13716029391,13716291714,13716191943,13716427398,13124792612", - preventionDes: "杈瑰潯杈冮櫋锛岄『鍚戝博灞傦紝鎴垮眿闈犺繎鍧¤剼锛屽缓璁敖蹇不鐞�", - preventionLevel: "", - preventionPlan: "瀹氭湡宸℃煡锛岄璀﹁浆绉伙紝绔嬭绀虹墝", - preventionUnit: "涔¢晣", - principal: "", - province: "鍖椾含甯�", - qp: "", - reason: "", - responsibleUnit: "", - riskLevel: "", - scale: "灏忓瀷", - stableLevel: "", - status: "", - thickness: 0, - threatenFamily: 1, - threatenMoney: 0, - threatenPopulation: "3", - threatenType: "", - town: "鐞夌拑搴欓晣", - trigger: "", - type: "宕╁", - village: "瀛欒儭娌熸潙", - volume: "", - volumePotential: "", - width: 0, - }, - { - activeStatus: "", - areaCode: "", - areaName: "", - brookLength: 0, - checkId: "", - city: "鍖椾含甯�", - codeProvince: "110116", - county: "鎬�鏌�", - dangerLevel: "", - disasterStatus: "", - drainageArea: "", - elevation: 0, - featureDes: "", - groupMonitor: "鏉庢姊�,瀛欐鍜�,鑼冩弧鐢�,绉﹀缓鏉�,瀛欐姹�,瀛欐浼�", - hasPlan: "", - id: "110116020742", - latitude: 40.57680556, - length: 0, - district: "鐞夌拑搴欓晣瀛欒儭娌熸潙涓変憨鍦拌寖蹇犵敯瀹跺眿鍚�", - longitude: 116.5887222, - monitor: "", - monitorAdvice: "", - name: "涓変憨鍦拌寖蹇犵敯瀹跺眿鍚庡穿濉岄殣鎮g偣", - number: "13716108909,13716029391,13716291714,13716191943,13716427398,13124792612", - preventionDes: "", - preventionLevel: "", - preventionPlan: "瀹氭湡宸℃煡锛岄璀﹁浆绉伙紝鏇存崲璀︾ず鐗�", - preventionUnit: "涔¢晣", - principal: "", - province: "鍖椾含甯�", - qp: "", - reason: "", - responsibleUnit: "", - riskLevel: "", - scale: "涓瀷", - stableLevel: "", - status: "", - thickness: 0, - threatenFamily: 8, - threatenMoney: 0, - threatenPopulation: "23", - threatenType: "", - town: "鐞夌拑搴欓晣", - trigger: "", - type: "宕╁", - village: "瀛欒儭娌熸潙", - volume: "", - volumePotential: "", - width: 0, - }, - { - activeStatus: "", - areaCode: "", - areaName: "", - brookLength: 0, - checkId: "", - city: "鍖椾含甯�", - codeProvince: "110116", - county: "鎬�鏌�", - dangerLevel: "", - disasterStatus: "", - drainageArea: "", - elevation: 0, - featureDes: "", - groupMonitor: "鏉庢姊�,瀛欐鍜�,鑼冩弧鐢�,绉﹀缓鏉�,瀛欐姹�,瀛欐浼�", - hasPlan: "", - id: "110116030040", - latitude: 40.56344444, - length: 0, - district: "鐞夌拑搴欓晣瀛欒儭娌熸潙娌宠タ浜庡瑗挎矡", - longitude: 116.5953889, - monitor: "", - monitorAdvice: "", - name: "浜庡瑗挎矡娉ョ煶娴侀殣鎮g偣", - number: "13716108909,13716029391,13716291714,13716191943,13716427398,13124792612", - preventionDes: "宸茬洃娴嬶紝2018鏉戝凡娌荤悊锛涙矡鍙e爢绉墖鏄庢樉锛屾瀵规埧灞嬶紝寤鸿姹涙湡鍔犲己宸℃煡", - preventionLevel: "", - preventionPlan: "瀹氭湡宸℃煡锛岄璀﹁浆绉�", - preventionUnit: "涔¢晣", - principal: "", - province: "鍖椾含甯�", - qp: "", - reason: "", - responsibleUnit: "", - riskLevel: "", - scale: "涓瀷", - stableLevel: "", - status: "", - thickness: 0, - threatenFamily: 18, - threatenMoney: 0, - threatenPopulation: "59", - threatenType: "", - town: "鐞夌拑搴欓晣", - trigger: "", - type: "娉ョ煶娴�", - village: "瀛欒儭娌熸潙", - volume: "", - volumePotential: "", - width: 0, - }, - { - activeStatus: "", - areaCode: "", - areaName: "", - brookLength: 0, - checkId: "", - city: "鍖椾含甯�", - codeProvince: "110116", - county: "鎬�鏌�", - dangerLevel: "", - disasterStatus: "", - drainageArea: "", - elevation: 0, - featureDes: "", - groupMonitor: "鏉庢姊�,瀛欐鍜�,鑼冩弧鐢�,绉﹀缓鏉�,瀛欐姹�,瀛欐浼�", - hasPlan: "", - id: "110116030055", - latitude: 40.55283333, - length: 0, - district: "鐞夌拑搴欓晣瀛欒儭娌熸潙妞存爲搴曚笅涓滄矡", - longitude: 116.5999444, - monitor: "", - monitorAdvice: "", - name: "妞存爲搴曚笅涓滄矡娉ョ煶娴侀殣鎮g偣", - number: "13716108909,13716029391,13716291714,13716191943,13716427398,13124792612", - preventionDes: "宸叉不鐞嗭細濞佽儊瀵硅薄閲嶅锛氫笌110116030015閲嶅5鎴�11浜�", - preventionLevel: "", - preventionPlan: "瀹氭湡宸℃煡锛岄璀﹁浆绉伙紝绔嬭绀虹墝", - preventionUnit: "涔¢晣", - principal: "", - province: "鍖椾含甯�", - qp: "", - reason: "", - responsibleUnit: "", - riskLevel: "", - scale: "涓瀷", - stableLevel: "", - status: "", - thickness: 0, - threatenFamily: 5, - threatenMoney: 0, - threatenPopulation: "11", - threatenType: "", - town: "鐞夌拑搴欓晣", - trigger: "", - type: "娉ョ煶娴�", - village: "瀛欒儭娌熸潙", - volume: "", - volumePotential: "", - width: 0, - }, - { - activeStatus: "", - areaCode: "", - areaName: "", - brookLength: 0, - checkId: "", - city: "鍖椾含甯�", - codeProvince: "110116", - county: "鎬�鏌�", - dangerLevel: "", - disasterStatus: "", - drainageArea: "", - elevation: 0, - featureDes: "", - groupMonitor: "鏉庢姊�,瀛欐鍜�,鑼冩弧鐢�,绉﹀缓鏉�,瀛欐姹�,瀛欐浼�", - hasPlan: "", - id: "110116030054", - latitude: 40.56166667, - length: 0, - district: "鐞夌拑搴欓晣瀛欒儭娌熸潙涓婂彴瀛愭渤涓滃崡娌�", - longitude: 116.5997222, - monitor: "", - monitorAdvice: "", - name: "娌充笢鍗楁矡娉ョ煶娴侀殣鎮g偣", - number: "13716108909,13716029391,13716291714,13716191943,13716427398,13124792612", - preventionDes: "宸茬洃娴�", - preventionLevel: "", - preventionPlan: "瀹氭湡宸℃煡,绔嬭绀虹墝", - preventionUnit: "涔¢晣", - principal: "", - province: "鍖椾含甯�", - qp: "", - reason: "", - responsibleUnit: "", - riskLevel: "", - scale: "灏忓瀷", - stableLevel: "", - status: "", - thickness: 0, - threatenFamily: 0, - threatenMoney: 0, - threatenPopulation: "", - threatenType: "", - town: "鐞夌拑搴欓晣", - trigger: "", - type: "娉ョ煶娴�", - village: "瀛欒儭娌熸潙", - volume: "", - volumePotential: "", - width: 0, - }, + { + activeStatus: "", + areaCode: "", + areaName: "", + brookLength: 0, + checkId: "", + city: "鍖椾含甯�", + codeProvince: "110116", + county: "鎬�鏌�", + dangerLevel: "", + disasterStatus: "", + drainageArea: "", + elevation: 0, + featureDes: "", + groupMonitor: "鏉庢姊�,瀛欐鍜�,鑼冩弧鐢�,绉﹀缓鏉�,瀛欐姹�,瀛欐浼�", + hasPlan: "", + id: "110116020058", + latitude: 40.56652778, + length: 0, + district: "鐞夌拑搴欓晣瀛欒儭娌熸潙灏瑰瑗挎矡灏瑰缓鐕曞灞嬪悗", + longitude: 116.5803889, + monitor: "", + monitorAdvice: "", + name: "灏瑰瑗挎矡灏瑰缓鐕曞灞嬪悗宕╁闅愭偅鐐�", + number: "13716108909,13716029391,13716291714,13716191943,13716427398,13124792612", + preventionDes: "", + preventionLevel: "", + preventionPlan: "瀹氭湡宸℃煡锛岄璀﹁浆绉伙紝绔嬭绀虹墝", + preventionUnit: "涔¢晣", + principal: "", + province: "鍖椾含甯�", + qp: "", + reason: "", + responsibleUnit: "", + riskLevel: "", + scale: "灏忓瀷", + stableLevel: "", + status: "", + thickness: 0, + threatenFamily: 2, + threatenMoney: 0, + threatenPopulation: "3", + threatenType: "", + town: "鐞夌拑搴欓晣", + trigger: "", + type: "宕╁", + village: "瀛欒儭娌熸潙", + volume: "", + volumePotential: "", + width: 0, + }, + { + activeStatus: "", + areaCode: "", + areaName: "", + brookLength: 0, + checkId: "", + city: "鍖椾含甯�", + codeProvince: "110116", + county: "鎬�鏌�", + dangerLevel: "", + disasterStatus: "", + drainageArea: "", + elevation: 0, + featureDes: "", + groupMonitor: "鏉庢姊�,瀛欐鍜�,鑼冩弧鐢�,绉﹀缓鏉�,瀛欐姹�,瀛欐浼�", + hasPlan: "", + id: "110116020078", + latitude: 40.56497222, + length: 0, + district: "鐞夌拑搴欓晣瀛欒儭娌熸潙娌宠タ浜庡嚖鑻卞灞嬪悗", + longitude: 116.5955278, + monitor: "", + monitorAdvice: "", + name: "娌宠タ浜庡嚖鑻卞灞嬪悗宕╁闅愭偅鐐�", + number: "13716108909,13716029391,13716291714,13716191943,13716427398,13124792612", + preventionDes: "", + preventionLevel: "", + preventionPlan: "瀹氭湡宸℃煡锛岄璀﹁浆绉伙紝绔嬭绀虹墝", + preventionUnit: "涔¢晣", + principal: "", + province: "鍖椾含甯�", + qp: "", + reason: "", + responsibleUnit: "", + riskLevel: "", + scale: "灏忓瀷", + stableLevel: "", + status: "", + thickness: 0, + threatenFamily: 4, + threatenMoney: 0, + threatenPopulation: "6", + threatenType: "", + town: "鐞夌拑搴欓晣", + trigger: "", + type: "宕╁", + village: "瀛欒儭娌熸潙", + volume: "", + volumePotential: "", + width: 0, + }, + { + activeStatus: "", + areaCode: "", + areaName: "", + brookLength: 0, + checkId: "", + city: "鍖椾含甯�", + codeProvince: "110116", + county: "鎬�鏌�", + dangerLevel: "", + disasterStatus: "", + drainageArea: "", + elevation: 0, + featureDes: "", + groupMonitor: "鏉庢姊�,瀛欐鍜�,鑼冩弧鐢�,绉﹀缓鏉�,瀛欐姹�,瀛欐浼�", + hasPlan: "", + id: "110116030041", + latitude: 40.55369444, + length: 0, + district: "鐞夌拑搴欓晣瀛欒儭娌熷叕璺�", + longitude: 116.6002778, + monitor: "", + monitorAdvice: "", + name: "鍗楁灏忎笢娌熸偿鐭虫祦闅愭偅鐐�", + number: "13716108909,13716029391,13716291714,13716191943,13716427398,13124792612", + preventionDes: "", + preventionLevel: "", + preventionPlan: "瀹氭湡宸℃煡,绔嬭绀虹墝", + preventionUnit: "涔¢晣", + principal: "", + province: "鍖椾含甯�", + qp: "", + reason: "", + responsibleUnit: "", + riskLevel: "", + scale: "灏忓瀷", + stableLevel: "", + status: "", + thickness: 0, + threatenFamily: 0, + threatenMoney: 0, + threatenPopulation: "", + threatenType: "", + town: "鐞夌拑搴欓晣", + trigger: "", + type: "娉ョ煶娴�", + village: "瀛欒儭娌熸潙", + volume: "", + volumePotential: "", + width: 0, + }, + { + activeStatus: "", + areaCode: "", + areaName: "", + brookLength: 0, + checkId: "", + city: "鍖椾含甯�", + codeProvince: "110116", + county: "鎬�鏌�", + dangerLevel: "", + disasterStatus: "", + drainageArea: "", + elevation: 0, + featureDes: "", + groupMonitor: "鏉庢姊�,瀛欐鍜�,鑼冩弧鐢�,绉﹀缓鏉�,瀛欐姹�,瀛欐浼�", + hasPlan: "", + id: "110116030015", + latitude: 40.55277778, + length: 0, + district: "鐞夌拑搴欓晣瀛欒儭娌熸潙鍗楁鏉戝ぇ绐戞矡", + longitude: 116.5994722, + monitor: "", + monitorAdvice: "", + name: "澶х獞娌熸偿鐭虫祦闅愭偅鐐�", + number: "13716108909,13716029391,13716291714,13716191943,13716427398,13124792612", + preventionDes: "宸茬洃娴嬨�佸凡娌荤悊", + preventionLevel: "", + preventionPlan: "瀹氭湡宸℃煡锛岄璀﹁浆绉伙紝绔嬭绀虹墝", + preventionUnit: "涔¢晣", + principal: "", + province: "鍖椾含甯�", + qp: "", + reason: "", + responsibleUnit: "", + riskLevel: "", + scale: "涓瀷", + stableLevel: "", + status: "", + thickness: 0, + threatenFamily: 5, + threatenMoney: 0, + threatenPopulation: "11", + threatenType: "", + town: "鐞夌拑搴欓晣", + trigger: "", + type: "娉ョ煶娴�", + village: "瀛欒儭娌熸潙", + volume: "", + volumePotential: "", + width: 0, + }, + { + activeStatus: "", + areaCode: "", + areaName: "", + brookLength: 0, + checkId: "", + city: "鍖椾含甯�", + codeProvince: "110116", + county: "鎬�鏌�", + dangerLevel: "", + disasterStatus: "", + drainageArea: "", + elevation: 0, + featureDes: "", + groupMonitor: "鏉庢姊�,瀛欐鍜�,鑼冩弧鐢�,绉﹀缓鏉�,瀛欐姹�,瀛欐浼�", + hasPlan: "", + id: "110116030076", + latitude: 40.55972222, + length: 0, + district: "鐞夌拑搴欓晣瀛欒儭娌熸潙涓滃潕澶т笢娌�", + longitude: 116.5916667, + monitor: "", + monitorAdvice: "", + name: "澶т笢娌熸偿鐭虫祦闅愭偅鐐�", + number: "13716108909,13716029391,13716291714,13716191943,13716427398,13124792612", + preventionDes: "宸叉不鐞�", + preventionLevel: "", + preventionPlan: "瀹氭湡宸℃煡锛岄璀﹁浆绉�", + preventionUnit: "涔¢晣", + principal: "", + province: "鍖椾含甯�", + qp: "", + reason: "", + responsibleUnit: "", + riskLevel: "", + scale: "灏忓瀷", + stableLevel: "", + status: "", + thickness: 0, + threatenFamily: 1, + threatenMoney: 0, + threatenPopulation: "2", + threatenType: "", + town: "鐞夌拑搴欓晣", + trigger: "", + type: "娉ョ煶娴�", + village: "瀛欒儭娌熸潙", + volume: "", + volumePotential: "", + width: 0, + }, + { + activeStatus: "", + areaCode: "", + areaName: "", + brookLength: 0, + checkId: "", + city: "鍖椾含甯�", + codeProvince: "110116", + county: "鎬�鏌�", + dangerLevel: "", + disasterStatus: "", + drainageArea: "", + elevation: 0, + featureDes: "", + groupMonitor: "鏉庢姊�,瀛欐鍜�,鑼冩弧鐢�,绉﹀缓鏉�,瀛欐姹�,瀛欐浼�", + hasPlan: "", + id: "110116030074", + latitude: 40.56580556, + length: 0, + district: "鐞夌拑搴欓晣瀛欒儭娌熸潙灏瑰瑗挎矡", + longitude: 116.59, + monitor: "", + monitorAdvice: "", + name: "灏瑰瑗挎矡娉ョ煶娴侀殣鎮g偣", + number: "13716108909,13716029391,13716291714,13716191943,13716427398,13124792612", + preventionDes: "宸茬洃娴嬶紱鐏惧浣撳彉鍖栵細4澶勫潯绉墿鍨锛屽爢绉嚦鍧¤剼锛屾柟閲忕害20m鲁銆�", + preventionLevel: "", + preventionPlan: "瀹氭湡宸℃煡锛岄璀﹁浆绉�", + preventionUnit: "涔¢晣", + principal: "", + province: "鍖椾含甯�", + qp: "", + reason: "", + responsibleUnit: "", + riskLevel: "", + scale: "涓瀷", + stableLevel: "", + status: "", + thickness: 0, + threatenFamily: 7, + threatenMoney: 0, + threatenPopulation: "12", + threatenType: "", + town: "鐞夌拑搴欓晣", + trigger: "", + type: "娉ョ煶娴�", + village: "瀛欒儭娌熸潙", + volume: "", + volumePotential: "", + width: 0, + }, + { + activeStatus: "", + areaCode: "", + areaName: "", + brookLength: 0, + checkId: "", + city: "鍖椾含甯�", + codeProvince: "110116", + county: "鎬�鏌�", + dangerLevel: "", + disasterStatus: "", + drainageArea: "", + elevation: 0, + featureDes: "", + groupMonitor: "鏉庢姊�,瀛欐鍜�,鑼冩弧鐢�,绉﹀缓鏉�,瀛欐姹�,瀛欐浼�", + hasPlan: "", + id: "110116030053", + latitude: 40.57361111, + length: 0, + district: "鐞夌拑搴欓晣瀛欒儭娌熸潙鍖楀ぇ鍦拌タ娲煎瓙娌�", + longitude: 116.5897222, + monitor: "", + monitorAdvice: "", + name: "鍖楀ぇ鍦拌タ娲煎瓙娌熸偿鐭虫祦闅愭偅鐐�", + number: "13716108909,13716029391,13716291714,13716191943,13716427398,13124792612", + preventionDes: "娌熷彛姝e鎴垮眿锛岄檷闆ㄦ椂鍑烘按閲忓ぇ锛屽缓璁不鐞嗭紝姹涙湡鍔犲己宸℃煡", + preventionLevel: "", + preventionPlan: "瀹氭湡宸℃煡锛岄璀﹁浆绉伙紝绔嬭绀虹墝", + preventionUnit: "涔¢晣", + principal: "", + province: "鍖椾含甯�", + qp: "", + reason: "", + responsibleUnit: "", + riskLevel: "", + scale: "涓瀷", + stableLevel: "", + status: "", + thickness: 0, + threatenFamily: 6, + threatenMoney: 0, + threatenPopulation: "10", + threatenType: "", + town: "鐞夌拑搴欓晣", + trigger: "", + type: "娉ョ煶娴�", + village: "瀛欒儭娌熸潙", + volume: "", + volumePotential: "", + width: 0, + }, + { + activeStatus: "", + areaCode: "", + areaName: "", + brookLength: 0, + checkId: "", + city: "鍖椾含甯�", + codeProvince: "110116", + county: "鎬�鏌�", + dangerLevel: "", + disasterStatus: "", + drainageArea: "", + elevation: 0, + featureDes: "", + groupMonitor: "鏉庢姊�,瀛欐鍜�,鑼冩弧鐢�,绉﹀缓鏉�,瀛欐姹�,瀛欐浼�", + hasPlan: "", + id: "110116020102", + latitude: 40.55972222, + length: 0, + district: "鐞夌拑搴欓晣瀛欒儭娌熸潙鑼冨搴勭帇绉�鑾插灞嬪悗", + longitude: 116.5922222, + monitor: "", + monitorAdvice: "", + name: "鑼冨搴勭帇绉�鑾插灞嬪悗宕╁闅愭偅鐐�", + number: "13716108909,13716029391,13716291714,13716191943,13716427398,13124792612", + preventionDes: "杈瑰潯杈冮櫋锛岄『鍚戝博灞傦紝鎴垮眿闈犺繎鍧¤剼锛屽缓璁敖蹇不鐞�", + preventionLevel: "", + preventionPlan: "瀹氭湡宸℃煡锛岄璀﹁浆绉伙紝绔嬭绀虹墝", + preventionUnit: "涔¢晣", + principal: "", + province: "鍖椾含甯�", + qp: "", + reason: "", + responsibleUnit: "", + riskLevel: "", + scale: "灏忓瀷", + stableLevel: "", + status: "", + thickness: 0, + threatenFamily: 1, + threatenMoney: 0, + threatenPopulation: "3", + threatenType: "", + town: "鐞夌拑搴欓晣", + trigger: "", + type: "宕╁", + village: "瀛欒儭娌熸潙", + volume: "", + volumePotential: "", + width: 0, + }, + { + activeStatus: "", + areaCode: "", + areaName: "", + brookLength: 0, + checkId: "", + city: "鍖椾含甯�", + codeProvince: "110116", + county: "鎬�鏌�", + dangerLevel: "", + disasterStatus: "", + drainageArea: "", + elevation: 0, + featureDes: "", + groupMonitor: "鏉庢姊�,瀛欐鍜�,鑼冩弧鐢�,绉﹀缓鏉�,瀛欐姹�,瀛欐浼�", + hasPlan: "", + id: "110116020742", + latitude: 40.57680556, + length: 0, + district: "鐞夌拑搴欓晣瀛欒儭娌熸潙涓変憨鍦拌寖蹇犵敯瀹跺眿鍚�", + longitude: 116.5887222, + monitor: "", + monitorAdvice: "", + name: "涓変憨鍦拌寖蹇犵敯瀹跺眿鍚庡穿濉岄殣鎮g偣", + number: "13716108909,13716029391,13716291714,13716191943,13716427398,13124792612", + preventionDes: "", + preventionLevel: "", + preventionPlan: "瀹氭湡宸℃煡锛岄璀﹁浆绉伙紝鏇存崲璀︾ず鐗�", + preventionUnit: "涔¢晣", + principal: "", + province: "鍖椾含甯�", + qp: "", + reason: "", + responsibleUnit: "", + riskLevel: "", + scale: "涓瀷", + stableLevel: "", + status: "", + thickness: 0, + threatenFamily: 8, + threatenMoney: 0, + threatenPopulation: "23", + threatenType: "", + town: "鐞夌拑搴欓晣", + trigger: "", + type: "宕╁", + village: "瀛欒儭娌熸潙", + volume: "", + volumePotential: "", + width: 0, + }, + { + activeStatus: "", + areaCode: "", + areaName: "", + brookLength: 0, + checkId: "", + city: "鍖椾含甯�", + codeProvince: "110116", + county: "鎬�鏌�", + dangerLevel: "", + disasterStatus: "", + drainageArea: "", + elevation: 0, + featureDes: "", + groupMonitor: "鏉庢姊�,瀛欐鍜�,鑼冩弧鐢�,绉﹀缓鏉�,瀛欐姹�,瀛欐浼�", + hasPlan: "", + id: "110116030040", + latitude: 40.56344444, + length: 0, + district: "鐞夌拑搴欓晣瀛欒儭娌熸潙娌宠タ浜庡瑗挎矡", + longitude: 116.5953889, + monitor: "", + monitorAdvice: "", + name: "浜庡瑗挎矡娉ョ煶娴侀殣鎮g偣", + number: "13716108909,13716029391,13716291714,13716191943,13716427398,13124792612", + preventionDes: "宸茬洃娴嬶紝2018鏉戝凡娌荤悊锛涙矡鍙e爢绉墖鏄庢樉锛屾瀵规埧灞嬶紝寤鸿姹涙湡鍔犲己宸℃煡", + preventionLevel: "", + preventionPlan: "瀹氭湡宸℃煡锛岄璀﹁浆绉�", + preventionUnit: "涔¢晣", + principal: "", + province: "鍖椾含甯�", + qp: "", + reason: "", + responsibleUnit: "", + riskLevel: "", + scale: "涓瀷", + stableLevel: "", + status: "", + thickness: 0, + threatenFamily: 18, + threatenMoney: 0, + threatenPopulation: "59", + threatenType: "", + town: "鐞夌拑搴欓晣", + trigger: "", + type: "娉ョ煶娴�", + village: "瀛欒儭娌熸潙", + volume: "", + volumePotential: "", + width: 0, + }, + { + activeStatus: "", + areaCode: "", + areaName: "", + brookLength: 0, + checkId: "", + city: "鍖椾含甯�", + codeProvince: "110116", + county: "鎬�鏌�", + dangerLevel: "", + disasterStatus: "", + drainageArea: "", + elevation: 0, + featureDes: "", + groupMonitor: "鏉庢姊�,瀛欐鍜�,鑼冩弧鐢�,绉﹀缓鏉�,瀛欐姹�,瀛欐浼�", + hasPlan: "", + id: "110116030055", + latitude: 40.55283333, + length: 0, + district: "鐞夌拑搴欓晣瀛欒儭娌熸潙妞存爲搴曚笅涓滄矡", + longitude: 116.5999444, + monitor: "", + monitorAdvice: "", + name: "妞存爲搴曚笅涓滄矡娉ョ煶娴侀殣鎮g偣", + number: "13716108909,13716029391,13716291714,13716191943,13716427398,13124792612", + preventionDes: "宸叉不鐞嗭細濞佽儊瀵硅薄閲嶅锛氫笌110116030015閲嶅5鎴�11浜�", + preventionLevel: "", + preventionPlan: "瀹氭湡宸℃煡锛岄璀﹁浆绉伙紝绔嬭绀虹墝", + preventionUnit: "涔¢晣", + principal: "", + province: "鍖椾含甯�", + qp: "", + reason: "", + responsibleUnit: "", + riskLevel: "", + scale: "涓瀷", + stableLevel: "", + status: "", + thickness: 0, + threatenFamily: 5, + threatenMoney: 0, + threatenPopulation: "11", + threatenType: "", + town: "鐞夌拑搴欓晣", + trigger: "", + type: "娉ョ煶娴�", + village: "瀛欒儭娌熸潙", + volume: "", + volumePotential: "", + width: 0, + }, + { + activeStatus: "", + areaCode: "", + areaName: "", + brookLength: 0, + checkId: "", + city: "鍖椾含甯�", + codeProvince: "110116", + county: "鎬�鏌�", + dangerLevel: "", + disasterStatus: "", + drainageArea: "", + elevation: 0, + featureDes: "", + groupMonitor: "鏉庢姊�,瀛欐鍜�,鑼冩弧鐢�,绉﹀缓鏉�,瀛欐姹�,瀛欐浼�", + hasPlan: "", + id: "110116030054", + latitude: 40.56166667, + length: 0, + district: "鐞夌拑搴欓晣瀛欒儭娌熸潙涓婂彴瀛愭渤涓滃崡娌�", + longitude: 116.5997222, + monitor: "", + monitorAdvice: "", + name: "娌充笢鍗楁矡娉ョ煶娴侀殣鎮g偣", + number: "13716108909,13716029391,13716291714,13716191943,13716427398,13124792612", + preventionDes: "宸茬洃娴�", + preventionLevel: "", + preventionPlan: "瀹氭湡宸℃煡,绔嬭绀虹墝", + preventionUnit: "涔¢晣", + principal: "", + province: "鍖椾含甯�", + qp: "", + reason: "", + responsibleUnit: "", + riskLevel: "", + scale: "灏忓瀷", + stableLevel: "", + status: "", + thickness: 0, + threatenFamily: 0, + threatenMoney: 0, + threatenPopulation: "", + threatenType: "", + town: "鐞夌拑搴欓晣", + trigger: "", + type: "娉ョ煶娴�", + village: "瀛欒儭娌熸潙", + volume: "", + volumePotential: "", + width: 0, + }, ]) -function initDistrictPoint() { - let list = [] - districtList.value.forEach(item => { - item.showBillboard = true - item.className = "district" - item.type = '娉ョ煶娴�' - const entity = createPoint(item) - entity.show = false - list.push(entity) - }) - treeMap.set("瀛欒儭娌熼殣鎮g偣", list) +function initDistrictPoint () { + let list = [] + districtList.value.forEach(item => { + item.showBillboard = true + item.className = "district" + item.type = '娉ョ煶娴�' + const entity = createPoint(item) + entity.show = false + list.push(entity) + }) + treeMap.set("瀛欒儭娌熼殣鎮g偣", list) } let divPointList = [] -function initDuanmianPoint() { - getDuanMainData().then(res => { - const duanmianList = res.data - const list = [] - duanmianList.forEach(item => { - item.id = item.id + item.alias - item.name = item.alias - item.longitude = item.lon - item.latitude = item.lat - item.showBillboard = false - item.className = "district" +function initDuanmianPoint () { + getDuanMainData().then(res => { + const duanmianList = res.data + const list = [] + duanmianList.forEach(item => { + item.id = item.id + item.alias + item.name = item.alias + item.longitude = item.lon + item.latitude = item.lat + item.showBillboard = false + item.className = "district" - const entity = createPoint(item) - entity.show = false - list.push(entity) - return - const divPoint = earthCtrl.factory.createDivPoint( - item.alias, - { lon: longitude, lat: latitude }, - { - type: "custom", - offset: ["c", 60], - description: ` + const entity = createPoint(item) + entity.show = false + list.push(entity) + return + const divPoint = earthCtrl.factory.createDivPoint( + item.alias, + { lon: longitude, lat: latitude }, + { + type: "custom", + offset: ["c", 60], + description: ` <div class="divPoint-custom"> <p>${item.alias}</p> </div> `, - near: 0, - far: 500000, - } - ) - divPoint.item.show = false - console.log(divPoint) + near: 0, + far: 500000, + } + ) + divPoint.item.show = false + console.log(divPoint) - divPointList.push(divPoint.item) - }) - treeMap.set("瀛欒儭娌熶豢鐪熸爣娉ㄥ湴鐗�", list) - }) + divPointList.push(divPoint.item) + }) + treeMap.set("瀛欒儭娌熶豢鐪熸爣娉ㄥ湴鐗�", list) + }) } -function addTetrahedron(visible) { - const emergencyAreaList = [] +function addTetrahedron (visible) { + const emergencyAreaList = [] - loadAreaPolygon("/json/emergency_area.geojson", true).then(entities => { - emergencyAreaList.push(...entities) - }) - // console.log('polygon', polygon); + loadAreaPolygon("/json/emergency_area.geojson", true).then(entities => { + emergencyAreaList.push(...entities) + }) + // console.log('polygon', polygon); - let list = [ - { - name: "灏瑰缓鍗庡", - longitude: 116.593517, - latitude: 40.568391, - altitude: 528.45, - }, - { - name: "鑼冩尟姹熷", - longitude: 116.591059, - latitude: 40.574068, - altitude: 528, - }, - { - name: "鍚庡潯", - longitude: 116.597975, - latitude: 40.558199, - altitude: 528, - }, - ] - list.forEach(item => { - let point = earthCtrl.factory.addTetrahedron({ - position: { - lon: item.longitude, - lat: item.latitude, - height: item.altitude, - }, - multiple: 1.0, - scale: new SmartEarth.Cesium.Cartesian3(20, 20, 20), - }) - console.log("point", point) - emergencyAreaList.push(point) + let list = [ + { + name: "灏瑰缓鍗庡", + longitude: 116.593517, + latitude: 40.568391, + altitude: 528.45, + }, + { + name: "鑼冩尟姹熷", + longitude: 116.591059, + latitude: 40.574068, + altitude: 528, + }, + { + name: "鍚庡潯", + longitude: 116.597975, + latitude: 40.558199, + altitude: 528, + }, + ] + list.forEach(item => { + let point = earthCtrl.factory.addTetrahedron({ + position: { + lon: item.longitude, + lat: item.latitude, + height: item.altitude, + }, + multiple: 1.0, + scale: new SmartEarth.Cesium.Cartesian3(20, 20, 20), + }) + console.log("point", point) + emergencyAreaList.push(point) - }) - treeMap.set("閬块櫓鐐�", emergencyAreaList) + }) + treeMap.set("閬块櫓鐐�", emergencyAreaList) } -function toggleLayerVisible(name, checked) { - const entityList = treeMap.get(name) - if (Array.isArray(entityList) && entityList.length > 0) { - entityList.forEach(entity => { - entity.show = checked - }) - } - treeMap.set(name, entityList) +function toggleLayerVisible (name, checked) { + const entityList = treeMap.get(name) + if (Array.isArray(entityList) && entityList.length > 0) { + entityList.forEach(entity => { + entity.show = checked + }) + } + treeMap.set(name, entityList) } -function getData() { - initDevicePoint() - initDistrictPoint() - initDuanmianPoint() +function getData () { + initDevicePoint() + initDistrictPoint() + initDuanmianPoint() } // 閫氳繃 store 浼犻�掗渶瑕侀�変腑鐨刱ey watch(() => checkedKeys.value, (keys) => { - if (keys && Array.isArray(keys)) { - treeRef.value.setCheckedKeys(defaultSelectedKeys.value.concat(keys), true) - } + if (keys && Array.isArray(keys)) { + treeRef.value.setCheckedKeys(defaultSelectedKeys.value.concat(keys), true) + } }) watch( - () => route.fullPath, - path => { - const defaultKeys = defaultSelectedKeys.value - if (path == "/yhgl") { - treeRef.value.setCheckedKeys(defaultKeys.concat("瀛欒儭娌熼殣鎮g偣"), true) - toggleLayerVisible("瀛欒儭娌熼殣鎮g偣", true) - toggleLayerVisible("缁煎悎鐩戞祴璁惧淇℃伅", false) - toggleLayerVisible("瀛欒儭娌熶豢鐪熸爣娉ㄥ湴鐗�", false) + () => route.fullPath, + path => { + const defaultKeys = defaultSelectedKeys.value + if (path == "/yhgl") { + treeRef.value.setCheckedKeys(defaultKeys.concat("瀛欒儭娌熼殣鎮g偣"), true) + toggleLayerVisible("瀛欒儭娌熼殣鎮g偣", true) + toggleLayerVisible("缁煎悎鐩戞祴璁惧淇℃伅", false) + toggleLayerVisible("瀛欒儭娌熶豢鐪熸爣娉ㄥ湴鐗�", false) - } else if (path == "/zhjc") { - treeRef.value.setCheckedKeys(defaultKeys.concat("缁煎悎鐩戞祴璁惧淇℃伅"), true) - toggleLayerVisible("缁煎悎鐩戞祴璁惧淇℃伅", true) - toggleLayerVisible("瀛欒儭娌熼殣鎮g偣", false) - toggleLayerVisible("瀛欒儭娌熶豢鐪熸爣娉ㄥ湴鐗�", false) - } else if (path == "/mnfz") { - treeRef.value.setCheckedKeys(defaultKeys.concat("瀛欒儭娌熶豢鐪熸爣娉ㄥ湴鐗�"), true) - toggleLayerVisible("瀛欒儭娌熶豢鐪熸爣娉ㄥ湴鐗�", true) - toggleLayerVisible("瀛欒儭娌熼殣鎮g偣", false) - toggleLayerVisible("缁煎悎鐩戞祴璁惧淇℃伅", false) + } else if (path == "/zhjc") { + treeRef.value.setCheckedKeys(defaultKeys.concat("缁煎悎鐩戞祴璁惧淇℃伅"), true) + toggleLayerVisible("缁煎悎鐩戞祴璁惧淇℃伅", true) + toggleLayerVisible("瀛欒儭娌熼殣鎮g偣", false) + toggleLayerVisible("瀛欒儭娌熶豢鐪熸爣娉ㄥ湴鐗�", false) + } else if (path == "/mnfz") { + treeRef.value.setCheckedKeys(defaultKeys.concat("瀛欒儭娌熶豢鐪熸爣娉ㄥ湴鐗�"), true) + toggleLayerVisible("瀛欒儭娌熶豢鐪熸爣娉ㄥ湴鐗�", true) + toggleLayerVisible("瀛欒儭娌熼殣鎮g偣", false) + toggleLayerVisible("缁煎悎鐩戞祴璁惧淇℃伅", false) - } else { - treeRef.value.setCheckedKeys(defaultKeys, true) - } - } + } else { + treeRef.value.setCheckedKeys(defaultKeys, true) + } + } ) onMounted(() => { - initMap() - getData() + initMap() + getData() }) onUnmounted(() => { - viewer.entities.removeAll() + viewer.entities.removeAll() }) </script> <style lang="less" scoped> .layer-tree { - // position: absolute; - // top: 11%; - // right: 25%; - background: url("@/assets/img/tools/plotting_new.png"); - width: 200px; - height: 200px; - z-index: 99; + // position: absolute; + // top: 11%; + // right: 25%; + background: url("@/assets/img/tools/plotting_new.png"); + width: 200px; + height: 200px; + z-index: 99; } </style> \ No newline at end of file -- Gitblit v1.9.3