diff --git a/dist.zip b/dist.zip
index 28779ee..9e6e984 100644
Binary files a/dist.zip and b/dist.zip differ
diff --git a/src/assets/images/map/cjrzj.png b/src/assets/images/map/cjrzj.png
index fc6ab1c..b73ca11 100644
Binary files a/src/assets/images/map/cjrzj.png and b/src/assets/images/map/cjrzj.png differ
diff --git a/src/assets/images/map/cjrzj_map.png b/src/assets/images/map/cjrzj_map.png
new file mode 100644
index 0000000..469357b
Binary files /dev/null and b/src/assets/images/map/cjrzj_map.png differ
diff --git a/src/router/index.js b/src/router/index.js
index 7a513e6..c01f5e2 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -125,7 +125,7 @@ const router = createRouter({
path: "/home/index/person",
component: () => import("../view/person/index.vue"),
},
-
+
// {
// name: '地图编辑',
// 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)
// next();
+ // }
+ // console.log(55555, to.fullPath);
+ // if (to.fullPath == '/home/index/map') {
+
+ // next('/home/index')
+ // } else {
+
// }
next();
});
diff --git a/src/utils/request.js b/src/utils/request.js
index 02a9252..ab56c12 100644
--- a/src/utils/request.js
+++ b/src/utils/request.js
@@ -2,7 +2,7 @@ import axios from "axios";
import { ElMessage } from "element-plus";
import tools from "@/utils/tools";
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;
// HTTP request 拦截器
diff --git a/src/view/img_map/map.js b/src/view/img_map/map.js
index b8d20da..a62d7b5 100644
--- a/src/view/img_map/map.js
+++ b/src/view/img_map/map.js
@@ -1,6 +1,5 @@
import zcd from "@/assets/images/map/zcd.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 bmfwzx from "@/assets/images/map/bmfwzx.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 xqwy from "@/assets/images/map/xqwy.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 j1 from "@/assets/images/map/j1.png";
import j2 from "@/assets/images/map/j2.png";
@@ -68,8 +69,8 @@ export {
j11,
xqwy,
j1_map,
- j2_map,
- j3_map,
+ j2_map,
+ j3_map,
j4_map,
j5_map,
j7_map,
@@ -77,4 +78,5 @@ export {
j10_map,
j11_map,
xqwy_map,
+ cjrzj_map,
}
\ No newline at end of file
diff --git a/src/view/sy_map.vue b/src/view/sy_map.vue
index f72afe5..12589d2 100644
--- a/src/view/sy_map.vue
+++ b/src/view/sy_map.vue
@@ -135,8 +135,7 @@
imgB:
item.name == '菜市场' ||
item.name == '停车场' ||
- item.name == '文化广场' ||
- item.name == '残疾人之家',
+ item.name == '文化广场',
}"
/>
{{ item.name }}
@@ -467,6 +466,7 @@ import {
j10_map,
j11_map,
xqwy_map,
+ cjrzj_map,
} from "./img_map/map.js";
//--------定义参数-------
//测绘模式等
@@ -1154,10 +1154,13 @@ const yaosuTotal = ref([
},
{
id: 26,
- name: "停车场",
- img: tcc,
+ name: "残疾人之家",
+ url:'/api/ggfwyth/ysyzt/getCjrzjxx',
+ tooltip: "mc",
+ img: cjrzj,
+ img_map: cjrzj_map,
wz: true,
- click: false,
+ click: true,
},
{
@@ -1169,8 +1172,8 @@ const yaosuTotal = ref([
},
{
id: 22,
- name: "残疾人之家",
- img: cjrzj,
+ name: "停车场",
+ img: tcc,
wz: true,
click: false,
},
@@ -1266,7 +1269,6 @@ const yaosuTotal = ref([
img: csc,
wz: true,
click: false,
-
},
]);
//选中的资源要素
@@ -1480,7 +1482,7 @@ const table_column_list = reactive({
type: "slot",
},
],
- xqwy:[
+ xqwy: [
{
label: "序号",
property: "index",
@@ -2273,6 +2275,7 @@ const clearyaosu = () => {
yaosuIcon.value[name].sj.forEach((item, index) => {
map.removeOverlay(item.overlay);
});
+ yaosuIcon.value[name]={}
});
zyys_dk.value.forEach((item, index) => {
@@ -3223,7 +3226,7 @@ const changeys = (name) => {
name == "高中" ||
name == "医院" ||
name == "卫生服务中心" ||
- name == "养老机构"
+ name == "残疾人之家"
) {
getZyys(url, name, img, img_map, tooltip);
} 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) => {
http.get(url).then((res) => {
if (res.code == 200) {
@@ -3301,24 +3303,24 @@ const getZyys3 = (url, name, img, img_map, tooltip) => {
zyys_jd.push(itemN.ssjd);
}
});
+ zyys_total_center[name]=[];
zyys_jd.forEach((item) => {
- loadCs_zyys2(item);
+ loadCs_zyys2(item,name);
});
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) => {
+ zyys_total_center[name].forEach((center) => {
if (item.sssq == center.name) {
- item.center=[...center.center];
+ item.center = [...center.center];
}
});
- });
+ });
yaosuIcon.value[name].sj.forEach((itemm, indexx) => {
createZyys(itemm, indexx, name, tooltip);
});
@@ -3333,7 +3335,7 @@ const createZyys = (polygon, indexx, name, tooltip) => {
properties_change = {
xqs: `${polygon.xqsl}/`,
wys: polygon.wysl,
- title:polygon.sssq,
+ title: polygon.sssq,
imgSrc2: polygon.img_map,
type: "customOverlay",
};
@@ -3353,6 +3355,9 @@ const createZyys = (polygon, indexx, name, tooltip) => {
content.style.height = "30px";
content.style.width = "30px";
// content.style.position = "relative"; // 使得提示文字相对于父元素定位
+ let img2 = document.createElement("img");
+ img2.style.width = "20px";
+ img2.style.height = "26px";
if (name == "小区物业") {
var div = document.createElement("div");
div.style.color = "#333";
@@ -3395,11 +3400,10 @@ const createZyys = (polygon, indexx, name, tooltip) => {
title.appendChild(document.createTextNode(this.properties.title));
content.appendChild(title);
}
- let img2 = document.createElement("img");
- img2.style.width = "20px";
- img2.style.height = "26px";
+ if(name=='残疾人之家'){
+ img2.style.width = "24px";
+ }
img2.src = this.properties.imgSrc2;
-
// 添加 title 属性作为简单的文字提示
img2.title = polygon[tooltip];
content.appendChild(img2);
@@ -3436,9 +3440,11 @@ const createZyys = (polygon, indexx, name, tooltip) => {
break;
case "汽车充电桩":
break;
- case "小区物业":
- console.log(polygon);
- open_detail_zyys_xqwy(polygon.ssjd,polygon.sssq)
+ case "残疾人之家":
+ break;
+ case "小区物业":
+ console.log(polygon);
+ open_detail_zyys_xqwy(polygon.ssjd, polygon.sssq);
break;
default:
zyys_choose_cs.value = name;
@@ -3455,9 +3461,9 @@ const createZyys = (polygon, indexx, name, tooltip) => {
message: "暂无数据",
});
} else {
- zyysCenter.length = 0;
- zyysDk.length = 0;
- await get_dk_zyys(polygon.fgfwrs, polygon.lb, polygon.ssly);
+ zyys_total_center[name] = [];
+ zyys_total_dk[name] = [];
+ await get_dk_zyys(polygon.fgfwrs, polygon.lb, polygon.ssly,name);
xr_dk_center_zyys();
}
@@ -3466,9 +3472,9 @@ const createZyys = (polygon, indexx, name, tooltip) => {
}
);
};
-const open_detail_zyys_xqwy = (xzjd,csq) => {
- tableType.title='小区物业';
- tableType.columns=table_column_list.xqwy
+const open_detail_zyys_xqwy = (xzjd, csq) => {
+ tableType.title = "小区物业";
+ tableType.columns = table_column_list.xqwy;
dialogShow.value = true;
http
.get(
@@ -3476,7 +3482,6 @@ const open_detail_zyys_xqwy = (xzjd,csq) => {
)
.then((res) => {
if (res.code == 200) {
-
tableType.data = res.data;
res.data.forEach((item, index) => {
item.index =
@@ -3486,44 +3491,48 @@ const open_detail_zyys_xqwy = (xzjd,csq) => {
}
});
};
-//资源要素(获取对应村社的地块)
+//资源要素(获取对应村社的地块,学校医院,有二重嵌套要显示地块)
const zyys_data = ref({
point: [],
center: [],
});
-//资源要素(学校,医院,小区物业)获取对应街道村社
-const zyysCenter = reactive([]);
-const zyysDk = reactive([]);
-const zyysCenter_xqwy = reactive([]);
+//资源要素(学校,医院)获取对应街道村社
+// const zyysCenter = reactive([]);
+// const zyysDk = 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) => {
if (item.name == jdname) {
csqk.value = item.sj;
}
});
+ console.log(zyys_total_dk[name],typeof zyys_total_dk[name]);
+
for (let v of csqk.value.features) {
if (v.geometry.coordinates.length > 1) {
- for (let w in v.geometry.coordinates) {
- if (v.geometry.coordinates[w][0].length < 60) continue;
- zyysDk.push({
- id: v.id,
- name: v.properties.name,
- point: v.geometry.coordinates[w],
- });
- }
- zyysCenter.push({
- id: v.id,
- name: v.properties.name,
- center: v.properties.center,
- });
+ // for (let w in v.geometry.coordinates) {
+ // if (v.geometry.coordinates[w][0].length < 60) continue;
+ // zyys_total_dk[name].push({
+ // id: v.id,
+ // name: v.properties.name,
+ // point: v.geometry.coordinates[w],
+ // });
+ // }
+ // zyys_total_center[name].push({
+ // id: v.id,
+ // name: v.properties.name,
+ // center: v.properties.center,
+ // });
} else {
- zyysDk.push({
+ zyys_total_dk[name].push({
id: v.id,
name: v.properties.name,
point: v.geometry.coordinates[0],
});
- zyysCenter.push({
+ zyys_total_center[name].push({
id: v.id,
name: v.properties.name,
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) => {
if (item.name == jdname) {
csqk.value = item.sj;
}
});
- console.log(22222,csqk.value.features);
-
+ console.log(22222, csqk.value.features);
+
for (let v of csqk.value.features) {
if (v.geometry.coordinates.length > 1) {
} else {
- zyysCenter_xqwy.push({
+ zyys_total_center[name].push({
id: v.id,
name: v.properties.name,
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_center.value.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_total_dk[name]= [];
+ zyys_total_center[name]=[]
zyys_jd.forEach((item) => {
- loadCs_zyys(item);
+ loadCs_zyys(item,name);
});
// zyysDk.forEach((dk) => {
// let pdK = true; //判断sj有没有对应地块,没有就赋值0
@@ -3616,7 +3627,7 @@ const get_dk_zyys = async (sj, xd, ssly) => {
// }
// });
sj.forEach((item, index) => {
- zyysDk.forEach((dk) => {
+ zyys_total_dk[name].forEach((dk) => {
if (item.committee == dk.name) {
let a = {
...dk,
@@ -3625,7 +3636,7 @@ const get_dk_zyys = async (sj, xd, ssly) => {
zyys_data.value.point.push(a);
}
});
- zyysCenter.forEach((center) => {
+ zyys_total_center[name].forEach((center) => {
if (item.committee == center.name) {
let b = {
...center,
@@ -3743,7 +3754,7 @@ const Xr_zyysNum = (polygon, indexx) => {
console.log(polygon);
// cfCsZs.value = polygon.name;
tableType.type = false;
- tableType.title='人员列表';
+ tableType.title = "人员列表";
tableType.columns = table_column_list.zxs;
zyys_table.town = polygon.town;
zyys_table.committee = polygon.committee;
@@ -3846,7 +3857,7 @@ const to_jd = async (item_name) => {
//详情
const open_detail = () => {
tableType.type = true;
- tableType.title='人员列表';
+ tableType.title = "人员列表";
tableType.columns = table_column_list.sxt;
let age = "";
let tagId;
@@ -3935,8 +3946,8 @@ const openCamera = () => {
};
//打开人物详情页面
const openMessage = (e) => {
- if(tableType.title=='小区物业'){
- return
+ if (tableType.title == "小区物业") {
+ return;
}
message.value = e;
openD.value = true;