diff --git a/dist.zip b/dist.zip new file mode 100644 index 0000000..f0e6802 Binary files /dev/null and b/dist.zip differ diff --git a/src/view/sy_map.vue b/src/view/sy_map.vue index 340c7a3..94e15d6 100644 --- a/src/view/sy_map.vue +++ b/src/view/sy_map.vue @@ -125,7 +125,7 @@ wz: item.wz == true, Tsactive: !item.click, }" - @click="item.click ? changeys(item.name,item.img_width) : ''" + @click="item.click ? changeys(item.name, item.img_width) : ''" :key="index" >
- 地图权限: -

{{ bjtitle }}

+
+ {{ isCollapsed ? "◀" : "▶" }} +
+ 地图权限: +

+ {{ bjtitle }} +

{ //----------资源要素------------ const zyys_choose_cs = ref(""); -const changeys = (name,img_width) => { +const changeys = (name, img_width) => { if (yaosuList.value.includes(name)) { yaosuList.value = yaosuList.value.filter((ch) => ch !== name); if (yaosuIcon.value[name]) { @@ -3241,18 +3249,18 @@ const changeys = (name,img_width) => { name == "汽车充电桩" || name == "便民服务中心" ) { - getZyys(url, name, img, img_map, tooltip,img_width); + getZyys(url, name, img, img_map, tooltip, img_width); } else if (name == "养老机构") { - getZyys2(name, img, img_map, tooltip,img_width); + getZyys2(name, img, img_map, tooltip, img_width); } else if (name == "小区物业") { - getZyys3(url, name, img, img_map, tooltip,img_width); + getZyys3(url, name, img, img_map, tooltip, img_width); } else { loadingss.value = false; } } }; //线上接口资源要素 -const getZyys = (url, name, img, img_map, tooltip,img_width) => { +const getZyys = (url, name, img, img_map, tooltip, img_width) => { http.get(url).then((res) => { if (res.code == 200) { yaosuIcon.value[name] = {}; @@ -3283,14 +3291,14 @@ const getZyys = (url, name, img, img_map, tooltip,img_width) => { // }; }); yaosuIcon.value[name].sj.forEach((itemm, indexx) => { - createZyys(itemm, indexx, name, tooltip,img_width); + createZyys(itemm, indexx, name, tooltip, img_width); }); } loadingss.value = false; }); }; //本地存储资源要素 -const getZyys2 = (name, img, img_map, tooltip,img_width) => { +const getZyys2 = (name, img, img_map, tooltip, img_width) => { if (name == "养老机构") { yaosuIcon.value[name] = {}; yaosuIcon.value[name]["sj"] = []; @@ -3301,13 +3309,13 @@ const getZyys2 = (name, img, img_map, tooltip,img_width) => { item.overlay = null; }); yaosuIcon.value[name].sj.forEach((itemm, indexx) => { - createZyys(itemm, indexx, name, tooltip,img_width); + createZyys(itemm, indexx, name, tooltip, img_width); }); loadingss.value = false; } }; //线上接口资源要素(无坐标,需自己匹配) -const getZyys3 = (url, name, img, img_map, tooltip,img_width) => { +const getZyys3 = (url, name, img, img_map, tooltip, img_width) => { http.get(url).then((res) => { if (res.code == 200) { let zyys_jd = []; @@ -3335,14 +3343,14 @@ const getZyys3 = (url, name, img, img_map, tooltip,img_width) => { }); }); yaosuIcon.value[name].sj.forEach((itemm, indexx) => { - createZyys(itemm, indexx, name, tooltip,img_width); + createZyys(itemm, indexx, name, tooltip, img_width); }); } loadingss.value = false; }); }; // 添加资源要素的图标(overlay存放标记点) -const createZyys = (polygon, indexx, name, tooltip,img_width) => { +const createZyys = (polygon, indexx, name, tooltip, img_width) => { let properties_change = {}; if (name == "小区物业") { properties_change = { @@ -3455,9 +3463,9 @@ const createZyys = (polygon, indexx, name, tooltip,img_width) => { break; case "残疾人之家": break; - case "便民服务中心": + case "便民服务中心": break; - case "残疾人之家": + case "残疾人之家": break; case "小区物业": console.log(polygon); @@ -5322,6 +5330,13 @@ const reset_font2 = () => { document.querySelector(".detail").style.transform = "scale(" + width / 1920 + "," + height / 1080 + ")"; }; +// const bjtitle = ref(锁定); +// const jsqx = ref(false); +const isCollapsed = ref(false); + +const toggleCollapse = () => { + isCollapsed.value = !isCollapsed.value; +}; onMounted(async () => { // 检查浏览器是否支持 WebGL @@ -5951,6 +5966,7 @@ onMounted(async () => { border-radius: 0 3px 3px 0; } } + .btnBj { cursor: pointer; z-index: 100; @@ -5964,7 +5980,26 @@ onMounted(async () => { display: flex; align-items: center; opacity: 0.8; + transition: width 0.3s ease; + width: auto; + overflow: hidden; + + .btnBj.collapsed { + width: 15px; + justify-content: center; + } + + .arrow { + cursor: pointer; + font-size: 16px; + color: #ffffff; + transition: color 0.2s ease; + } + .arrow:hover { + color: #000000; + } } + .title { background-image: url(@/assets/images/map/map_title_bg.png); background-repeat: no-repeat;