Newer
Older
gdtMimiProgram / pagesA / checkInfo / checkInfo.vue
<template>
	<view class="">
		<view class="check-message-detail">
			<view class="detail-content">
				<view class="detail-item" >
				<text class="title">设备类型</text>
				<text>燃气智能监测终端</text>
				</view>
				<view class="detail-item" >
				<text class="title">设备编号</text>
				<text>312022040441</text>
				</view>
				<view class="detail-item" >
						<text class="title">设备位置</text>
						<text>职工食堂</text>
				</view>
				<view class="detail-item" >
						<text class="title">井编号</text>
						<text>1</text>
				</view>
				<view class="detail-item" >
						<text class="title">井类型</text>
						<text>其他</text>
				</view>
				<view class="detail-item" >
						<text class="title">井名称</text>
						<text>其他</text>
				</view>
				<view class="detail-item" >
						<text class="title">设备状态</text>
						<text>在线</text>
				</view>
				<view class="detail-item" >
						<text class="title">安装时间</text>
						<text>2022/12/28  9:35:26</text>
				</view>
				<view class="detail-item" >
						<text class="title">设备图片</text>
						<image src="../../static/back.png" mode="widthFix" style="width: 230rpx;"></image>
				</view>
				<view class="detail-item" >
						<text class="title">设备经纬度</text>
						<view>
							<view>
							113.27451701447426,
						</view> 
						<view>
							23.14173300760558
						</view>
						</view>
				</view>
				<view class="map-info">
					<map  :show-location='true' style="width: 100%; height:100%;"  :latitude="latitude" :longitude="longitude" :markers="marker"></map>
				</view>
			</view>
	</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				latitude: '',//纬度
				longitude: '',//经度
				marker: [
				{
				id:0,
				latitude: '',//纬度
				longitude: '',//经度
				iconPath: '../../static/checkIcon/manhole-line.png',    //显示的图标        
				rotate:0,   // 旋转度数
				width:30,   //宽
				height:40,   //高
				// title:'我在这里',//标注点名
				alpha:0.5,   //透明度
				callout:{//自定义标记点上方的气泡窗口 点击有效  
				content:'天宝大厦',//文本
				color:'#ffffff',//文字颜色
				fontSize:14,//文本大小
				borderRadius:15,//边框圆角
				borderWidth:'10',
				bgColor:'#e51860',//背景颜色
				display:'ALWAYS',//常显
				},
				}],
			}
		},
		onLoad() {
			wx.getLocation({
			type:'gcj02',
			success:(res)=>{
				this.latitude = res.latitude;
				this.longitude= res.longitude;
				// 将获取的值赋值给markers
				this.marker[0].latitude  = this.latitude
				this.marker[0].longitude= this.longitude
				console.log(res)
			},
			fail: (err) => {
			console.log(err,'地理位置错误')
			}
		})
		}
		
	}
</script>

<style lang="scss" scoped>
	.check-message-detail {
		padding: 18rpx;
		height: 100%;
		.title {
			font-weight: 600;
		}
		.detail-content {
			padding: 22rpx;
			background-color: #fff;
			border-radius: 10rpx;
		}
	
		.detail-item {
			display: flex;
			justify-content: space-between;
			margin-bottom: 44rpx;
		}
	}
	.map-info {
		width: 100%;
		height: 460rpx;
	}
</style>