地图添加企业标点
This commit is contained in:
parent
7d92dbb698
commit
ecdc6110f8
Binary file not shown.
|
After Width: | Height: | Size: 1.2 KiB |
|
|
@ -112,6 +112,14 @@ export function getSoilSummry(data) {
|
|||
headers: {},
|
||||
})
|
||||
}
|
||||
// 各个站坐标点
|
||||
export function getCompanyList() {
|
||||
return requests({
|
||||
url: '/zh-applet-admin/appmana/bigScreen/getEntList',
|
||||
method: 'get',
|
||||
headers: {},
|
||||
})
|
||||
}
|
||||
// 查询设备下各检测项的历史数据
|
||||
export function survItemSummary(obj) {
|
||||
return requests({
|
||||
|
|
|
|||
|
|
@ -450,7 +450,7 @@
|
|||
</div>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<div class="grid-content bg-purple" style="width:80%;margin-left:10%;">
|
||||
<div class="grid-content bg-purple" style="">
|
||||
<el-carousel indicator-position="outside">
|
||||
<el-carousel-item v-for="(item,index) in qyinformation.extPics" :key="index">
|
||||
<viewer :images="qyinformation.extPics">
|
||||
|
|
@ -462,8 +462,8 @@
|
|||
</el-col>
|
||||
<el-col :span="12">
|
||||
<div class="grid-content bg-purple-light">
|
||||
<span class="tctit">{{ qyinformation.name }}</span>
|
||||
<span class="tcgldw">{{ qyinformation.notes }}</span>
|
||||
<span class="tctit">{{ qyinformation.entName }}</span>
|
||||
<span class="tcgldw">{{ qyinformation.entIntro }}</span>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
|
@ -482,7 +482,7 @@ import ScaleBox from 'vue2-scale-box'
|
|||
import {
|
||||
displayInfo,
|
||||
fwlist,
|
||||
getAllstationAndPestLight,
|
||||
getAllstationAndPestLight, getCompanyList,
|
||||
getIndexSummry,
|
||||
getNewestData,
|
||||
getPollutionDict,
|
||||
|
|
@ -545,6 +545,7 @@ export default {
|
|||
qcdtdialogTableVisible: false,
|
||||
qyinfordtdialogTableVisible: false,
|
||||
shipdialogTableVisible: false,
|
||||
entList:[],
|
||||
qyinformation: '',
|
||||
listData: [],
|
||||
summryAllData: null,
|
||||
|
|
@ -555,7 +556,7 @@ export default {
|
|||
dialogVisible: false,
|
||||
inforname: '',
|
||||
loading: true,
|
||||
zoomData: 8,
|
||||
zoomData: 10,
|
||||
focusZoomData: 14,
|
||||
isShowLightNumber: '1',
|
||||
switchValue: true,
|
||||
|
|
@ -627,10 +628,37 @@ export default {
|
|||
// })
|
||||
// }, 2000)
|
||||
// 实时时间
|
||||
|
||||
let that = this;
|
||||
setTimeout(() => {
|
||||
this.$nextTick(() => {
|
||||
this.initMap(this.zoomData, this.isShowLightNumber);
|
||||
})
|
||||
getCompanyList().then(res => {
|
||||
that.entList = res.result.map(item => {
|
||||
item.type = 'cusLocaltion';
|
||||
item.longitude = item.entLong;
|
||||
item.latitude = item.entLat;
|
||||
item.name = item.entName;
|
||||
item.picUrl = 'temp/enticon.png';
|
||||
item.width = 0 ;
|
||||
item.height = 0;
|
||||
// zIndex: item.type == 'soil' ? that.lastZIndex : (that.lastZIndex+1),
|
||||
// icon: this.urlimg + item.picUrl,
|
||||
// position: [item.longitude, item.latitude],
|
||||
// offset: new AMap.Pixel(item.width, item.height),//偏移量
|
||||
// title: item.name,
|
||||
return item;
|
||||
});
|
||||
// ids: item.ids,
|
||||
// extPics: item.extPics,
|
||||
// notes: item.notes,
|
||||
// name: item.name,
|
||||
// item: item,
|
||||
// stationType: item.type
|
||||
//
|
||||
console.log(that.entList,'111222')
|
||||
that.$nextTick(() => {
|
||||
that.initMap(that.zoomData, that.isShowLightNumber);
|
||||
})
|
||||
});
|
||||
}, 2000)
|
||||
//初始化数据
|
||||
this.getNowTime();
|
||||
|
|
@ -773,8 +801,8 @@ export default {
|
|||
}, 200)
|
||||
},
|
||||
initMap(zoomnum, isShowLight) {
|
||||
console.log("初始化地图。")
|
||||
let that = this;
|
||||
// let isShowLight = this.isShowLightNumber
|
||||
getAllstationAndPestLight(isShowLight).then(res => {
|
||||
// 地图
|
||||
that.aMap = new AMap.Map('container', {
|
||||
|
|
@ -796,13 +824,14 @@ export default {
|
|||
scale: (2, 2.5)
|
||||
});
|
||||
that.aMap.on('complete', (e) => {
|
||||
var markerData = res.result;
|
||||
let Marker = markerData.filter(ele => ele.type != 'light').sort((a,b) => {
|
||||
let Marker = res.result.filter(ele => ele.type != 'light').sort((a,b) => {
|
||||
if (b.type=='soil') return 1;
|
||||
if (b.type!='soil') return -1;
|
||||
return 0;
|
||||
});//其他类型
|
||||
// console.log(Marker,'Marker')
|
||||
Marker.push(...this.entList);
|
||||
console.log("初始化地图。2", Marker)
|
||||
Marker.map(item => {
|
||||
let marker = new AMap.Marker({
|
||||
zIndex: item.type == 'soil' ? that.lastZIndex : (that.lastZIndex+1),
|
||||
|
|
@ -810,6 +839,10 @@ export default {
|
|||
position: [item.longitude, item.latitude],
|
||||
offset: new AMap.Pixel(item.width, item.height),//偏移量
|
||||
title: item.name,
|
||||
label: {
|
||||
content: item.type == "cusLocaltion"? item.name : '',
|
||||
direction: 'top'
|
||||
},
|
||||
extData: {
|
||||
ids: item.ids,
|
||||
extPics: item.extPics,
|
||||
|
|
@ -824,7 +857,6 @@ export default {
|
|||
let indexnumb = e.target.getExtData().ids.slice(-1);
|
||||
this.qcdtinfor = this.stationInfoList[indexnumb]
|
||||
this.qcdtdialogTableVisible = true
|
||||
// console.log('livestock or orient', this.qyinformation)
|
||||
})
|
||||
this.markersOrient.push(marker)
|
||||
} else if(item.type == 'soil'){//土壤弹窗,长期监测站
|
||||
|
|
@ -834,7 +866,18 @@ export default {
|
|||
// console.log('soil click', )
|
||||
})
|
||||
this.markersSoil.push(marker);
|
||||
} else {
|
||||
} else if(item.type == "cusLocaltion"){//企业类型
|
||||
marker.on("click", e => {
|
||||
this.qyinformation= e.target.getExtData().item
|
||||
if(this.qyinformation.entPics){
|
||||
this.qyinformation.extPics = this.qyinformation.entPics.split(",");
|
||||
}else {
|
||||
this.qyinformation.extPics = []
|
||||
}
|
||||
console.log("this.qyinformation",this.qyinformation)
|
||||
this.qyinfordtdialogTableVisible = true
|
||||
})
|
||||
} else {
|
||||
this.markersOther.push(marker)
|
||||
}
|
||||
marker.setMap(that.aMap);
|
||||
|
|
@ -1517,14 +1560,8 @@ a:hover {
|
|||
|
||||
.map img {
|
||||
width: 80%;
|
||||
margin-left: 10%;
|
||||
//margin-left: 10%;
|
||||
}
|
||||
|
||||
.map img {
|
||||
width: 80%;
|
||||
margin-left: 10%;
|
||||
}
|
||||
|
||||
.mapActived1 {
|
||||
position: absolute;
|
||||
top: 41.5%;
|
||||
|
|
@ -1768,20 +1805,23 @@ a:hover {
|
|||
/* 企业弹窗样式 */
|
||||
.tctit {
|
||||
font-size: 1.2vw;
|
||||
color: #fff;
|
||||
color: #0bf373;
|
||||
font-weight: bold;
|
||||
display: block;
|
||||
margin-bottom: 1.6vw;
|
||||
margin: 5px auto;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.tcgldw {
|
||||
font-size: 1vw;
|
||||
font-size: 0.8vw;
|
||||
color: #fff;
|
||||
line-height: 2vw;
|
||||
display: block;
|
||||
padding-right: 3%;
|
||||
height: 15vw;
|
||||
overflow: auto;
|
||||
text-indent: 2em;
|
||||
}
|
||||
|
||||
/* 定义滚动条样式 */
|
||||
|
|
@ -1945,5 +1985,49 @@ a:hover {
|
|||
.mywrcov_onenumjx{
|
||||
font-size: 1.2vw;
|
||||
}
|
||||
.amap-marker-label{
|
||||
//width: 60px;
|
||||
font-size: 16px;
|
||||
line-height: 18px;
|
||||
text-align: center;
|
||||
height: 18px;
|
||||
font-family: STLiti;
|
||||
color: #bbd6f1;
|
||||
border-radius: 15px;
|
||||
padding: 5px;
|
||||
background-color: rgba(77, 140, 241, 0.84);
|
||||
border: solid 2px rgba(100,255,200,0.8);
|
||||
}
|
||||
|
||||
|
||||
.tz_cov{
|
||||
width: 100%;
|
||||
height: 30vw;
|
||||
margin: 0 auto;
|
||||
/* margin-top: 4vw; */
|
||||
border: 1px solid #0169d0;
|
||||
position: relative;
|
||||
background: rgba(16, 45, 80, 1);
|
||||
box-shadow: inset 0px 0px 16px 0px rgba(0, 145, 255, 1);
|
||||
padding: 20px;
|
||||
}
|
||||
.tz_cov_top{
|
||||
width: 40%;
|
||||
height: 3vw;
|
||||
margin: 0 auto;
|
||||
background: url(../../assets/image/tz_tltle_bg.png)no-repeat;
|
||||
background-size: cover;
|
||||
text-align: center;
|
||||
line-height: 3vw;
|
||||
margin-bottom: 2vw;
|
||||
}
|
||||
.tz_cov_top_tit{
|
||||
font-size: 1vw;
|
||||
color: #fff;
|
||||
text-shadow: 0px 2px 0px rgba(4,49,52,0.55);
|
||||
font-family: douyuFont;
|
||||
}
|
||||
.grid-content{
|
||||
padding: 10px
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -217,7 +217,7 @@
|
|||
<img src="@/assets/image/png01_iSpt.png" class="png01_iSpt" alt="">
|
||||
<img src="@/assets/image/qcshuj.png" class="qcshuj" alt="">
|
||||
<span class="qxfwzcl_rit_smt">{{DisplayListdetailList3?.detailCode}}</span>
|
||||
<!-- <span class="qxfwzcl_rit_num in1con_lf_imglf_num_jix">{{DisplayListdetailList3?.detailValue}} <span style="font-size: 0.5vw;">万头</span> </span>-->
|
||||
<span class="qxfwzcl_rit_num in1con_lf_imglf_num_jix">{{DisplayListdetailList3?.detailValue}} <span style="font-size: 0.7vw;">{{DisplayListdetailList3?.detailValue2}}</span> </span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Reference in New Issue