This commit is contained in:
duanxiaohai 2024-11-08 09:18:59 +08:00
commit 19b200905c
4 changed files with 161 additions and 19 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

View File

@ -14,6 +14,8 @@ import gc from "@/assets/images/map/gc.png";
import whlt from "@/assets/images/map/whlt.png"; import whlt from "@/assets/images/map/whlt.png";
import njsw from "@/assets/images/map/njsw.png"; import njsw from "@/assets/images/map/njsw.png";
import xxg from "@/assets/images/map/xxg.png"; import xxg from "@/assets/images/map/xxg.png";
import xqwy from "@/assets/images/map/xqwy.png";
import xqwy_map from "@/assets/images/map/xqwy_map.png";
import j0 from "@/assets/images/map/j0.png"; import j0 from "@/assets/images/map/j0.png";
import j1 from "@/assets/images/map/j1.png"; import j1 from "@/assets/images/map/j1.png";
import j2 from "@/assets/images/map/j2.png"; import j2 from "@/assets/images/map/j2.png";
@ -64,6 +66,7 @@ export {
j9, j9,
j10, j10,
j11, j11,
xqwy,
j1_map, j1_map,
j2_map, j2_map,
j3_map, j3_map,
@ -73,4 +76,5 @@ export {
j9_map, j9_map,
j10_map, j10_map,
j11_map, j11_map,
xqwy_map,
} }

View File

@ -456,6 +456,7 @@ import {
j9, j9,
j10, j10,
j11, j11,
xqwy,
j1_map, j1_map,
j2_map, j2_map,
j3_map, j3_map,
@ -465,6 +466,7 @@ import {
j9_map, j9_map,
j10_map, j10_map,
j11_map, j11_map,
xqwy_map,
} from "./img_map/map.js"; } from "./img_map/map.js";
//--------------- //---------------
// //
@ -1141,11 +1143,14 @@ const yaosuTotal = ref([
}, },
{ {
id: 25, id: 12,
name: "菜市场", name: "小区物业",
img: csc, url: "/api/ggfwyth/ysyzt/getXqWyXx",
img: xqwy,
tooltip: "sssq",
img_map: xqwy_map,
wz: true, wz: true,
click: false, click: true,
}, },
{ {
id: 26, id: 26,
@ -1257,10 +1262,11 @@ const yaosuTotal = ref([
}, },
{ {
id: 36, id: 36,
name: "小区物业", name: "菜市场",
img: xxg, img: csc,
wz: false, wz: true,
click: false, click: false,
}, },
]); ]);
// //
@ -1474,6 +1480,31 @@ const table_column_list = reactive({
type: "slot", type: "slot",
}, },
], ],
xqwy:[
{
label: "序号",
property: "index",
width: "50",
type: "index",
align: "center",
},
{
label: "企业名称",
property: "qymc",
},
{
label: "所在街道",
property: "ssjd",
},
{
label: "所在社区",
property: "sssq",
},
{
label: "管辖小区",
property: "xmmc",
},
],
}); });
// //
@ -3191,12 +3222,14 @@ 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);
} else if (name == "养老机构") { } else if (name == "养老机构") {
getZyys2(name, img, img_map, tooltip); getZyys2(name, img, img_map, tooltip);
} else if (name == "小区物业") { } else if (name == "小区物业") {
getZyys3(url, name, img, img_map, tooltip);
} else { } else {
loadingss.value = false; loadingss.value = false;
} }
@ -3257,13 +3290,50 @@ const getZyys2 = (name, img, img_map, tooltip) => {
loadingss.value = false; loadingss.value = false;
} }
}; };
//线()
const zyys_data_xqwy = ref([]);
const getZyys3 = (url, name, img, img_map, tooltip) => {
http.get(url).then((res) => {
if (res.code == 200) {
let zyys_jd = [];
res.data.forEach((itemN) => {
if (!zyys_jd.includes(itemN.ssjd)) {
zyys_jd.push(itemN.ssjd);
}
});
zyys_jd.forEach((item) => {
loadCs_zyys2(item);
});
yaosuIcon.value[name] = {};
yaosuIcon.value[name]["sj"] = [];
yaosuIcon.value[name]["sj"] = res.data;
yaosuIcon.value[name]["sj"].forEach((item, index) => {
item.img = img;
item.img_map = img_map;
item.overlay = null;
item.center = [];
zyysCenter_xqwy.forEach((center) => {
if (item.sssq == center.name) {
item.center=[...center.center];
}
});
});
yaosuIcon.value[name].sj.forEach((itemm, indexx) => {
createZyys(itemm, indexx, name, tooltip);
});
}
loadingss.value = false;
});
};
// (overlay) // (overlay)
const createZyys = (polygon, indexx, name, tooltip) => { const createZyys = (polygon, indexx, name, tooltip) => {
let properties_change = {}; let properties_change = {};
if (name == "小区物业") { if (name == "小区物业") {
properties_change = { properties_change = {
xqs: "100/", xqs: `${polygon.xqsl}/`,
wys: "100", wys: polygon.wysl,
title:polygon.sssq,
imgSrc2: polygon.img_map, imgSrc2: polygon.img_map,
type: "customOverlay", type: "customOverlay",
}; };
@ -3294,20 +3364,36 @@ const createZyys = (polygon, indexx, name, tooltip) => {
div.style.cursor = "pointer"; div.style.cursor = "pointer";
div.style.padding = "5px"; div.style.padding = "5px";
div.style.minWidth = "60px"; div.style.minWidth = "60px";
div.style.transform = "translateY(5px)"; div.style.transform = "translateY(30px)";
var xqs = document.createElement("div"); var xqs = document.createElement("div");
xqs.style.fontSize = "10px"; xqs.style.fontSize = "13px";
xqs.style.fontWeight = "600"; xqs.style.fontWeight = "600";
xqs.style.color = "blue"; xqs.style.color = "#16aaf2";
var wys = document.createElement("div"); var wys = document.createElement("div");
wys.style.fontSize = "10px"; wys.style.fontSize = "13px";
wys.style.fontWeight = "600"; wys.style.fontWeight = "600";
wys.style.color = "yellow"; wys.style.color = "#cebb0e";
xqs.appendChild(document.createTextNode(this.properties.xqs)); xqs.appendChild(document.createTextNode(this.properties.xqs));
wys.appendChild(document.createTextNode(this.properties.wys)); wys.appendChild(document.createTextNode(this.properties.wys));
div.appendChild(xqs); div.appendChild(xqs);
div.appendChild(wys); div.appendChild(wys);
content.appendChild(div); content.appendChild(div);
var title = document.createElement("div");
title.style.color = "#333";
title.style.whiteSpace = "nowrap";
title.style.MozUserSelect = "none";
title.style.display = "flex";
title.style.justifyContent = "center";
title.style.alignItems = "center";
title.style.padding = "5px";
title.style.minWidth = "60px";
title.style.transform = "translateY(40px)";
title.style.fontSize = "10px";
title.style.fontWeight = "600";
title.style.color = "black";
title.appendChild(document.createTextNode(this.properties.title));
content.appendChild(title);
} }
let img2 = document.createElement("img"); let img2 = document.createElement("img");
img2.style.width = "20px"; img2.style.width = "20px";
@ -3350,14 +3436,18 @@ const createZyys = (polygon, indexx, name, tooltip) => {
break; break;
case "汽车充电桩": case "汽车充电桩":
break; break;
case "小区物业":
console.log(polygon);
open_detail_zyys_xqwy(polygon.ssjd,polygon.sssq)
break;
default: default:
zyys_choose_cs.value = name; zyys_choose_cs.value = name;
if (zyys_dk.value.length) { if (zyys_dk.value.length) {
zyys_dk.value.forEach((item, index) => { zyys_dk.value.forEach((item, index) => {
map.removeOverlay(item); // map.removeOverlay(item); //
}); });
zyys_center.value.forEach((item, index) => { zyys_center.value.forEach((item, index) => {
map.removeOverlay(item); // map.removeOverlay(item); //
}); });
} }
if (polygon.fgfwrs.length == 0) { if (polygon.fgfwrs.length == 0) {
@ -3376,14 +3466,36 @@ const createZyys = (polygon, indexx, name, tooltip) => {
} }
); );
}; };
const open_detail_zyys_xqwy = (xzjd,csq) => {
tableType.title='小区物业';
tableType.columns=table_column_list.xqwy
dialogShow.value = true;
http
.get(
`/api/ggfwyth/ysyzt/listXqWyxx?page=${pagination.currentPage}&size=${pagination.pageSize}&xzjd=${xzjd}&csq=${csq}`
)
.then((res) => {
if (res.code == 200) {
tableType.data = res.data;
res.data.forEach((item, index) => {
item.index =
index + 1 + (pagination.currentPage - 1) * pagination.pageSize;
});
pagination.total = res.count;
}
});
};
//() //()
const zyys_data = ref({ const zyys_data = ref({
point: [], point: [],
center: [], center: [],
}); });
//(,) //(,,)
const zyysCenter = reactive([]); const zyysCenter = reactive([]);
const zyysDk = reactive([]); const zyysDk = reactive([]);
const zyysCenter_xqwy = reactive([]);
//
const loadCs_zyys = async (jdname) => { const loadCs_zyys = async (jdname) => {
cssj.forEach((item, index) => { cssj.forEach((item, index) => {
if (item.name == jdname) { if (item.name == jdname) {
@ -3420,6 +3532,27 @@ const loadCs_zyys = async (jdname) => {
} }
} }
}; };
//
const loadCs_zyys2 = async (jdname) => {
cssj.forEach((item, index) => {
if (item.name == jdname) {
csqk.value = item.sj;
}
});
console.log(22222,csqk.value.features);
for (let v of csqk.value.features) {
if (v.geometry.coordinates.length > 1) {
} else {
zyysCenter_xqwy.push({
id: v.id,
name: v.properties.name,
jdname: jdname,
center: v.properties.center,
});
}
}
};
const get_dk_zyys = async (sj, xd, ssly) => { const get_dk_zyys = async (sj, xd, ssly) => {
zyys_dk.value.length = 0; zyys_dk.value.length = 0;
zyys_center.value.length = 0; zyys_center.value.length = 0;
@ -3538,7 +3671,7 @@ const xr_dk_center_zyys = async () => {
const zyys_table = reactive({ const zyys_table = reactive({
town: "", town: "",
committee: "", committee: "",
xd: "",// xd: "", //
}); });
const Xr_zyysNum = (polygon, indexx) => { const Xr_zyysNum = (polygon, indexx) => {
function createLabelDOM() { function createLabelDOM() {
@ -3610,6 +3743,7 @@ const Xr_zyysNum = (polygon, indexx) => {
console.log(polygon); console.log(polygon);
// cfCsZs.value = polygon.name; // cfCsZs.value = polygon.name;
tableType.type = false; tableType.type = false;
tableType.title='人员列表';
tableType.columns = table_column_list.zxs; tableType.columns = table_column_list.zxs;
zyys_table.town = polygon.town; zyys_table.town = polygon.town;
zyys_table.committee = polygon.committee; zyys_table.committee = polygon.committee;
@ -3712,6 +3846,7 @@ const to_jd = async (item_name) => {
// //
const open_detail = () => { const open_detail = () => {
tableType.type = true; tableType.type = true;
tableType.title='人员列表';
tableType.columns = table_column_list.sxt; tableType.columns = table_column_list.sxt;
let age = ""; let age = "";
let tagId; let tagId;
@ -3800,6 +3935,9 @@ const openCamera = () => {
}; };
// //
const openMessage = (e) => { const openMessage = (e) => {
if(tableType.title=='小区物业'){
return
}
message.value = e; message.value = e;
openD.value = true; openD.value = true;
reset_font2(); reset_font2();