|
|
@@ -274,7 +274,7 @@ export default {
|
|
|
{
|
|
|
icon: {
|
|
|
img: iconUrl,
|
|
|
- size: type === 1 ? [106, 98] : [25, 30],
|
|
|
+ size: type === 1 ? [106, 98] : [25, 33],
|
|
|
anchor: 'bottom-center',
|
|
|
fitZoom: 12,
|
|
|
scaleFactor: 1,
|
|
|
@@ -298,7 +298,7 @@ export default {
|
|
|
anchor: 'top-center',
|
|
|
text: item.base_name || '',
|
|
|
style: this.textMarkerStyle,
|
|
|
- offset: new AMap.Pixel(0, -25)
|
|
|
+ offset: new AMap.Pixel(0, -125)
|
|
|
})
|
|
|
this.map.add(text)
|
|
|
}
|
|
|
@@ -351,23 +351,25 @@ export default {
|
|
|
console.log(type, 'type--')
|
|
|
const infoWindow = new AMap.InfoWindow({
|
|
|
content:
|
|
|
- `<div style="padding: 20px;color:#666">` +
|
|
|
- `<p style="border-bottom: 2px solid #35a478;line-height: 33px;margin-bottom: 5px;">` +
|
|
|
+ `<div class='info-map'>` +
|
|
|
+ `<p class="title">` +
|
|
|
type[0].type_name +
|
|
|
`</p>` +
|
|
|
- `<div style="display:flex;height:28px">设备ID :` +
|
|
|
+ `<div class="content">` +
|
|
|
+ `<p style="height:28px"><span class='label'>设备ID </span>` +
|
|
|
info.device_id +
|
|
|
- `<p onclick="tabpo()" style="padding: 6px 13px;font-size: 12px;border-radius: 3px;background: #74ab7e;color: #fff;margin-left: 15px;">详情</p>` +
|
|
|
- `</div>` +
|
|
|
- `<p style="height:28px">设备名称 :` +
|
|
|
+ `</p>` +
|
|
|
+ `<p style="height:28px"> <span class='label'>设备名称</span> ` +
|
|
|
info.device_name +
|
|
|
`</p>` +
|
|
|
- `<p style="height:28px">设备位置 :` +
|
|
|
- info.city +
|
|
|
+ `<p style="height:28px"><span class='label'>设备位置</span>` +
|
|
|
+ (info.city || '--') +
|
|
|
`</p>` +
|
|
|
- `<p style="height:28px">上报时间 :` +
|
|
|
+ `<p style="height:28px"><span class='label'>上报时间</span> ` +
|
|
|
moment(Number(info.uptime) * 1000).format('YYYY-MM-DD HH:mm:ss') +
|
|
|
`</p>` +
|
|
|
+ `<p onclick="tabpo()" style="cursor:pointer;width:100%;font-size: 14px;color: #0085FF;text-align:center">详情</p>` +
|
|
|
+ `</div>` +
|
|
|
`</div>` // 使用默认信息窗体框样式,显示信息内容
|
|
|
})
|
|
|
infoWindow.open(this.map, [info.lng, info.lat])
|
|
|
@@ -650,7 +652,7 @@ export default {
|
|
|
item.device_type_id / 1 === 6
|
|
|
? require('../assets/101.png')
|
|
|
: require('../assets/101.png'),
|
|
|
- size: [25, 30],
|
|
|
+ size: [25, 33],
|
|
|
anchor: 'center',
|
|
|
fitZoom: 15,
|
|
|
scaleFactor: 1,
|
|
|
@@ -1362,23 +1364,60 @@ export default {
|
|
|
::v-deep .no-events {
|
|
|
pointer-events: none !important;
|
|
|
}
|
|
|
-::v-deep .amap-info {
|
|
|
- background: #00000080;
|
|
|
+/deep/ .amap-info {
|
|
|
+ background: none;
|
|
|
border-radius: 4px;
|
|
|
- border: 1px solid #fff;
|
|
|
+
|
|
|
color: #fff;
|
|
|
padding: 2px 4px;
|
|
|
font-size: 14px;
|
|
|
margin-top: -10px;
|
|
|
- .amap-info-contentContainer {
|
|
|
+ .amap-info-content {
|
|
|
+ background: rgba(0, 0, 0, 0.48);
|
|
|
padding: 0;
|
|
|
}
|
|
|
+ .amap-info-contentContainer {
|
|
|
+ // padding: 0;
|
|
|
+ background: none;
|
|
|
+ }
|
|
|
// position: relative;
|
|
|
.amap-info-close {
|
|
|
- display: none;
|
|
|
+ // display: none;
|
|
|
+ color: #0085ff;
|
|
|
+ right: 20px;
|
|
|
+ top: 10px;
|
|
|
}
|
|
|
.amap-info-sharp {
|
|
|
- display: none;
|
|
|
+ // display: none;
|
|
|
+ bottom: 2px;
|
|
|
+ border-top: 8px solid rgba(0, 0, 0, 0.48);
|
|
|
+ }
|
|
|
+ .info-map {
|
|
|
+ color: #fff;
|
|
|
+ .content {
|
|
|
+ padding: 16px 20px;
|
|
|
+ p {
|
|
|
+ height: 28px;
|
|
|
+ line-height: 28px;
|
|
|
+ margin-bottom: 2px;
|
|
|
+ }
|
|
|
+ .label {
|
|
|
+ display: inline-block;
|
|
|
+ width: 58px;
|
|
|
+ text-align: right;
|
|
|
+ color: rgba(255, 255, 255, 0.6);
|
|
|
+ margin-right: 8px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .title {
|
|
|
+ color: #fff;
|
|
|
+ height: 35px;
|
|
|
+ line-height: 35px;
|
|
|
+ // width: 100%;
|
|
|
+ padding-left: 20px;
|
|
|
+ background-image: url('/static/images/map/map-title.png');
|
|
|
+ background-size: 100% 100%;
|
|
|
+ }
|
|
|
}
|
|
|
.infomainwrap {
|
|
|
color: #fff;
|