Compare commits

...

2 Commits

Author SHA1 Message Date
duanxiaohai 767d39e056 Merge branch 'main' of https://git.cityme.com.cn/xiangshan/ggfwjsc 2024-11-18 13:57:16 +08:00
duanxiaohai 73bfc239eb gx 2024-11-18 13:57:12 +08:00
2 changed files with 55 additions and 20 deletions

BIN
dist.zip Normal file

Binary file not shown.

View File

@ -125,7 +125,7 @@
wz: item.wz == true, wz: item.wz == true,
Tsactive: !item.click, Tsactive: !item.click,
}" }"
@click="item.click ? changeys(item.name,item.img_width) : ''" @click="item.click ? changeys(item.name, item.img_width) : ''"
:key="index" :key="index"
> >
<img <img
@ -247,11 +247,20 @@
</div> </div>
<div <div
class="btnBj" class="btnBj"
:class="{ collapsed: isCollapsed }"
v-if="!showEdit && !dialogShow && !openD" v-if="!showEdit && !dialogShow && !openD"
@click="openqx()"
> >
地图权限 <div class="arrow" @click="toggleCollapse">
<p :style="{ color: jsqx ? 'green' : 'red' }">{{ bjtitle }}</p> <span>{{ isCollapsed ? "◀" : "▶" }}</span>
</div>
<span v-show="!isCollapsed" style="margin-left: 10px">地图权限</span>
<p
v-show="!isCollapsed"
@click="openqx()"
:style="{ color: jsqx ? 'green' : 'red' }"
>
{{ bjtitle }}
</p>
</div> </div>
<Dialog <Dialog
:dialogShow="dialogShow" :dialogShow="dialogShow"
@ -1115,7 +1124,6 @@ const yaosuTotal = ref([
url: "/api/ggfwyth/ysyzt/getCdzxx", url: "/api/ggfwyth/ysyzt/getCdzxx",
tooltip: "zdmc", tooltip: "zdmc",
click: true, click: true,
}, },
{ {
id: 9, id: 9,
@ -1167,7 +1175,7 @@ const yaosuTotal = ref([
img_map: cjrzj_map, img_map: cjrzj_map,
wz: true, wz: true,
click: true, click: true,
img_width:24, img_width: 24,
}, },
{ {
@ -1179,7 +1187,7 @@ const yaosuTotal = ref([
tooltip: "mc", tooltip: "mc",
wz: true, wz: true,
click: true, click: true,
img_width:24, img_width: 24,
}, },
{ {
id: 22, id: 22,
@ -3192,7 +3200,7 @@ const changeRs = (id) => {
//---------------------- //----------------------
const zyys_choose_cs = ref(""); const zyys_choose_cs = ref("");
const changeys = (name,img_width) => { const changeys = (name, img_width) => {
if (yaosuList.value.includes(name)) { if (yaosuList.value.includes(name)) {
yaosuList.value = yaosuList.value.filter((ch) => ch !== name); yaosuList.value = yaosuList.value.filter((ch) => ch !== name);
if (yaosuIcon.value[name]) { if (yaosuIcon.value[name]) {
@ -3241,18 +3249,18 @@ const changeys = (name,img_width) => {
name == "汽车充电桩" || name == "汽车充电桩" ||
name == "便民服务中心" name == "便民服务中心"
) { ) {
getZyys(url, name, img, img_map, tooltip,img_width); getZyys(url, name, img, img_map, tooltip, img_width);
} else if (name == "养老机构") { } else if (name == "养老机构") {
getZyys2(name, img, img_map, tooltip,img_width); getZyys2(name, img, img_map, tooltip, img_width);
} else if (name == "小区物业") { } else if (name == "小区物业") {
getZyys3(url, name, img, img_map, tooltip,img_width); getZyys3(url, name, img, img_map, tooltip, img_width);
} else { } else {
loadingss.value = false; 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) => { http.get(url).then((res) => {
if (res.code == 200) { if (res.code == 200) {
yaosuIcon.value[name] = {}; yaosuIcon.value[name] = {};
@ -3283,14 +3291,14 @@ const getZyys = (url, name, img, img_map, tooltip,img_width) => {
// }; // };
}); });
yaosuIcon.value[name].sj.forEach((itemm, indexx) => { yaosuIcon.value[name].sj.forEach((itemm, indexx) => {
createZyys(itemm, indexx, name, tooltip,img_width); createZyys(itemm, indexx, name, tooltip, img_width);
}); });
} }
loadingss.value = false; loadingss.value = false;
}); });
}; };
// //
const getZyys2 = (name, img, img_map, tooltip,img_width) => { const getZyys2 = (name, img, img_map, tooltip, img_width) => {
if (name == "养老机构") { if (name == "养老机构") {
yaosuIcon.value[name] = {}; yaosuIcon.value[name] = {};
yaosuIcon.value[name]["sj"] = []; yaosuIcon.value[name]["sj"] = [];
@ -3301,13 +3309,13 @@ const getZyys2 = (name, img, img_map, tooltip,img_width) => {
item.overlay = null; item.overlay = null;
}); });
yaosuIcon.value[name].sj.forEach((itemm, indexx) => { yaosuIcon.value[name].sj.forEach((itemm, indexx) => {
createZyys(itemm, indexx, name, tooltip,img_width); createZyys(itemm, indexx, name, tooltip, img_width);
}); });
loadingss.value = false; 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) => { http.get(url).then((res) => {
if (res.code == 200) { if (res.code == 200) {
let zyys_jd = []; let zyys_jd = [];
@ -3335,14 +3343,14 @@ const getZyys3 = (url, name, img, img_map, tooltip,img_width) => {
}); });
}); });
yaosuIcon.value[name].sj.forEach((itemm, indexx) => { yaosuIcon.value[name].sj.forEach((itemm, indexx) => {
createZyys(itemm, indexx, name, tooltip,img_width); createZyys(itemm, indexx, name, tooltip, img_width);
}); });
} }
loadingss.value = false; loadingss.value = false;
}); });
}; };
// (overlay) // (overlay)
const createZyys = (polygon, indexx, name, tooltip,img_width) => { const createZyys = (polygon, indexx, name, tooltip, img_width) => {
let properties_change = {}; let properties_change = {};
if (name == "小区物业") { if (name == "小区物业") {
properties_change = { properties_change = {
@ -3455,9 +3463,9 @@ const createZyys = (polygon, indexx, name, tooltip,img_width) => {
break; break;
case "残疾人之家": case "残疾人之家":
break; break;
case "便民服务中心": case "便民服务中心":
break; break;
case "残疾人之家": case "残疾人之家":
break; break;
case "小区物业": case "小区物业":
console.log(polygon); console.log(polygon);
@ -5322,6 +5330,13 @@ const reset_font2 = () => {
document.querySelector(".detail").style.transform = document.querySelector(".detail").style.transform =
"scale(" + width / 1920 + "," + height / 1080 + ")"; "scale(" + width / 1920 + "," + height / 1080 + ")";
}; };
// const bjtitle = ref();
// const jsqx = ref(false);
const isCollapsed = ref(false);
const toggleCollapse = () => {
isCollapsed.value = !isCollapsed.value;
};
onMounted(async () => { onMounted(async () => {
// WebGL // WebGL
@ -5951,6 +5966,7 @@ onMounted(async () => {
border-radius: 0 3px 3px 0; border-radius: 0 3px 3px 0;
} }
} }
.btnBj { .btnBj {
cursor: pointer; cursor: pointer;
z-index: 100; z-index: 100;
@ -5964,7 +5980,26 @@ onMounted(async () => {
display: flex; display: flex;
align-items: center; align-items: center;
opacity: 0.8; 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 { .title {
background-image: url(@/assets/images/map/map_title_bg.png); background-image: url(@/assets/images/map/map_title_bg.png);
background-repeat: no-repeat; background-repeat: no-repeat;