gxcs
This commit is contained in:
parent
8f52a5c27d
commit
042a7962d7
|
@ -154,6 +154,8 @@ const sfdd = ref(false);
|
||||||
const xuanzhongCs = ref([]);
|
const xuanzhongCs = ref([]);
|
||||||
//存放街道
|
//存放街道
|
||||||
const cfJd = ref("");
|
const cfJd = ref("");
|
||||||
|
//存放村社
|
||||||
|
const cfCs = ref("");
|
||||||
//村社颜色列表
|
//村社颜色列表
|
||||||
const colorList = [
|
const colorList = [
|
||||||
{
|
{
|
||||||
|
@ -189,7 +191,8 @@ const csh = () => {
|
||||||
xuanzhongCs.value = [];
|
xuanzhongCs.value = [];
|
||||||
sfdd.value = false;
|
sfdd.value = false;
|
||||||
title_choose.value = "";
|
title_choose.value = "";
|
||||||
cfjiedao.value = "";
|
cfJd.value = "";
|
||||||
|
cfCs.value = "";
|
||||||
cs_un_choose_arr.value.forEach((item, index) => {
|
cs_un_choose_arr.value.forEach((item, index) => {
|
||||||
map.removeOverlay(cs_un_choose_arr.value[index]);
|
map.removeOverlay(cs_un_choose_arr.value[index]);
|
||||||
});
|
});
|
||||||
|
@ -364,7 +367,7 @@ const xkzCenter = reactive([
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "大阳家村",
|
name: "大阳家村",
|
||||||
center: [119.16442376733693, 28.89890581872806],
|
center: [119.16442376733693, 29.89890581872806],
|
||||||
number: "50",
|
number: "50",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -478,14 +481,15 @@ const addPolygonCounty = () => {
|
||||||
// console.log(2);
|
// console.log(2);
|
||||||
|
|
||||||
// jrcs.value=true;
|
// jrcs.value=true;
|
||||||
if (item.name == cfjiedao.value) {
|
if (item.name == cfJd.value) {
|
||||||
// console.log(2222);
|
// console.log(2222);
|
||||||
} else {
|
} else {
|
||||||
// console.log(111);
|
// console.log(111);
|
||||||
cfjiedao.value = item.name;
|
cfJd.value = item.name;
|
||||||
let jdCenter = [];
|
let jdCenter = [];
|
||||||
if (item.name == "溪口镇") {
|
if (item.name == "溪口镇") {
|
||||||
BMAP();
|
BMAP();
|
||||||
|
getDatas("溪口镇", choose.value.person);
|
||||||
if (!title_choose.value.includes("溪口镇")) {
|
if (!title_choose.value.includes("溪口镇")) {
|
||||||
title_choose.value = title_choose.value + `>${item.name}`;
|
title_choose.value = title_choose.value + `>${item.name}`;
|
||||||
}
|
}
|
||||||
|
@ -536,10 +540,10 @@ const addPolygonCounty = () => {
|
||||||
// cs_un_choose_arr.value = [];
|
// cs_un_choose_arr.value = [];
|
||||||
// cs_dd_arr.value = [];
|
// cs_dd_arr.value = [];
|
||||||
cfJd.value = "";
|
cfJd.value = "";
|
||||||
|
cfCs.value = "";
|
||||||
xuanzhongCs.value = [];
|
xuanzhongCs.value = [];
|
||||||
sfdd.value = false;
|
sfdd.value = false;
|
||||||
title_choose.value = "";
|
title_choose.value = "";
|
||||||
cfjiedao.value = "";
|
|
||||||
cs_un_choose_arr.value.forEach((item, index) => {
|
cs_un_choose_arr.value.forEach((item, index) => {
|
||||||
map.removeOverlay(cs_un_choose_arr.value[index]);
|
map.removeOverlay(cs_un_choose_arr.value[index]);
|
||||||
});
|
});
|
||||||
|
@ -636,9 +640,9 @@ const addPolygonCountyCs = () => {
|
||||||
});
|
});
|
||||||
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", () => {
|
||||||
|
cfCs.value = item.name;
|
||||||
|
console.log("cfCs.value", cfCs.value);
|
||||||
sfdd.value = true;
|
sfdd.value = true;
|
||||||
console.log(66666666, item.name);
|
|
||||||
console.log(111, xkzDk);
|
|
||||||
xkzCenter.forEach((a, b) => {
|
xkzCenter.forEach((a, b) => {
|
||||||
if (a.name == item.name) {
|
if (a.name == item.name) {
|
||||||
cs_dd_arr.value.push(a);
|
cs_dd_arr.value.push(a);
|
||||||
|
@ -673,7 +677,7 @@ const addPolygonCountyCs = () => {
|
||||||
DGcreateCs2(item, index);
|
DGcreateCs2(item, index);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
getDatas2(cfJd.value, choose.value.person, cfCs.value);
|
||||||
console.log("chooseCsList.value", chooseCsList.value);
|
console.log("chooseCsList.value", chooseCsList.value);
|
||||||
console.log("unChooseList.value", unChooseList.value);
|
console.log("unChooseList.value", unChooseList.value);
|
||||||
addCsChoose();
|
addCsChoose();
|
||||||
|
@ -726,6 +730,7 @@ const addCsUnChoose = () => {
|
||||||
});
|
});
|
||||||
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", () => {
|
||||||
|
cfCs.value = item.name;
|
||||||
sfdd.value = true;
|
sfdd.value = true;
|
||||||
cs_dd_arr.value.forEach((item, index) => {
|
cs_dd_arr.value.forEach((item, index) => {
|
||||||
map.removeOverlay(cs_dd_arr.value[index]);
|
map.removeOverlay(cs_dd_arr.value[index]);
|
||||||
|
@ -768,6 +773,7 @@ const addCsUnChoose = () => {
|
||||||
DGcreateCs2(item, index);
|
DGcreateCs2(item, index);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
getDatas2(cfJd.value, choose.value.person, cfCs.value);
|
||||||
addCsChoose();
|
addCsChoose();
|
||||||
addCsUnChoose();
|
addCsUnChoose();
|
||||||
});
|
});
|
||||||
|
@ -823,7 +829,7 @@ const createCustomOverlayJd2 = (polygon, indexx) => {
|
||||||
content.style.flexDirection = "column";
|
content.style.flexDirection = "column";
|
||||||
content.style.alignItems = "center";
|
content.style.alignItems = "center";
|
||||||
content.style.zIndex = BMapGL.Overlay.getZIndex(this.point.lat);
|
content.style.zIndex = BMapGL.Overlay.getZIndex(this.point.lat);
|
||||||
content.style.height = "30px";
|
content.style.height = "30px";
|
||||||
content.style.width = "30px";
|
content.style.width = "30px";
|
||||||
var div = document.createElement("div");
|
var div = document.createElement("div");
|
||||||
div.style.color = "#333";
|
div.style.color = "#333";
|
||||||
|
@ -901,8 +907,8 @@ const createCs2 = (polygon, indexx) => {
|
||||||
content.style.flexDirection = "column";
|
content.style.flexDirection = "column";
|
||||||
content.style.alignItems = "center";
|
content.style.alignItems = "center";
|
||||||
content.style.zIndex = BMapGL.Overlay.getZIndex(this.point.lat);
|
content.style.zIndex = BMapGL.Overlay.getZIndex(this.point.lat);
|
||||||
content.style.height = "45px";
|
content.style.height = "60px";
|
||||||
content.style.width = "45px";
|
content.style.width = "60px";
|
||||||
var div = document.createElement("div");
|
var div = document.createElement("div");
|
||||||
div.style.color = "#333";
|
div.style.color = "#333";
|
||||||
div.style.whiteSpace = "nowrap";
|
div.style.whiteSpace = "nowrap";
|
||||||
|
@ -962,8 +968,8 @@ const createCs = (polygon, indexx) => {
|
||||||
content.style.display = "flex";
|
content.style.display = "flex";
|
||||||
content.style.flexDirection = "column";
|
content.style.flexDirection = "column";
|
||||||
content.style.alignItems = "center";
|
content.style.alignItems = "center";
|
||||||
content.style.height = "45px";
|
content.style.height = "60px";
|
||||||
content.style.width = "45px";
|
content.style.width = "60px";
|
||||||
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");
|
||||||
|
@ -1016,8 +1022,8 @@ const DGcreateCs = (polygon, indexx) => {
|
||||||
content.style.display = "flex";
|
content.style.display = "flex";
|
||||||
content.style.flexDirection = "column";
|
content.style.flexDirection = "column";
|
||||||
content.style.alignItems = "center";
|
content.style.alignItems = "center";
|
||||||
content.style.height = "40px";
|
content.style.height = "60px";
|
||||||
content.style.width = "40px";
|
content.style.width = "60px";
|
||||||
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");
|
||||||
|
@ -1069,8 +1075,8 @@ const DGcreateCs2 = (polygon, indexx) => {
|
||||||
content.style.display = "flex";
|
content.style.display = "flex";
|
||||||
content.style.flexDirection = "column";
|
content.style.flexDirection = "column";
|
||||||
content.style.alignItems = "center";
|
content.style.alignItems = "center";
|
||||||
content.style.height = "40px";
|
content.style.height = "60px";
|
||||||
content.style.width = "40px";
|
content.style.width = "60px";
|
||||||
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");
|
||||||
|
@ -1137,7 +1143,7 @@ const createCustomOverlay = (polygon, indexx) => {
|
||||||
content.style.display = "flex";
|
content.style.display = "flex";
|
||||||
content.style.flexDirection = "column";
|
content.style.flexDirection = "column";
|
||||||
content.style.alignItems = "center";
|
content.style.alignItems = "center";
|
||||||
content.style.height = "40px";
|
content.style.height = "40px";
|
||||||
content.style.width = "40px";
|
content.style.width = "40px";
|
||||||
content.style.zIndex = BMapGL.Overlay.getZIndex(this.point.lat);
|
content.style.zIndex = BMapGL.Overlay.getZIndex(this.point.lat);
|
||||||
|
|
||||||
|
@ -2099,7 +2105,8 @@ const getDatas = async (e, i) => {
|
||||||
.get(`/api/ggfwyth/ysyzt/getCssrksl?town=${e}&age=${i || ""}`)
|
.get(`/api/ggfwyth/ysyzt/getCssrksl?town=${e}&age=${i || ""}`)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
if (cfJd.value !== "") {
|
if (cfCs.value != "") {
|
||||||
|
} else if (cfJd.value !== "") {
|
||||||
personTotal.value = [
|
personTotal.value = [
|
||||||
{
|
{
|
||||||
id: "0",
|
id: "0",
|
||||||
|
@ -2171,9 +2178,11 @@ const getDatas = async (e, i) => {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
const getDatas2 = async (e, i) => {
|
const getDatas2 = async (e, i, cs) => {
|
||||||
await http
|
await http
|
||||||
.get(`/api/ggfwyth/ysyzt/getCssrksl?town=${e}&age=${i || ""}`)
|
.get(
|
||||||
|
`/api/ggfwyth/ysyzt/getCssrksl?town=${e}&age=${i || ""}&committee=${cs}`
|
||||||
|
)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
personTotal.value = [
|
personTotal.value = [
|
||||||
|
|
Loading…
Reference in New Issue