From 8dab0434215327bd19ff9493188d90de4acaabb7 Mon Sep 17 00:00:00 2001
From: 张含笑 <zhx18749296735@163.com>
Date: Fri, 05 Sep 2025 11:44:16 +0800
Subject: [PATCH] feat:任务管理边界
---
.env.development | 5 +++--
src/utils/cesium/useBoundary.js | 1 +
.env.localhost | 2 ++
src/utils/cesium/publicCesium.js | 28 ++++++++++++++--------------
.env.jiangwu | 2 ++
5 files changed, 22 insertions(+), 16 deletions(-)
diff --git a/.env.development b/.env.development
index 09780be..2d834a7 100644
--- a/.env.development
+++ b/.env.development
@@ -21,7 +21,7 @@
# 服务地址
VITE_APP_URL = https://wrj.shuixiongit.com/api
-#VITE_APP_URL= http://192.168.1.168
+#VITE_APP_URL= http://192.168.1.168
#VITE_APP_URL= http://192.168.1.33
#新大屏地址
VITE_APP_DASHBOARD_URL = 'https://wrj.shuixiongit.com/command-center-dashboard/'
@@ -37,7 +37,8 @@
# 图片存放地址
VITE_APP_TERRAIN_URL = https://wrj.shuixiongit.com/aiskyminio/cloud-bucket/ztzf_terrain/all_terrain
-
+# 行政区划存放地址
+VITE_APP_REGION_URL = https://wrj.shuixiongit.com/aiskyminio/cloud-bucket/ztzf_region
# 算法仓库图片地址
VITE_APP_PICTURE_URL = https://wrj.shuixiongit.com/aiskyminio/cloud-bucket
diff --git a/.env.jiangwu b/.env.jiangwu
index 83fb5e5..623d388 100644
--- a/.env.jiangwu
+++ b/.env.jiangwu
@@ -38,6 +38,8 @@
# 地形存放地址
VITE_APP_TERRAIN_URL = http://192.168.253.121:9000/cloud-bucket/ztzf_terrain
+# 行政区划存放地址
+VITE_APP_REGION_URL = https://wrj.shuixiongit.com/aiskyminio/cloud-bucket/ztzf_region
# 图片资源存放地址
VITE_APP_IMAGESOURCE_URL = http://192.168.253.121:9000/cloud-bucket
diff --git a/.env.localhost b/.env.localhost
index 258a5ec..851dc67 100644
--- a/.env.localhost
+++ b/.env.localhost
@@ -28,6 +28,8 @@
# 图片存放地址
VITE_APP_TERRAIN_URL = https://wrj.shuixiongit.com/aiskyminio/cloud-bucket/ztzf_terrain/all_terrain
+# 行政区划存放地址
+VITE_APP_REGION_URL = https://wrj.shuixiongit.com/aiskyminio/cloud-bucket/ztzf_region
# 算法仓库图片地址
VITE_APP_PICTURE_URL = http://192.168.1.227:80/aiskyminio/cloud-bucket
diff --git a/src/utils/cesium/publicCesium.js b/src/utils/cesium/publicCesium.js
index e5ea8f9..99afb97 100644
--- a/src/utils/cesium/publicCesium.js
+++ b/src/utils/cesium/publicCesium.js
@@ -94,7 +94,7 @@
terrain = false,
layerMode = 0,
contour = true,
- // flyToContour = false,
+ flyToContour = false,
multiple = 1.4,
dockOptions = {},
@@ -158,8 +158,8 @@
this.viewer.scene.screenSpaceCameraController.maximumZoomDistance = 4500000
this.switchLayers(layerMode)
this.switchFlatMode(flatMode)
- // this.switchContour(contour)
- // flyToContour && this.flyToContour(contour)
+ this.switchContour(contour)
+ flyToContour && this.flyToContour(contour)
}
getViewer () {
@@ -202,21 +202,21 @@
}
setShowDock (sns) {
- // this.boundary?.setShowDock(sns)
+ this.boundary?.setShowDock(sns)
}
// 切换轮廓显示
- // async switchContour (open) {
- // if (open) {
- // await this.boundary?.openContour()
- // } else {
- // this.boundary?.closeContour()
- // }
- // }
+ async switchContour (open) {
+ if (open) {
+ await this.boundary?.openContour()
+ } else {
+ this.boundary?.closeContour()
+ }
+ }
// // 飞向轮廓居中
- // flyToContour () {
- // this.boundary?.flyToBoundary()
- // }
+ flyToContour () {
+ this.boundary?.flyToBoundary()
+ }
// 飞行 flyto
flyTo (pointOption, time = 4, height = 3000, orientation = {}, complete = () => { }) {
diff --git a/src/utils/cesium/useBoundary.js b/src/utils/cesium/useBoundary.js
index 6e34a02..d04ffb9 100644
--- a/src/utils/cesium/useBoundary.js
+++ b/src/utils/cesium/useBoundary.js
@@ -217,6 +217,7 @@
// 打开边界
const openContour = async () => {
const areaCode = selectedAreaCode || userAreaCode
+
viewer.scene.postRender.removeEventListener(determineScaling)
if (!areaCode) return
const hierarchy = areaCodeToArr(areaCode.slice(0, 6))
--
Gitblit v1.9.3