Compare commits
3 Commits
b258fe7517
...
559a343ad7
Author | SHA1 | Date |
---|---|---|
姚宇浩 | 559a343ad7 | |
姚宇浩 | 353ead0cfc | |
姚宇浩 | 36a6a97f35 |
Binary file not shown.
After Width: | Height: | Size: 5.3 KiB |
Binary file not shown.
After Width: | Height: | Size: 2.5 KiB |
|
@ -109,7 +109,9 @@ const to = (url) => {
|
||||||
});
|
});
|
||||||
if (url == "/home/index/map") {
|
if (url == "/home/index/map") {
|
||||||
let menu = tools.data.get("menu");
|
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.nowTab = url;
|
||||||
data.menushow = false;
|
data.menushow = false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -140,6 +140,7 @@ const router = createRouter({
|
||||||
|
|
||||||
router.beforeEach((to, form, next) => {
|
router.beforeEach((to, form, next) => {
|
||||||
let menu = tools.data.get("menu");
|
let menu = tools.data.get("menu");
|
||||||
|
let token = tools.data.get("token");
|
||||||
// var token = getCookie('lytoken')
|
// var token = getCookie('lytoken')
|
||||||
// // console.log('token', token)
|
// // console.log('token', token)
|
||||||
// if (token == '') {
|
// if (token == '') {
|
||||||
|
@ -161,6 +162,9 @@ router.beforeEach((to, form, next) => {
|
||||||
// next();
|
// next();
|
||||||
// }
|
// }
|
||||||
// console.log(55555, to.fullPath);
|
// console.log(55555, to.fullPath);
|
||||||
|
if (!token) {
|
||||||
|
next();
|
||||||
|
} else {
|
||||||
if (to.fullPath == '/home/index/map') {
|
if (to.fullPath == '/home/index/map') {
|
||||||
if (!menu || menu.indexOf('ggfw:ystp') == -1) {
|
if (!menu || menu.indexOf('ggfw:ystp') == -1) {
|
||||||
ElMessage.error("您无权限访问该模块,若有需求请联系大数据中心!");
|
ElMessage.error("您无权限访问该模块,若有需求请联系大数据中心!");
|
||||||
|
@ -170,6 +174,8 @@ router.beforeEach((to, form, next) => {
|
||||||
} else {
|
} else {
|
||||||
next();
|
next();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// next();
|
// next();
|
||||||
});
|
});
|
||||||
|
|
|
@ -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 拦截器
|
||||||
|
|
|
@ -2,6 +2,7 @@ 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 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 bmfwzx_map from "@/assets/images/map/bmfwzx_map.png";
|
||||||
import csc from "@/assets/images/map/csc.png";
|
import csc from "@/assets/images/map/csc.png";
|
||||||
import tcc from "@/assets/images/map/tcc.png";
|
import tcc from "@/assets/images/map/tcc.png";
|
||||||
import lnhds from "@/assets/images/map/lnhds.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 j4_map from "@/assets/images/map/j4_map.png";
|
||||||
import j5_map from "@/assets/images/map/j5_map.png";
|
import j5_map from "@/assets/images/map/j5_map.png";
|
||||||
import j7_map from "@/assets/images/map/j7_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 j9_map from "@/assets/images/map/j9_map.png";
|
||||||
import j10_map from "@/assets/images/map/j10_map.png";
|
import j10_map from "@/assets/images/map/j10_map.png";
|
||||||
import j11_map from "@/assets/images/map/j11_map.png";
|
import j11_map from "@/assets/images/map/j11_map.png";
|
||||||
|
@ -74,9 +76,11 @@ export {
|
||||||
j4_map,
|
j4_map,
|
||||||
j5_map,
|
j5_map,
|
||||||
j7_map,
|
j7_map,
|
||||||
|
j8_map,
|
||||||
j9_map,
|
j9_map,
|
||||||
j10_map,
|
j10_map,
|
||||||
j11_map,
|
j11_map,
|
||||||
xqwy_map,
|
xqwy_map,
|
||||||
cjrzj_map,
|
cjrzj_map,
|
||||||
|
bmfwzx_map,
|
||||||
}
|
}
|
|
@ -125,7 +125,7 @@
|
||||||
wz: item.wz == true,
|
wz: item.wz == true,
|
||||||
Tsactive: !item.click,
|
Tsactive: !item.click,
|
||||||
}"
|
}"
|
||||||
@click="item.click ? changeys(item.name) : ''"
|
@click="item.click ? changeys(item.name,item.img_width) : ''"
|
||||||
:key="index"
|
:key="index"
|
||||||
>
|
>
|
||||||
<img
|
<img
|
||||||
|
@ -462,15 +462,17 @@ import {
|
||||||
j4_map,
|
j4_map,
|
||||||
j5_map,
|
j5_map,
|
||||||
j7_map,
|
j7_map,
|
||||||
|
j8_map,
|
||||||
j9_map,
|
j9_map,
|
||||||
j10_map,
|
j10_map,
|
||||||
j11_map,
|
j11_map,
|
||||||
xqwy_map,
|
xqwy_map,
|
||||||
cjrzj_map,
|
cjrzj_map,
|
||||||
|
bmfwzx_map,
|
||||||
} from "./img_map/map.js";
|
} from "./img_map/map.js";
|
||||||
//--------定义参数-------
|
//--------定义参数-------
|
||||||
//测绘模式等
|
//测绘模式等
|
||||||
const drawing = ref(false);
|
const drawing = ref(false); //进入编辑等模式为true
|
||||||
const add_mode = ref(false);
|
const add_mode = ref(false);
|
||||||
const edit_mode = ref(false);
|
const edit_mode = ref(false);
|
||||||
const move_mode = ref(false);
|
const move_mode = ref(false);
|
||||||
|
@ -1108,8 +1110,12 @@ const yaosuTotal = ref([
|
||||||
id: 8,
|
id: 8,
|
||||||
name: "汽车充电桩",
|
name: "汽车充电桩",
|
||||||
img: j8,
|
img: j8,
|
||||||
|
img_map: j8_map,
|
||||||
wz: true,
|
wz: true,
|
||||||
|
url: "/api/ggfwyth/ysyzt/getCdzxx",
|
||||||
|
tooltip: "zdmc",
|
||||||
click: true,
|
click: true,
|
||||||
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 9,
|
id: 9,
|
||||||
|
@ -1153,22 +1159,27 @@ const yaosuTotal = ref([
|
||||||
click: true,
|
click: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 26,
|
id: 13,
|
||||||
name: "残疾人之家",
|
name: "残疾人之家",
|
||||||
url:'/api/ggfwyth/ysyzt/getCjrzjxx',
|
url: "/api/ggfwyth/ysyzt/getCjrzjxx",
|
||||||
tooltip: "mc",
|
tooltip: "mc",
|
||||||
img: cjrzj,
|
img: cjrzj,
|
||||||
img_map: cjrzj_map,
|
img_map: cjrzj_map,
|
||||||
wz: true,
|
wz: true,
|
||||||
click: true,
|
click: true,
|
||||||
|
img_width:24,
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
id: 21,
|
id: 14,
|
||||||
name: "党群服务中心",
|
name: "便民服务中心",
|
||||||
img: dqfwzx,
|
url: "/api/ggfwyth/ysyzt/getBmfwzx",
|
||||||
|
img_map: bmfwzx_map,
|
||||||
|
img: bmfwzx,
|
||||||
|
tooltip: "mc",
|
||||||
wz: true,
|
wz: true,
|
||||||
click: false,
|
click: true,
|
||||||
|
img_width:24,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 22,
|
id: 22,
|
||||||
|
@ -1193,8 +1204,8 @@ const yaosuTotal = ref([
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 24,
|
id: 24,
|
||||||
name: "便民服务中心",
|
name: "党群服务中心",
|
||||||
img: bmfwzx,
|
img: dqfwzx,
|
||||||
wz: true,
|
wz: true,
|
||||||
click: false,
|
click: false,
|
||||||
},
|
},
|
||||||
|
@ -2275,7 +2286,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]={}
|
yaosuIcon.value[name] = {};
|
||||||
});
|
});
|
||||||
|
|
||||||
zyys_dk.value.forEach((item, index) => {
|
zyys_dk.value.forEach((item, index) => {
|
||||||
|
@ -3181,7 +3192,7 @@ const changeRs = (id) => {
|
||||||
|
|
||||||
//----------资源要素------------
|
//----------资源要素------------
|
||||||
const zyys_choose_cs = ref("");
|
const zyys_choose_cs = ref("");
|
||||||
const changeys = (name) => {
|
const changeys = (name,img_width) => {
|
||||||
if (yaosuList.value.includes(name)) {
|
if (yaosuList.value.includes(name)) {
|
||||||
yaosuList.value = yaosuList.value.filter((ch) => ch !== name);
|
yaosuList.value = yaosuList.value.filter((ch) => ch !== name);
|
||||||
if (yaosuIcon.value[name]) {
|
if (yaosuIcon.value[name]) {
|
||||||
|
@ -3226,20 +3237,22 @@ const changeys = (name) => {
|
||||||
name == "高中" ||
|
name == "高中" ||
|
||||||
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 == "养老机构") {
|
} else if (name == "养老机构") {
|
||||||
getZyys2(name, img, img_map, tooltip);
|
getZyys2(name, img, img_map, tooltip,img_width);
|
||||||
} else if (name == "小区物业") {
|
} else if (name == "小区物业") {
|
||||||
getZyys3(url, name, img, img_map, tooltip);
|
getZyys3(url, name, img, img_map, tooltip,img_width);
|
||||||
} else {
|
} else {
|
||||||
loadingss.value = false;
|
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) => {
|
http.get(url).then((res) => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
yaosuIcon.value[name] = {};
|
yaosuIcon.value[name] = {};
|
||||||
|
@ -3270,14 +3283,14 @@ const getZyys = (url, name, img, img_map, tooltip) => {
|
||||||
// };
|
// };
|
||||||
});
|
});
|
||||||
yaosuIcon.value[name].sj.forEach((itemm, indexx) => {
|
yaosuIcon.value[name].sj.forEach((itemm, indexx) => {
|
||||||
createZyys(itemm, indexx, name, tooltip);
|
createZyys(itemm, indexx, name, tooltip,img_width);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
loadingss.value = false;
|
loadingss.value = false;
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
//本地存储资源要素
|
//本地存储资源要素
|
||||||
const getZyys2 = (name, img, img_map, tooltip) => {
|
const getZyys2 = (name, img, img_map, tooltip,img_width) => {
|
||||||
if (name == "养老机构") {
|
if (name == "养老机构") {
|
||||||
yaosuIcon.value[name] = {};
|
yaosuIcon.value[name] = {};
|
||||||
yaosuIcon.value[name]["sj"] = [];
|
yaosuIcon.value[name]["sj"] = [];
|
||||||
|
@ -3288,13 +3301,13 @@ const getZyys2 = (name, img, img_map, tooltip) => {
|
||||||
item.overlay = null;
|
item.overlay = null;
|
||||||
});
|
});
|
||||||
yaosuIcon.value[name].sj.forEach((itemm, indexx) => {
|
yaosuIcon.value[name].sj.forEach((itemm, indexx) => {
|
||||||
createZyys(itemm, indexx, name, tooltip);
|
createZyys(itemm, indexx, name, tooltip,img_width);
|
||||||
});
|
});
|
||||||
loadingss.value = false;
|
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) => {
|
http.get(url).then((res) => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
let zyys_jd = [];
|
let zyys_jd = [];
|
||||||
|
@ -3322,14 +3335,14 @@ const getZyys3 = (url, name, img, img_map, tooltip) => {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
yaosuIcon.value[name].sj.forEach((itemm, indexx) => {
|
yaosuIcon.value[name].sj.forEach((itemm, indexx) => {
|
||||||
createZyys(itemm, indexx, name, tooltip);
|
createZyys(itemm, indexx, name, tooltip,img_width);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
loadingss.value = false;
|
loadingss.value = false;
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
// 添加资源要素的图标(overlay存放标记点)
|
// 添加资源要素的图标(overlay存放标记点)
|
||||||
const createZyys = (polygon, indexx, name, tooltip) => {
|
const createZyys = (polygon, indexx, name, tooltip,img_width) => {
|
||||||
let properties_change = {};
|
let properties_change = {};
|
||||||
if (name == "小区物业") {
|
if (name == "小区物业") {
|
||||||
properties_change = {
|
properties_change = {
|
||||||
|
@ -3400,8 +3413,8 @@ 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);
|
||||||
}
|
}
|
||||||
if(name=='残疾人之家'){
|
if (img_width) {
|
||||||
img2.style.width = "24px";
|
img2.style.width = `${img_width}px`;
|
||||||
}
|
}
|
||||||
img2.src = this.properties.imgSrc2;
|
img2.src = this.properties.imgSrc2;
|
||||||
// 添加 title 属性作为简单的文字提示
|
// 添加 title 属性作为简单的文字提示
|
||||||
|
@ -3500,8 +3513,8 @@ const zyys_data = ref({
|
||||||
// const zyysCenter = reactive([]);
|
// const zyysCenter = reactive([]);
|
||||||
// const zyysDk = reactive([]);
|
// const zyysDk = reactive([]);
|
||||||
//存放资源要素要匹配的地块中心点和地块,通过name来分类
|
//存放资源要素要匹配的地块中心点和地块,通过name来分类
|
||||||
const zyys_total_center=reactive({})
|
const zyys_total_center = reactive({});
|
||||||
const zyys_total_dk=reactive({})
|
const zyys_total_dk = reactive({});
|
||||||
//小学,初中等
|
//小学,初中等
|
||||||
const loadCs_zyys = async (jdname, name) => {
|
const loadCs_zyys = async (jdname, name) => {
|
||||||
cssj.forEach((item, index) => {
|
cssj.forEach((item, index) => {
|
||||||
|
@ -3574,7 +3587,7 @@ const get_dk_zyys = async (sj, xd, ssly,name) => {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
zyys_total_dk[name] = [];
|
zyys_total_dk[name] = [];
|
||||||
zyys_total_center[name]=[]
|
zyys_total_center[name] = [];
|
||||||
zyys_jd.forEach((item) => {
|
zyys_jd.forEach((item) => {
|
||||||
loadCs_zyys(item, name);
|
loadCs_zyys(item, name);
|
||||||
});
|
});
|
||||||
|
@ -4610,13 +4623,6 @@ const addPolygonCounty = () => {
|
||||||
map.addOverlay(polygon);
|
map.addOverlay(polygon);
|
||||||
|
|
||||||
polygon.addEventListener("click", async () => {
|
polygon.addEventListener("click", async () => {
|
||||||
// if (cfJd.value == "湖镇镇" && item.name == "模环乡") {
|
|
||||||
// if (isclick.value=='') {
|
|
||||||
// return;
|
|
||||||
// } else {
|
|
||||||
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
if (showEdit.value) {
|
if (showEdit.value) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue