diff --git a/src/assets/images/map/bmfwzx_map.png b/src/assets/images/map/bmfwzx_map.png
new file mode 100644
index 0000000..ba16146
Binary files /dev/null and b/src/assets/images/map/bmfwzx_map.png differ
diff --git a/src/assets/images/map/j8_map.png b/src/assets/images/map/j8_map.png
new file mode 100644
index 0000000..a246033
Binary files /dev/null and b/src/assets/images/map/j8_map.png differ
diff --git a/src/components/header.vue b/src/components/header.vue
index 55e305c..e5ac0e5 100644
--- a/src/components/header.vue
+++ b/src/components/header.vue
@@ -114,7 +114,9 @@ const to = (url) => {
});
if (url == "/home/index/map") {
let menu = tools.data.get("menu");
- if (menu && menu.indexOf("ggfw:ystp") != -1) {
+ if(!menu || menu.indexOf('ggfw:ystp') == -1){
+
+ }else{
data.nowTab = url;
data.menushow = false;
}
diff --git a/src/router/index.js b/src/router/index.js
index 4ebcbea..0faf9d3 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -150,6 +150,7 @@ const router = createRouter({
router.beforeEach((to, form, next) => {
let menu = tools.data.get("menu");
+ let token = tools.data.get("token");
// var token = getCookie('lytoken')
// // console.log('token', token)
// if (token == '') {
@@ -171,16 +172,23 @@ router.beforeEach((to, form, next) => {
// next();
// }
// console.log(55555, to.fullPath);
- if (to.fullPath == '/home/index/map' ) {
- if(!menu || menu.indexOf('ggfw:ystp') == -1){
- ElMessage.error("您无权限访问该模块,若有需求请联系大数据中心!");
- }else{
+ //没有token直接放行
+ if (!token) {
+ next();
+ } else {
+ if (to.fullPath == '/home/index/map') {
+ //当未重新登录时,menu为空,或没有权限标识,无法访问,
+ if (!menu || menu.indexOf('ggfw:ystp') == -1) {
+ ElMessage.error("您无权限访问该模块,若有需求请联系大数据中心!");
+ } else {
+ next();
+ }
+ } else {
next();
}
- } else {
- next();
}
-
+
+
// next();
});
diff --git a/src/view/img_map/map.js b/src/view/img_map/map.js
index a62d7b5..d0c7e88 100644
--- a/src/view/img_map/map.js
+++ b/src/view/img_map/map.js
@@ -2,6 +2,7 @@ import zcd from "@/assets/images/map/zcd.png";
import dqfwzx from "@/assets/images/map/dqfwzx.png";
import bxjsf from "@/assets/images/map/bxjsf.png";
import bmfwzx from "@/assets/images/map/bmfwzx.png";
+import bmfwzx_map from "@/assets/images/map/bmfwzx_map.png";
import csc from "@/assets/images/map/csc.png";
import tcc from "@/assets/images/map/tcc.png";
import lnhds from "@/assets/images/map/lnhds.png";
@@ -35,6 +36,7 @@ import j3_map from "@/assets/images/map/j3_map.png";
import j4_map from "@/assets/images/map/j4_map.png";
import j5_map from "@/assets/images/map/j5_map.png";
import j7_map from "@/assets/images/map/j7_map.png";
+import j8_map from "@/assets/images/map/j8_map.png";
import j9_map from "@/assets/images/map/j9_map.png";
import j10_map from "@/assets/images/map/j10_map.png";
import j11_map from "@/assets/images/map/j11_map.png";
@@ -74,9 +76,11 @@ export {
j4_map,
j5_map,
j7_map,
+ j8_map,
j9_map,
j10_map,
j11_map,
xqwy_map,
cjrzj_map,
+ bmfwzx_map,
}
\ No newline at end of file
diff --git a/src/view/sy_details.vue b/src/view/sy_details.vue
index f7710b0..6ed50f9 100644
--- a/src/view/sy_details.vue
+++ b/src/view/sy_details.vue
@@ -37,6 +37,7 @@
:prop="item.property"
:show-overflow-tooltip="item.tooltip"
:width="item.width || ''"
+ :align="item.align || 'left'"
>
@@ -52,6 +53,7 @@
:width="item.width || ''"
:prop="item.property"
:show-overflow-tooltip="item.tooltip"
+ :align="item.align || 'left'"
/>
@@ -104,6 +106,7 @@
:label="item.label"
:width="item.width || ''"
:prop="item.property"
+ :align="item.align || 'left'"
/>
@@ -228,6 +231,7 @@
:width="item.width || ''"
:prop="item.property"
:show-overflow-tooltip="item.tooltip"
+ :align="item.align || 'left'"
/>
@@ -318,7 +322,8 @@ const data = reactive({
{
label: "姓名",
property: "xm",
- width: "90",
+ width: "100",
+ align: "center",
},
{
label: "地址",
@@ -329,6 +334,7 @@ const data = reactive({
label: "年龄",
property: "nl",
width: "80",
+ align: "center",
},
{
label: "人口标签",
@@ -364,8 +370,9 @@ const data = reactive({
{
label: "姓名",
property: "xm",
- width: "90",
+ width: "100",
type: "slot",
+ align: "center",
},
{
label: "状态",
@@ -383,6 +390,7 @@ const data = reactive({
label: "年龄",
property: "nl",
width: "80",
+ align: "center",
},
{
label: "人口标签",
@@ -467,7 +475,8 @@ const lampScreen = (val) => {
{
label: "姓名",
property: "xm",
- width: "90",
+ width: "100",
+ align: "center",
type: "slot",
},
{
@@ -485,6 +494,7 @@ const lampScreen = (val) => {
{
label: "年龄",
property: "nl",
+ align: "center",
width: "80",
},
{
@@ -496,6 +506,8 @@ const lampScreen = (val) => {
label: "推送次数",
property: "pushSendTotal",
type: "slot",
+ width: "80",
+ align: "center",
},
];
} else {
@@ -503,7 +515,8 @@ const lampScreen = (val) => {
{
label: "姓名",
property: "xm",
- width: "90",
+ width: "100",
+ align: "center",
type: "slot",
},
{
@@ -521,6 +534,7 @@ const lampScreen = (val) => {
{
label: "年龄",
property: "nl",
+ align: "center",
width: "80",
},
{
diff --git a/src/view/sy_map.vue b/src/view/sy_map.vue
index 13375ee..340c7a3 100644
--- a/src/view/sy_map.vue
+++ b/src/view/sy_map.vue
@@ -125,7 +125,7 @@
wz: item.wz == true,
Tsactive: !item.click,
}"
- @click="item.click ? changeys(item.name) : ''"
+ @click="item.click ? changeys(item.name,item.img_width) : ''"
:key="index"
>
{
yaosuIcon.value[name].sj.forEach((item, index) => {
map.removeOverlay(item.overlay);
});
- yaosuIcon.value[name]={}
+ yaosuIcon.value[name] = {};
});
zyys_dk.value.forEach((item, index) => {
@@ -3181,7 +3192,7 @@ const changeRs = (id) => {
//----------资源要素------------
const zyys_choose_cs = ref("");
-const changeys = (name) => {
+const changeys = (name,img_width) => {
if (yaosuList.value.includes(name)) {
yaosuList.value = yaosuList.value.filter((ch) => ch !== name);
if (yaosuIcon.value[name]) {
@@ -3226,20 +3237,22 @@ const changeys = (name) => {
name == "高中" ||
name == "医院" ||
name == "卫生服务中心" ||
- name == "残疾人之家"
+ name == "残疾人之家" ||
+ name == "汽车充电桩" ||
+ name == "便民服务中心"
) {
- getZyys(url, name, img, img_map, tooltip);
+ getZyys(url, name, img, img_map, tooltip,img_width);
} else if (name == "养老机构") {
- getZyys2(name, img, img_map, tooltip);
+ getZyys2(name, img, img_map, tooltip,img_width);
} else if (name == "小区物业") {
- getZyys3(url, name, img, img_map, tooltip);
+ getZyys3(url, name, img, img_map, tooltip,img_width);
} else {
loadingss.value = false;
}
}
};
//线上接口资源要素
-const getZyys = (url, name, img, img_map, tooltip) => {
+const getZyys = (url, name, img, img_map, tooltip,img_width) => {
http.get(url).then((res) => {
if (res.code == 200) {
yaosuIcon.value[name] = {};
@@ -3270,14 +3283,14 @@ const getZyys = (url, name, img, img_map, tooltip) => {
// };
});
yaosuIcon.value[name].sj.forEach((itemm, indexx) => {
- createZyys(itemm, indexx, name, tooltip);
+ createZyys(itemm, indexx, name, tooltip,img_width);
});
}
loadingss.value = false;
});
};
//本地存储资源要素
-const getZyys2 = (name, img, img_map, tooltip) => {
+const getZyys2 = (name, img, img_map, tooltip,img_width) => {
if (name == "养老机构") {
yaosuIcon.value[name] = {};
yaosuIcon.value[name]["sj"] = [];
@@ -3288,13 +3301,13 @@ const getZyys2 = (name, img, img_map, tooltip) => {
item.overlay = null;
});
yaosuIcon.value[name].sj.forEach((itemm, indexx) => {
- createZyys(itemm, indexx, name, tooltip);
+ createZyys(itemm, indexx, name, tooltip,img_width);
});
loadingss.value = false;
}
};
//线上接口资源要素(无坐标,需自己匹配)
-const getZyys3 = (url, name, img, img_map, tooltip) => {
+const getZyys3 = (url, name, img, img_map, tooltip,img_width) => {
http.get(url).then((res) => {
if (res.code == 200) {
let zyys_jd = [];
@@ -3303,9 +3316,9 @@ const getZyys3 = (url, name, img, img_map, tooltip) => {
zyys_jd.push(itemN.ssjd);
}
});
- zyys_total_center[name]=[];
+ zyys_total_center[name] = [];
zyys_jd.forEach((item) => {
- loadCs_zyys2(item,name);
+ loadCs_zyys2(item, name);
});
yaosuIcon.value[name] = {};
yaosuIcon.value[name]["sj"] = [];
@@ -3322,14 +3335,14 @@ const getZyys3 = (url, name, img, img_map, tooltip) => {
});
});
yaosuIcon.value[name].sj.forEach((itemm, indexx) => {
- createZyys(itemm, indexx, name, tooltip);
+ createZyys(itemm, indexx, name, tooltip,img_width);
});
}
loadingss.value = false;
});
};
// 添加资源要素的图标(overlay存放标记点)
-const createZyys = (polygon, indexx, name, tooltip) => {
+const createZyys = (polygon, indexx, name, tooltip,img_width) => {
let properties_change = {};
if (name == "小区物业") {
properties_change = {
@@ -3400,8 +3413,8 @@ const createZyys = (polygon, indexx, name, tooltip) => {
title.appendChild(document.createTextNode(this.properties.title));
content.appendChild(title);
}
- if(name=='残疾人之家'){
- img2.style.width = "24px";
+ if (img_width) {
+ img2.style.width = `${img_width}px`;
}
img2.src = this.properties.imgSrc2;
// 添加 title 属性作为简单的文字提示
@@ -3440,6 +3453,10 @@ const createZyys = (polygon, indexx, name, tooltip) => {
break;
case "汽车充电桩":
break;
+ case "残疾人之家":
+ break;
+ case "便民服务中心":
+ break;
case "残疾人之家":
break;
case "小区物业":
@@ -3463,7 +3480,7 @@ const createZyys = (polygon, indexx, name, tooltip) => {
} else {
zyys_total_center[name] = [];
zyys_total_dk[name] = [];
- await get_dk_zyys(polygon.fgfwrs, polygon.lb, polygon.ssly,name);
+ await get_dk_zyys(polygon.fgfwrs, polygon.lb, polygon.ssly, name);
xr_dk_center_zyys();
}
@@ -3500,17 +3517,17 @@ const zyys_data = ref({
// const zyysCenter = reactive([]);
// const zyysDk = reactive([]);
//存放资源要素要匹配的地块中心点和地块,通过name来分类
-const zyys_total_center=reactive({})
-const zyys_total_dk=reactive({})
+const zyys_total_center = reactive({});
+const zyys_total_dk = reactive({});
//小学,初中等
-const loadCs_zyys = async (jdname,name) => {
+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]);
-
+ 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) {
@@ -3542,7 +3559,7 @@ const loadCs_zyys = async (jdname,name) => {
}
};
//小区物业等
-const loadCs_zyys2 = async (jdname,name) => {
+const loadCs_zyys2 = async (jdname, name) => {
cssj.forEach((item, index) => {
if (item.name == jdname) {
csqk.value = item.sj;
@@ -3562,7 +3579,7 @@ const loadCs_zyys2 = async (jdname,name) => {
}
}
};
-const get_dk_zyys = async (sj, xd, ssly,name) => {
+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;
@@ -3573,10 +3590,10 @@ const get_dk_zyys = async (sj, xd, ssly,name) => {
zyys_jd.push(itemN.town);
}
});
- zyys_total_dk[name]= [];
- zyys_total_center[name]=[]
+ zyys_total_dk[name] = [];
+ zyys_total_center[name] = [];
zyys_jd.forEach((item) => {
- loadCs_zyys(item,name);
+ loadCs_zyys(item, name);
});
// zyysDk.forEach((dk) => {
// let pdK = true; //判断sj有没有对应地块,没有就赋值0
@@ -4610,13 +4627,6 @@ const addPolygonCounty = () => {
map.addOverlay(polygon);
polygon.addEventListener("click", async () => {
- // if (cfJd.value == "湖镇镇" && item.name == "模环乡") {
- // if (isclick.value=='') {
- // return;
- // } else {
-
- // }
- // }
if (showEdit.value) {
return;
}