地图添加企业标点
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: {},
|
headers: {},
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
// 各个站坐标点
|
||||||
|
export function getCompanyList() {
|
||||||
|
return requests({
|
||||||
|
url: '/zh-applet-admin/appmana/bigScreen/getEntList',
|
||||||
|
method: 'get',
|
||||||
|
headers: {},
|
||||||
|
})
|
||||||
|
}
|
||||||
// 查询设备下各检测项的历史数据
|
// 查询设备下各检测项的历史数据
|
||||||
export function survItemSummary(obj) {
|
export function survItemSummary(obj) {
|
||||||
return requests({
|
return requests({
|
||||||
|
|
|
||||||
|
|
@ -450,7 +450,7 @@
|
||||||
</div>
|
</div>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<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 indicator-position="outside">
|
||||||
<el-carousel-item v-for="(item,index) in qyinformation.extPics" :key="index">
|
<el-carousel-item v-for="(item,index) in qyinformation.extPics" :key="index">
|
||||||
<viewer :images="qyinformation.extPics">
|
<viewer :images="qyinformation.extPics">
|
||||||
|
|
@ -462,8 +462,8 @@
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<div class="grid-content bg-purple-light">
|
<div class="grid-content bg-purple-light">
|
||||||
<span class="tctit">{{ qyinformation.name }}</span>
|
<span class="tctit">{{ qyinformation.entName }}</span>
|
||||||
<span class="tcgldw">{{ qyinformation.notes }}</span>
|
<span class="tcgldw">{{ qyinformation.entIntro }}</span>
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
@ -482,7 +482,7 @@ import ScaleBox from 'vue2-scale-box'
|
||||||
import {
|
import {
|
||||||
displayInfo,
|
displayInfo,
|
||||||
fwlist,
|
fwlist,
|
||||||
getAllstationAndPestLight,
|
getAllstationAndPestLight, getCompanyList,
|
||||||
getIndexSummry,
|
getIndexSummry,
|
||||||
getNewestData,
|
getNewestData,
|
||||||
getPollutionDict,
|
getPollutionDict,
|
||||||
|
|
@ -545,6 +545,7 @@ export default {
|
||||||
qcdtdialogTableVisible: false,
|
qcdtdialogTableVisible: false,
|
||||||
qyinfordtdialogTableVisible: false,
|
qyinfordtdialogTableVisible: false,
|
||||||
shipdialogTableVisible: false,
|
shipdialogTableVisible: false,
|
||||||
|
entList:[],
|
||||||
qyinformation: '',
|
qyinformation: '',
|
||||||
listData: [],
|
listData: [],
|
||||||
summryAllData: null,
|
summryAllData: null,
|
||||||
|
|
@ -555,7 +556,7 @@ export default {
|
||||||
dialogVisible: false,
|
dialogVisible: false,
|
||||||
inforname: '',
|
inforname: '',
|
||||||
loading: true,
|
loading: true,
|
||||||
zoomData: 8,
|
zoomData: 10,
|
||||||
focusZoomData: 14,
|
focusZoomData: 14,
|
||||||
isShowLightNumber: '1',
|
isShowLightNumber: '1',
|
||||||
switchValue: true,
|
switchValue: true,
|
||||||
|
|
@ -627,10 +628,37 @@ export default {
|
||||||
// })
|
// })
|
||||||
// }, 2000)
|
// }, 2000)
|
||||||
// 实时时间
|
// 实时时间
|
||||||
|
|
||||||
|
let that = this;
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.$nextTick(() => {
|
getCompanyList().then(res => {
|
||||||
this.initMap(this.zoomData, this.isShowLightNumber);
|
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)
|
}, 2000)
|
||||||
//初始化数据
|
//初始化数据
|
||||||
this.getNowTime();
|
this.getNowTime();
|
||||||
|
|
@ -773,8 +801,8 @@ export default {
|
||||||
}, 200)
|
}, 200)
|
||||||
},
|
},
|
||||||
initMap(zoomnum, isShowLight) {
|
initMap(zoomnum, isShowLight) {
|
||||||
|
console.log("初始化地图。")
|
||||||
let that = this;
|
let that = this;
|
||||||
// let isShowLight = this.isShowLightNumber
|
|
||||||
getAllstationAndPestLight(isShowLight).then(res => {
|
getAllstationAndPestLight(isShowLight).then(res => {
|
||||||
// 地图
|
// 地图
|
||||||
that.aMap = new AMap.Map('container', {
|
that.aMap = new AMap.Map('container', {
|
||||||
|
|
@ -796,13 +824,14 @@ export default {
|
||||||
scale: (2, 2.5)
|
scale: (2, 2.5)
|
||||||
});
|
});
|
||||||
that.aMap.on('complete', (e) => {
|
that.aMap.on('complete', (e) => {
|
||||||
var markerData = res.result;
|
let Marker = res.result.filter(ele => ele.type != 'light').sort((a,b) => {
|
||||||
let Marker = markerData.filter(ele => ele.type != 'light').sort((a,b) => {
|
|
||||||
if (b.type=='soil') return 1;
|
if (b.type=='soil') return 1;
|
||||||
if (b.type!='soil') return -1;
|
if (b.type!='soil') return -1;
|
||||||
return 0;
|
return 0;
|
||||||
});//其他类型
|
});//其他类型
|
||||||
// console.log(Marker,'Marker')
|
// console.log(Marker,'Marker')
|
||||||
|
Marker.push(...this.entList);
|
||||||
|
console.log("初始化地图。2", Marker)
|
||||||
Marker.map(item => {
|
Marker.map(item => {
|
||||||
let marker = new AMap.Marker({
|
let marker = new AMap.Marker({
|
||||||
zIndex: item.type == 'soil' ? that.lastZIndex : (that.lastZIndex+1),
|
zIndex: item.type == 'soil' ? that.lastZIndex : (that.lastZIndex+1),
|
||||||
|
|
@ -810,6 +839,10 @@ export default {
|
||||||
position: [item.longitude, item.latitude],
|
position: [item.longitude, item.latitude],
|
||||||
offset: new AMap.Pixel(item.width, item.height),//偏移量
|
offset: new AMap.Pixel(item.width, item.height),//偏移量
|
||||||
title: item.name,
|
title: item.name,
|
||||||
|
label: {
|
||||||
|
content: item.type == "cusLocaltion"? item.name : '',
|
||||||
|
direction: 'top'
|
||||||
|
},
|
||||||
extData: {
|
extData: {
|
||||||
ids: item.ids,
|
ids: item.ids,
|
||||||
extPics: item.extPics,
|
extPics: item.extPics,
|
||||||
|
|
@ -824,7 +857,6 @@ export default {
|
||||||
let indexnumb = e.target.getExtData().ids.slice(-1);
|
let indexnumb = e.target.getExtData().ids.slice(-1);
|
||||||
this.qcdtinfor = this.stationInfoList[indexnumb]
|
this.qcdtinfor = this.stationInfoList[indexnumb]
|
||||||
this.qcdtdialogTableVisible = true
|
this.qcdtdialogTableVisible = true
|
||||||
// console.log('livestock or orient', this.qyinformation)
|
|
||||||
})
|
})
|
||||||
this.markersOrient.push(marker)
|
this.markersOrient.push(marker)
|
||||||
} else if(item.type == 'soil'){//土壤弹窗,长期监测站
|
} else if(item.type == 'soil'){//土壤弹窗,长期监测站
|
||||||
|
|
@ -834,6 +866,17 @@ export default {
|
||||||
// console.log('soil click', )
|
// console.log('soil click', )
|
||||||
})
|
})
|
||||||
this.markersSoil.push(marker);
|
this.markersSoil.push(marker);
|
||||||
|
} 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 {
|
} else {
|
||||||
this.markersOther.push(marker)
|
this.markersOther.push(marker)
|
||||||
}
|
}
|
||||||
|
|
@ -1517,14 +1560,8 @@ a:hover {
|
||||||
|
|
||||||
.map img {
|
.map img {
|
||||||
width: 80%;
|
width: 80%;
|
||||||
margin-left: 10%;
|
//margin-left: 10%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.map img {
|
|
||||||
width: 80%;
|
|
||||||
margin-left: 10%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mapActived1 {
|
.mapActived1 {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 41.5%;
|
top: 41.5%;
|
||||||
|
|
@ -1768,20 +1805,23 @@ a:hover {
|
||||||
/* 企业弹窗样式 */
|
/* 企业弹窗样式 */
|
||||||
.tctit {
|
.tctit {
|
||||||
font-size: 1.2vw;
|
font-size: 1.2vw;
|
||||||
color: #fff;
|
color: #0bf373;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
display: block;
|
display: block;
|
||||||
margin-bottom: 1.6vw;
|
margin-bottom: 1.6vw;
|
||||||
|
margin: 5px auto;
|
||||||
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tcgldw {
|
.tcgldw {
|
||||||
font-size: 1vw;
|
font-size: 0.8vw;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
line-height: 2vw;
|
line-height: 2vw;
|
||||||
display: block;
|
display: block;
|
||||||
padding-right: 3%;
|
padding-right: 3%;
|
||||||
height: 15vw;
|
height: 15vw;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
|
text-indent: 2em;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 定义滚动条样式 */
|
/* 定义滚动条样式 */
|
||||||
|
|
@ -1945,5 +1985,49 @@ a:hover {
|
||||||
.mywrcov_onenumjx{
|
.mywrcov_onenumjx{
|
||||||
font-size: 1.2vw;
|
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>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -217,7 +217,7 @@
|
||||||
<img src="@/assets/image/png01_iSpt.png" class="png01_iSpt" alt="">
|
<img src="@/assets/image/png01_iSpt.png" class="png01_iSpt" alt="">
|
||||||
<img src="@/assets/image/qcshuj.png" class="qcshuj" alt="">
|
<img src="@/assets/image/qcshuj.png" class="qcshuj" alt="">
|
||||||
<span class="qxfwzcl_rit_smt">{{DisplayListdetailList3?.detailCode}}</span>
|
<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>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue