From ce16bdf4081d3f1ad6c549ee9d096e1cad066fce Mon Sep 17 00:00:00 2001 From: duanxiaohai <1812246227@qq.com> Date: Thu, 29 Aug 2024 16:52:05 +0800 Subject: [PATCH 1/3] gx --- vite.config.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vite.config.js b/vite.config.js index 99753df..7708875 100644 --- a/vite.config.js +++ b/vite.config.js @@ -15,8 +15,8 @@ export default defineConfig({ // 第一个代理 "/api": { // 匹配到啥来进行方向代理 - // target: "http://10.0.0.65:8095/", //刘进 - target: "http://220.191.238.50:996/", //线上 + target: "http://10.0.0.65:8095/", //刘进 + // target: "http://220.191.238.50:996/", //线上 changeOrigin: true, //是否支持跨域 //rewrite: (path) => path.replace(/^\/api/, '') // 如果不需要api 直接把路径上的api 替换成空,这个 }, From fb553082d97d0e573e7142d213f39dd6eb74f80b Mon Sep 17 00:00:00 2001 From: duanxiaohai <1812246227@qq.com> Date: Fri, 30 Aug 2024 11:24:49 +0800 Subject: [PATCH 2/3] gx --- src/view/sy_map.vue | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/src/view/sy_map.vue b/src/view/sy_map.vue index 4487aa9..860cec5 100644 --- a/src/view/sy_map.vue +++ b/src/view/sy_map.vue @@ -2504,11 +2504,45 @@ const createZyys = (polygon, indexx, name) => { content.style.zIndex = BMapGL.Overlay.getZIndex(this.point.lat); content.style.height = "30px"; content.style.width = "30px"; + // content.style.position = "relative"; // 使得提示文字相对于父元素定位 + let img2 = document.createElement("img"); img2.style.width = "20px"; img2.style.height = "26px"; img2.src = this.properties.imgSrc2; + + // 添加 title 属性作为简单的文字提示 + img2.title = "这是一个图标的提示文字"; + // // 创建一个提示文字的元素 + // let tooltip = document.createElement("div"); + // tooltip.textContent = "这是一个图标的提示文字"; + // tooltip.style.visibility = "hidden"; + // tooltip.style.backgroundColor = "black"; + // tooltip.style.color = "#fff"; + // tooltip.style.textAlign = "center"; + // tooltip.style.borderRadius = "5px"; + // tooltip.style.padding = "5px"; + // tooltip.style.position = "absolute"; + // tooltip.style.bottom = "100%"; // 调整提示文字的位置 + // tooltip.style.left = "50%"; + // tooltip.style.transform = "translateX(-50%)"; + // tooltip.style.zIndex = "1"; + + // // 鼠标悬停时显示提示文字 + // content.addEventListener("mouseover", function() { + // console.log(556); + + // tooltip.style.visibility = "visible"; + // }); + + // // 鼠标移开时隐藏提示文字 + // content.addEventListener("mouseout", function() { + // tooltip.style.visibility = "hidden"; + // }); + content.appendChild(img2); + // content.appendChild(tooltip); + return content; } yaosuIcon.value[name].sj[indexx].overlay = new BMapGL.CustomOverlay( From 65e80ea739cf6b51fd9cff63541883e8d8b6deb1 Mon Sep 17 00:00:00 2001 From: duanxiaohai <1812246227@qq.com> Date: Fri, 30 Aug 2024 11:29:31 +0800 Subject: [PATCH 3/3] gx --- src/view/sy_map.vue | 79 +++++++++++++++++++++++---------------------- 1 file changed, 40 insertions(+), 39 deletions(-) diff --git a/src/view/sy_map.vue b/src/view/sy_map.vue index 895aa71..ca6551b 100644 --- a/src/view/sy_map.vue +++ b/src/view/sy_map.vue @@ -225,7 +225,11 @@ 退出 -
+
地图权限(123456):

{{ bjtitle }}

@@ -1059,14 +1063,12 @@ const openqx = () => { console.log(1111); if (jsqx.value) { - ElMessageBox.confirm("确定要取消权限吗?") - .then(() => { - qxvalue.value='' - jsqx.value = false; - }) - .catch(() => { - - }); + ElMessageBox.confirm("确定要取消权限吗?") + .then(() => { + qxvalue.value = ""; + jsqx.value = false; + }) + .catch(() => {}); } else { qx.value = true; } @@ -1075,7 +1077,7 @@ const saveqx = () => { if (qxvalue.value == qxkey) { jsqx.value = true; qx.value = false; - qxvalue.value='' + qxvalue.value = ""; ElMessage.success("解锁成功"); } else { ElMessage.error("解锁密码错误"); @@ -2568,33 +2570,33 @@ const createZyys = (polygon, indexx, name) => { img2.src = this.properties.imgSrc2; // 添加 title 属性作为简单的文字提示 - img2.title = "这是一个图标的提示文字"; - // // 创建一个提示文字的元素 - // let tooltip = document.createElement("div"); - // tooltip.textContent = "这是一个图标的提示文字"; - // tooltip.style.visibility = "hidden"; - // tooltip.style.backgroundColor = "black"; - // tooltip.style.color = "#fff"; - // tooltip.style.textAlign = "center"; - // tooltip.style.borderRadius = "5px"; - // tooltip.style.padding = "5px"; - // tooltip.style.position = "absolute"; - // tooltip.style.bottom = "100%"; // 调整提示文字的位置 - // tooltip.style.left = "50%"; - // tooltip.style.transform = "translateX(-50%)"; - // tooltip.style.zIndex = "1"; - - // // 鼠标悬停时显示提示文字 - // content.addEventListener("mouseover", function() { - // console.log(556); - - // tooltip.style.visibility = "visible"; - // }); - - // // 鼠标移开时隐藏提示文字 - // content.addEventListener("mouseout", function() { - // tooltip.style.visibility = "hidden"; - // }); + img2.title =polygon.name; + // // 创建一个提示文字的元素 + // let tooltip = document.createElement("div"); + // tooltip.textContent = "这是一个图标的提示文字"; + // tooltip.style.visibility = "hidden"; + // tooltip.style.backgroundColor = "black"; + // tooltip.style.color = "#fff"; + // tooltip.style.textAlign = "center"; + // tooltip.style.borderRadius = "5px"; + // tooltip.style.padding = "5px"; + // tooltip.style.position = "absolute"; + // tooltip.style.bottom = "100%"; // 调整提示文字的位置 + // tooltip.style.left = "50%"; + // tooltip.style.transform = "translateX(-50%)"; + // tooltip.style.zIndex = "1"; + + // // 鼠标悬停时显示提示文字 + // content.addEventListener("mouseover", function() { + // console.log(556); + + // tooltip.style.visibility = "visible"; + // }); + + // // 鼠标移开时隐藏提示文字 + // content.addEventListener("mouseout", function() { + // tooltip.style.visibility = "hidden"; + // }); content.appendChild(img2); // content.appendChild(tooltip); @@ -3853,8 +3855,7 @@ const DGcreateCs = (polygon, indexx) => { changeCsqkId.value = polygon.id; showEdit.value = !showEdit.value; } - }else{ - + } else { } }); };