From 84eef74812c212c489bb4a7fed3924b66b799183 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Cyansj=E2=80=9D?= Date: Wed, 15 Jan 2025 08:44:41 +0800 Subject: [PATCH] gx --- src/view/sy_map.vue | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/src/view/sy_map.vue b/src/view/sy_map.vue index a8e06a1..7ac593b 100644 --- a/src/view/sy_map.vue +++ b/src/view/sy_map.vue @@ -1149,6 +1149,7 @@ const yaosuTotal = ref([ id: 38, name: "共享教师", url: "/api/ggfwyth/ysyzt/getGxjsXx", + tooltip: "xxmc", img: gxjs, wz: true, click: true, @@ -1157,6 +1158,7 @@ const yaosuTotal = ref([ id: 39, name: "共享食堂", url: "/api/ggfwyth/ysyzt/getLnstxx", + tooltip: "lnstmc", img: gxst, wz: true, click: true, @@ -1313,7 +1315,7 @@ const yaosuTotal = ref([ name: "停车场", img: tcc, wz: true, - click: true, + click: false, }, { id: 23, @@ -3516,7 +3518,14 @@ const getZyys = (url, name, img, img_map, tooltip, img_width) => { yaosuIcon.value[name] = {}; yaosuIcon.value[name]["sj"] = []; if (name == "共享食堂") { - yaosuIcon.value[name]["sj"] = [...res.data.lnst, ...res.data.zcd]; + let zcd = + res.data.zcd.map((item) => { + return { + ...item, + lnstmc: item.zcdmc, + }; + }) || []; + yaosuIcon.value[name]["sj"] = [...res.data.lnst, ...zcd]; } else { yaosuIcon.value[name]["sj"] = res.data; } @@ -3759,7 +3768,7 @@ const createZyys = (polygon, indexx, name, tooltip, img_width) => { map.removeOverlay(item); // 清空资源要素中心点 }); } - if (polygon.fgfwrs.length == 0) { + if (!polygon?.fgfwrs) { ElMessage.warning({ message: "暂无数据", }); @@ -3896,7 +3905,7 @@ const loadCs_zyys2 = async (jdname, name) => { } } }; -const get_dk_zyys = async (sj, xd, ssly, name) => { +const get_dk_zyys = async (sj = [], xd, ssly, name) => { zyys_dk.value = []; zyys_center.value = []; zyys_data.value.point = [];