This commit is contained in:
汪汇 2024-07-24 17:19:05 +08:00
commit c6ead9f002
4 changed files with 35 additions and 12 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

View File

@ -421,6 +421,7 @@ const change = (name, index) => {
.module { .module {
width: 100%; width: 100%;
height: 943px; height: 943px;
margin-top: 112px;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
padding: 10px 45px; padding: 10px 45px;

View File

@ -107,7 +107,7 @@ import b5 from "@/assets/images/map/b5.png";
import b6 from "@/assets/images/map/b6.png"; import b6 from "@/assets/images/map/b6.png";
import xcbg from "@/assets/images/map/xcbg.png"; import xcbg from "@/assets/images/map/xcbg.png";
import http from "@/utils/request.js"; import http from "@/utils/request.js";
import AED from "@/assets/images/map/AED.png";
// //
const jdm_arr = ref([]); const jdm_arr = ref([]);
const jdm_number_arr = ref([]); const jdm_number_arr = ref([]);
@ -116,6 +116,7 @@ const cs_qk_arr = ref([]);
const cs_name_arr = ref([]); const cs_name_arr = ref([]);
const cs_number_name_arr = ref([]); const cs_number_name_arr = ref([]);
// //
const jrcs=ref(false)
const title_choose = ref("龙游县"); const title_choose = ref("龙游县");
// //
const colorList = [ const colorList = [
@ -147,6 +148,8 @@ const colorList = [
bg: "RGBA(27, 91, 55, 1)", bg: "RGBA(27, 91, 55, 1)",
}, },
]; ];
//
// //
const center_now = ref([]); const center_now = ref([]);
const center_center = ref([119.178783, 29.034583]); const center_center = ref([119.178783, 29.034583]);
@ -313,16 +316,18 @@ const xkzCenter = reactive([
}, },
]); ]);
var map = null; var map = null;
//
const BMAP = () => { const BMAP = () => {
// //
map.addEventListener("click", function (e) { map.addEventListener("click", function (e) {
console.log(e.point, 666); let icons = "";
// console.log(e.point.latLng.lng,e.point.latLng.lat, 666); icons = new BMapGL.Icon(AED, new BMapGL.Size(24, 62));
// var pt = e.point; // var marker = new BMapGL.Marker(
map.addOverlay(marker); new BMapGL.Point(e.latlng.lng, e.latlng.lat),
var marker = new BMapGL.Marker(new BMapGL.Point(e.point.lng, e.point.lat)); // {
// var marker = new BMapGL.Marker(pt); // icon: icons,
}
); //
map.addOverlay(marker); // map.addOverlay(marker); //
}); });
}; };
@ -338,8 +343,8 @@ const initMap = () => {
// //
addPolygonCounty(); addPolygonCounty();
// //
addJd();
BMAP(); BMAP();
addJd();
}; };
const loadTown = () => { const loadTown = () => {
for (let v of mapTown.features) { for (let v of mapTown.features) {
@ -384,8 +389,16 @@ const addPolygonCounty = () => {
map.addOverlay(polygon); map.addOverlay(polygon);
polygon.addEventListener("click", () => { polygon.addEventListener("click", () => {
console.log(item.name); console.log(item.name);
if (title_choose.value.includes("溪口镇")) { if(item.name !== "溪口镇"){
jrcs.value=false;
console.log( jrcs.value,'000');
}
if (jrcs.value && item.name !== "溪口镇") {
console.log(1);
} else { } else {
console.log(2);
jrcs.value=true;
let jdCenter = []; let jdCenter = [];
if (item.name == "溪口镇") { if (item.name == "溪口镇") {
if (!title_choose.value.includes("溪口镇")) { if (!title_choose.value.includes("溪口镇")) {
@ -398,6 +411,7 @@ const addPolygonCounty = () => {
jdCenter = item.center; jdCenter = item.center;
} }
}); });
console.log( jrcs.value);
addCs(); addCs();
goMapCenter(jdCenter, 13); goMapCenter(jdCenter, 13);
} else { } else {
@ -474,7 +488,13 @@ 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", () => {
console.log(111); console.log(item.name);
// console.log(111,xkzDk);
// xkzDk.forEach((itemm,indexx)=>{
// if(itemm.name==item.name){
// }
// })
// let jdCenter = []; // let jdCenter = [];
// if (item.name == "") { // if (item.name == "") {
// if (!title_choose.value.includes("")) { // if (!title_choose.value.includes("")) {
@ -502,6 +522,7 @@ const addPolygonCountyCs = () => {
} }
}); });
}; };
// //
const createCustomOverlayJd = (polygon, indexx) => { const createCustomOverlayJd = (polygon, indexx) => {

View File

@ -440,6 +440,7 @@ const rowState = (row) => {
img { img {
width: 24px; width: 24px;
height: 24px; height: 24px;
margin-right: 8px;
} }
.tableli { .tableli {
font-size: 26px; font-size: 26px;
@ -451,7 +452,7 @@ const rowState = (row) => {
height: 29px; height: 29px;
background: rgba(255, 255, 255, 0.2); background: rgba(255, 255, 255, 0.2);
border-radius: 15px; border-radius: 15px;
border: 0px solid #ffffff; border: 1px solid #ffffff6b;
color: #ffffff; color: #ffffff;
font-weight: 400; font-weight: 400;