Compare commits

..

2 Commits

Author SHA1 Message Date
姚宇浩 72526bec33 Merge branch 'main' of https://git.cityme.com.cn/xiangshan/ggfwjsc 2024-08-14 10:23:51 +08:00
姚宇浩 13ac4e9e27 gx 2024-08-14 10:23:47 +08:00
1 changed files with 63 additions and 63 deletions

View File

@ -232,7 +232,10 @@ import xcbg from "@/assets/images/map/xcbg.png";
import AED from "@/assets/images/map/AED.png"; import AED from "@/assets/images/map/AED.png";
import Dialog from "./dialog/dialogMapDp.vue"; import Dialog from "./dialog/dialogMapDp.vue";
import personDetail from "./person/index.vue"; import personDetail from "./person/index.vue";
import { ElLoading } from "element-plus";
//--------------- //---------------
//
var loading;
// //
const openD = ref(true); const openD = ref(true);
const message = ref({}); const message = ref({});
@ -958,8 +961,14 @@ const buten = async (item) => {
} }
} }
} else { } else {
getData(item.age); loading = ElLoading.service({
getDatas(cfJd.value, item.age); lock: true,
text: "加载中...",
background: "rgba(0, 0, 0, 0)",
});
await getData(item.age);
await getDatas(cfJd.value, item.age);
loading.close();
} }
}; };
//(name) //(name)
@ -996,6 +1005,11 @@ const buten2 = async (item) => {
} }
} }
} else { } else {
loading = ElLoading.service({
lock: true,
text: "加载中...",
background: "rgba(0, 0, 0, 0)",
});
getDataBqs(cfJd.value, cfCs.value, item.id); getDataBqs(cfJd.value, cfCs.value, item.id);
} }
}; };
@ -1420,7 +1434,8 @@ const getDataBq = async (jd, cs) => {
}; };
const getDataBqs = async (jd, cs, bq) => { const getDataBqs = async (jd, cs, bq) => {
await getDataBqJD(bq); await getDataBqJD(bq);
getDataBqs2(cfJd.value, cfCs.value, bq); await getDataBqs2(cfJd.value, cfCs.value, bq);
loading.close();
}; };
// //
const getDataBqs2 = async (jd, cs, bq) => { const getDataBqs2 = async (jd, cs, bq) => {
@ -2269,21 +2284,31 @@ const addPolygonCounty = () => {
}); });
map.addOverlay(polygon); map.addOverlay(polygon);
polygon.addEventListener("click", () => { polygon.addEventListener("click", async () => {
// townName.value = item.name; // townName.value = item.name;
if (item.name == cfJd.value) { if (item.name == cfJd.value) {
} else { } else {
loading = ElLoading.service({
lock: true,
text: "加载中...",
background: "rgba(0, 0, 0, 0)",
});
clear(); clear();
xkzDk.length = 0; xkzDk.length = 0;
cfJd.value = item.name; cfJd.value = item.name;
let jdCenter = []; let jdCenter = [];
// if (item.name == "") {
BMAP(); BMAP();
loadCs(item.name); loadCs(item.name);
addPolygonCountyCs(); addPolygonCountyCs();
getDataBq(cfJd.value, ""); mapTownCount.map((itemm) => {
if (itemm.name == item.name) {
jdCenter = itemm.center;
}
});
goMapCenter(jdCenter, 13);
await getDataBq(cfJd.value, "");
if (choose.value.person == "") { if (choose.value.person == "") {
getDatas(cfJd.value, ""); await getDatas(cfJd.value, "");
} }
if ( if (
choose.value.person == "残疾人" || choose.value.person == "残疾人" ||
@ -2296,13 +2321,13 @@ const addPolygonCounty = () => {
choose.value.person == "孤儿" || choose.value.person == "孤儿" ||
choose.value.person == "特困" choose.value.person == "特困"
) { ) {
getDataBqs2(cfJd.value, cfCs.value, choose.value.person); getDataBqs2(cfJd.value, cfCs.value, choose.value.person);
getDatas(cfJd.value, "", false); getDatas(cfJd.value, "", false);
} else if (choose.value.person != "") { } else if (choose.value.person != "") {
if (choose.value.person == "9999") { if (choose.value.person == "9999") {
getDatas(cfJd.value, ""); await getDatas(cfJd.value, "");
} else { } else {
getDatas(cfJd.value, choose.value.person); await getDatas(cfJd.value, choose.value.person);
} }
} }
if (title_jd.value == item.name) { if (title_jd.value == item.name) {
@ -2310,24 +2335,7 @@ const addPolygonCounty = () => {
title_jd.value = item.name; title_jd.value = item.name;
} }
mapTownCount.map((itemm) => { loading.close();
if (itemm.name == item.name) {
jdCenter = itemm.center;
}
});
goMapCenter(jdCenter, 13);
// }
// else {
// loadCs(item.name);
// addPolygonCountyCs();
// // map.removeEventListener("click", markera);
// // if (currentMarker !== null) {
// // map.removeOverlay(currentMarker);
// // }
// // clear();
// // getData();
// // getDataBq();
// }
} }
}); });
} }
@ -2530,8 +2538,12 @@ const addPolygonCountyCs = () => {
zIndex: 99, zIndex: 99,
}); });
map.addOverlay(cs_qk_arr.value[index]); map.addOverlay(cs_qk_arr.value[index]);
cs_qk_arr.value[index].addEventListener("click", () => { cs_qk_arr.value[index].addEventListener("click", async () => {
// console.log("", item.name); loading = ElLoading.service({
lock: true,
text: "数据加载中...",
background: "rgba(0, 0, 0, 0)",
});
cs_dd_arr.value = []; cs_dd_arr.value = [];
cfCs.value = item.name; cfCs.value = item.name;
title_cs.value = item.name; title_cs.value = item.name;
@ -2551,6 +2563,8 @@ const addPolygonCountyCs = () => {
unChooseList.value.push(itemm); unChooseList.value.push(itemm);
} }
}); });
addCsChoose();
addCsUnChoose();
cs_qk_arr.value.forEach((item, index) => { cs_qk_arr.value.forEach((item, index) => {
map.removeOverlay(cs_qk_arr.value[index]); map.removeOverlay(cs_qk_arr.value[index]);
}); });
@ -2560,7 +2574,7 @@ const addPolygonCountyCs = () => {
cs_number_name_arr.value.forEach((item, index) => { cs_number_name_arr.value.forEach((item, index) => {
map.removeOverlay(cs_number_name_arr.value[index]); map.removeOverlay(cs_number_name_arr.value[index]);
}); });
getDataBq(cfJd.value, cfCs.value); await getDataBq(cfJd.value, cfCs.value);
if ( if (
choose.value.person == "残疾人" || choose.value.person == "残疾人" ||
choose.value.person == "低边" || choose.value.person == "低边" ||
@ -2572,29 +2586,13 @@ const addPolygonCountyCs = () => {
choose.value.person == "孤儿" || choose.value.person == "孤儿" ||
choose.value.person == "特困" choose.value.person == "特困"
) { ) {
getDataBqs3(cfJd.value, cfCs.value, choose.value.person); await getDataBqs3(cfJd.value, cfCs.value, choose.value.person);
} else { } else {
// getDataBqs(cfJd.value, cfCs.value);
} }
//
// if (choose.value.person == 1) { await getDatas2(cfJd.value, choose.value.person, cfCs.value);
// getDatas2(cfJd.value, "0", cfCs.value); //0
// } else { loading.close();
// getDatas2(cfJd.value, choose.value.person - 1, cfCs.value);
// }
getDatas2(cfJd.value, choose.value.person, cfCs.value);
// getDatas2(cfJd.value, choose.value.person, cfCs.value);
addCsChoose();
addCsUnChoose();
// if (choose.value.person == "") {
// cs_dd_arr.value.map((item, index) => {
// DGcreateCs(item, index);
// });
// } else {
// cs_dd_arr.value.map((item, index) => {
// DGcreateCs2(item, index);
// });
// }
}); });
} }
}); });
@ -2641,7 +2639,12 @@ const addCsUnChoose = () => {
zIndex: 99, zIndex: 99,
}); });
map.addOverlay(cs_un_choose_arr.value[index]); map.addOverlay(cs_un_choose_arr.value[index]);
cs_un_choose_arr.value[index].addEventListener("click", () => { cs_un_choose_arr.value[index].addEventListener("click", async () => {
loading = ElLoading.service({
lock: true,
text: "数据加载中...",
background: "rgba(0, 0, 0, 0)",
});
cfCs.value = item.name; cfCs.value = item.name;
title_cs.value = cfCs.value; title_cs.value = cfCs.value;
sfdd.value = true; sfdd.value = true;
@ -2671,11 +2674,10 @@ const addCsUnChoose = () => {
unChooseList.value.push(itemm); unChooseList.value.push(itemm);
} }
}); });
addCsChoose();
getDataBq(cfJd.value, cfCs.value); addCsUnChoose();
await getDataBq(cfJd.value, cfCs.value);
getDatas2(cfJd.value, choose.value.person, cfCs.value); await getDatas2(cfJd.value, choose.value.person, cfCs.value);
if ( if (
choose.value.person == "残疾人" || choose.value.person == "残疾人" ||
choose.value.person == "低边" || choose.value.person == "低边" ||
@ -2687,11 +2689,9 @@ const addCsUnChoose = () => {
choose.value.person == "孤儿" || choose.value.person == "孤儿" ||
choose.value.person == "特困" choose.value.person == "特困"
) { ) {
getDataBqs3(cfJd.value, cfCs.value, choose.value.person); await getDataBqs3(cfJd.value, cfCs.value, choose.value.person);
} }
loading.close();
addCsChoose();
addCsUnChoose();
}); });
} }
}); });