This commit is contained in:
姚宇浩 2024-07-30 13:10:47 +08:00
parent b5a42e239b
commit 8ea4c73c44
1 changed files with 10 additions and 27 deletions

View File

@ -120,6 +120,7 @@ import {
watch, watch,
nextTick, nextTick,
} from "vue"; } from "vue";
import tools from "@/utils/tools";
import initializeMap from "@/utils/mapInitializer.js"; import initializeMap from "@/utils/mapInitializer.js";
import http from "@/utils/request.js"; import http from "@/utils/request.js";
import mapTown from "@/assets/json/ly.json"; import mapTown from "@/assets/json/ly.json";
@ -322,7 +323,7 @@ const chooseCsList = ref([]);
// //
const unChooseList = ref([]); const unChooseList = ref([]);
const sqname = ref(); const sqname = ref();
const townName = ref(); // const townName = ref();
//() //()
const mapTownCount = reactive([ const mapTownCount = reactive([
{ {
@ -1138,6 +1139,7 @@ const getDatas2 = async (e, i, cs) => {
}; };
// //
// //
//
const getDataBq = async (jd, cs) => { const getDataBq = async (jd, cs) => {
await http await http
.get(`/api/ggfwyth/ysyzt/getTsbq?csq=${cs || ""}&xzjd=${jd || ""}`) .get(`/api/ggfwyth/ysyzt/getTsbq?csq=${cs || ""}&xzjd=${jd || ""}`)
@ -1161,27 +1163,6 @@ const getDataBq = async (jd, cs) => {
}); });
}; };
const getDataBqs = async (jd, cs, bq) => { const getDataBqs = async (jd, cs, bq) => {
let data = {};
let vv = 0;
if (cs == "" && jd == "") {
data = {
tsbq: bq,
};
vv = 1;
} else if (cs == "") {
data = {
xzjd: jd,
tsbq: bq,
};
vv = 2;
} else {
data = {
xzjd: jd,
tsbq: bq,
csq: cs,
};
vv = 3;
}
await getDataBqJD(bq); await getDataBqJD(bq);
getDataBqs2(cfJd.value, cfCs.value, bq); getDataBqs2(cfJd.value, cfCs.value, bq);
// await http.get(`/api/ggfwyth/ysyzt/getTsbqByXzjdOrCsq`, data).then((res) => { // await http.get(`/api/ggfwyth/ysyzt/getTsbqByXzjdOrCsq`, data).then((res) => {
@ -1197,6 +1178,7 @@ const getDataBqs = async (jd, cs, bq) => {
// } // }
// }); // });
}; };
//
const getDataBqs2 = async (jd, cs, bq, f = true) => { const getDataBqs2 = async (jd, cs, bq, f = true) => {
//fchangeRs2 //fchangeRs2
let data = {}; let data = {};
@ -1264,7 +1246,7 @@ const getDataBqs2 = async (jd, cs, bq, f = true) => {
}); });
} }
} else { } else {
console.log("hhhhh", xkzCenter); // console.log("hhhhh", xkzCenter);
if (choose.value.person == "") { if (choose.value.person == "") {
addCs(); addCs();
} else { } else {
@ -1343,10 +1325,10 @@ const to_jd = (item_name) => {
map.removeOverlay(currentMarker); map.removeOverlay(currentMarker);
} }
townName.value = item_name; // townName.value = item_name;
// if (item_name == cfJd.value) { // if (item_name == cfJd.value) {
// } else { // } else {
console.log(111, choose.value.person); // console.log(111, choose.value.person);
cfJd.value = item_name; cfJd.value = item_name;
let jdCenter = []; let jdCenter = [];
if (item_name == "溪口镇") { if (item_name == "溪口镇") {
@ -1433,7 +1415,7 @@ const addPolygonCounty = () => {
map.addOverlay(polygon); map.addOverlay(polygon);
polygon.addEventListener("click", () => { polygon.addEventListener("click", () => {
townName.value = item.name; // townName.value = item.name;
if (item.name == cfJd.value) { if (item.name == cfJd.value) {
} else { } else {
cfJd.value = item.name; cfJd.value = item.name;
@ -2146,6 +2128,7 @@ const reset_font = () => {
} }
}; };
onMounted(() => { onMounted(() => {
tools.data.set("token","6b0e380b4a8f46baae4923f83faf670d");
reset_font(); reset_font();
initMap(); initMap();
getData(); getData();
@ -2234,7 +2217,7 @@ onMounted(() => {
left: 0; left: 0;
width: 40%; width: 40%;
height: 100%; height: 100%;
background:RGBA(53, 85, 114, 0.5); background:RGBA(53, 85, 114, 0.8);
z-index:-1; z-index:-1;
} }
.content_item:first-child { .content_item:first-child {