From 863098aad3e211f4f7e6fcbf260868dfdd6e314a Mon Sep 17 00:00:00 2001 From: duanxiaohai <1812246227@qq.com> Date: Thu, 8 Aug 2024 10:03:41 +0800 Subject: [PATCH] gx --- src/view/guide.vue | 9 ++++++--- src/view/sy_mapcopy.vue | 17 +++++++++++------ src/view/sy_table.vue | 30 ++++++++++++++++++------------ 3 files changed, 35 insertions(+), 21 deletions(-) diff --git a/src/view/guide.vue b/src/view/guide.vue index fadf252..c99f7b7 100644 --- a/src/view/guide.vue +++ b/src/view/guide.vue @@ -140,7 +140,10 @@ onMounted(() => { let token = tools.data.get("token"); // console.log(token, "token"); if (token == null) { - ElMessage.error("请重新登录!"); + ElMessage.error({ + message: "请重新登录!", + offset: 100, + }); window.location.href = "http://220.191.238.50:996/api/login?returnURL=" + window.location.href; } @@ -191,7 +194,7 @@ const tabData = reactive({ }, ], scenList: [ - { + { img: png3, url: "/home/index", }, @@ -203,7 +206,7 @@ const tabData = reactive({ img: png2, url: "/home/index/map", }, - + // { // img: png4, // url: "/home/yl", diff --git a/src/view/sy_mapcopy.vue b/src/view/sy_mapcopy.vue index 1e3e668..d66a009 100644 --- a/src/view/sy_mapcopy.vue +++ b/src/view/sy_mapcopy.vue @@ -2070,8 +2070,10 @@ const changeFwq = async (id, name, names) => { ); //中心点缩放 }, 500); } else { - console.log("无数据11"); - ElMessage.warning("无数据"); + ElMessage.warning({ + message: "无数据", + offset: 100, // 距离窗口顶部的偏移量 + }); } } }; @@ -2164,7 +2166,7 @@ const addggfwq = () => { // data.fwqCoordinates1 = calculateAverage(data.fwqCoordinates1); // data.fwqCoordinates2 = calculateAverage(data.fwqCoordinates2); - // console.log(centerPoint); // 输出中心点的经纬度 + console.log(centerPoint); // 输出中心点的经纬度 // console.log("经纬度", data.fwqCoordinates1, data.fwqCoordinates2 ); let distances = []; // 初始化距离数组 @@ -2184,15 +2186,18 @@ const addggfwq = () => { distances.push(distance); // 将距离存入数组 }); let maxDistance = Math.max(...distances); // 找到最大距离 - maxDistance = Math.ceil(maxDistance * 2.2); // 向上取整 + maxDistance = Math.ceil(maxDistance * 1.8); // 向上取整 if (maxDistance < 100) { maxDistance = 150; // 如果小于 100,则赋值为 150 } data.zoomLevel = calculateZoomLevel(maxDistance); - // console.log("最大距离:", maxDistance,data.zoomLevel); + console.log("最大距离:", maxDistance, data.zoomLevel); drawACircle(maxDistance); } else { - ElMessage.warning("无数据"); + ElMessage.warning({ + message: "无数据", + offset: 100, // 距离窗口顶部的偏移量 + }); } }; //计算两点之间直线距离 diff --git a/src/view/sy_table.vue b/src/view/sy_table.vue index eb1c59a..8fe76a1 100644 --- a/src/view/sy_table.vue +++ b/src/view/sy_table.vue @@ -102,7 +102,10 @@