This commit is contained in:
duanxiaohai 2024-11-08 16:44:54 +08:00
commit c3f5d7efb5
7 changed files with 90 additions and 70 deletions

BIN
dist.zip Normal file

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

@ -125,7 +125,7 @@ const router = createRouter({
path: "/home/index/person", path: "/home/index/person",
component: () => import("../view/person/index.vue"), component: () => import("../view/person/index.vue"),
}, },
// { // {
// name: '地图编辑', // name: '地图编辑',
// path: '/home/index/mapEdit', // path: '/home/index/mapEdit',
@ -133,7 +133,7 @@ const router = createRouter({
// }, // },
], ],
}, },
], ],
}); });
@ -157,6 +157,13 @@ router.beforeEach((to, form, next) => {
// // }); // // });
// tools.data.set('token', token) // tools.data.set('token', token)
// next(); // next();
// }
// console.log(55555, to.fullPath);
// if (to.fullPath == '/home/index/map') {
// next('/home/index')
// } else {
// } // }
next(); next();
}); });

View File

@ -2,7 +2,7 @@ import axios from "axios";
import { ElMessage } from "element-plus"; import { ElMessage } from "element-plus";
import tools from "@/utils/tools"; import tools from "@/utils/tools";
import router from "../router"; import router from "../router";
axios.defaults.baseURL = 'https://jzzf.longyou.gov.cn:998/' // axios.defaults.baseURL = 'https://jzzf.longyou.gov.cn:998/'
axios.defaults.timeout = 120000; axios.defaults.timeout = 120000;
// HTTP request 拦截器 // HTTP request 拦截器

View File

@ -1,6 +1,5 @@
import zcd from "@/assets/images/map/zcd.png"; import zcd from "@/assets/images/map/zcd.png";
import dqfwzx from "@/assets/images/map/dqfwzx.png"; import dqfwzx from "@/assets/images/map/dqfwzx.png";
import cjrzj from "@/assets/images/map/cjrzj.png";
import bxjsf from "@/assets/images/map/bxjsf.png"; import bxjsf from "@/assets/images/map/bxjsf.png";
import bmfwzx from "@/assets/images/map/bmfwzx.png"; import bmfwzx from "@/assets/images/map/bmfwzx.png";
import csc from "@/assets/images/map/csc.png"; import csc from "@/assets/images/map/csc.png";
@ -16,6 +15,8 @@ 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 from "@/assets/images/map/xqwy.png";
import xqwy_map from "@/assets/images/map/xqwy_map.png"; import xqwy_map from "@/assets/images/map/xqwy_map.png";
import cjrzj from "@/assets/images/map/cjrzj.png";
import cjrzj_map from "@/assets/images/map/cjrzj_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";
@ -68,8 +69,8 @@ export {
j11, j11,
xqwy, xqwy,
j1_map, j1_map,
j2_map, j2_map,
j3_map, j3_map,
j4_map, j4_map,
j5_map, j5_map,
j7_map, j7_map,
@ -77,4 +78,5 @@ export {
j10_map, j10_map,
j11_map, j11_map,
xqwy_map, xqwy_map,
cjrzj_map,
} }

View File

@ -135,8 +135,7 @@
imgB: imgB:
item.name == '菜市场' || item.name == '菜市场' ||
item.name == '停车场' || item.name == '停车场' ||
item.name == '文化广场' || item.name == '文化广场',
item.name == '残疾人之家',
}" }"
/> />
<div class="zyys_content_item_right">{{ item.name }}</div> <div class="zyys_content_item_right">{{ item.name }}</div>
@ -467,6 +466,7 @@ import {
j10_map, j10_map,
j11_map, j11_map,
xqwy_map, xqwy_map,
cjrzj_map,
} from "./img_map/map.js"; } from "./img_map/map.js";
//--------------- //---------------
// //
@ -1154,10 +1154,13 @@ const yaosuTotal = ref([
}, },
{ {
id: 26, id: 26,
name: "停车场", name: "残疾人之家",
img: tcc, url:'/api/ggfwyth/ysyzt/getCjrzjxx',
tooltip: "mc",
img: cjrzj,
img_map: cjrzj_map,
wz: true, wz: true,
click: false, click: true,
}, },
{ {
@ -1169,8 +1172,8 @@ const yaosuTotal = ref([
}, },
{ {
id: 22, id: 22,
name: "残疾人之家", name: "停车场",
img: cjrzj, img: tcc,
wz: true, wz: true,
click: false, click: false,
}, },
@ -1266,7 +1269,6 @@ const yaosuTotal = ref([
img: csc, img: csc,
wz: true, wz: true,
click: false, click: false,
}, },
]); ]);
// //
@ -1480,7 +1482,7 @@ const table_column_list = reactive({
type: "slot", type: "slot",
}, },
], ],
xqwy:[ xqwy: [
{ {
label: "序号", label: "序号",
property: "index", property: "index",
@ -2273,6 +2275,7 @@ const clearyaosu = () => {
yaosuIcon.value[name].sj.forEach((item, index) => { yaosuIcon.value[name].sj.forEach((item, index) => {
map.removeOverlay(item.overlay); map.removeOverlay(item.overlay);
}); });
yaosuIcon.value[name]={}
}); });
zyys_dk.value.forEach((item, index) => { zyys_dk.value.forEach((item, index) => {
@ -3223,7 +3226,7 @@ const changeys = (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 == "养老机构") {
@ -3291,7 +3294,6 @@ const getZyys2 = (name, img, img_map, tooltip) => {
} }
}; };
//线() //线()
const zyys_data_xqwy = ref([]);
const getZyys3 = (url, name, img, img_map, tooltip) => { const getZyys3 = (url, name, img, img_map, tooltip) => {
http.get(url).then((res) => { http.get(url).then((res) => {
if (res.code == 200) { if (res.code == 200) {
@ -3301,24 +3303,24 @@ const getZyys3 = (url, name, img, img_map, tooltip) => {
zyys_jd.push(itemN.ssjd); zyys_jd.push(itemN.ssjd);
} }
}); });
zyys_total_center[name]=[];
zyys_jd.forEach((item) => { zyys_jd.forEach((item) => {
loadCs_zyys2(item); loadCs_zyys2(item,name);
}); });
yaosuIcon.value[name] = {}; yaosuIcon.value[name] = {};
yaosuIcon.value[name]["sj"] = []; yaosuIcon.value[name]["sj"] = [];
yaosuIcon.value[name]["sj"] = res.data; yaosuIcon.value[name]["sj"] = res.data;
yaosuIcon.value[name]["sj"].forEach((item, index) => { yaosuIcon.value[name]["sj"].forEach((item, index) => {
item.img = img; item.img = img;
item.img_map = img_map; item.img_map = img_map;
item.overlay = null; item.overlay = null;
item.center = []; item.center = [];
zyysCenter_xqwy.forEach((center) => { zyys_total_center[name].forEach((center) => {
if (item.sssq == center.name) { if (item.sssq == center.name) {
item.center=[...center.center]; item.center = [...center.center];
} }
}); });
}); });
yaosuIcon.value[name].sj.forEach((itemm, indexx) => { yaosuIcon.value[name].sj.forEach((itemm, indexx) => {
createZyys(itemm, indexx, name, tooltip); createZyys(itemm, indexx, name, tooltip);
}); });
@ -3333,7 +3335,7 @@ const createZyys = (polygon, indexx, name, tooltip) => {
properties_change = { properties_change = {
xqs: `${polygon.xqsl}/`, xqs: `${polygon.xqsl}/`,
wys: polygon.wysl, wys: polygon.wysl,
title:polygon.sssq, title: polygon.sssq,
imgSrc2: polygon.img_map, imgSrc2: polygon.img_map,
type: "customOverlay", type: "customOverlay",
}; };
@ -3353,6 +3355,9 @@ const createZyys = (polygon, indexx, name, tooltip) => {
content.style.height = "30px"; content.style.height = "30px";
content.style.width = "30px"; content.style.width = "30px";
// content.style.position = "relative"; // 使 // content.style.position = "relative"; // 使
let img2 = document.createElement("img");
img2.style.width = "20px";
img2.style.height = "26px";
if (name == "小区物业") { if (name == "小区物业") {
var div = document.createElement("div"); var div = document.createElement("div");
div.style.color = "#333"; div.style.color = "#333";
@ -3395,11 +3400,10 @@ const createZyys = (polygon, indexx, name, tooltip) => {
title.appendChild(document.createTextNode(this.properties.title)); title.appendChild(document.createTextNode(this.properties.title));
content.appendChild(title); content.appendChild(title);
} }
let img2 = document.createElement("img"); if(name=='残疾人之家'){
img2.style.width = "20px"; img2.style.width = "24px";
img2.style.height = "26px"; }
img2.src = this.properties.imgSrc2; img2.src = this.properties.imgSrc2;
// title // title
img2.title = polygon[tooltip]; img2.title = polygon[tooltip];
content.appendChild(img2); content.appendChild(img2);
@ -3436,9 +3440,11 @@ const createZyys = (polygon, indexx, name, tooltip) => {
break; break;
case "汽车充电桩": case "汽车充电桩":
break; break;
case "小区物业": case "残疾人之家":
console.log(polygon); break;
open_detail_zyys_xqwy(polygon.ssjd,polygon.sssq) case "小区物业":
console.log(polygon);
open_detail_zyys_xqwy(polygon.ssjd, polygon.sssq);
break; break;
default: default:
zyys_choose_cs.value = name; zyys_choose_cs.value = name;
@ -3455,9 +3461,9 @@ const createZyys = (polygon, indexx, name, tooltip) => {
message: "暂无数据", message: "暂无数据",
}); });
} else { } else {
zyysCenter.length = 0; zyys_total_center[name] = [];
zyysDk.length = 0; zyys_total_dk[name] = [];
await get_dk_zyys(polygon.fgfwrs, polygon.lb, polygon.ssly); await get_dk_zyys(polygon.fgfwrs, polygon.lb, polygon.ssly,name);
xr_dk_center_zyys(); xr_dk_center_zyys();
} }
@ -3466,9 +3472,9 @@ const createZyys = (polygon, indexx, name, tooltip) => {
} }
); );
}; };
const open_detail_zyys_xqwy = (xzjd,csq) => { const open_detail_zyys_xqwy = (xzjd, csq) => {
tableType.title='小区物业'; tableType.title = "小区物业";
tableType.columns=table_column_list.xqwy tableType.columns = table_column_list.xqwy;
dialogShow.value = true; dialogShow.value = true;
http http
.get( .get(
@ -3476,7 +3482,6 @@ const open_detail_zyys_xqwy = (xzjd,csq) => {
) )
.then((res) => { .then((res) => {
if (res.code == 200) { if (res.code == 200) {
tableType.data = res.data; tableType.data = res.data;
res.data.forEach((item, index) => { res.data.forEach((item, index) => {
item.index = item.index =
@ -3486,44 +3491,48 @@ const open_detail_zyys_xqwy = (xzjd,csq) => {
} }
}); });
}; };
//() //(,)
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([]); //name
const zyys_total_center=reactive({})
const zyys_total_dk=reactive({})
// //
const loadCs_zyys = async (jdname) => { const loadCs_zyys = async (jdname,name) => {
cssj.forEach((item, index) => { cssj.forEach((item, index) => {
if (item.name == jdname) { if (item.name == jdname) {
csqk.value = item.sj; csqk.value = item.sj;
} }
}); });
console.log(zyys_total_dk[name],typeof zyys_total_dk[name]);
for (let v of csqk.value.features) { for (let v of csqk.value.features) {
if (v.geometry.coordinates.length > 1) { if (v.geometry.coordinates.length > 1) {
for (let w in v.geometry.coordinates) { // for (let w in v.geometry.coordinates) {
if (v.geometry.coordinates[w][0].length < 60) continue; // if (v.geometry.coordinates[w][0].length < 60) continue;
zyysDk.push({ // zyys_total_dk[name].push({
id: v.id, // id: v.id,
name: v.properties.name, // name: v.properties.name,
point: v.geometry.coordinates[w], // point: v.geometry.coordinates[w],
}); // });
} // }
zyysCenter.push({ // zyys_total_center[name].push({
id: v.id, // id: v.id,
name: v.properties.name, // name: v.properties.name,
center: v.properties.center, // center: v.properties.center,
}); // });
} else { } else {
zyysDk.push({ zyys_total_dk[name].push({
id: v.id, id: v.id,
name: v.properties.name, name: v.properties.name,
point: v.geometry.coordinates[0], point: v.geometry.coordinates[0],
}); });
zyysCenter.push({ zyys_total_center[name].push({
id: v.id, id: v.id,
name: v.properties.name, name: v.properties.name,
jdname: jdname, jdname: jdname,
@ -3533,18 +3542,18 @@ const loadCs_zyys = async (jdname) => {
} }
}; };
// //
const loadCs_zyys2 = async (jdname) => { const loadCs_zyys2 = async (jdname,name) => {
cssj.forEach((item, index) => { cssj.forEach((item, index) => {
if (item.name == jdname) { if (item.name == jdname) {
csqk.value = item.sj; csqk.value = item.sj;
} }
}); });
console.log(22222,csqk.value.features); console.log(22222, csqk.value.features);
for (let v of csqk.value.features) { for (let v of csqk.value.features) {
if (v.geometry.coordinates.length > 1) { if (v.geometry.coordinates.length > 1) {
} else { } else {
zyysCenter_xqwy.push({ zyys_total_center[name].push({
id: v.id, id: v.id,
name: v.properties.name, name: v.properties.name,
jdname: jdname, jdname: jdname,
@ -3553,7 +3562,7 @@ const loadCs_zyys2 = async (jdname) => {
} }
} }
}; };
const get_dk_zyys = async (sj, xd, ssly) => { const get_dk_zyys = async (sj, xd, ssly,name) => {
zyys_dk.value.length = 0; zyys_dk.value.length = 0;
zyys_center.value.length = 0; zyys_center.value.length = 0;
zyys_data.value.point.length = 0; zyys_data.value.point.length = 0;
@ -3564,8 +3573,10 @@ const get_dk_zyys = async (sj, xd, ssly) => {
zyys_jd.push(itemN.town); zyys_jd.push(itemN.town);
} }
}); });
zyys_total_dk[name]= [];
zyys_total_center[name]=[]
zyys_jd.forEach((item) => { zyys_jd.forEach((item) => {
loadCs_zyys(item); loadCs_zyys(item,name);
}); });
// zyysDk.forEach((dk) => { // zyysDk.forEach((dk) => {
// let pdK = true; //sj0 // let pdK = true; //sj0
@ -3616,7 +3627,7 @@ const get_dk_zyys = async (sj, xd, ssly) => {
// } // }
// }); // });
sj.forEach((item, index) => { sj.forEach((item, index) => {
zyysDk.forEach((dk) => { zyys_total_dk[name].forEach((dk) => {
if (item.committee == dk.name) { if (item.committee == dk.name) {
let a = { let a = {
...dk, ...dk,
@ -3625,7 +3636,7 @@ const get_dk_zyys = async (sj, xd, ssly) => {
zyys_data.value.point.push(a); zyys_data.value.point.push(a);
} }
}); });
zyysCenter.forEach((center) => { zyys_total_center[name].forEach((center) => {
if (item.committee == center.name) { if (item.committee == center.name) {
let b = { let b = {
...center, ...center,
@ -3743,7 +3754,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.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;
@ -3846,7 +3857,7 @@ const to_jd = async (item_name) => {
// //
const open_detail = () => { const open_detail = () => {
tableType.type = true; tableType.type = true;
tableType.title='人员列表'; tableType.title = "人员列表";
tableType.columns = table_column_list.sxt; tableType.columns = table_column_list.sxt;
let age = ""; let age = "";
let tagId; let tagId;
@ -3935,8 +3946,8 @@ const openCamera = () => {
}; };
// //
const openMessage = (e) => { const openMessage = (e) => {
if(tableType.title=='小区物业'){ if (tableType.title == "小区物业") {
return return;
} }
message.value = e; message.value = e;
openD.value = true; openD.value = true;