+
{{ item.name }}
@@ -80,6 +111,7 @@ import {
watch,
nextTick,
} from "vue";
+import initializeMap from "@/utils/mapInitializer.js";
import http from "@/utils/request.js";
import mapTown from "@/assets/json/ly.json";
import xkz from "@/assets/json/xkz.json";
@@ -531,9 +563,17 @@ const addPolygonCounty = () => {
if (choose.value.person == 0) {
getDatas("溪口镇", "");
getDataBq(cfJd.value, "");
- } else if (choose.value.person == "cjr" || choose.value.person == "dibian" || choose.value.person == "db" || choose.value.person == "gxy" || choose.value.person == "tnb" || choose.value.person == "tyjr" || choose.value.person == "kjer") {
+ } else if (
+ choose.value.person == "cjr" ||
+ choose.value.person == "dibian" ||
+ choose.value.person == "db" ||
+ choose.value.person == "gxy" ||
+ choose.value.person == "tnb" ||
+ choose.value.person == "tyjr" ||
+ choose.value.person == "kjer"
+ ) {
getDataBq(cfJd.value, "");
- getDataBqs2(cfJd.value, '', choose.value.person,);
+ getDataBqs2(cfJd.value, "", choose.value.person);
console.log(3);
} else {
console.log(4);
@@ -602,8 +642,8 @@ const addPolygonCounty = () => {
}
});
};
-//添加街道名
+//添加街道名
const addJd = () => {
mapTownCount.map((item, index) => {
createCustomOverlayJd(item, index);
@@ -615,7 +655,7 @@ const addJd2 = () => {
mapTownCount.map((item, index) => {
createCustomOverlayJd2(item, index);
});
- })
+ });
// if (center_now.value[0] == 119.178783) {
// goMapCenter([119.178783, 29.034581], 11);
@@ -698,14 +738,21 @@ const addPolygonCountyCs = () => {
DGcreateCs2(item, index);
});
}
- if (choose.value.person == "cjr" || choose.value.person == "dibian" || choose.value.person == "db" || choose.value.person == "gxy" || choose.value.person == "tnb" || choose.value.person == "tyjr" || choose.value.person == "kjer") {
- console.log(1, '溪口镇');
- getDataBqs2(cfJd.value, cfCs.value, '');
+ if (
+ choose.value.person == "cjr" ||
+ choose.value.person == "dibian" ||
+ choose.value.person == "db" ||
+ choose.value.person == "gxy" ||
+ choose.value.person == "tnb" ||
+ choose.value.person == "tyjr" ||
+ choose.value.person == "kjer"
+ ) {
+ console.log(1, "溪口镇");
+ getDataBqs2(cfJd.value, cfCs.value, "");
} else {
- console.log(2, '溪口镇');
-
- getDatas2('溪口镇', choose.value.person, cfCs.value);
+ console.log(2, "溪口镇");
+ getDatas2("溪口镇", choose.value.person, cfCs.value);
}
addCsChoose();
addCsUnChoose();
@@ -911,9 +958,17 @@ const createCustomOverlayJd2 = (polygon, indexx) => {
let num = "";
if (choose.value.person == "6666") {
num = "swrs";
- } if (choose.value.person == "cjr" || choose.value.person == "dibian" || choose.value.person == "db" || choose.value.person == "gxy" || choose.value.person == "tnb" || choose.value.person == "tyjr" || choose.value.person == "kjer") {
+ }
+ if (
+ choose.value.person == "cjr" ||
+ choose.value.person == "dibian" ||
+ choose.value.person == "db" ||
+ choose.value.person == "gxy" ||
+ choose.value.person == "tnb" ||
+ choose.value.person == "tyjr" ||
+ choose.value.person == "kjer"
+ ) {
num = "numbers";
-
} else {
num = "number";
}
@@ -928,7 +983,6 @@ const createCustomOverlayJd2 = (polygon, indexx) => {
},
});
map.addOverlay(jdm_number_arr.value[indexx]);
-
};
//创建村社
const addCs = () => {
@@ -993,9 +1047,17 @@ const createCs2 = (polygon, indexx) => {
let num = "";
if (choose.value.person == "6666") {
num = "swrs";
- } if (choose.value.person == "cjr" || choose.value.person == "dibian" || choose.value.person == "db" || choose.value.person == "gxy" || choose.value.person == "tnb" || choose.value.person == "tyjr" || choose.value.person == "kjer") {
+ }
+ if (
+ choose.value.person == "cjr" ||
+ choose.value.person == "dibian" ||
+ choose.value.person == "db" ||
+ choose.value.person == "gxy" ||
+ choose.value.person == "tnb" ||
+ choose.value.person == "tyjr" ||
+ choose.value.person == "kjer"
+ ) {
num = "numbers";
-
} else {
num = "number";
}
@@ -1173,9 +1235,17 @@ const DGcreateCs2 = (polygon, indexx) => {
let num = "";
if (choose.value.person == "6666") {
num = "swrs";
- } if (choose.value.person == "cjr" || choose.value.person == "dibian" || choose.value.person == "db" || choose.value.person == "gxy" || choose.value.person == "tnb" || choose.value.person == "tyjr" || choose.value.person == "kjer") {
+ }
+ if (
+ choose.value.person == "cjr" ||
+ choose.value.person == "dibian" ||
+ choose.value.person == "db" ||
+ choose.value.person == "gxy" ||
+ choose.value.person == "tnb" ||
+ choose.value.person == "tyjr" ||
+ choose.value.person == "kjer"
+ ) {
num = "numbers";
-
} else {
num = "number";
}
@@ -1367,7 +1437,7 @@ const changebq = (id) => {
// choose.value.person = id;
};
//基本公共服务圈点击
-const changeFwq = (id, list, center) => {
+const changeFwq = (id, list, center, name, names) => {
if (choose.value.fwq == id) {
// chooseArr.value = chooseArr.value.filter((item) => item !== "fwq");
choose.value.fwq = 9999;
@@ -1384,6 +1454,7 @@ const changeFwq = (id, list, center) => {
} else {
choose.value.fwq = id;
fwqList.value = list;
+ getServiceCircle(names, name);
// 清空地图上所有的覆盖物
console.log(22);
map.clearOverlays();
@@ -2126,8 +2197,38 @@ const buten = async (item) => {
const buten2 = async (item) => {
// getDataBq(item.id, item.age);
// getDatas("溪口镇", item.age);
+ // map.removeOverlay(marker1);
getDataBqs(cfJd.value, cfCs.value, item.id);
};
+const updateFwqList = (data, townName, communityName) => {
+ data.forEach((item) => {
+ if (item.csq === communityName) {
+ item.fwqList = data.map((item1) => ({
+ name: item1.zyysmc,
+ point: [item1.jd, item1.wd],
+ bgColor: "#00b050",
+ img: fwqbg1,
+ img2: b2,
+ x: 33,
+ y: 0,
+ textColor: "#fff",
+ padding: "4px 8px 10px",
+ }));
+ }
+ });
+};
+const getServiceCircle = async (communityName, townName) => {
+ try {
+ const response = await http.get(`/api/ggfwyth/ysyzt/zyysxx?csq=${communityName}&xzjd=${townName}`);
+ if (response.code === 200) {
+ console.log(response.data);
+ updateFwqList(response.data, townName, communityName);
+ }
+ } catch (error) {
+ console.error("Error fetching data:", error);
+ }
+};
+
//获取人口数
const getData = async (i, e) => {
await http
@@ -2285,8 +2386,16 @@ const getDatas = async (e, i) => {
});
};
const getDatas2 = async (e, i, cs) => {
- if (i == "cjr" || i == "dibian" || i == "db" || i == "gxy" || i == "tnb" || i == "tyjr" || i == "kjer") {
- i = ''
+ if (
+ i == "cjr" ||
+ i == "dibian" ||
+ i == "db" ||
+ i == "gxy" ||
+ i == "tnb" ||
+ i == "tyjr" ||
+ i == "kjer"
+ ) {
+ i = "";
}
await http
.get(
@@ -2367,7 +2476,6 @@ const getDataBqs = async (jd, cs, bq) => {
data = {
xzjd: jd,
tsbq: bq,
-
};
vv = 2;
} else {
@@ -2388,12 +2496,11 @@ const getDataBqs = async (jd, cs, bq) => {
}
});
});
- console.log(mapTownCount, 'mapTownCount');
+ console.log(mapTownCount, "mapTownCount");
changeRs2(bq);
if (jd) {
addCs2();
}
-
}
});
};
@@ -2514,13 +2621,17 @@ onMounted(() => {
bottom: 0;
width: 520px;
height: 960px;
- background: linear-gradient(270deg,
+ background: linear-gradient(
+ 270deg,
rgba(0, 52, 131, 0.69) 0%,
rgba(0, 32, 83, 0.77) 50%,
- rgba(0, 60, 131, 0.74) 100%),
- radial-gradient(128% 99% at 100% 46%,
+ rgba(0, 60, 131, 0.74) 100%
+ ),
+ radial-gradient(
+ 128% 99% at 100% 46%,
rgba(0, 48, 125, 0.29) 0%,
- rgba(0, 61, 134, 0.42) 100%);
+ rgba(0, 61, 134, 0.42) 100%
+ );
box-shadow: inset 0px 0px 56px 0px rgba(173, 221, 255, 0.5);
backdrop-filter: blur(3px);
padding: 30px 26px;
@@ -2692,13 +2803,17 @@ onMounted(() => {
bottom: 0;
width: 520px;
height: 960px;
- background: linear-gradient(270deg,
+ background: linear-gradient(
+ 270deg,
rgba(0, 52, 131, 0.69) 0%,
rgba(0, 32, 83, 0.77) 50%,
- rgba(0, 60, 131, 0.74) 100%),
- radial-gradient(128% 99% at 100% 46%,
+ rgba(0, 60, 131, 0.74) 100%
+ ),
+ radial-gradient(
+ 128% 99% at 100% 46%,
rgba(0, 48, 125, 0.29) 0%,
- rgba(0, 61, 134, 0.42) 100%);
+ rgba(0, 61, 134, 0.42) 100%
+ );
box-shadow: inset 0px 0px 56px 0px rgba(173, 221, 255, 0.5);
backdrop-filter: blur(3px);
padding: 30px 26px;
@@ -2856,10 +2971,12 @@ onMounted(() => {
// line-height: 44px;
letter-spacing: 4px;
margin-bottom: 15px;
- background: linear-gradient(180deg,
- #ffffff 0%,
- #ffffff 40%,
- #00ffff 100%);
+ background: linear-gradient(
+ 180deg,
+ #ffffff 0%,
+ #ffffff 40%,
+ #00ffff 100%
+ );
/* 使文字没有背景颜色的背景 */
background-clip: text;
/* 为了兼容性,添加渐变背景到IE */