This commit is contained in:
姚宇浩 2024-08-14 10:23:47 +08:00
parent 45b8e12b13
commit 13ac4e9e27
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 Dialog from "./dialog/dialogMapDp.vue";
import personDetail from "./person/index.vue";
import { ElLoading } from "element-plus";
//---------------
//
var loading;
//
const openD = ref(true);
const message = ref({});
@ -958,8 +961,14 @@ const buten = async (item) => {
}
}
} else {
getData(item.age);
getDatas(cfJd.value, item.age);
loading = ElLoading.service({
lock: true,
text: "加载中...",
background: "rgba(0, 0, 0, 0)",
});
await getData(item.age);
await getDatas(cfJd.value, item.age);
loading.close();
}
};
//(name)
@ -996,6 +1005,11 @@ const buten2 = async (item) => {
}
}
} else {
loading = ElLoading.service({
lock: true,
text: "加载中...",
background: "rgba(0, 0, 0, 0)",
});
getDataBqs(cfJd.value, cfCs.value, item.id);
}
};
@ -1420,7 +1434,8 @@ const getDataBq = async (jd, cs) => {
};
const getDataBqs = async (jd, cs, 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) => {
@ -2269,21 +2284,31 @@ const addPolygonCounty = () => {
});
map.addOverlay(polygon);
polygon.addEventListener("click", () => {
polygon.addEventListener("click", async () => {
// townName.value = item.name;
if (item.name == cfJd.value) {
} else {
loading = ElLoading.service({
lock: true,
text: "加载中...",
background: "rgba(0, 0, 0, 0)",
});
clear();
xkzDk.length = 0;
cfJd.value = item.name;
let jdCenter = [];
// if (item.name == "") {
BMAP();
loadCs(item.name);
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 == "") {
getDatas(cfJd.value, "");
await getDatas(cfJd.value, "");
}
if (
choose.value.person == "残疾人" ||
@ -2300,9 +2325,9 @@ const addPolygonCounty = () => {
getDatas(cfJd.value, "", false);
} else if (choose.value.person != "") {
if (choose.value.person == "9999") {
getDatas(cfJd.value, "");
await getDatas(cfJd.value, "");
} else {
getDatas(cfJd.value, choose.value.person);
await getDatas(cfJd.value, choose.value.person);
}
}
if (title_jd.value == item.name) {
@ -2310,24 +2335,7 @@ const addPolygonCounty = () => {
title_jd.value = item.name;
}
mapTownCount.map((itemm) => {
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();
// }
loading.close();
}
});
}
@ -2530,8 +2538,12 @@ const addPolygonCountyCs = () => {
zIndex: 99,
});
map.addOverlay(cs_qk_arr.value[index]);
cs_qk_arr.value[index].addEventListener("click", () => {
// console.log("", item.name);
cs_qk_arr.value[index].addEventListener("click", async () => {
loading = ElLoading.service({
lock: true,
text: "数据加载中...",
background: "rgba(0, 0, 0, 0)",
});
cs_dd_arr.value = [];
cfCs.value = item.name;
title_cs.value = item.name;
@ -2551,6 +2563,8 @@ const addPolygonCountyCs = () => {
unChooseList.value.push(itemm);
}
});
addCsChoose();
addCsUnChoose();
cs_qk_arr.value.forEach((item, index) => {
map.removeOverlay(cs_qk_arr.value[index]);
});
@ -2560,7 +2574,7 @@ const addPolygonCountyCs = () => {
cs_number_name_arr.value.forEach((item, index) => {
map.removeOverlay(cs_number_name_arr.value[index]);
});
getDataBq(cfJd.value, cfCs.value);
await getDataBq(cfJd.value, cfCs.value);
if (
choose.value.person == "残疾人" ||
choose.value.person == "低边" ||
@ -2572,29 +2586,13 @@ const addPolygonCountyCs = () => {
choose.value.person == "孤儿" ||
choose.value.person == "特困"
) {
getDataBqs3(cfJd.value, cfCs.value, choose.value.person);
await getDataBqs3(cfJd.value, cfCs.value, choose.value.person);
} else {
// getDataBqs(cfJd.value, cfCs.value);
}
//
// if (choose.value.person == 1) {
// getDatas2(cfJd.value, "0", cfCs.value); //0
// } else {
// 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);
// });
// }
await getDatas2(cfJd.value, choose.value.person, cfCs.value);
loading.close();
});
}
});
@ -2641,7 +2639,12 @@ const addCsUnChoose = () => {
zIndex: 99,
});
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;
title_cs.value = cfCs.value;
sfdd.value = true;
@ -2671,11 +2674,10 @@ const addCsUnChoose = () => {
unChooseList.value.push(itemm);
}
});
getDataBq(cfJd.value, cfCs.value);
getDatas2(cfJd.value, choose.value.person, cfCs.value);
addCsChoose();
addCsUnChoose();
await getDataBq(cfJd.value, cfCs.value);
await getDatas2(cfJd.value, choose.value.person, cfCs.value);
if (
choose.value.person == "残疾人" ||
choose.value.person == "低边" ||
@ -2687,11 +2689,9 @@ const addCsUnChoose = () => {
choose.value.person == "孤儿" ||
choose.value.person == "特困"
) {
getDataBqs3(cfJd.value, cfCs.value, choose.value.person);
await getDataBqs3(cfJd.value, cfCs.value, choose.value.person);
}
addCsChoose();
addCsUnChoose();
loading.close();
});
}
});