From ebc79da8a1c5a72fb9ec66da407692c0cde01eba Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Thu, 26 Dec 2024 12:26:44 +0800
Subject: [PATCH] 新干加载企业范围及企业详情初始化调整

---
 src/views/companyInfo/index.vue |   41 +++++++++++++++++++++++++++++------------
 1 files changed, 29 insertions(+), 12 deletions(-)

diff --git a/src/views/companyInfo/index.vue b/src/views/companyInfo/index.vue
index b43e7a9..c60b6a3 100644
--- a/src/views/companyInfo/index.vue
+++ b/src/views/companyInfo/index.vue
@@ -2,7 +2,7 @@
  * @Author: shuishen 1109946754@qq.com
  * @Date: 2024-11-08 11:00:30
  * @LastEditors: shuishen 1109946754@qq.com
- * @LastEditTime: 2024-12-25 11:30:12
+ * @LastEditTime: 2024-12-26 12:25:07
  * @FilePath: \bigScreen\src\views\companyInfo\index.vue
  * @Description:
  *
@@ -26,19 +26,36 @@
 window.$viewer.addLayer(curCompanyWall)
 
 data.companyInfo = JSON.parse(localStorage.getItem('companyInfo'))
-// let curCompany = qyfw.features.find(item => item.properties.name == data.companyInfo.name)
+let curCompany = qyfw.features.find(item => item.properties.name == data.companyInfo.name)
 
-// let wall = new DC.Wall(
-//   curCompany.geometry.coordinates[0].map(d => [...d, 125].join(',')).join(';')
-// )
+if (curCompany) {
+  let wall = new DC.Wall(
+    curCompany.geometry.coordinates[0].map(d => [...d, 125].join(',')).join(';')
+  )
 
-// wall.setStyle({
-//   material: new DC.WallTrailMaterialProperty({
-//     color: window.$Cesium.Color.fromBytes(255, 255, 0, 180),
-//     speed: 10
-//   })
-// })
-// curCompanyWall.addOverlay(wall)
+  wall.setStyle({
+    material: new DC.WallTrailMaterialProperty({
+      color: window.$Cesium.Color.fromBytes(255, 255, 0, 180),
+      speed: 10
+    })
+  })
+  curCompanyWall.addOverlay(wall)
+} else {
+  let lng = data.companyInfo.lng
+  let lat = data.companyInfo.lat
+
+  if (lng && lat) {
+    window.$viewer.zoomToPosition(new DC.Position(
+      lng.content,
+      lat.content,
+      400,
+      0,
+      -90,
+      0
+    ), () => {
+    })
+  }
+}
 
 onMounted(() => {
   window.$viewer && window.$viewer.flyTo(curCompanyWall)

--
Gitblit v1.9.3