Merge pull request 'lukeyan' (#117) from lukeyan into master

Reviewed-on: #117
pull/125/head
lukeyan 1 year ago
commit 8f64bd3a9d

84
package-lock.json generated

@ -19,7 +19,9 @@
"js-cookie": "^3.0.1",
"less": "3.9.0",
"less-loader": "7",
"swiper": "4.5.1",
"vue": "^2.6.11",
"vue-awesome-swiper": "3.1.3",
"vue-router": "3",
"vuex": "3"
},
@ -6631,6 +6633,19 @@
"url": "https://github.com/cheeriojs/dom-serializer?sponsor=1"
}
},
"node_modules/dom7": {
"version": "2.1.5",
"resolved": "https://registry.npmjs.org/dom7/-/dom7-2.1.5.tgz",
"integrity": "sha512-xnhwVgyOh3eD++/XGtH+5qBwYTgCm0aW91GFgPJ3XG+jlsRLyJivnbP0QmUBFhI+Oaz9FV0s7cxgXHezwOEBYA==",
"dependencies": {
"ssr-window": "^2.0.0"
}
},
"node_modules/dom7/node_modules/ssr-window": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/ssr-window/-/ssr-window-2.0.0.tgz",
"integrity": "sha512-NXzN+/HPObKAx191H3zKlYomE5WrVIkoCB5IaSdvKokxTpjBdWfr0RaP+1Z5KOfDT0ZVz+2tdtiBkhsEQ9p+0A=="
},
"node_modules/domain-browser": {
"version": "1.2.0",
"resolved": "https://registry.npmmirror.com/domain-browser/-/domain-browser-1.2.0.tgz",
@ -13872,6 +13887,11 @@
"node": ">=0.10.0"
}
},
"node_modules/ssr-window": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/ssr-window/-/ssr-window-1.0.1.tgz",
"integrity": "sha512-dgFqB+f00LJTEgb6UXhx0h+SrG50LJvti2yMKMqAgzfUmUXZrLSv2fjULF7AWGwK25EXu8+smLR3jYsJQChPsg=="
},
"node_modules/ssri": {
"version": "6.0.2",
"resolved": "https://registry.npmmirror.com/ssri/-/ssri-6.0.2.tgz",
@ -14299,6 +14319,19 @@
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/swiper": {
"version": "4.5.1",
"resolved": "https://registry.npmjs.org/swiper/-/swiper-4.5.1.tgz",
"integrity": "sha512-se6I7PWWu950NAMXXT+ENtF/6SVb8mPyO+bTfNxbQBILSeLqsYp3Ndap+YOA0EczOIUlea274PKejT6gKZDseA==",
"hasInstallScript": true,
"dependencies": {
"dom7": "^2.1.3",
"ssr-window": "^1.0.1"
},
"engines": {
"node": ">= 4.7.0"
}
},
"node_modules/table": {
"version": "5.4.6",
"resolved": "https://registry.npmmirror.com/table/-/table-5.4.6.tgz",
@ -15264,6 +15297,19 @@
"csstype": "^3.1.0"
}
},
"node_modules/vue-awesome-swiper": {
"version": "3.1.3",
"resolved": "https://registry.npmjs.org/vue-awesome-swiper/-/vue-awesome-swiper-3.1.3.tgz",
"integrity": "sha512-E7suzkyApO8vNZbgdEnjSmnpsmQZyRvSVXJ7sey3XYwKPOkLhH3+GnHroBw+5PZIQXvWBwdCeQsPG1xQ1r1Rhg==",
"dependencies": {
"object-assign": "^4.1.1",
"swiper": "^4.0.7"
},
"engines": {
"node": ">= 4.0.0",
"npm": ">= 3.0.0"
}
},
"node_modules/vue-eslint-parser": {
"version": "7.11.0",
"resolved": "https://registry.npmmirror.com/vue-eslint-parser/-/vue-eslint-parser-7.11.0.tgz",
@ -21046,6 +21092,21 @@
"entities": "^2.0.0"
}
},
"dom7": {
"version": "2.1.5",
"resolved": "https://registry.npmjs.org/dom7/-/dom7-2.1.5.tgz",
"integrity": "sha512-xnhwVgyOh3eD++/XGtH+5qBwYTgCm0aW91GFgPJ3XG+jlsRLyJivnbP0QmUBFhI+Oaz9FV0s7cxgXHezwOEBYA==",
"requires": {
"ssr-window": "^2.0.0"
},
"dependencies": {
"ssr-window": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/ssr-window/-/ssr-window-2.0.0.tgz",
"integrity": "sha512-NXzN+/HPObKAx191H3zKlYomE5WrVIkoCB5IaSdvKokxTpjBdWfr0RaP+1Z5KOfDT0ZVz+2tdtiBkhsEQ9p+0A=="
}
}
},
"domain-browser": {
"version": "1.2.0",
"resolved": "https://registry.npmmirror.com/domain-browser/-/domain-browser-1.2.0.tgz",
@ -26316,6 +26377,11 @@
"tweetnacl": "~0.14.0"
}
},
"ssr-window": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/ssr-window/-/ssr-window-1.0.1.tgz",
"integrity": "sha512-dgFqB+f00LJTEgb6UXhx0h+SrG50LJvti2yMKMqAgzfUmUXZrLSv2fjULF7AWGwK25EXu8+smLR3jYsJQChPsg=="
},
"ssri": {
"version": "6.0.2",
"resolved": "https://registry.npmmirror.com/ssri/-/ssri-6.0.2.tgz",
@ -26634,6 +26700,15 @@
}
}
},
"swiper": {
"version": "4.5.1",
"resolved": "https://registry.npmjs.org/swiper/-/swiper-4.5.1.tgz",
"integrity": "sha512-se6I7PWWu950NAMXXT+ENtF/6SVb8mPyO+bTfNxbQBILSeLqsYp3Ndap+YOA0EczOIUlea274PKejT6gKZDseA==",
"requires": {
"dom7": "^2.1.3",
"ssr-window": "^1.0.1"
}
},
"table": {
"version": "5.4.6",
"resolved": "https://registry.npmmirror.com/table/-/table-5.4.6.tgz",
@ -27347,6 +27422,15 @@
}
}
},
"vue-awesome-swiper": {
"version": "3.1.3",
"resolved": "https://registry.npmjs.org/vue-awesome-swiper/-/vue-awesome-swiper-3.1.3.tgz",
"integrity": "sha512-E7suzkyApO8vNZbgdEnjSmnpsmQZyRvSVXJ7sey3XYwKPOkLhH3+GnHroBw+5PZIQXvWBwdCeQsPG1xQ1r1Rhg==",
"requires": {
"object-assign": "^4.1.1",
"swiper": "^4.0.7"
}
},
"vue-eslint-parser": {
"version": "7.11.0",
"resolved": "https://registry.npmmirror.com/vue-eslint-parser/-/vue-eslint-parser-7.11.0.tgz",

@ -6038,12 +6038,11 @@ window.BMAP_AUTHENTIC_KEY = "iSZit9hpxlgGq28nmIyFk8lQQ21widby";
anchor: new M(10, 25),
infoWindowAnchor: new M(10, 0)
})
, Bd = new nd(I.pa + "marker_red_sprite.png", new M(20, 11), {
anchor: new M(6, 11),
imageOffset: new M(-19, -13)
, Bd = new nd(I.pa + "marker_red_sprite.png", new M(50, 120), {
anchor: new M(50, 120),
imageOffset: new M(-10, 40)
});
function W(a, b) {
kb.call(this);
b = b || {};
this.point = a;
this.Tq = this.map = p;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 9.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

@ -28,7 +28,6 @@ export default {
this.companyList = res.data
this.initMap()
})
},
methods: {
goBack() {
@ -170,7 +169,7 @@ export default {
that.companyList.forEach((item) => {
var point = new BMap.Point(item.longitude, item.latitude);
console.log(point, 'point');
console.log(point, 'point123');
var marker = new BMap.Marker(point); //
map.addOverlay(marker);
var content = item.companyName;
@ -180,7 +179,7 @@ export default {
})
label.setStyle({ backgroundColor: ' rgba(0, 0, 0, 0)', border: '0', color: '#0060ce', fontSize: '16px' })
map.addOverlay(label);
marker.addEventListener("click", function () {
label.addEventListener("click", function () {
map.removeOverlay(that.label1);
topMapOne({ companyId: item.companyId, companyName: item.companyName }).then(res => {
that.label1 = new BMap.Label();

@ -7,6 +7,7 @@ const request = axios.create({
// baseURL: 'http://172.18.113.50:8080/zhapi',
//baseURL: 'http://172.18.113.13:8080/zhapi', // 孙强
//baseURL: 'http://192.168.0.188:8888/zhapi',
//baseURL: 'http://121.41.91.94:12002/zhapi',
baseURL: `http://${window.location.host}/zhapi`,
timeout: 50000,
headers: { 'content-type': 'application/json' },

@ -3,7 +3,7 @@
<div class="supermarket_body">
<div class="supermarket_title">
<div class="supermarket_title_01" @click="back_list"></div>
<div v-if="is_flag != '0'" class="supermarket_title_02">>>处置详情</div>
<div v-if="is_flag != '0'" class="supermarket_title_02">>>人员背景审查</div>
</div>
<div class="supermarket_list">
<div v-if="is_flag === '0'" class="list_boxs">

@ -235,7 +235,7 @@ export default {
// }
.pagination_body {
width: 44vw;
height: 4vh;
height: 4.5vh;
display: flex;
flex-direction: row-reverse;
// border: 0.1px solid #2f6363;

@ -139,7 +139,7 @@ export default {
}
.pagination_body {
width: 44vw;
height: 4vh;
height: 4.5vh;
display: flex;
flex-direction: row-reverse;
// border: 0.1px solid #2f6363;

@ -1,215 +1,270 @@
<template>
<div>
<div class="bmap" id="container" ref="container"></div>
</div>
<div>
<div class="bmap" id="container" ref="container"></div>
</div>
</template>
<script>
import MapLine from "../../../public/zhenhaiLine.json"
import MapPoint from "../../../public/zhenhaiPoint.json"
import styleJson from "../../../public/custom_map_config.json"
import MapLine from "../../../public/zhenhaiLine.json";
import MapPoint from "../../../public/zhenhaiPoint.json";
import styleJson from "../../../public/custom_map_config.json";
import { topMap } from "@/api/offLineMap";
export default {
name: 'zhenhaimap',
props: ['companyInfoList', 'deviceVideoInfoList'],
data() {
return {
dongtaiPoint: [121.604192, 29.977299],
WaringList: this.companyInfoList,
VideoInfoList: this.deviceVideoInfoList,
villageList: [],
villageSumList: [],
flag: true,
companyList: [],
}
},
mounted() {
this.$nextTick(() => {
this.initMap()
})
name: "zhenhaimap",
props: ["companyInfoList", "deviceVideoInfoList"],
data() {
return {
dongtaiPoint: [121.604192, 29.977299],
WaringList: this.companyInfoList,
VideoInfoList: this.deviceVideoInfoList,
villageList: [],
villageSumList: [],
flag: true,
companyList: [],
};
},
mounted() {
this.$nextTick(() => {
this.initMap();
});
topMap({ scoreType: "season" }).then((res) => {
this.companyList = res.data;
});
},
watch: {
companyInfoList: {
handler(newVal) {
this.WaringList = newVal;
this.initMap();
},
immediate: true,
},
watch: {
companyInfoList: {
handler(newVal) {
this.WaringList = newVal
this.initMap()
},
immediate: true
},
deviceVideoInfoList: {
handler(newVal) {
this.VideoInfoList = newVal
this.initMap()
},
immediate: true
}
deviceVideoInfoList: {
handler(newVal) {
this.VideoInfoList = newVal;
this.initMap();
},
immediate: true,
},
methods: {
goBack() {
this.initMap()
},
methods: {
goBack() {
this.initMap();
this.$emit('goBack')
this.$emit("goBack");
},
initMap() {
var BMap = window.BMap;
// console.log(BMap, 'BMap');
var map = new BMap.Map("container", {
style: {
styleJson,
},
initMap() {
var BMap = window.BMap
// console.log(BMap, 'BMap');
var map = new BMap.Map('container', {
style: {
styleJson
}
});
// console.log(this.WaringList, 'waringList');
let that = this
map.centerAndZoom(new BMap.Point(this.dongtaiPoint[0], this.dongtaiPoint[1]), 13);
map.setMinZoom(12)
map.setMaxZoom(19)
map.enableScrollWheelZoom(true);
// hjrequest({
// url: '/yc/dt/statistical/village',
// method: 'get',
// params: { areaCode: that.areaCode }
// }).then((res) => {
// that.villageSumList = res.data
// })
// console.log(MapLine, 'MapLine');
for (var i = 0, n = MapLine.features.length; i < n; i++) {
showBoundaryEx(MapLine.features[i]);
}
var label = new BMap.Label();
showPoint()
showPic()
function showBoundaryEx(city) {
var paths = []
var list = city.geometry.coordinates
// console.log(list.length, 'list[0].length')
//console.log(list[1], 'list[1].length')
var polygon = {}
if (list.length > 1) {
for (let a = 0; a < list.length; a++) {
paths = []
for (let i = 0; i < list[a][0].length; i++) {
let lat = list[a][0][i][1],
lng = list[a][0][i][0];
paths.push(new BMap.Point(lng, lat));
}
polygon = new BMap.Polygon(paths, {
fillColor: '#3b4c44',
strokeColor: "#0f1423",
fillOpacity: 0.6,
strokeWeight: 1
}); //
map.addOverlay(polygon); //
}
// // console.log(list, 'length');
} else {
// console.log(list[0], ' list[0]');
for (let i = 0; i < list[0].length; i++) {
let lat = list[0][i][1],
lng = list[0][i][0];
paths.push(new BMap.Point(lng, lat));
}
// console.log(list, 'length');
polygon = new BMap.Polygon(paths, {
fillColor: '#3b4c44',
strokeColor: "#0f1423",
fillOpacity: 0.6,
strokeWeight: 1
}); //
map.addOverlay(polygon); //
}
polygon.infowindow = new BMap.InfoWindow();
polygon.infowindow.name = city.properties.name;
polygon.addEventListener("mouseover", function () {
polygon.setFillColor("#ffa500");
});
polygon.addEventListener("mouseout", function () {
map.removeOverlay(label);
polygon.setFillColor('#3b4c44');
});
});
// console.log(this.WaringList, 'waringList');
let that = this;
map.centerAndZoom(
new BMap.Point(this.dongtaiPoint[0], this.dongtaiPoint[1]),
13
);
map.setMinZoom(12);
map.setMaxZoom(19);
map.enableScrollWheelZoom(true);
// hjrequest({
// url: '/yc/dt/statistical/village',
// method: 'get',
// params: { areaCode: that.areaCode }
// }).then((res) => {
// that.villageSumList = res.data
// })
// console.log(MapLine, 'MapLine');
for (var i = 0, n = MapLine.features.length; i < n; i++) {
showBoundaryEx(MapLine.features[i]);
}
var label = new BMap.Label();
showPoint();
showPic();
function showBoundaryEx(city) {
var paths = [];
var list = city.geometry.coordinates;
// console.log(list.length, 'list[0].length')
//console.log(list[1], 'list[1].length')
var polygon = {};
if (list.length > 1) {
for (let a = 0; a < list.length; a++) {
paths = [];
for (let i = 0; i < list[a][0].length; i++) {
let lat = list[a][0][i][1],
lng = list[a][0][i][0];
paths.push(new BMap.Point(lng, lat));
}
function showPoint() {
// console.log(MapPoint, 'MapPoint');
for (let i = 0; i < MapPoint.features.length; i++) {
var opts = {
position: new BMap.Point(MapPoint.features[i].geometry.coordinates[0], MapPoint.features[i].geometry.coordinates[1]), //
offset: new BMap.Size(-30, -30) //
};
polygon = new BMap.Polygon(paths, {
fillColor: "#3b4c44",
strokeColor: "#0f1423",
fillOpacity: 0.6,
strokeWeight: 1,
}); //
map.addOverlay(polygon); //
}
// // console.log(list, 'length');
} else {
// console.log(list[0], ' list[0]');
for (let i = 0; i < list[0].length; i++) {
let lat = list[0][i][1],
lng = list[0][i][0];
paths.push(new BMap.Point(lng, lat));
}
// console.log(list, 'length');
polygon = new BMap.Polygon(paths, {
fillColor: "#3b4c44",
strokeColor: "#0f1423",
fillOpacity: 0.6,
strokeWeight: 1,
}); //
map.addOverlay(polygon); //
}
polygon.infowindow = new BMap.InfoWindow();
polygon.infowindow.name = city.properties.name;
polygon.addEventListener("mouseover", function () {
polygon.setFillColor("#ffa500");
});
polygon.addEventListener("mouseout", function () {
map.removeOverlay(label);
polygon.setFillColor("#3b4c44");
});
// _1
polygon.addEventListener("click", function () {
if (city.properties.name == "骆驼街道") {
map.centerAndZoom(new BMap.Point(121.58887, 29.986122), 15);
} else if (city.properties.name == "招宝山街道") {
map.centerAndZoom(new BMap.Point(121.713707, 29.95656), 15);
} else if (city.properties.name == "蛟川街道") {
map.centerAndZoom(new BMap.Point(121.686105, 29.947339), 15);
} else if (city.properties.name == "庄市街道") {
map.centerAndZoom(new BMap.Point(121.627037, 29.925579), 15);
} else if (city.properties.name == "贵驷街道") {
map.centerAndZoom(new BMap.Point(121.624142, 29.985606), 15);
} else if (city.properties.name == "澥浦镇") {
map.centerAndZoom(new BMap.Point(121.607133, 30.037162), 15);
} else if (city.properties.name == "九龙湖镇") {
map.centerAndZoom(new BMap.Point(121.558532, 30.039457), 15);
}
// _2
that.companyList.forEach((item) => {
var point = new BMap.Point(item.longitude, item.latitude);
var marker = new BMap.Marker(point); //
map.addOverlay(marker);
var content = item.companyName;
var label = new BMap.Label(content, {
//
position: point, //
offset: new BMap.Size(-10, -50), //
});
label.setStyle({
backgroundColor: " rgba(0, 0, 0, 0)",
border: "0",
color: "#0060ce",
fontSize: "16px",
});
map.addOverlay(label);
})
});
}
function showPoint() {
// console.log(MapPoint, 'MapPoint');
for (let i = 0; i < MapPoint.features.length; i++) {
var opts = {
position: new BMap.Point(
MapPoint.features[i].geometry.coordinates[0],
MapPoint.features[i].geometry.coordinates[1]
), //
offset: new BMap.Size(-30, -30), //
};
//
var label1 = new BMap.Label(MapPoint.features[i].properties.name, opts);
//
label1.setStyle({
color: 'orange',
borderRadius: '5px',
borderColor: '#ccc',
padding: '10px',
fontSize: '16px',
height: '20px',
lineHeight: '20px',
backgroundColor: 'rgba(0,0,0,0)',
border: '0',
fontFamily: '微软雅黑'
});
map.addOverlay(label1);
}
//
var label1 = new BMap.Label(
MapPoint.features[i].properties.name,
opts
);
//
label1.setStyle({
color: "orange",
borderRadius: "5px",
borderColor: "#ccc",
padding: "10px",
fontSize: "16px",
height: "20px",
lineHeight: "20px",
backgroundColor: "rgba(0,0,0,0)",
border: "0",
fontFamily: "微软雅黑",
});
map.addOverlay(label1);
}
}
function showPic() {
// console.log(that.WaringList, 'that.WaringList');
that.WaringList.forEach((item) => {
//
var myIcon = new BMap.Icon(
"pbImg/企业icon悬浮.png",
new BMap.Size(80, 80)
);
myIcon.setImageUrl("pbImg/企业icon悬浮.png");
// Marker使
var marker = new BMap.Marker(
new BMap.Point(item.longitude, item.latitude),
{
icon: myIcon,
}
function showPic() {
// console.log(that.WaringList, 'that.WaringList');
that.WaringList.forEach(item => {
//
var myIcon = new BMap.Icon("pbImg/企业icon悬浮.png", new BMap.Size(80, 80));
myIcon.setImageUrl("pbImg/企业icon悬浮.png")
// Marker使
var marker = new BMap.Marker(new BMap.Point(item.longitude, item.latitude), {
icon: myIcon
});
// console.log(marker, 'marker');
map.addOverlay(marker);
marker.addEventListener("click", function () {
that.$emit('showCompanyData', item)
});
})
//that.flexPoint()
console.log(that.VideoInfoList, 'that.VideoInfoList');
that.VideoInfoList.forEach(item => {
//
var myIcon = new BMap.Icon("pbImg/监控icon悬浮.png", new BMap.Size(80, 80));
myIcon.setImageUrl("pbImg/监控icon悬浮.png")
// Marker使
var marker = new BMap.Marker(new BMap.Point(item.longitude, item.latitude), {
icon: myIcon
});
// console.log(marker, 'marker');
map.addOverlay(marker);
marker.addEventListener("click", function () {
that.$emit('showCameraData', item)
});
})
);
// console.log(marker, 'marker');
map.addOverlay(marker);
marker.addEventListener("click", function () {
that.$emit("showCompanyData", item);
});
});
//that.flexPoint()
console.log(that.VideoInfoList, "that.VideoInfoList");
that.VideoInfoList.forEach((item) => {
//
var myIcon = new BMap.Icon(
"pbImg/监控icon悬浮.png",
new BMap.Size(80, 80)
);
myIcon.setImageUrl("pbImg/监控icon悬浮.png");
// Marker使
var marker = new BMap.Marker(
new BMap.Point(item.longitude, item.latitude),
{
icon: myIcon,
}
},
flexPoint() {
var pointAll = document.querySelectorAll('.BMap_Marker.BMap_noprint')
console.log(pointAll, 'pointAll');
}
}
}
);
// console.log(marker, 'marker');
map.addOverlay(marker);
marker.addEventListener("click", function () {
that.$emit("showCameraData", item);
});
});
}
},
flexPoint() {
var pointAll = document.querySelectorAll(".BMap_Marker.BMap_noprint");
console.log(pointAll, "pointAll");
},
},
};
</script>
<style scoped lang="less">
.bmap {
width: 100%;
height: 100%;
border: 1px solid #000000;
width: 100%;
height: 100%;
border: 1px solid #000000;
}
// /deep/ .BMap_Marker {
// z-index: 1000;
// background: url('../../../public/dongtai/awrni.png') no-repeat !important;
@ -217,16 +272,15 @@ export default {
// }
.fanhui {
display: inline-block;
width: 50px;
height: 20px;
position: absolute;
left: 49%;
bottom: 30px;
display: flex;
justify-content: center;
align-items: center;
z-index: 50;
display: inline-block;
width: 50px;
height: 20px;
position: absolute;
left: 49%;
bottom: 30px;
display: flex;
justify-content: center;
align-items: center;
z-index: 50;
}
</style>

@ -5,30 +5,57 @@
<img src="../assets/companyFile/编组 7212.png" />
</div>
<div class="headText">镇海平安企业园区</div>
<el-menu :default-active="activeIndex" class="el-menu-demo topMenu" mode="horizontal" @select="handleSelect"
:router="true">
<el-menu
:default-active="activeIndex"
class="el-menu-demo topMenu"
mode="horizontal"
@select="handleSelect"
:router="true"
>
<div class="shu"></div>
<el-menu-item index="1" route="/home/safetyIndex">综合指数</el-menu-item>
<el-menu-item index="1" route="/home/safetyIndex"
>综合指数</el-menu-item
>
<div class="shu"></div>
<el-menu-item index="2" route="/home/realtimeWarning">实时预警</el-menu-item>
<el-menu-item index="2" route="/home/realtimeWarning"
>实时预警</el-menu-item
>
<div class="shu"></div>
<el-menu-item index="3" route="/home/closeLoopDispose">闭环处置</el-menu-item>
<el-menu-item index="3" route="/home/closeLoopDispose"
>闭环处置</el-menu-item
>
<div class="shu"></div>
<el-menu-item index="4" route="/home/factorResources">要素资源</el-menu-item>
<el-menu-item index="4" route="/home/factorResources"
>要素资源</el-menu-item
>
<div class="shu"></div>
<el-menu-item index="5" route="/home/enterpriseArchives">企业档案</el-menu-item>
<el-menu-item index="5" route="/home/enterpriseArchives"
>企业档案</el-menu-item
>
<div class="shu"></div>
<el-menu-item index="6" route="/home/applySupermarket">应用超市</el-menu-item>
<el-menu-item index="6" route="/home/applySupermarket"
>应用超市</el-menu-item
>
<div class="shu"></div>
<el-menu-item index="7" route="/home/systemManagement/safeIndex">系统管理</el-menu-item>
<el-menu-item index="7" route="/home/systemManagement/safeIndex"
>系统管理</el-menu-item
>
<div class="shu"></div>
</el-menu>
<div class="jingGuan">
<div class="jgtx">
<div class="jgtx" @click="check_user">
<img src="../assets/companyFile/12110.png" />
</div>
&nbsp;&nbsp; 王警官
</div>
<div class="user_box" v-show="user_show">
<div class="user_box_body">
<!-- 用户个人中心 -->
<div class="user_center">修改密码</div>
<!-- 用户退出登录 -->
<div class="user_check_login" @click="logout">退</div>
</div>
</div>
</div>
<router-view />
</div>
@ -36,18 +63,37 @@
<script>
export default {
name: "Head",
data() {
return {
activeIndex: "1",
activeIndex2: "1",
user_show: false,
};
},
created() {
this.activeIndex = sessionStorage.getItem('activeIndex') ? sessionStorage.getItem('activeIndex') : '1'
this.activeIndex = sessionStorage.getItem("activeIndex")
? sessionStorage.getItem("activeIndex")
: "1";
},
methods: {
handleSelect(key) {
sessionStorage.setItem('activeIndex', key)
sessionStorage.setItem("activeIndex", key);
},
// 退
check_user() {
if (this.user_show) {
this.user_show = false;
} else {
this.user_show = true;
}
},
// 退
logout() {
// token
window.sessionStorage.clear();
//
this.$router.push("/login");
},
},
};
@ -113,7 +159,47 @@ export default {
}
}
}
.user_box {
position: absolute;
top: 70px;
right: 10px;
width: 180px;
height: 100px;
// border: 0.1px solid #33cccc;
padding: 10px;
background: url("~@/assets/archives/023.png") no-repeat;
background-size: 100% 100%;
z-index: 2;
.user_box_body {
width: 160px;
height: 80px;
// border: 0.1px solid #33cccc;
}
.user_center {
width: 160px;
height: 40px;
color: #d9e7ff;
text-align: center;
line-height: 40px;
cursor: pointer;
}
.user_check_login {
width: 160px;
height: 40px;
color: #d9e7ff;
text-align: center;
line-height: 40px;
cursor: pointer;
}
.user_center:hover,
.user_center:focus {
text-shadow: 0 0 20px rgba(21, 255, 198, 0.64);
}
.user_check_login:hover,
.user_check_login:focus {
text-shadow: 0 0 20px rgba(21, 255, 198, 0.64);
}
}
/deep/.el-menu {
border: 0;
background-color: rgba(0, 0, 0, 0);
@ -164,12 +250,12 @@ export default {
justify-content: center;
align-items: center;
padding: 10px 20px;
background: url('~@/assets/companyFile/Rectangle Copy 4.png') no-repeat;
background: url("~@/assets/companyFile/Rectangle Copy 4.png") no-repeat;
background-size: 100% 100%;
font-size: 16px;
color: #D9E7FF;
color: #d9e7ff;
letter-spacing: 3px;
text-align: center;
font-weight: 400;
@ -183,7 +269,7 @@ export default {
}
.is-active {
background: url('~@/assets/companyFile/891771.png') no-repeat;
background: url("~@/assets/companyFile/891771.png") no-repeat;
background-size: 100% 100%;
}

File diff suppressed because it is too large Load Diff

@ -1,179 +1,184 @@
<template>
<div>
<div class="bmap" id="container" ref="container"></div>
</div>
<div>
<div class="bmap" id="container" ref="container"></div>
</div>
</template>
<script>
import MapLine from "../../../public/zhenhaiLine.json"
import MapPoint from "../../../public/zhenhaiPoint.json"
import styleJson from "../../../public/custom_map_config.json"
import MapLine from "../../../public/zhenhaiLine.json";
import MapPoint from "../../../public/zhenhaiPoint.json";
import styleJson from "../../../public/custom_map_config.json";
import { topMap } from "@/api/offLineMap";
export default {
name: 'zhenhaimap',
props: ['waringList'],
data() {
return {
dongtaiPoint: [121.604192, 29.977299],
WaringList: this.waringList,
villageList: [],
villageSumList: [],
flag: true,
companyList: [],
}
},
mounted() {
this.$nextTick(() => {
this.initMap()
})
name: "zhenhaimap",
props: ["waringList"],
data() {
return {
dongtaiPoint: [121.604192, 29.977299],
WaringList: this.waringList,
villageList: [],
villageSumList: [],
flag: true,
companyList: [],
};
},
mounted() {
this.$nextTick(() => {
this.initMap();
});
topMap({ scoreType: "season" }).then((res) => {
this.companyList = res.data;
});
},
methods: {
goBack() {
this.initMap();
this.$emit("goBack");
},
methods: {
goBack() {
this.initMap()
this.$emit('goBack')
initMap() {
var BMap = window.BMap;
// console.log(BMap, 'BMap');
var map = new BMap.Map("container", {
style: {
styleJson,
},
initMap() {
var BMap = window.BMap
// console.log(BMap, 'BMap');
var map = new BMap.Map('container', {
style: {
styleJson
}
});
// console.log(this.WaringList, 'waringList');
let that = this
map.centerAndZoom(new BMap.Point(this.dongtaiPoint[0], this.dongtaiPoint[1]), 13);
map.setMinZoom(12)
map.setMaxZoom(19)
map.enableScrollWheelZoom(true);
// hjrequest({
// url: '/yc/dt/statistical/village',
// method: 'get',
// params: { areaCode: that.areaCode }
// }).then((res) => {
// that.villageSumList = res.data
// })
// console.log(MapLine, 'MapLine');
for (var i = 0, n = MapLine.features.length; i < n; i++) {
showBoundaryEx(MapLine.features[i]);
}
var label = new BMap.Label();
showPoint()
showPic()
function showBoundaryEx(city) {
var paths = []
var list = city.geometry.coordinates
});
// console.log(list.length, 'list[0].length')
//console.log(list[1], 'list[1].length')
var polygon = {}
if (list.length > 1) {
for (let a = 0; a < list.length; a++) {
paths = []
for (let i = 0; i < list[a][0].length; i++) {
let lat = list[a][0][i][1],
lng = list[a][0][i][0];
paths.push(new BMap.Point(lng, lat));
}
polygon = new BMap.Polygon(paths, {
fillColor: '#3b4c44',
strokeColor: "#0f1423",
fillOpacity: 0.6,
strokeWeight: 1
}); //
map.addOverlay(polygon); //
}
// // console.log(list, 'length');
} else {
// console.log(list[0], ' list[0]');
for (let i = 0; i < list[0].length; i++) {
let lat = list[0][i][1],
lng = list[0][i][0];
paths.push(new BMap.Point(lng, lat));
}
// console.log(list, 'length');
polygon = new BMap.Polygon(paths, {
fillColor: '#3b4c44',
strokeColor: "#0f1423",
fillOpacity: 0.6,
strokeWeight: 1
}); //
map.addOverlay(polygon); //
}
polygon.infowindow = new BMap.InfoWindow();
polygon.infowindow.name = city.properties.name;
polygon.addEventListener("mouseover", function () {
polygon.setFillColor("#ffa500");
});
polygon.addEventListener("mouseout", function () {
map.removeOverlay(label);
polygon.setFillColor('#3b4c44');
});
}
function showPoint() {
// console.log(MapPoint, 'MapPoint');
// console.log(this.WaringList, 'waringList');
let that = this;
map.centerAndZoom(
new BMap.Point(this.dongtaiPoint[0], this.dongtaiPoint[1]),
13
);
map.setMinZoom(12);
map.setMaxZoom(19);
map.enableScrollWheelZoom(true);
// hjrequest({
// url: '/yc/dt/statistical/village',
// method: 'get',
// params: { areaCode: that.areaCode }
// }).then((res) => {
// that.villageSumList = res.data
// })
// console.log(MapLine, 'MapLine');
for (var i = 0, n = MapLine.features.length; i < n; i++) {
showBoundaryEx(MapLine.features[i]);
}
var label = new BMap.Label();
showPoint();
showPic();
for (let i = 0; i < MapPoint.features.length; i++) {
var opts = {
position: new BMap.Point(MapPoint.features[i].geometry.coordinates[0], MapPoint.features[i].geometry.coordinates[1]), //
offset: new BMap.Size(-30, -30) //
};
function showBoundaryEx(city) {
var paths = [];
var list = city.geometry.coordinates;
//
var label1 = new BMap.Label(MapPoint.features[i].properties.name, opts);
//
label1.setStyle({
color: 'orange',
borderRadius: '5px',
borderColor: '#ccc',
padding: '10px',
fontSize: '16px',
height: '20px',
lineHeight: '20px',
backgroundColor: 'rgba(0,0,0,0)',
border: '0',
fontFamily: '微软雅黑'
});
map.addOverlay(label1);
}
// console.log(list.length, 'list[0].length')
//console.log(list[1], 'list[1].length')
var polygon = {};
if (list.length > 1) {
for (let a = 0; a < list.length; a++) {
paths = [];
for (let i = 0; i < list[a][0].length; i++) {
let lat = list[a][0][i][1],
lng = list[a][0][i][0];
paths.push(new BMap.Point(lng, lat));
}
function showPic() {
// console.log(that.WaringList, 'that.WaringList');
that.WaringList.forEach(item => {
//
var myIcon = new BMap.Icon("public/dongtai/awrni.png", new BMap.Size(80, 80));
myIcon.setImageUrl("/dongtai/awrni.png")
// Marker使
var marker = new BMap.Marker(new BMap.Point(item.longitude, item.latitude), {
icon: myIcon
});
// console.log(marker, 'marker');
map.addOverlay(marker);
marker.addEventListener("click", function () {
var label = new BMap.Label();
label.setStyle({
color: 'blue',
borderRadius: '5px',
borderColor: '#ccc',
padding: '10px',
fontSize: '16px',
fontFamily: '微软雅黑',
transform: 'translateX(-50%) translateY(calc(-100% - 10px))'
});
label.setPosition(new BMap.Point(item.longitude, item.latitude));
label.setOffset(new BMap.Size(130, -10))
label.setStyle({ width: '340px', height: '238px', background: 'url(pbImg/气泡弹窗1.png) no-repeat', backgroundSize: '100% 100%', border: '0', color: '#fff', zIndex: 2000000000, })
label.setContent(`
polygon = new BMap.Polygon(paths, {
fillColor: "#3b4c44",
strokeColor: "#0f1423",
fillOpacity: 0.6,
strokeWeight: 1,
}); //
map.addOverlay(polygon); //
}
// // console.log(list, 'length');
} else {
// console.log(list[0], ' list[0]');
for (let i = 0; i < list[0].length; i++) {
let lat = list[0][i][1],
lng = list[0][i][0];
paths.push(new BMap.Point(lng, lat));
}
// console.log(list, 'length');
polygon = new BMap.Polygon(paths, {
fillColor: "#3b4c44",
strokeColor: "#0f1423",
fillOpacity: 0.6,
strokeWeight: 1,
}); //
map.addOverlay(polygon); //
}
polygon.infowindow = new BMap.InfoWindow();
polygon.infowindow.name = city.properties.name;
polygon.addEventListener("mouseover", function () {
polygon.setFillColor("#ffa500");
});
polygon.addEventListener("mouseout", function () {
map.removeOverlay(label);
polygon.setFillColor("#3b4c44");
});
// _1
polygon.addEventListener("click", function () {
if (city.properties.name == "骆驼街道") {
map.centerAndZoom(new BMap.Point(121.58887, 29.986122), 15);
} else if (city.properties.name == "招宝山街道") {
map.centerAndZoom(new BMap.Point(121.713707, 29.95656), 15);
} else if (city.properties.name == "蛟川街道") {
map.centerAndZoom(new BMap.Point(121.686105, 29.947339), 15);
} else if (city.properties.name == "庄市街道") {
map.centerAndZoom(new BMap.Point(121.627037, 29.925579), 15);
} else if (city.properties.name == "贵驷街道") {
map.centerAndZoom(new BMap.Point(121.624142, 29.985606), 15);
} else if (city.properties.name == "澥浦镇") {
map.centerAndZoom(new BMap.Point(121.607133, 30.037162), 15);
} else if (city.properties.name == "九龙湖镇") {
map.centerAndZoom(new BMap.Point(121.558532, 30.039457), 15);
}
// _2
that.companyList.forEach((item) => {
var point = new BMap.Point(item.longitude, item.latitude);
var marker = new BMap.Marker(point); //
map.addOverlay(marker);
var content = item.companyName;
var label = new BMap.Label(content, {
//
position: point, //
offset: new BMap.Size(-10, -50), //
});
label.setStyle({
backgroundColor: " rgba(0, 0, 0, 0)",
border: "0",
color: "#0060ce",
fontSize: "16px",
});
map.addOverlay(label);
label.addEventListener("click", function () {
var label_ponit = new BMap.Label(); //
label_ponit.setStyle({
color: "blue",
borderRadius: "5px",
borderColor: "#ccc",
padding: "10px",
fontSize: "16px",
fontFamily: "微软雅黑",
transform: "translateX(-50%) translateY(calc(-100% - 10px))",
});
//
label_ponit.setPosition(
new BMap.Point(item.longitude, item.latitude)
);
label_ponit.setOffset(new BMap.Size(130, -10));
label_ponit.setStyle({
width: "340px",
height: "238px",
background: "url(pbImg/气泡弹窗1.png) no-repeat",
backgroundSize: "100% 100%",
border: "0",
color: "#fff",
zIndex: 2000000000,
});
label_ponit.setContent(`
<div style='width:100%;display:flex;justify-content: space-between;align-items: center;'> <h4 style='margin:12px;font-size: 14px;color: #FFE6D9;overflow: hidden;text-overflow: ellipsis;white-space: nowrap; '>${item.companyName}</h4><div class='closeBtn' style='background: url(pbImg/关闭.png) no-repeat;width:20px;height:20px;background-size: 100% 100%;margin-right:10px;"'></div></div>
<div style='margin:0 auto;font-size: 14px;width:316px;height:108px;padding:0 12px;background: rgba(108,128,151,0.20);border: 1px solid rgba(73,84,97,1);'>
<h4 style='height:33%;opacity: 0.8;margin:0;line-height:38px;font-weight:300;'><span style="color:#D0DEEE;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">一级指标</span>${item.levelIndexOne}</h4>
@ -191,62 +196,165 @@ margin-left:80px;
font-weight: 400;'>转处置</div>
</div>
`);
map.addOverlay(label);
let btn = document.querySelector('.zhuanchuzhiBtn')
//console.log(btn, 'btn');
btn.addEventListener('click', () => {
//console.log(item, 'item');
that.$emit('zhuanchuzhi', item)
})
let closebtn = document.querySelector('.closeBtn')
//console.log(btn, 'btn');
closebtn.addEventListener('click', () => {
map.removeOverlay(label);
})
// label.addEventListener('mouseout', function () {
// map.removeOverlay(label);
// })
});
})
//that.flexPoint()
}
},
flexPoint() {
var pointAll = document.querySelectorAll('.BMap_Marker.BMap_noprint')
console.log(pointAll, 'pointAll');
map.addOverlay(label_ponit);
let btn = document.querySelector(".zhuanchuzhiBtn");
//console.log(btn, 'btn');
btn.addEventListener("click", () => {
//console.log(item, 'item');
that.$emit("zhuanchuzhi", item);
});
let closebtn = document.querySelector(".closeBtn");
//console.log(btn, 'btn');
closebtn.addEventListener("click", () => {
map.removeOverlay(label_ponit);
});
});
});
});
}
function showPoint() {
// console.log(MapPoint, 'MapPoint');
for (let i = 0; i < MapPoint.features.length; i++) {
var opts = {
position: new BMap.Point(
MapPoint.features[i].geometry.coordinates[0],
MapPoint.features[i].geometry.coordinates[1]
), //
offset: new BMap.Size(-30, -30), //
};
//
var label1 = new BMap.Label(
MapPoint.features[i].properties.name,
opts
);
//
label1.setStyle({
color: "orange",
borderRadius: "5px",
borderColor: "#ccc",
padding: "10px",
fontSize: "16px",
height: "20px",
lineHeight: "20px",
backgroundColor: "rgba(0,0,0,0)",
border: "0",
fontFamily: "微软雅黑",
});
map.addOverlay(label1);
}
}
}
}
function showPic() {
// console.log(that.WaringList, 'that.WaringList');
that.WaringList.forEach((item) => {
//
var myIcon = new BMap.Icon(
"public/dongtai/awrni.png",
new BMap.Size(80, 80)
);
myIcon.setImageUrl("/dongtai/awrni.png");
// Marker使
var marker = new BMap.Marker(
new BMap.Point(item.longitude, item.latitude),
{
icon: myIcon,
}
);
console.log(marker, "marker");
map.addOverlay(marker);
marker.addEventListener("click", function () {
var label = new BMap.Label();
label.setStyle({
color: "blue",
borderRadius: "5px",
borderColor: "#ccc",
padding: "10px",
fontSize: "16px",
fontFamily: "微软雅黑",
transform: "translateX(-50%) translateY(calc(-100% - 10px))",
});
//
label.setPosition(new BMap.Point(item.longitude, item.latitude));
label.setOffset(new BMap.Size(130, -10));
label.setStyle({
width: "340px",
height: "238px",
background: "url(pbImg/气泡弹窗1.png) no-repeat",
backgroundSize: "100% 100%",
border: "0",
color: "#fff",
zIndex: 2000000000,
});
label.setContent(`
<div style='width:100%;display:flex;justify-content: space-between;align-items: center;'> <h4 style='margin:12px;font-size: 14px;color: #FFE6D9;overflow: hidden;text-overflow: ellipsis;white-space: nowrap; '>${item.companyName}</h4><div class='closeBtn' style='background: url(pbImg/关闭.png) no-repeat;width:20px;height:20px;background-size: 100% 100%;margin-right:10px;"'></div></div>
<div style='margin:0 auto;font-size: 14px;width:316px;height:108px;padding:0 12px;background: rgba(108,128,151,0.20);border: 1px solid rgba(73,84,97,1);'>
<h4 style='height:33%;opacity: 0.8;margin:0;line-height:38px;font-weight:300;'><span style="color:#D0DEEE;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">一级指标</span>${item.levelIndexOne}</h4>
<h4 style='height:33%;opacity: 0.8;margin:0;line-height:38px;font-weight:300;'><span style="color:#D0DEEE;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">预警指标</span>"${item.levelIndexThree}"异常</h4>
<h4 style='height:33%;opacity: 0.8;margin:0;line-height:38px;font-weight:300;'><span style="color:#D0DEEE;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">预警时间</span>${item.alarmTime}</h4>
<div class='zhuanchuzhiBtn' style='width:80px;height:34px;font-size: 14px;
color: #FFFFFF;
text-align:center;
line-height:34px;
background: url(pbImg/2121.png) no-repeat;
margin-top:20px;
background-size: 100% 100%;
letter-spacing: 0;
margin-left:80px;
font-weight: 400;'>转处置</div>
</div>
`);
map.addOverlay(label);
let btn = document.querySelector(".zhuanchuzhiBtn");
//console.log(btn, 'btn');
btn.addEventListener("click", () => {
//console.log(item, 'item');
that.$emit("zhuanchuzhi", item);
});
let closebtn = document.querySelector(".closeBtn");
//console.log(btn, 'btn');
closebtn.addEventListener("click", () => {
map.removeOverlay(label);
});
// label.addEventListener('mouseout', function () {
// map.removeOverlay(label);
// })
});
});
//that.flexPoint()
}
},
flexPoint() {
var pointAll = document.querySelectorAll(".BMap_Marker.BMap_noprint");
console.log(pointAll, "pointAll");
},
},
};
</script>
<style scoped lang="less">
.bmap {
width: 100%;
height: 100%;
border: 1px solid #000000;
width: 100%;
height: 100%;
border: 1px solid #000000;
}
/deep/ .BMap_Marker {
z-index: 1000;
background: url('../../../public/dongtai/awrni.png') no-repeat !important;
background-size: 100% 100% !important;
z-index: 1000;
background: url("../../../public/dongtai/awrni.png") no-repeat !important;
background-size: 100% 100% !important;
}
.fanhui {
display: inline-block;
width: 50px;
height: 20px;
position: absolute;
left: 49%;
bottom: 30px;
display: flex;
justify-content: center;
align-items: center;
z-index: 50;
display: inline-block;
width: 50px;
height: 20px;
position: absolute;
left: 49%;
bottom: 30px;
display: flex;
justify-content: center;
align-items: center;
z-index: 50;
}
</style>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save