|
|
|
@ -11,12 +11,12 @@
|
|
|
|
|
</template>
|
|
|
|
|
<div>
|
|
|
|
|
<el-descriptions :border="false" :column="1" size="mini">
|
|
|
|
|
<el-descriptions-item label="事件编号">2023073024252</el-descriptions-item>
|
|
|
|
|
<el-descriptions-item label="事件标题">下水道结冰堵塞</el-descriptions-item>
|
|
|
|
|
<el-descriptions-item label="事件类型">城市安全类</el-descriptions-item>
|
|
|
|
|
<el-descriptions-item label="事件地址">XXXXXXXXXXXXXXXXXXXX</el-descriptions-item>
|
|
|
|
|
<el-descriptions-item label="发生时间">2023-07-30</el-descriptions-item>
|
|
|
|
|
<el-descriptions-item label="所属网格">网格2</el-descriptions-item>
|
|
|
|
|
<el-descriptions-item label="事件编号">{{ markerInfo.rand_number }}</el-descriptions-item>
|
|
|
|
|
<el-descriptions-item label="事件标题">{{ markerInfo.name }}</el-descriptions-item>
|
|
|
|
|
<el-descriptions-item label="事件类型">{{ markerInfo.type }}</el-descriptions-item>
|
|
|
|
|
<el-descriptions-item label="事件地址">{{ markerInfo.address }}</el-descriptions-item>
|
|
|
|
|
<el-descriptions-item label="发生时间">{{ markerInfo.open_time }}</el-descriptions-item>
|
|
|
|
|
<el-descriptions-item label="所属网格">XXX</el-descriptions-item>
|
|
|
|
|
</el-descriptions>
|
|
|
|
|
</div>
|
|
|
|
|
<template slot="footer">
|
|
|
|
@ -31,16 +31,9 @@
|
|
|
|
|
<script>
|
|
|
|
|
import L from "leaflet"
|
|
|
|
|
import "@/utils/lib/leaflet.ChineseTmsProviders.js";
|
|
|
|
|
import oneGJ02 from "@/utils/lib/jiangningqu/1GJ02(1).json"; // 一中队
|
|
|
|
|
import twoGJ02 from "@/utils/lib/jiangningqu/1GJ02(2).json"; // 二中队
|
|
|
|
|
import threeGJ02 from "@/utils/lib/jiangningqu/1GJ02(3).json"; // 三中队
|
|
|
|
|
import fourGJ02 from "@/utils/lib/jiangningqu/1GJ02(4).json"; // 四中队
|
|
|
|
|
|
|
|
|
|
import ruanjianyuan from "@/utils/lib/jiangningqu/1GJ02(5).json"; // 软件园
|
|
|
|
|
import konggang from "@/utils/lib/jiangningqu/1GJ02(6).json"; // 空港开发区
|
|
|
|
|
import onLine from "@/utils/lib/jiangningqu/onLine.json";
|
|
|
|
|
// 重点路段 重点区域 网格 图标获取 手机号和人员名称查询 部门查询 部门id查询 imei查询用户信息
|
|
|
|
|
import { listZdld, listZdqy, levelQywg, getFenceList } from "@/api/basicsSet";
|
|
|
|
|
import { robotLogin, ViewListPage } from "@/api/root";
|
|
|
|
|
export default {
|
|
|
|
|
name: 'HelloWorld',
|
|
|
|
|
data(){
|
|
|
|
@ -51,9 +44,11 @@ export default {
|
|
|
|
|
mapLayer1:null,
|
|
|
|
|
mapLayer2:null,
|
|
|
|
|
mapLayer3:null,
|
|
|
|
|
mapLayer1Text:null,
|
|
|
|
|
},
|
|
|
|
|
dialogVisible:false,
|
|
|
|
|
onLoad:false,
|
|
|
|
|
markerInfo:{},
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
props: {
|
|
|
|
@ -105,37 +100,43 @@ export default {
|
|
|
|
|
this.mapLayers.mapLayer1 = L.featureGroup().addTo(this.map);
|
|
|
|
|
this.mapLayers.mapLayer2 = L.featureGroup().addTo(this.map);
|
|
|
|
|
this.mapLayers.mapLayer3 = L.featureGroup().addTo(this.map);
|
|
|
|
|
this.mapLayers.mapLayer1Text = L.featureGroup().addTo(this.map);
|
|
|
|
|
this.map.on("zoom", () => {
|
|
|
|
|
let zoom = this.map.getZoom();
|
|
|
|
|
if (zoom >= 13) {
|
|
|
|
|
this.map.removeLayer(this.mapLayers.mapLayer1)
|
|
|
|
|
this.map.removeLayer(this.mapLayers.mapLayer1Text)
|
|
|
|
|
this.map.addLayer(this.mapLayers.mapLayer2)
|
|
|
|
|
this.map.addLayer(this.mapLayers.mapLayer3)
|
|
|
|
|
} else {
|
|
|
|
|
this.map.addLayer(this.mapLayers.mapLayer1)
|
|
|
|
|
this.map.addLayer(this.mapLayers.mapLayer1Text)
|
|
|
|
|
this.map.removeLayer(this.mapLayers.mapLayer2)
|
|
|
|
|
this.map.removeLayer(this.mapLayers.mapLayer3)
|
|
|
|
|
}
|
|
|
|
|
if(zoom <= 10) {
|
|
|
|
|
this.map.removeLayer(this.mapLayers.mapLayer1Text)
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
let zoom = this.map.getZoom();
|
|
|
|
|
if (zoom >= 13) {
|
|
|
|
|
this.map.removeLayer(this.mapLayers.mapLayer1)
|
|
|
|
|
this.map.removeLayer(this.mapLayers.mapLayer1Text)
|
|
|
|
|
this.map.addLayer(this.mapLayers.mapLayer2)
|
|
|
|
|
this.map.addLayer(this.mapLayers.mapLayer3)
|
|
|
|
|
} else {
|
|
|
|
|
this.map.addLayer(this.mapLayers.mapLayer1)
|
|
|
|
|
this.map.addLayer(this.mapLayers.mapLayer1Text)
|
|
|
|
|
this.map.removeLayer(this.mapLayers.mapLayer2)
|
|
|
|
|
this.map.removeLayer(this.mapLayers.mapLayer3)
|
|
|
|
|
}
|
|
|
|
|
// 中队
|
|
|
|
|
// this.zhongdui();
|
|
|
|
|
// 空港
|
|
|
|
|
// this.konggangMap();
|
|
|
|
|
// 软件园
|
|
|
|
|
// this.ruanjianyuanMap();
|
|
|
|
|
robotLogin({username:"superAdmin",password:"sa@123456"}).then(res=>{
|
|
|
|
|
if(res.code == 200) {
|
|
|
|
|
localStorage.setItem('robotToken',res.result.token)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
// 点位信息
|
|
|
|
|
this.eventPoint();
|
|
|
|
|
// console.log(onLine,"在线情况");
|
|
|
|
|
// 重点区域
|
|
|
|
|
this.zhongdianMap();
|
|
|
|
|
// 围栏1
|
|
|
|
@ -145,208 +146,35 @@ export default {
|
|
|
|
|
// 网格
|
|
|
|
|
this.wanggeMap();
|
|
|
|
|
},
|
|
|
|
|
// 中队
|
|
|
|
|
zhongdui() {
|
|
|
|
|
let one = L.geoJSON(oneGJ02, {
|
|
|
|
|
pane: "mapLayer2",
|
|
|
|
|
style: function (feature) {
|
|
|
|
|
return {
|
|
|
|
|
color: "#1E83EB",
|
|
|
|
|
weight: 2,
|
|
|
|
|
fillColor: "#1E83EB",
|
|
|
|
|
fillOpacity: 0.2,
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
onEachFeature: (feature, layer) => {
|
|
|
|
|
// console.log(feature,'feature');
|
|
|
|
|
let bounds = layer._bounds;
|
|
|
|
|
let center = bounds.getCenter();
|
|
|
|
|
let myIcon = L.divIcon({
|
|
|
|
|
className: "region-name3",
|
|
|
|
|
html: feature.properties.NAME,
|
|
|
|
|
iconSize: [80, 24],
|
|
|
|
|
iconAnchor: [20, 0],
|
|
|
|
|
});
|
|
|
|
|
// 多边形上的标记点;
|
|
|
|
|
// L.marker({lng:feature.properties.CENTERX,lat:feature.properties.CENTERY}, {
|
|
|
|
|
L.marker(center, {
|
|
|
|
|
pane: "mapLayer3",
|
|
|
|
|
icon: myIcon,
|
|
|
|
|
}).addTo(this.mapLayers.mapLayer3);
|
|
|
|
|
},
|
|
|
|
|
}).addTo(this.mapLayers.mapLayer2);
|
|
|
|
|
let two = L.geoJSON(twoGJ02, {
|
|
|
|
|
pane: "mapLayer2",
|
|
|
|
|
style: function (feature) {
|
|
|
|
|
return {
|
|
|
|
|
color: "#1E83EB",
|
|
|
|
|
weight: 2,
|
|
|
|
|
fillColor: "#1E83EB",
|
|
|
|
|
fillOpacity: 0.2,
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
onEachFeature: (feature, layer) => {
|
|
|
|
|
// console.log(feature,'feature');
|
|
|
|
|
let bounds = layer._bounds;
|
|
|
|
|
let center = bounds.getCenter();
|
|
|
|
|
let myIcon = L.divIcon({
|
|
|
|
|
className: "region-name3",
|
|
|
|
|
html: feature.properties.NAME,
|
|
|
|
|
iconSize: [80, 24],
|
|
|
|
|
iconAnchor: [20, 0],
|
|
|
|
|
});
|
|
|
|
|
// 多边形上的标记点;
|
|
|
|
|
// L.marker({lng:feature.properties.CENTERX,lat:feature.properties.CENTERY}, {
|
|
|
|
|
L.marker(center, {
|
|
|
|
|
pane: "mapLayer3",
|
|
|
|
|
icon: myIcon,
|
|
|
|
|
}).addTo(this.mapLayers.mapLayer3);
|
|
|
|
|
},
|
|
|
|
|
}).addTo(this.mapLayers.mapLayer2);
|
|
|
|
|
let three = L.geoJSON(threeGJ02, {
|
|
|
|
|
pane: "mapLayer2",
|
|
|
|
|
style: function (feature) {
|
|
|
|
|
return {
|
|
|
|
|
color: "#1E83EB",
|
|
|
|
|
weight: 2,
|
|
|
|
|
fillColor: "#1E83EB",
|
|
|
|
|
fillOpacity: 0.2,
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
onEachFeature: (feature, layer) => {
|
|
|
|
|
// console.log(feature,'feature');
|
|
|
|
|
let bounds = layer._bounds;
|
|
|
|
|
let center = bounds.getCenter();
|
|
|
|
|
let myIcon = L.divIcon({
|
|
|
|
|
className: "region-name3",
|
|
|
|
|
html: feature.properties.NAME,
|
|
|
|
|
iconSize: [80, 24],
|
|
|
|
|
iconAnchor: [20, 0],
|
|
|
|
|
});
|
|
|
|
|
// 多边形上的标记点;
|
|
|
|
|
// L.marker({lng:feature.properties.CENTERX,lat:feature.properties.CENTERY}, {
|
|
|
|
|
L.marker(center, {
|
|
|
|
|
pane: "mapLayer3",
|
|
|
|
|
icon: myIcon,
|
|
|
|
|
}).addTo(this.mapLayers.mapLayer3);
|
|
|
|
|
},
|
|
|
|
|
}).addTo(this.mapLayers.mapLayer2);
|
|
|
|
|
let four = L.geoJSON(fourGJ02, {
|
|
|
|
|
pane: "mapLayer2",
|
|
|
|
|
style: function (feature) {
|
|
|
|
|
return {
|
|
|
|
|
color: "#1E83EB",
|
|
|
|
|
weight: 2,
|
|
|
|
|
fillColor: "#1E83EB",
|
|
|
|
|
fillOpacity: 0.2,
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
onEachFeature: (feature, layer) => {
|
|
|
|
|
// console.log(feature,'feature');
|
|
|
|
|
let bounds = layer._bounds;
|
|
|
|
|
let center = bounds.getCenter();
|
|
|
|
|
let myIcon = L.divIcon({
|
|
|
|
|
className: "region-name3",
|
|
|
|
|
html: feature.properties.NAME,
|
|
|
|
|
iconSize: [80, 24],
|
|
|
|
|
iconAnchor: [20, 0],
|
|
|
|
|
});
|
|
|
|
|
// 多边形上的标记点;
|
|
|
|
|
// L.marker({lng:feature.properties.CENTERX,lat:feature.properties.CENTERY}, {
|
|
|
|
|
L.marker(center, {
|
|
|
|
|
pane: "mapLayer3",
|
|
|
|
|
icon: myIcon,
|
|
|
|
|
}).addTo(this.mapLayers.mapLayer3);
|
|
|
|
|
},
|
|
|
|
|
}).addTo(this.mapLayers.mapLayer2);
|
|
|
|
|
const bounds = four.getBounds();
|
|
|
|
|
let center = bounds.getCenter();
|
|
|
|
|
this.map.setView(center, 11);
|
|
|
|
|
},
|
|
|
|
|
// 空港开发区
|
|
|
|
|
konggangMap() {
|
|
|
|
|
let kg = L.geoJSON(konggang, {
|
|
|
|
|
pane: "mapLayer2",
|
|
|
|
|
style: function (feature) {
|
|
|
|
|
return {
|
|
|
|
|
color: "#1E83EB",
|
|
|
|
|
weight: 2,
|
|
|
|
|
fillColor: "#1E83EB",
|
|
|
|
|
fillOpacity: 0.2,
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
onEachFeature: (feature, layer) => {
|
|
|
|
|
let bounds = layer._bounds;
|
|
|
|
|
let center = bounds.getCenter();
|
|
|
|
|
// console.log(feature,'feature');
|
|
|
|
|
let myIcon = L.divIcon({
|
|
|
|
|
className: "region-name3",
|
|
|
|
|
html: feature.properties.NAME,
|
|
|
|
|
iconSize: [150, 24],
|
|
|
|
|
iconAnchor: [45, 0],
|
|
|
|
|
});
|
|
|
|
|
// 多边形上的标记点;
|
|
|
|
|
// L.marker({lng:feature.properties.CENTERX,lat:feature.properties.CENTERY}, {
|
|
|
|
|
L.marker(center, {
|
|
|
|
|
pane: "mapLayer3",
|
|
|
|
|
icon: myIcon,
|
|
|
|
|
}).addTo(this.mapLayers.mapLayer3);
|
|
|
|
|
},
|
|
|
|
|
}).addTo(this.mapLayers.mapLayer2);
|
|
|
|
|
},
|
|
|
|
|
// 软件园
|
|
|
|
|
ruanjianyuanMap() {
|
|
|
|
|
let rjy = L.geoJSON(ruanjianyuan, {
|
|
|
|
|
pane: "mapLayer2",
|
|
|
|
|
style: function (feature) {
|
|
|
|
|
return {
|
|
|
|
|
color: "#1E83EB",
|
|
|
|
|
weight: 2,
|
|
|
|
|
fillColor: "#1E83EB",
|
|
|
|
|
fillOpacity: 0.2,
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
onEachFeature: (feature, layer) => {
|
|
|
|
|
// console.log(feature,'feature');
|
|
|
|
|
let bounds = layer._bounds;
|
|
|
|
|
let center = bounds.getCenter();
|
|
|
|
|
let myIcon = L.divIcon({
|
|
|
|
|
className: "region-name3",
|
|
|
|
|
html: feature.properties.NAME,
|
|
|
|
|
iconSize: [150, 24],
|
|
|
|
|
iconAnchor: [45, 0],
|
|
|
|
|
});
|
|
|
|
|
// 多边形上的标记点;
|
|
|
|
|
// L.marker({lng:feature.properties.CENTERX,lat:feature.properties.CENTERY}, {
|
|
|
|
|
L.marker(center, {
|
|
|
|
|
pane: "mapLayer3",
|
|
|
|
|
icon: myIcon,
|
|
|
|
|
}).addTo(this.mapLayers.mapLayer3);
|
|
|
|
|
},
|
|
|
|
|
}).addTo(this.mapLayers.mapLayer2);
|
|
|
|
|
},
|
|
|
|
|
// 渲染事件点位
|
|
|
|
|
eventPoint(){
|
|
|
|
|
let iconUrl1 = require("@/assets/images/icon1.png");
|
|
|
|
|
let iconUrl2 = require("@/assets/images/icon2.png");
|
|
|
|
|
onLine.features.forEach((element,index) => {
|
|
|
|
|
let marker = L.marker({ lng: element.geometry.coordinates[0], lat: element.geometry.coordinates[1] },
|
|
|
|
|
{
|
|
|
|
|
icon: L.icon({
|
|
|
|
|
iconUrl:element.properties.name == "Icon1" ? iconUrl1 : iconUrl2,
|
|
|
|
|
iconSize: [60,70],
|
|
|
|
|
iconAnchor:[30,70]
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
).addTo(this.map)
|
|
|
|
|
this.markerClick(marker, element);
|
|
|
|
|
});
|
|
|
|
|
let iconUrl1 = require("@/assets/images/icon2.png");
|
|
|
|
|
let data = {'queryValue' : [], "myInstanceClassify" : "all", "parameterValue":[], fks: []}
|
|
|
|
|
ViewListPage({viewCode:'shi_jian_shou_li_list_page', pageNo: 1, pageSize:500}, data).then(res=>{
|
|
|
|
|
if(res.code == 200) {
|
|
|
|
|
res.result.records.forEach((element)=>{
|
|
|
|
|
let location = element.location?.split(',');
|
|
|
|
|
if(location) {
|
|
|
|
|
let marker = L.marker({ lng: location[0], lat: location[1] },
|
|
|
|
|
{
|
|
|
|
|
icon: L.icon({
|
|
|
|
|
iconUrl: iconUrl1,
|
|
|
|
|
iconSize: [40,45],
|
|
|
|
|
iconAnchor:[20,45]
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
).addTo(this.map)
|
|
|
|
|
this.markerClick(marker, element);
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
// 点位的点击事件
|
|
|
|
|
markerClick(marker,element) {
|
|
|
|
|
marker.on("click", (e) => {
|
|
|
|
|
this.dialogVisible = true;
|
|
|
|
|
console.log(element);
|
|
|
|
|
this.markerInfo = element;
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
dispose(){
|
|
|
|
@ -385,7 +213,7 @@ export default {
|
|
|
|
|
L.marker(center, {
|
|
|
|
|
pane: "mapLayer1",
|
|
|
|
|
icon: myIcon,
|
|
|
|
|
}).addTo(this.mapLayers.mapLayer1);
|
|
|
|
|
}).addTo(this.mapLayers.mapLayer1Text);
|
|
|
|
|
},
|
|
|
|
|
}).addTo(this.mapLayers.mapLayer1);
|
|
|
|
|
})
|
|
|
|
|