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 yaosuList = ref([]);
// //
const yaosuIcon = ref({ const yaosuIcon = ref({
摄像头: { // : {
sj: [], // sj: [],
}, // },
体育场所: { // : {
sj: [], // sj: [],
}, // },
幼儿园: { // : {
sj: [], // sj: [],
}, // },
小学: { sj: [] }, // : { sj: [] },
初中: { sj: [] }, // : { sj: [] },
高中: { sj: [] }, // : { sj: [] },
医院: { sj: [] }, // : { sj: [] },
南孔书院: { sj: [] }, // : { sj: [] },
养老机构: { sj: [] }, // : { sj: [] },
汽车充电桩: { sj: [] }, // : { sj: [] },
卫生服务中心: { sj: [] }, // : { sj: [] },
AED: { sj: [] }, // AED: { sj: [] },
}); });
// //
const ylCount = reactive([ const ylCount = reactive([
@ -1076,7 +1076,7 @@ const pagination = reactive({
//------------------------------------------------ //------------------------------------------------
// //
const initMap = () => { 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.setMapType(BMAP_SATELLITE_MAP);
map.enableScrollWheelZoom(true); map.enableScrollWheelZoom(true);
goMapCenter([119.178783, 29.034583], 11); goMapCenter([119.178783, 29.034583], 11);
@ -1094,8 +1094,6 @@ const getXzsj = async () => {
.get("/api/ggfwyth/regionalDivision/getManagerTownDetails") .get("/api/ggfwyth/regionalDivision/getManagerTownDetails")
.then((res) => { .then((res) => {
if (res.code == 200) { if (res.code == 200) {
console.log(JSON.parse(res.data));
mapTown = JSON.parse(res.data); mapTown = JSON.parse(res.data);
} }
}); });
@ -2680,21 +2678,30 @@ const changeys = (name) => {
tooltip = item.tooltip; 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); getZyys(url, name, img, img_map, tooltip);
} }
if (name == "养老机构") { if (name == "养老机构") {
getZyys2(name, img, img_map, tooltip); getZyys2(name, img, img_map, tooltip);
} }
} }
}; };
//线 //线
const getZyys = (url, name, img, img_map, tooltip) => { const getZyys = (url, name, img, img_map, tooltip) => {
http.get(url).then((res) => { http.get(url).then((res) => {
if (res.code == 200) { if (res.code == 200) {
yaosuIcon.value[name].sj = res.data; yaosuIcon.value[name] = {};
yaosuIcon.value[name].sj.forEach((item, index) => { yaosuIcon.value[name]["sj"] = [];
yaosuIcon.value[name]["sj"] = res.data;
yaosuIcon.value[name]["sj"].forEach((item, index) => {
item.img = img; item.img = img;
item.img_map = img_map; item.img_map = img_map;
item.overlay = null; item.overlay = null;
@ -2727,8 +2734,10 @@ const getZyys = (url, name, img, img_map, tooltip) => {
// //
const getZyys2 = (name, img, img_map, tooltip) => { const getZyys2 = (name, img, img_map, tooltip) => {
if (name == "养老机构") { if (name == "养老机构") {
yaosuIcon.value[name].sj = ylCount; yaosuIcon.value[name] = {};
yaosuIcon.value[name].sj.forEach((item, index) => { yaosuIcon.value[name]["sj"] = [];
yaosuIcon.value[name]["sj"] = ylCount;
yaosuIcon.value[name]["sj"].forEach((item, index) => {
item.img = img; item.img = img;
item.img_map = img_map; item.img_map = img_map;
item.overlay = null; item.overlay = null;
@ -3251,7 +3260,7 @@ const createCustomOverlay = (polygon, indexx) => {
function createLabelDOM() { function createLabelDOM() {
var content = document.createElement("div"); var content = document.createElement("div");
content.style.display = "flex"; content.style.display = "flex";
content.style.justifyContent= "end"; content.style.justifyContent = "end";
content.style.flexDirection = "column"; content.style.flexDirection = "column";
content.style.alignItems = "center"; content.style.alignItems = "center";
content.style.justifyContent = "end"; content.style.justifyContent = "end";