This commit is contained in:
duanxiaohai 2024-10-16 09:42:05 +08:00
commit 8989a43734
4 changed files with 222 additions and 39 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

View File

@ -217,4 +217,8 @@ onMounted(() => {
font-size: 18px; font-size: 18px;
border: none; border: none;
} }
:deep(.el-table) {
--el-table-border-color: #62696d;
// border: 1px solid #62696d;
}
</style> </style>

View File

@ -573,10 +573,10 @@ const handleRowClick = (row) => {
} }
}; };
const handleRowClickGO = (row) => { const handleRowClickGO = (row) => {
router.push({ // router.push({
path: `/person/rwTable`, // path: `/person/rwTable`,
query: { xh: row.xh, bm: row.bm }, // query: { xh: row.xh, bm: row.bm },
}); // });
}; };
// //

View File

@ -109,7 +109,7 @@
</div> </div>
</div> </div>
<div class="right" style="width: 517px" v-show="!showEdit"> <div class="right" style="width: 517px" v-show="!showEdit">
<div class="zyys"> <div class="zyys">
<div class="title"> <div class="title">
<div class="title_name"><span> 基本公共服务资源要素</span></div> <div class="title_name"><span> 基本公共服务资源要素</span></div>
</div> </div>
@ -155,7 +155,6 @@
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div class="btns" v-if="showEdit"> <div class="btns" v-if="showEdit">
<div <div
@ -412,6 +411,7 @@ import j3_map from "@/assets/images/map/j3_map.png";
import j4_map from "@/assets/images/map/j4_map.png"; import j4_map from "@/assets/images/map/j4_map.png";
import j5_map from "@/assets/images/map/j5_map.png"; import j5_map from "@/assets/images/map/j5_map.png";
import j7_map from "@/assets/images/map/j7_map.png"; import j7_map from "@/assets/images/map/j7_map.png";
import j9_map from "@/assets/images/map/j9_map.png";
import j10_map from "@/assets/images/map/j10_map.png"; import j10_map from "@/assets/images/map/j10_map.png";
import j11_map from "@/assets/images/map/j11_map.png"; import j11_map from "@/assets/images/map/j11_map.png";
import dwd from "@/assets/images/map/dwd.png"; import dwd from "@/assets/images/map/dwd.png";
@ -481,15 +481,20 @@ const message = ref({});
// //
const jdm_arr = ref([]); // const jdm_arr = ref([]); //
const jdm_number_arr = ref([]); //(+) const jdm_number_arr = ref([]); //(+)
const fwq_list_arr = ref([]); //
const fwq_dk = ref([]); //
const fwq_center = ref([]); //
const cs_qk_arr = ref([]); // 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 cs_choose_arr = ref([]); //() const cs_choose_arr = ref([]); //()
const cs_un_choose_arr = ref([]); //() const cs_un_choose_arr = ref([]); //()
const cs_dd_arr = ref([]); // const cs_dd_arr = ref([]); //
//---------
const fwq_list_arr = ref([]); //
const fwq_dk = ref([]); //
const fwq_center = ref([]); //
//---------
const zyys_dk = ref([]); //
const zyys_center = ref([]); //()
//---------
// //
const csqk = ref({}); const csqk = ref({});
var cssj; var cssj;
@ -880,7 +885,10 @@ const yaosuTotal = ref([
id: 9, id: 9,
name: "卫生服务中心", name: "卫生服务中心",
img: j9, img: j9,
img_map: j9_map,
wz: true, wz: true,
tooltip: "zyysmc",
url: "/api/ggfwyth/ysyzt/getZyys?zyyslx=卫生服务中心",
}, },
{ {
id: 10, id: 10,
@ -1096,7 +1104,6 @@ const initMap = () => {
} else { } else {
totalType.value = 2; totalType.value = 2;
map.setMapType(BMAP_SATELLITE_MAP); map.setMapType(BMAP_SATELLITE_MAP);
} }
map.enableScrollWheelZoom(true); map.enableScrollWheelZoom(true);
goMapCenter([119.178783, 29.034583], 11); goMapCenter([119.178783, 29.034583], 11);
@ -1819,28 +1826,36 @@ const clear = () => {
xkzDk.length = 0; xkzDk.length = 0;
}; };
//() //()
const clearPerson=()=>{ const clearPerson = () => {
if(choose.value.person){ if (choose.value.person) {
choose.value.person=''; choose.value.person = "";
jdm_number_arr.value.forEach((item, index) => { jdm_number_arr.value.forEach((item, index) => {
map.removeOverlay(jdm_number_arr.value[index]); map.removeOverlay(jdm_number_arr.value[index]);
}); });
addJd(); addJd();
} }
} };
// //
const clearyaosu=()=>{ const clearyaosu = () => {
if (yaosuList.value.length != 0) {
if(yaosuList.value.length!=0){ yaosuList.value.forEach((name, index) => {
yaosuList.value.forEach((name,index)=>{
yaosuIcon.value[name].sj.forEach((item, index) => { yaosuIcon.value[name].sj.forEach((item, index) => {
map.removeOverlay(yaosuIcon.value[name].sj[index].overlay); map.removeOverlay(item.overlay);
});
}); });
})
yaosuList.value.length=0;
}
} zyys_dk.value.forEach((item, index) => {
map.removeOverlay(item); //
});
zyys_center.value.forEach((item, index) => {
map.removeOverlay(item); //
});
yaosuList.value.length = 0;
zyys_dk.value.length = 0;
zyys_center.value.length = 0;
zyys_choose_cs.value='';
}
};
// //
const goMapCenter = (point, zoom) => { const goMapCenter = (point, zoom) => {
map.centerAndZoom(new BMapGL.Point(point[0], point[1]), zoom); map.centerAndZoom(new BMapGL.Point(point[0], point[1]), zoom);
@ -2708,12 +2723,23 @@ const changeRs = (id) => {
}; };
//---------------------- //----------------------
const zyys_choose_cs = ref("");
const changeys = (name) => { const changeys = (name) => {
if (yaosuList.value.includes(name)) { if (yaosuList.value.includes(name)) {
yaosuList.value = yaosuList.value.filter((ch) => ch !== name); yaosuList.value = yaosuList.value.filter((ch) => ch !== name);
yaosuIcon.value[name].sj.forEach((item, index) => { yaosuIcon.value[name].sj.forEach((item, index) => {
map.removeOverlay(yaosuIcon.value[name].sj[index].overlay); map.removeOverlay(yaosuIcon.value[name].sj[index].overlay);
}); });
if (name == zyys_choose_cs.value) {
zyys_dk.value.forEach((item, index) => {
map.removeOverlay(item);
});
zyys_center.value.forEach((item, index) => {
map.removeOverlay(item);
});
zyys_dk.value.length = 0;
zyys_center.value.length = 0;
}
} else { } else {
csh(); csh();
clearPerson(); clearPerson();
@ -2737,7 +2763,8 @@ const changeys = (name) => {
name == "小学" || name == "小学" ||
name == "初中" || name == "初中" ||
name == "高中" || name == "高中" ||
name == "医院" name == "医院" ||
name == "卫生服务中心"
) { ) {
getZyys(url, name, img, img_map, tooltip); getZyys(url, name, img, img_map, tooltip);
} }
@ -2837,21 +2864,174 @@ const createZyys = (polygon, indexx, name, tooltip) => {
} }
); );
map.addOverlay(yaosuIcon.value[name].sj[indexx].overlay); map.addOverlay(yaosuIcon.value[name].sj[indexx].overlay);
yaosuIcon.value[name].sj[indexx].overlay.addEventListener("click", () => { yaosuIcon.value[name].sj[indexx].overlay.addEventListener(
switch (name) { "click",
case "摄像头": async () => {
sxtShow.deviceCode = polygon.sbbm; switch (name) {
sxtShow.name = polygon.sbmc; case "摄像头":
getCameraUrl(); sxtShow.deviceCode = polygon.sbbm;
break; sxtShow.name = polygon.sbmc;
case "AED": getCameraUrl();
break; break;
default: case "AED":
break; break;
case "体育场所":
break;
case "南孔书院":
break;
case "养老机构":
break;
case "汽车充电桩":
break;
default:
zyys_choose_cs.value=name;
if (zyys_dk.value.length) {
zyys_dk.value.forEach((item, index) => {
map.removeOverlay(item); //
});
zyys_center.value.forEach((item, index) => {
map.removeOverlay(item); //
});
}
await get_dk_zyys(
polygon.xzjd,
polygon.csq,
polygon.num,
polygon.zyysmc
);
if (zyys_data.value.point.length == 0) {
ElMessage.warning({
message: "地图上未找到对应村社",
});
} else {
xr_dk_center_zyys();
}
break;
}
}
);
};
//()
const zyys_data = ref({
point: [],
center: [],
name: "",
});
const get_dk_zyys = async (xzjd, csq, number, name) => {
zyys_dk.value.length = 0;
zyys_center.value.length = 0;
zyys_data.value.point.length = 0;
zyys_data.value.center.length = 0;
zyys_data.value.name = "";
await loadCs(xzjd);
zyys_data.value.name = csq;
xkzDk.forEach((dk) => {
if (csq == dk.name) {
zyys_data.value.point.push(dk);
}
});
xkzCenter.forEach((center) => {
if (csq == center.name) {
let a = { ...center, num: number, zyysmc: name };
zyys_data.value.center.push(a);
} }
}); });
}; };
//()
const xr_dk_center_zyys = async () => {
zyys_data.value.point.map((item, index) => {
let points = [];
item.point[0].map((p) => points.push(new BMapGL.Point(...p)));
if (points.length) {
//
zyys_dk.value[index] = new BMapGL.Polygon(points, {
strokeColor: "blue",
strokeWeight: 2,
strokeOpacity: 0.8,
fillColor: "blue",
fillOpacity: 0.3,
zIndex: 5,
});
map.addOverlay(zyys_dk.value[index]);
}
});
zyys_data.value.center.map((item, index) => {
Xr_zyysNum(item, index);
});
};
//()
const Xr_zyysNum = (polygon, indexx) => {
console.log(4444444, ...polygon.center);
function createLabelDOM() {
var content = document.createElement("div");
content.style.display = "flex";
content.style.flexDirection = "column";
content.style.alignItems = "center";
content.style.height = "60px";
content.style.width = "60px";
content.style.zIndex = BMapGL.Overlay.getZIndex(this.point.lat);
var div = document.createElement("div");
div.style.color = "#333";
div.style.whiteSpace = "nowrap";
div.style.MozUserSelect = "none";
div.style.display = "flex";
div.style.justifyContent = "space-between";
div.style.alignItems = "center";
div.style.cursor = "pointer";
div.style.padding = "5px";
div.style.minWidth = "60px";
div.style.background = `url(${xcbg}) no-repeat 0/100% 100%`;
div.style.transform = "translateY(50px)";
div.setAttribute("name", this.properties.title);
var title = document.createElement("div");
title.style.fontSize = "10px";
title.style.fontWeight = "600";
title.style.color = "#000000";
div.appendChild(title);
title.appendChild(document.createTextNode(this.properties.title));
content.appendChild(div);
var number = document.createElement("div");
number.style.fontSize = "10px";
number.style.fontWeight = "600";
number.style.color = "black";
div.appendChild(number);
number.appendChild(document.createTextNode(this.properties.number));
content.appendChild(div);
let img2 = document.createElement("img");
img2.style.width = "20px";
img2.style.height = "26px";
img2.src = this.properties.imgSrc2;
content.appendChild(div);
content.appendChild(img2);
return content;
}
zyys_center.value[indexx] = new BMapGL.CustomOverlay(createLabelDOM, {
point: new BMapGL.Point(...polygon.center),
opacity: 0.5,
offsetX: 10,
offsetY: -15,
properties: {
// title: `${polygon.name}(${polygon.zyysmc})`,
title: polygon.name,
number: polygon.num,
imgSrc2: dwd,
type: "customOverlay",
},
});
map.addOverlay(zyys_center.value[indexx]);
zyys_center.value[indexx].addEventListener("click", () => {
console.log(polygon.name);
// cfCsZs.value = polygon.name;
// open_detail();
});
};
// //
const getCameraUrl = () => { const getCameraUrl = () => {
// camera.deviceCode = dataMyTag.camera.sbbm; // camera.deviceCode = dataMyTag.camera.sbbm;
@ -3690,8 +3870,8 @@ const addPolygonCounty = () => {
// townName.value = item.name; // townName.value = item.name;
if (item.name == cfJd.value) { if (item.name == cfJd.value) {
} else { } else {
if(yaosuList.value.length!=0){ if (yaosuList.value.length != 0) {
return return;
} }
loadingss.value = true; loadingss.value = true;
clear(); clear();
@ -3906,7 +4086,6 @@ const loadCs = async (name) => {
}); });
} }
} }
console.log(6666);
}; };
// //
const addPolygonCountyCs = () => { const addPolygonCountyCs = () => {
@ -4722,7 +4901,7 @@ onMounted(async () => {
overflow: hidden; overflow: hidden;
transition: opacity 1s; transition: opacity 1s;
.jbggfwq { .jbggfwq {
margin-top: 20px; margin-top: 20px;
.jbggfwq_content { .jbggfwq_content {
height: 540px; height: 540px;
overflow: auto; overflow: auto;