diff --git a/src/view/sy_map.vue b/src/view/sy_map.vue index cad8917..5122f67 100644 --- a/src/view/sy_map.vue +++ b/src/view/sy_map.vue @@ -299,11 +299,9 @@ const addPolygonCounty = () => { }; //添加街道名 const addJd = () => { - mapTownCount.map((item) => { createCustomOverlayJd(item); }); - }; //添加街道名2含数量 const addJd2 = () => { @@ -487,8 +485,8 @@ const createCustomOverlay = (polygon) => { content.style.zIndex = BMapGL.Overlay.getZIndex(this.point.lat); var div = document.createElement("div"); - div.style.color = "#333"; - div.style.padding = "6px 8px"; + div.style.color = "#ddd"; + div.style.padding = `${polygon.padding}`; div.style.whiteSpace = "nowrap"; div.style.MozUserSelect = "none"; div.style.fontSize = "12px"; @@ -505,7 +503,7 @@ const createCustomOverlay = (polygon) => { title.style.fontSize = "14px"; title.style.fontWeight = "700"; title.style.marginLeft = "0px"; - title.style.color = "#ddd"; + title.style.color = `${polygon.textColor}`; div.appendChild(title); title.appendChild(document.createTextNode(this.properties.title)); @@ -583,7 +581,7 @@ const xuanran = () => { if (chooseArr.value.includes("person")) { console.log(3434); addJd2(); - }else{ + } else { addJd(); } if (chooseArr.value.includes("fwq")) { @@ -635,11 +633,11 @@ const changeFwq = (id, list, center) => { fwqList.value = list; removeAllPolygon("fwq"); xuanran(); - console.log(1111111111,center); + console.log(1111111111, center); setTimeout(() => { goMapCenter(center, 17); }, 500); - + // addggfwq() } @@ -864,8 +862,11 @@ const jbfwqTotal = ref([ bgColor: "#00b050", img: fwqbg1, img2: b2, - x:33, - y:0, + x: 33, + y: 0, + textColor: "#fff", + + padding: "4px 8px 10px", }, { name: "衢州学院附属幼儿园", @@ -873,8 +874,10 @@ const jbfwqTotal = ref([ bgColor: "#00b050", img: fwqbg1, img2: b2, - x:55, - y:0, + x: 55, + y: 0, + textColor: "#fff", + padding: "4px 8px 10px", }, { name: "溪口中银小学", @@ -882,8 +885,10 @@ const jbfwqTotal = ref([ bgColor: "#00b050", img: fwqbg1, img2: b2, - x:38, - y:0, + x: 38, + y: 0, + textColor: "#fff", + padding: "4px 8px 10px", }, { name: "溪口初中", @@ -891,8 +896,10 @@ const jbfwqTotal = ref([ bgColor: "#00b050", img: fwqbg1, img2: b2, - x:33, - y:0, + x: 33, + y: 0, + textColor: "#fff", + padding: "4px 8px 10px", }, { name: "居家养老中心", @@ -900,8 +907,10 @@ const jbfwqTotal = ref([ bgColor: "#f4c243", img: fwqbg5, img2: b1, - x:38, - y:0, + x: 38, + y: 0, + textColor: "#fff", + padding: "4px 8px 10px", }, { name: "共享食堂", @@ -909,8 +918,10 @@ const jbfwqTotal = ref([ bgColor: "#f4c243", img: fwqbg5, img2: b1, - x:33, - y:0, + x: 33, + y: 0, + textColor: "#fff", + padding: "4px 8px 10px", }, { name: "老年活动中心", @@ -918,8 +929,10 @@ const jbfwqTotal = ref([ bgColor: "#f4c243", img: fwqbg5, img2: b1, - x:38, - y:0, + x: 38, + y: 0, + textColor: "#fff", + padding: "4px 8px 10px", }, { name: "残疾人之家", @@ -927,8 +940,10 @@ const jbfwqTotal = ref([ bgColor: "#f4c243", img: fwqbg5, img2: b1, - x:35, - y:0, + x: 35, + y: 0, + textColor: "#fff", + padding: "4px 8px 10px", }, { name: "智慧篮球场", @@ -936,8 +951,10 @@ const jbfwqTotal = ref([ bgColor: "#00b0f0", img: fwqbg2, img2: b3, - x:34, - y:50, + x: 34, + y: 50, + textColor: "#fff", + padding: "8px 8px 2px", }, { name: "慢行步道", @@ -945,8 +962,10 @@ const jbfwqTotal = ref([ bgColor: "#00b0f0", img: fwqbg2, img2: b3, - x:26, - y:50, + x: 26, + y: 50, + textColor: "#fff", + padding: "8px 8px 2px", }, { name: "文化礼堂", @@ -954,8 +973,10 @@ const jbfwqTotal = ref([ bgColor: "#a1ce63", img: fwqbg6, img2: b4, - x:33, - y:0, + x: 33, + y: 0, + textColor: "#79B72B", + padding: "4px 8px 10px", }, { name: "综合文化站", @@ -963,8 +984,10 @@ const jbfwqTotal = ref([ bgColor: "#a1ce63", img: fwqbg6, img2: b4, - x:35, - y:0, + x: 35, + y: 0, + textColor: "#79B72B", + padding: "4px 8px 10px", }, { name: "共享菜园", @@ -972,8 +995,10 @@ const jbfwqTotal = ref([ bgColor: "#a1ce63", img: fwqbg6, img2: b4, - x:33, - y:0, + x: 33, + y: 0, + textColor: "#79B72B", + padding: "4px 8px 2px", }, { name: "零工市场", @@ -981,8 +1006,10 @@ const jbfwqTotal = ref([ bgColor: "#a1ce63", img: fwqbg6, img2: b4, - x:33, - y:0, + x: 33, + y: 0, + textColor: "#79B72B", + padding: "4px 8px 10px", }, { name: "溪口中心医院", @@ -990,8 +1017,10 @@ const jbfwqTotal = ref([ bgColor: "#0070c0", img: fwqbg3, img2: b5, - x:10, - y:50, + x: 10, + y: 50, + textColor: "#fff", + padding: "8px 8px 2px", }, { name: "溪口菜市场", @@ -999,8 +1028,10 @@ const jbfwqTotal = ref([ bgColor: "#184e32", img: fwqbg4, img2: b6, - x:-24, - y:50, + x: -24, + y: 50, + textColor: "#fff", + padding: "8px 8px 2px", }, { name: "大型超市", @@ -1008,8 +1039,10 @@ const jbfwqTotal = ref([ bgColor: "#184e32", img: fwqbg4, img2: b6, - x:-24, - y:50, + x: -24, + y: 50, + textColor: "#fff", + padding: "8px 8px 2px", }, { name: "智慧停车场", @@ -1017,8 +1050,10 @@ const jbfwqTotal = ref([ bgColor: "#184e32", img: fwqbg4, img2: b6, - x:-28, - y:50, + x: -28, + y: 50, + textColor: "#fff", + padding: "8px 8px 2px", }, { name: "溪口镇便民服务中心", @@ -1026,8 +1061,10 @@ const jbfwqTotal = ref([ bgColor: "#184e32", img: fwqbg4, img2: b6, - x:-40, - y:50, + x: -40, + y: 50, + textColor: "#fff", + padding: "8px 8px 2px", }, ], }, @@ -1221,7 +1258,7 @@ const jbfwqTotal = ref([ }, ], }, -]);//存放地图上服务圈数据 +]); //存放地图上服务圈数据 const fwqList = ref([]); //资源要素 const yaosuTotal = ref([ @@ -1626,4 +1663,4 @@ onMounted(() => { border-bottom: 2px dashed #ffffff; } } - \ No newline at end of file + diff --git a/src/view/sy_table.vue b/src/view/sy_table.vue index 8e896a5..64d9a0a 100644 --- a/src/view/sy_table.vue +++ b/src/view/sy_table.vue @@ -400,6 +400,9 @@ const rowState = (row) => { .tableBox { display: flex; flex-wrap: wrap; + :nth-child(3n).tableBoxTop { + margin-right: 0px; + } .tableBoxTop { width: 510px; height: 210px; @@ -409,7 +412,7 @@ const rowState = (row) => { // background-color: pink; padding: 15px 28px; box-sizing: border-box; - margin-left: 20px; + margin-right: 20px; margin-bottom: 20px; .tableBoxTops { display: flex;