From f62b5dccd3fbd23ff9353f4e7ea5e6d18aa54946 Mon Sep 17 00:00:00 2001
From: 张含笑 <zhx18749296735@163.com>
Date: Wed, 21 Jan 2026 17:46:37 +0800
Subject: [PATCH] feat:添加判断

---
 applications/task-work-order/src/views/orderView/orderManage/orderManage/FormDiaLog.vue |   26 ++++++++++++++++++++------
 1 files changed, 20 insertions(+), 6 deletions(-)

diff --git a/applications/task-work-order/src/views/orderView/orderManage/orderManage/FormDiaLog.vue b/applications/task-work-order/src/views/orderView/orderManage/orderManage/FormDiaLog.vue
index 6d05750..f054c12 100644
--- a/applications/task-work-order/src/views/orderView/orderManage/orderManage/FormDiaLog.vue
+++ b/applications/task-work-order/src/views/orderView/orderManage/orderManage/FormDiaLog.vue
@@ -6,13 +6,13 @@
 		@closed="visible = false"
 		width="80%"
 		destroy-on-close
+		:close-on-click-modal="false"
 	>
 		<div class="content" style="display: flex">
-			<div class="processBox">
+			<div class="processBox" v-if="dialogMode !== 'add'">
 				<el-steps direction="vertical" :active="processList.length">
 					<el-step v-for="item in processList" :title="item.flowName" :description="item.flowDesc" />
 				</el-steps>
-				<!--				<div v-for="(item, index) in processList">{{ index }}-{{ item.flowName }}{{ item.flowDesc }}</div>-->
 			</div>
 			<div class="leftBox">
 				<div v-if="dialogReadonly">
@@ -121,7 +121,7 @@
 						</el-col>
 					</el-row>
 				</el-form>
-
+				<div class="detail-title" :style="{ marginTop: pxToRem(20) }">工单执行范围</div>
 				<CommonCesiumMap
 					ref="mapRef"
 					class="leftMap gd-cesium"
@@ -131,6 +131,7 @@
 					:layer-mode="4"
 					:boundary="false"
 					:zoomToBoundary="false"
+					@ready="mapReady"
 				/>
 			</div>
 			<div class="rightBox" v-if="!dialogReadonly">
@@ -201,7 +202,7 @@
 <script setup>
 import { computed, ref, onMounted, nextTick } from 'vue'
 import { ElMessage } from 'element-plus'
-import { dateRangeFormat, fieldRules, geomAnalysis, getDictLabel } from '@ztzf/utils'
+import { dateRangeFormat, fieldRules, flyVisual, geomAnalysis, getDictLabel } from '@ztzf/utils'
 import {
 	gdWorkOrderDetailApi,
 	gdWorkOrderFlowListApi,
@@ -275,6 +276,8 @@
 	dialogMode.value = 'edit'
 	nextTick(() => {
 		syncSelection()
+		viewPlane && viewer.entities.remove(viewPlane)
+		editPolygon()
 	})
 }
 
@@ -388,12 +391,13 @@
 	drawPolygonExample.subscribe('getPolygonPositions', drawFinished)
 }
 
+let viewPlane
 // 查看面
 function viewPolygon() {
 	if (!formData.value?.geom) return
 	pointList = geomAnalysis(formData.value.geom)
 	const result = pointList.map(item => [item.longitude, item.latitude]).flat()
-	const mian = viewer.entities?.add({
+	viewPlane = viewer.entities?.add({
 		customType: 'control_group',
 		position: Cesium.Cartesian3.fromDegrees(result[0], result[1]),
 		polyline: {
@@ -403,7 +407,10 @@
 			material: Cesium.Color.RED,
 		},
 	})
-	viewer.flyTo(mian, { duration: 0 })
+	flyVisual({
+		positionsData: pointList.map(i => [i.longitude, i.latitude, i.height || 0]),
+		viewer,
+	})
 }
 
 // 同步关联场景
@@ -445,6 +452,10 @@
 	viewer = map?.viewer || null
 }
 
+function mapReady() {
+	dialogMode.value === 'add' && mapRef.value.flyBoundary()
+}
+
 defineExpose({ open })
 </script>
 
@@ -469,6 +480,9 @@
 			color: #272e37;
 		}
 	}
+	.processBox {
+		width: 312px;
+	}
 }
 
 .setHeight {

--
Gitblit v1.9.3