From 96c391e780d7405bec831d88d3cff73218ebf150 Mon Sep 17 00:00:00 2001
From: xuhongjie <1943105267@qq.com>
Date: Fri, 28 Mar 2025 16:44:06 +0800
Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E6=88=90=E4=B8=89=E7=A7=8D=E7=82=B9?=
=?UTF-8?q?=E4=BD=8D=E5=9B=BE=E5=B1=82=E7=9A=84=E5=8A=A0=E7=82=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/map.vue | 46 +++++++++++++++++++++++++++-------------------
1 file changed, 27 insertions(+), 19 deletions(-)
diff --git a/src/views/map.vue b/src/views/map.vue
index 691cb0d..4bbe8ae 100644
--- a/src/views/map.vue
+++ b/src/views/map.vue
@@ -179,12 +179,8 @@
@@ -301,9 +297,9 @@ let popupShow = ref(false);
let dictList = reactive([]);
let info = reactive({});
let businessInfo = reactive({});
-const showPreview = ref(false)
-let srcList = reactive([])
-let initialIndex = ref(0)
+const showPreview = ref(false);
+let srcList = reactive([]);
+let initialIndex = ref(0);
const dialogVisible = ref(false);
const innerVisible = ref(false);
@@ -332,15 +328,12 @@ onUnmounted(() => {
/**
*
* @param index
- *
+ *
*/
const lookIamge = (index) => {
+ initialIndex.value = index; //阅览的索引
+ showPreview.value = true;
- initialIndex.value = index //阅览的索引
- showPreview.value = true
-
-
-
// if (!exampleFile) return;
// const imageItem = document.getElementById(`businessImage` + index);
// console.log('sssddd',)
@@ -356,11 +349,11 @@ const handleInfoByyewu = async (id) => {
id,
parent: info.parent,
});
- res.data.srcList = []
- if(res.data.formList.length>0){
- res.data.srcList= res.data.formList.map(item=>{
- return `${baseUrl}/api/yzt-data/file/otherImage?name=${item.exampleFile}&imgname=${item.name}`
- })
+ res.data.srcList = [];
+ if (res.data.formList.length > 0) {
+ res.data.srcList = res.data.formList.map((item) => {
+ return `${baseUrl}/api/yzt-data/file/otherImage?name=${item.exampleFile}&imgname=${item.name}`;
+ });
}
businessInfo = res.data;
@@ -509,8 +502,23 @@ const handleOutsideClick = (event) => {
const handlePointLayer = (index, value) => {
if (currentIndex.value != index) {
currentIndex.value = index;
+ getMarkerType(value);
}
};
+
+const getMarkerType = async (type) => {
+ const res = await getPointListByType({ type });
+ mapLayer.markerLayer.clear();
+ res.data.map((item, index) => {
+ if (index == 0) {
+ map.flyToPoint(item.lonLat.split(","), {
+ radius: 30738,
+ duration: 1,
+ });
+ }
+ initMarker(item);
+ });
+};
/**
* 点位选择
*/