Compare commits

..

No commits in common. "559a343ad77854214f5527babc590c47f9a64156" and "b258fe751713a98d969e40c80b336ac1e875dfed" have entirely different histories.

7 changed files with 55 additions and 73 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

View File

@ -109,9 +109,7 @@ const to = (url) => {
});
if (url == "/home/index/map") {
let menu = tools.data.get("menu");
if(!menu || menu.indexOf('ggfw:ystp') == -1){
}else{
if(menu && menu.indexOf('ggfw:ystp') != -1){
data.nowTab = url;
data.menushow = false;
}

View File

@ -140,7 +140,6 @@ 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 == '') {
@ -162,20 +161,15 @@ router.beforeEach((to, form, next) => {
// next();
// }
// console.log(55555, to.fullPath);
if (!token) {
next();
} else {
if (to.fullPath == '/home/index/map') {
if (!menu || menu.indexOf('ggfw:ystp') == -1) {
if (to.fullPath == '/home/index/map' ) {
if(!menu || menu.indexOf('ggfw:ystp') == -1){
ElMessage.error("您无权限访问该模块,若有需求请联系大数据中心!");
} else {
}else{
next();
}
} else {
next();
}
}
// next();
});

View File

@ -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 拦截器

View File

@ -2,7 +2,6 @@ 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";
@ -36,7 +35,6 @@ 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";
@ -76,11 +74,9 @@ export {
j4_map,
j5_map,
j7_map,
j8_map,
j9_map,
j10_map,
j11_map,
xqwy_map,
cjrzj_map,
bmfwzx_map,
}

View File

@ -125,7 +125,7 @@
wz: item.wz == true,
Tsactive: !item.click,
}"
@click="item.click ? changeys(item.name,item.img_width) : ''"
@click="item.click ? changeys(item.name) : ''"
:key="index"
>
<img
@ -462,17 +462,15 @@ import {
j4_map,
j5_map,
j7_map,
j8_map,
j9_map,
j10_map,
j11_map,
xqwy_map,
cjrzj_map,
bmfwzx_map,
} from "./img_map/map.js";
//---------------
//
const drawing = ref(false); //true
const drawing = ref(false);
const add_mode = ref(false);
const edit_mode = ref(false);
const move_mode = ref(false);
@ -1110,12 +1108,8 @@ const yaosuTotal = ref([
id: 8,
name: "汽车充电桩",
img: j8,
img_map: j8_map,
wz: true,
url: "/api/ggfwyth/ysyzt/getCdzxx",
tooltip: "zdmc",
click: true,
},
{
id: 9,
@ -1159,27 +1153,22 @@ const yaosuTotal = ref([
click: true,
},
{
id: 13,
id: 26,
name: "残疾人之家",
url: "/api/ggfwyth/ysyzt/getCjrzjxx",
url:'/api/ggfwyth/ysyzt/getCjrzjxx',
tooltip: "mc",
img: cjrzj,
img_map: cjrzj_map,
wz: true,
click: true,
img_width:24,
},
{
id: 14,
name: "便民服务中心",
url: "/api/ggfwyth/ysyzt/getBmfwzx",
img_map: bmfwzx_map,
img: bmfwzx,
tooltip: "mc",
id: 21,
name: "党群服务中心",
img: dqfwzx,
wz: true,
click: true,
img_width:24,
click: false,
},
{
id: 22,
@ -1204,8 +1193,8 @@ const yaosuTotal = ref([
},
{
id: 24,
name: "党群服务中心",
img: dqfwzx,
name: "便民服务中心",
img: bmfwzx,
wz: true,
click: false,
},
@ -2286,7 +2275,7 @@ const clearyaosu = () => {
yaosuIcon.value[name].sj.forEach((item, index) => {
map.removeOverlay(item.overlay);
});
yaosuIcon.value[name] = {};
yaosuIcon.value[name]={}
});
zyys_dk.value.forEach((item, index) => {
@ -3192,7 +3181,7 @@ const changeRs = (id) => {
//----------------------
const zyys_choose_cs = ref("");
const changeys = (name,img_width) => {
const changeys = (name) => {
if (yaosuList.value.includes(name)) {
yaosuList.value = yaosuList.value.filter((ch) => ch !== name);
if (yaosuIcon.value[name]) {
@ -3237,22 +3226,20 @@ const changeys = (name,img_width) => {
name == "高中" ||
name == "医院" ||
name == "卫生服务中心" ||
name == "残疾人之家" ||
name == "汽车充电桩" ||
name == "便民服务中心"
name == "残疾人之家"
) {
getZyys(url, name, img, img_map, tooltip,img_width);
getZyys(url, name, img, img_map, tooltip);
} else if (name == "养老机构") {
getZyys2(name, img, img_map, tooltip,img_width);
getZyys2(name, img, img_map, tooltip);
} else if (name == "小区物业") {
getZyys3(url, name, img, img_map, tooltip,img_width);
getZyys3(url, name, img, img_map, tooltip);
} else {
loadingss.value = false;
}
}
};
//线
const getZyys = (url, name, img, img_map, tooltip,img_width) => {
const getZyys = (url, name, img, img_map, tooltip) => {
http.get(url).then((res) => {
if (res.code == 200) {
yaosuIcon.value[name] = {};
@ -3283,14 +3270,14 @@ const getZyys = (url, name, img, img_map, tooltip,img_width) => {
// };
});
yaosuIcon.value[name].sj.forEach((itemm, indexx) => {
createZyys(itemm, indexx, name, tooltip,img_width);
createZyys(itemm, indexx, name, tooltip);
});
}
loadingss.value = false;
});
};
//
const getZyys2 = (name, img, img_map, tooltip,img_width) => {
const getZyys2 = (name, img, img_map, tooltip) => {
if (name == "养老机构") {
yaosuIcon.value[name] = {};
yaosuIcon.value[name]["sj"] = [];
@ -3301,13 +3288,13 @@ const getZyys2 = (name, img, img_map, tooltip,img_width) => {
item.overlay = null;
});
yaosuIcon.value[name].sj.forEach((itemm, indexx) => {
createZyys(itemm, indexx, name, tooltip,img_width);
createZyys(itemm, indexx, name, tooltip);
});
loadingss.value = false;
}
};
//线()
const getZyys3 = (url, name, img, img_map, tooltip,img_width) => {
const getZyys3 = (url, name, img, img_map, tooltip) => {
http.get(url).then((res) => {
if (res.code == 200) {
let zyys_jd = [];
@ -3316,9 +3303,9 @@ const getZyys3 = (url, name, img, img_map, tooltip,img_width) => {
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"] = [];
@ -3335,14 +3322,14 @@ const getZyys3 = (url, name, img, img_map, tooltip,img_width) => {
});
});
yaosuIcon.value[name].sj.forEach((itemm, indexx) => {
createZyys(itemm, indexx, name, tooltip,img_width);
createZyys(itemm, indexx, name, tooltip);
});
}
loadingss.value = false;
});
};
// (overlay)
const createZyys = (polygon, indexx, name, tooltip,img_width) => {
const createZyys = (polygon, indexx, name, tooltip) => {
let properties_change = {};
if (name == "小区物业") {
properties_change = {
@ -3413,8 +3400,8 @@ const createZyys = (polygon, indexx, name, tooltip,img_width) => {
title.appendChild(document.createTextNode(this.properties.title));
content.appendChild(title);
}
if (img_width) {
img2.style.width = `${img_width}px`;
if(name=='残疾人之家'){
img2.style.width = "24px";
}
img2.src = this.properties.imgSrc2;
// title
@ -3476,7 +3463,7 @@ const createZyys = (polygon, indexx, name, tooltip,img_width) => {
} 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();
}
@ -3513,16 +3500,16 @@ 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) {
@ -3555,7 +3542,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;
@ -3575,7 +3562,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;
@ -3586,10 +3573,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; //sj0
@ -4623,6 +4610,13 @@ const addPolygonCounty = () => {
map.addOverlay(polygon);
polygon.addEventListener("click", async () => {
// if (cfJd.value == "" && item.name == "") {
// if (isclick.value=='') {
// return;
// } else {
// }
// }
if (showEdit.value) {
return;
}