This commit is contained in:
duanxiaohai 2024-07-24 11:43:30 +08:00
parent d9fdca24b3
commit 99a9ef6174
2 changed files with 89 additions and 49 deletions

View File

@ -299,11 +299,9 @@ const addPolygonCounty = () => {
}; };
// //
const addJd = () => { const addJd = () => {
mapTownCount.map((item) => { mapTownCount.map((item) => {
createCustomOverlayJd(item); createCustomOverlayJd(item);
}); });
}; };
//2 //2
const addJd2 = () => { const addJd2 = () => {
@ -487,8 +485,8 @@ const createCustomOverlay = (polygon) => {
content.style.zIndex = BMapGL.Overlay.getZIndex(this.point.lat); content.style.zIndex = BMapGL.Overlay.getZIndex(this.point.lat);
var div = document.createElement("div"); var div = document.createElement("div");
div.style.color = "#333"; div.style.color = "#ddd";
div.style.padding = "6px 8px"; div.style.padding = `${polygon.padding}`;
div.style.whiteSpace = "nowrap"; div.style.whiteSpace = "nowrap";
div.style.MozUserSelect = "none"; div.style.MozUserSelect = "none";
div.style.fontSize = "12px"; div.style.fontSize = "12px";
@ -505,7 +503,7 @@ const createCustomOverlay = (polygon) => {
title.style.fontSize = "14px"; title.style.fontSize = "14px";
title.style.fontWeight = "700"; title.style.fontWeight = "700";
title.style.marginLeft = "0px"; title.style.marginLeft = "0px";
title.style.color = "#ddd"; title.style.color = `${polygon.textColor}`;
div.appendChild(title); div.appendChild(title);
title.appendChild(document.createTextNode(this.properties.title)); title.appendChild(document.createTextNode(this.properties.title));
@ -583,7 +581,7 @@ const xuanran = () => {
if (chooseArr.value.includes("person")) { if (chooseArr.value.includes("person")) {
console.log(3434); console.log(3434);
addJd2(); addJd2();
}else{ } else {
addJd(); addJd();
} }
if (chooseArr.value.includes("fwq")) { if (chooseArr.value.includes("fwq")) {
@ -635,11 +633,11 @@ const changeFwq = (id, list, center) => {
fwqList.value = list; fwqList.value = list;
removeAllPolygon("fwq"); removeAllPolygon("fwq");
xuanran(); xuanran();
console.log(1111111111,center); console.log(1111111111, center);
setTimeout(() => { setTimeout(() => {
goMapCenter(center, 17); goMapCenter(center, 17);
}, 500); }, 500);
// addggfwq() // addggfwq()
} }
@ -864,8 +862,11 @@ const jbfwqTotal = ref([
bgColor: "#00b050", bgColor: "#00b050",
img: fwqbg1, img: fwqbg1,
img2: b2, img2: b2,
x:33, x: 33,
y:0, y: 0,
textColor: "#fff",
padding: "4px 8px 10px",
}, },
{ {
name: "衢州学院附属幼儿园", name: "衢州学院附属幼儿园",
@ -873,8 +874,10 @@ const jbfwqTotal = ref([
bgColor: "#00b050", bgColor: "#00b050",
img: fwqbg1, img: fwqbg1,
img2: b2, img2: b2,
x:55, x: 55,
y:0, y: 0,
textColor: "#fff",
padding: "4px 8px 10px",
}, },
{ {
name: "溪口中银小学", name: "溪口中银小学",
@ -882,8 +885,10 @@ const jbfwqTotal = ref([
bgColor: "#00b050", bgColor: "#00b050",
img: fwqbg1, img: fwqbg1,
img2: b2, img2: b2,
x:38, x: 38,
y:0, y: 0,
textColor: "#fff",
padding: "4px 8px 10px",
}, },
{ {
name: "溪口初中", name: "溪口初中",
@ -891,8 +896,10 @@ const jbfwqTotal = ref([
bgColor: "#00b050", bgColor: "#00b050",
img: fwqbg1, img: fwqbg1,
img2: b2, img2: b2,
x:33, x: 33,
y:0, y: 0,
textColor: "#fff",
padding: "4px 8px 10px",
}, },
{ {
name: "居家养老中心", name: "居家养老中心",
@ -900,8 +907,10 @@ const jbfwqTotal = ref([
bgColor: "#f4c243", bgColor: "#f4c243",
img: fwqbg5, img: fwqbg5,
img2: b1, img2: b1,
x:38, x: 38,
y:0, y: 0,
textColor: "#fff",
padding: "4px 8px 10px",
}, },
{ {
name: "共享食堂", name: "共享食堂",
@ -909,8 +918,10 @@ const jbfwqTotal = ref([
bgColor: "#f4c243", bgColor: "#f4c243",
img: fwqbg5, img: fwqbg5,
img2: b1, img2: b1,
x:33, x: 33,
y:0, y: 0,
textColor: "#fff",
padding: "4px 8px 10px",
}, },
{ {
name: "老年活动中心", name: "老年活动中心",
@ -918,8 +929,10 @@ const jbfwqTotal = ref([
bgColor: "#f4c243", bgColor: "#f4c243",
img: fwqbg5, img: fwqbg5,
img2: b1, img2: b1,
x:38, x: 38,
y:0, y: 0,
textColor: "#fff",
padding: "4px 8px 10px",
}, },
{ {
name: "残疾人之家", name: "残疾人之家",
@ -927,8 +940,10 @@ const jbfwqTotal = ref([
bgColor: "#f4c243", bgColor: "#f4c243",
img: fwqbg5, img: fwqbg5,
img2: b1, img2: b1,
x:35, x: 35,
y:0, y: 0,
textColor: "#fff",
padding: "4px 8px 10px",
}, },
{ {
name: "智慧篮球场", name: "智慧篮球场",
@ -936,8 +951,10 @@ const jbfwqTotal = ref([
bgColor: "#00b0f0", bgColor: "#00b0f0",
img: fwqbg2, img: fwqbg2,
img2: b3, img2: b3,
x:34, x: 34,
y:50, y: 50,
textColor: "#fff",
padding: "8px 8px 2px",
}, },
{ {
name: "慢行步道", name: "慢行步道",
@ -945,8 +962,10 @@ const jbfwqTotal = ref([
bgColor: "#00b0f0", bgColor: "#00b0f0",
img: fwqbg2, img: fwqbg2,
img2: b3, img2: b3,
x:26, x: 26,
y:50, y: 50,
textColor: "#fff",
padding: "8px 8px 2px",
}, },
{ {
name: "文化礼堂", name: "文化礼堂",
@ -954,8 +973,10 @@ const jbfwqTotal = ref([
bgColor: "#a1ce63", bgColor: "#a1ce63",
img: fwqbg6, img: fwqbg6,
img2: b4, img2: b4,
x:33, x: 33,
y:0, y: 0,
textColor: "#79B72B",
padding: "4px 8px 10px",
}, },
{ {
name: "综合文化站", name: "综合文化站",
@ -963,8 +984,10 @@ const jbfwqTotal = ref([
bgColor: "#a1ce63", bgColor: "#a1ce63",
img: fwqbg6, img: fwqbg6,
img2: b4, img2: b4,
x:35, x: 35,
y:0, y: 0,
textColor: "#79B72B",
padding: "4px 8px 10px",
}, },
{ {
name: "共享菜园", name: "共享菜园",
@ -972,8 +995,10 @@ const jbfwqTotal = ref([
bgColor: "#a1ce63", bgColor: "#a1ce63",
img: fwqbg6, img: fwqbg6,
img2: b4, img2: b4,
x:33, x: 33,
y:0, y: 0,
textColor: "#79B72B",
padding: "4px 8px 2px",
}, },
{ {
name: "零工市场", name: "零工市场",
@ -981,8 +1006,10 @@ const jbfwqTotal = ref([
bgColor: "#a1ce63", bgColor: "#a1ce63",
img: fwqbg6, img: fwqbg6,
img2: b4, img2: b4,
x:33, x: 33,
y:0, y: 0,
textColor: "#79B72B",
padding: "4px 8px 10px",
}, },
{ {
name: "溪口中心医院", name: "溪口中心医院",
@ -990,8 +1017,10 @@ const jbfwqTotal = ref([
bgColor: "#0070c0", bgColor: "#0070c0",
img: fwqbg3, img: fwqbg3,
img2: b5, img2: b5,
x:10, x: 10,
y:50, y: 50,
textColor: "#fff",
padding: "8px 8px 2px",
}, },
{ {
name: "溪口菜市场", name: "溪口菜市场",
@ -999,8 +1028,10 @@ const jbfwqTotal = ref([
bgColor: "#184e32", bgColor: "#184e32",
img: fwqbg4, img: fwqbg4,
img2: b6, img2: b6,
x:-24, x: -24,
y:50, y: 50,
textColor: "#fff",
padding: "8px 8px 2px",
}, },
{ {
name: "大型超市", name: "大型超市",
@ -1008,8 +1039,10 @@ const jbfwqTotal = ref([
bgColor: "#184e32", bgColor: "#184e32",
img: fwqbg4, img: fwqbg4,
img2: b6, img2: b6,
x:-24, x: -24,
y:50, y: 50,
textColor: "#fff",
padding: "8px 8px 2px",
}, },
{ {
name: "智慧停车场", name: "智慧停车场",
@ -1017,8 +1050,10 @@ const jbfwqTotal = ref([
bgColor: "#184e32", bgColor: "#184e32",
img: fwqbg4, img: fwqbg4,
img2: b6, img2: b6,
x:-28, x: -28,
y:50, y: 50,
textColor: "#fff",
padding: "8px 8px 2px",
}, },
{ {
name: "溪口镇便民服务中心", name: "溪口镇便民服务中心",
@ -1026,8 +1061,10 @@ const jbfwqTotal = ref([
bgColor: "#184e32", bgColor: "#184e32",
img: fwqbg4, img: fwqbg4,
img2: b6, img2: b6,
x:-40, x: -40,
y:50, y: 50,
textColor: "#fff",
padding: "8px 8px 2px",
}, },
], ],
}, },
@ -1221,7 +1258,7 @@ const jbfwqTotal = ref([
}, },
], ],
}, },
]);// ]); //
const fwqList = ref([]); const fwqList = ref([]);
// //
const yaosuTotal = ref([ const yaosuTotal = ref([
@ -1626,4 +1663,4 @@ onMounted(() => {
border-bottom: 2px dashed #ffffff; border-bottom: 2px dashed #ffffff;
} }
} }
</style> </style>

View File

@ -400,6 +400,9 @@ const rowState = (row) => {
.tableBox { .tableBox {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
:nth-child(3n).tableBoxTop {
margin-right: 0px;
}
.tableBoxTop { .tableBoxTop {
width: 510px; width: 510px;
height: 210px; height: 210px;
@ -409,7 +412,7 @@ const rowState = (row) => {
// background-color: pink; // background-color: pink;
padding: 15px 28px; padding: 15px 28px;
box-sizing: border-box; box-sizing: border-box;
margin-left: 20px; margin-right: 20px;
margin-bottom: 20px; margin-bottom: 20px;
.tableBoxTops { .tableBoxTops {
display: flex; display: flex;