From 730e3a29fd1bebdedc88cc4482e1139d5c8a7d75 Mon Sep 17 00:00:00 2001
From: 罗广辉 <guanghui.luo@foxmail.com>
Date: Wed, 21 Jan 2026 15:26:34 +0800
Subject: [PATCH] feat: 字典匹配
---
applications/task-work-order/src/utils/cesium/adminBoundary.js | 8 ++++++--
packages/utils/common/index.js | 8 ++++++--
applications/task-work-order/src/components/map-container/common-cesium-map.vue | 4 ++--
applications/task-work-order/src/views/orderView/orderManage/orderManage/FormDiaLog.vue | 8 +++++++-
4 files changed, 21 insertions(+), 7 deletions(-)
diff --git a/applications/task-work-order/src/components/map-container/common-cesium-map.vue b/applications/task-work-order/src/components/map-container/common-cesium-map.vue
index 02eb8e5..f7773f7 100644
--- a/applications/task-work-order/src/components/map-container/common-cesium-map.vue
+++ b/applications/task-work-order/src/components/map-container/common-cesium-map.vue
@@ -79,7 +79,6 @@
})
viewer.value = viewInstance.value.getViewer()
if (props.showAdminBoundary) {
- console.log(props.zoomToBoundary,'props.zoomToBoundary')
adminBoundarySources = await loadJaAdminBoundary(viewer.value, {
zoomTo: props.zoomToBoundary,
})
@@ -124,8 +123,9 @@
const getMap = () => ({ viewer: viewer.value, publicCesium: viewInstance.value })
const getViewer = () => viewer.value
const getPublicCesium = () => viewInstance.value
+const flyBoundary = () => adminBoundarySources.flyBoundary()
-defineExpose({ getMap, getViewer, getPublicCesium })
+defineExpose({ getMap, getViewer, getPublicCesium,flyBoundary })
</script>
<style scoped lang="scss">
diff --git a/applications/task-work-order/src/utils/cesium/adminBoundary.js b/applications/task-work-order/src/utils/cesium/adminBoundary.js
index 381dc7d..905f626 100644
--- a/applications/task-work-order/src/utils/cesium/adminBoundary.js
+++ b/applications/task-work-order/src/utils/cesium/adminBoundary.js
@@ -70,13 +70,17 @@
viewer.dataSources.add(labelSource)
if (config.zoomTo) {
- await viewer.flyTo(boundarySource, {
+ flyBoundary()
+ }
+
+ const flyBoundary = () => {
+ viewer.flyTo(boundarySource, {
duration: 0,
offset: new Cesium.HeadingPitchRange(0, Cesium.Math.toRadians(-75), 0),
})
}
- return { boundarySource, lineSource, labelSource }
+ return { boundarySource, lineSource, labelSource,flyBoundary }
}
export const removeJaAdminBoundary = (viewer, sources) => {
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 ca55aa3..3f65277 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
@@ -8,7 +8,7 @@
destroy-on-close
>
<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>
@@ -130,6 +130,7 @@
:layer-mode="4"
:boundary="false"
:zoomToBoundary="false"
+ @ready="mapReady"
/>
</div>
<div class="rightBox" v-if="!dialogReadonly">
@@ -444,6 +445,11 @@
viewer = map?.viewer || null
}
+function mapReady() {
+ console.log(6363)
+ dialogMode.value === 'add' && mapRef.value.flyBoundary()
+}
+
defineExpose({ open })
</script>
diff --git a/packages/utils/common/index.js b/packages/utils/common/index.js
index 2b1ff27..43fcec6 100644
--- a/packages/utils/common/index.js
+++ b/packages/utils/common/index.js
@@ -22,9 +22,13 @@
return rules
}
-
export function getDictLabel(value, dictList = []) {
- return dictList.filter(item => String(value).includes(String(item.dictKey))).map(item => item.dictValue).join(',')
+ if (value === null || value === undefined || value === '') return '';
+ const values = String(value).split(',');
+ return dictList
+ .filter(item => values.includes(String(item.dictKey)))
+ .map(item => item.dictValue)
+ .join(',');
}
export function blobDownload(res) {
--
Gitblit v1.9.3