Compare commits

..

2 Commits

Author SHA1 Message Date
姚宇浩 b11a1fb79d Merge branch 'main' of https://git.cityme.com.cn/xiangshan/ggfwjsc 2024-09-27 16:16:41 +08:00
姚宇浩 53472ab2d6 1 2024-09-27 16:16:29 +08:00
1 changed files with 37 additions and 28 deletions

View File

@ -905,24 +905,24 @@ const yaosuTotal = ref([
const yaosuList = ref([]);
//
const yaosuIcon = ref({
摄像头: {
sj: [],
},
体育场所: {
sj: [],
},
幼儿园: {
sj: [],
},
小学: { sj: [] },
初中: { sj: [] },
高中: { sj: [] },
医院: { sj: [] },
南孔书院: { sj: [] },
养老机构: { sj: [] },
汽车充电桩: { sj: [] },
卫生服务中心: { sj: [] },
AED: { sj: [] },
// : {
// sj: [],
// },
// : {
// sj: [],
// },
// : {
// sj: [],
// },
// : { sj: [] },
// : { sj: [] },
// : { sj: [] },
// : { sj: [] },
// : { sj: [] },
// : { sj: [] },
// : { sj: [] },
// : { sj: [] },
// AED: { sj: [] },
});
//
const ylCount = reactive([
@ -1076,7 +1076,7 @@ const pagination = reactive({
//------------------------------------------------
//
const initMap = () => {
map = new BMapGL.Map("map", { minZoom: 8, maxZoom: 19 });
map = new BMapGL.Map("map", { minZoom: 8, maxZoom: 20 });
map.setMapType(BMAP_SATELLITE_MAP);
map.enableScrollWheelZoom(true);
goMapCenter([119.178783, 29.034583], 11);
@ -1094,8 +1094,6 @@ const getXzsj = async () => {
.get("/api/ggfwyth/regionalDivision/getManagerTownDetails")
.then((res) => {
if (res.code == 200) {
console.log(JSON.parse(res.data));
mapTown = JSON.parse(res.data);
}
});
@ -2680,21 +2678,30 @@ const changeys = (name) => {
tooltip = item.tooltip;
}
});
if (name == "摄像头" || name == "AED" || name=='幼儿园' || name=='小学'|| name=='初中' || name=='高中'|| name=='医院') {
if (
name == "摄像头" ||
name == "AED" ||
name == "幼儿园" ||
name == "小学" ||
name == "初中" ||
name == "高中" ||
name == "医院"
) {
getZyys(url, name, img, img_map, tooltip);
}
if (name == "养老机构") {
getZyys2(name, img, img_map, tooltip);
}
}
};
//线
const getZyys = (url, name, img, img_map, tooltip) => {
http.get(url).then((res) => {
if (res.code == 200) {
yaosuIcon.value[name].sj = res.data;
yaosuIcon.value[name].sj.forEach((item, index) => {
yaosuIcon.value[name] = {};
yaosuIcon.value[name]["sj"] = [];
yaosuIcon.value[name]["sj"] = res.data;
yaosuIcon.value[name]["sj"].forEach((item, index) => {
item.img = img;
item.img_map = img_map;
item.overlay = null;
@ -2727,8 +2734,10 @@ const getZyys = (url, name, img, img_map, tooltip) => {
//
const getZyys2 = (name, img, img_map, tooltip) => {
if (name == "养老机构") {
yaosuIcon.value[name].sj = ylCount;
yaosuIcon.value[name].sj.forEach((item, index) => {
yaosuIcon.value[name] = {};
yaosuIcon.value[name]["sj"] = [];
yaosuIcon.value[name]["sj"] = ylCount;
yaosuIcon.value[name]["sj"].forEach((item, index) => {
item.img = img;
item.img_map = img_map;
item.overlay = null;