重点区域精细化管理-商业街区热力图

This commit is contained in:
wangwei 2022-12-07 10:53:47 +08:00
parent c850ba6e9c
commit 119c61d55e
2 changed files with 47 additions and 2 deletions

View File

@ -166,7 +166,7 @@ export default {
}, },
], ],
eventListData: [], eventListData: [],
total:0, total:6,
pageSize:6, pageSize:6,
currentPage:1, currentPage:1,
@ -200,7 +200,7 @@ export default {
let resdata=res.data.data; let resdata=res.data.data;
this.dateTabs[1].dataNum=resdata.length; this.dateTabs[1].dataNum=resdata.length;
// this.eventListData = res.data; // this.eventListData = res.data;
this.total = res.count; // this.total = res.data.count;
// console.log("111"); // console.log("111");
// //
$.ajax({ $.ajax({

View File

@ -166,6 +166,9 @@ import { selectByAreaEvent, selectKeyArea } from "@/api/area";
import { gcjLL2wgs84LL } from "@/utils/coordinateSystemTransform"; import { gcjLL2wgs84LL } from "@/utils/coordinateSystemTransform";
// //
import HorizonTimeLine from "./components/HorizonTimeLine"; import HorizonTimeLine from "./components/HorizonTimeLine";
import {
crowflowList,
} from "@/api/areaMonitor";
export default { export default {
data() { data() {
return { return {
@ -549,6 +552,8 @@ export default {
this.hiMapFun.addAreaToMap(areaLatLng); this.hiMapFun.addAreaToMap(areaLatLng);
} }
}); });
//
this.shoppingMallThermodynamic();
} else { } else {
const dataEvent = []; const dataEvent = [];
res.data.data.forEach((item) => { res.data.data.forEach((item) => {
@ -579,6 +584,7 @@ export default {
case "窗口单位": case "窗口单位":
if (item === "商业街区") { if (item === "商业街区") {
this.hiMapFun.removerPolygon(); this.hiMapFun.removerPolygon();
this.hiMapFun.removeLayerByLayerName("shoppingMallLayer");
} }
this.hiMapFun.removeLayerByLayerName(item); this.hiMapFun.removeLayerByLayerName(item);
break; break;
@ -616,6 +622,43 @@ export default {
createCameraDetailsPop createCameraDetailsPop
); );
}, },
//
async shoppingMallThermodynamic(){
//
const params = {
page: 1,
size: 500,
needAreaData:true,
};
// console.log("");
let shoppingMallList=await crowflowList(params);
let smList=shoppingMallList.data.data;
let smListLength=smList.length;
let smOnMapData=[];
for(let i=0; i<smListLength; i++){
if(smList[i].totalAreaData){
var jsonData = JSON.parse(smList[i].totalAreaData);//
// console.log("smList[i].totalAreaData",jsonData)
for(let key in jsonData) {
let latlonVal=[];
// console.log(jsonData[key]) // foo, bar
let keyArr=key.split("_");
latlonVal.push(keyArr[1]);
latlonVal.push(keyArr[0]);
latlonVal.push(jsonData[key]);
// console.log("smList[i]xxxx",latlonVal)
smOnMapData.push(latlonVal);
}
}
}
// console.log("smList[i]xxxx",smOnMapData)
this.hiMapFun.removeLayerByLayerName("shoppingMallLayer");
this.hiMapFun.thermodynamic(
smOnMapData,
25,
"shoppingMallLayer"
);
},
thermodynamic() { thermodynamic() {
let dataNumber = []; let dataNumber = [];
@ -684,6 +727,7 @@ export default {
this.thermodynamicPeopleType = ""; this.thermodynamicPeopleType = "";
}, },
changeThermodynamicPeopleType(value) { changeThermodynamicPeopleType(value) {
console.log("热力图上图数据",this.thermodynamicPeopleAll);
this.hiMapFun.removeLayerByLayerName("types"); this.hiMapFun.removeLayerByLayerName("types");
switch (value) { switch (value) {
case "all": case "all":
@ -730,6 +774,7 @@ export default {
this.hiMapFun.removeLayerByLayerName("景区景点"); this.hiMapFun.removeLayerByLayerName("景区景点");
this.hiMapFun.removeLayerByLayerName("海水浴场"); this.hiMapFun.removeLayerByLayerName("海水浴场");
this.hiMapFun.removeLayerByLayerName("窗口单位"); this.hiMapFun.removeLayerByLayerName("窗口单位");
this.hiMapFun.removeLayerByLayerName("shoppingMallLayer"); //
// //
this.changeLayerBtnGroup=[]; this.changeLayerBtnGroup=[];
this.thermodynamicPeopleType = ""; this.thermodynamicPeopleType = "";