Vue数据大屏回显相关点位

 

<div class="midone" style="display: flex">
				<div class="img" id="dv" style="margin: auto; height: 90.56px; width: 1447; font-weight: 400">
					<img style="width: 1438px; height: 70px; margin-top: 18px" :src="imgs" alt="" />
					<div class="marker" @click="ck(item)" v-for="(item, i) in images" :key="i" :style="[baseStyles[i]]">
						<img
							@mouseenter="onMouserOver(item)"
							@mouseleave="onMouseout(item)"
							v-if="item.nowdata < item.upperLimit"
							src="../../assets/t1.png"
							alt=""
						/>
						<img
							@mouseenter="onMouserOver(item)"
							@mouseleave="onMouseout(item)"
							v-else="item.nowdata > item.upperLimit"
							src="../../assets/t11.png"
							alt=""
						/>
						<div
							@mouseenter="onMouserOver(item)"
							@mouseleave="onMouseout(item)"
							v-if="item.nowdata < item.upperLimit"
							style="width: 150px; height: 30px; position: relative; margin-top: -45px; margin-left: -15px; color: #2dff57"
						>
							监测值:{{ item.nowdata }}
						</div>

						<div
							@mouseenter="onMouserOver(item)"
							@mouseleave="onMouseout(item)"
							v-else="item.nowdata > item.upperLimit"
							style="width: 150px; height: 30px; position: relative; margin-top: -45px; margin-left: -15px; color: #ff0000"
						>
							监测值:{{ item.nowdata }}
						</div>
						<div
							v-if="item.sensorId == showimgs"
							style="
								border: 1px solid #7fdeff;
								width: 250px;
								height: 110px;
								position: relative;
								margin-top: 20px;
								color: #7fdeff;
							"
						>
							传感器编号:{{ item.sensorCode }}
							<br />
							传感器名称:{{ item.sensorAddress }}
							<br />
							传感器类型:{{ item.sensorType }}
							<br />
							传感器上限值:{{ item.upperLimit }}
							<br />
							传感器下限值:{{ item.lowerLimit }}
						</div>
					</div>
				</div>
			</div>
selectimg(e) {
			
			this.imgs = `${url}` + e.picturePath
			this.images = []
			getOnePictureSensorList(e.pictureId).then((res) => {
				console.log(res.data.sensorList, "ppppp")
				this.dianweilist=res.data.sensorList;
                   this.params.sensorCodes=res.data.sensorList[0].sensorCode
		          this.getsSensorData()
				var divs = document.getElementsByName("marker")
				console.log(divs, 111123)
				for (var i = 0; i < res.data.sensorList.length; i++) {
					this.baseStyles.push({ left: null, top: null, height: null, background: null, position: null })
					this.baseStyles[i].left = res.data.sensorList[i].xPoint + "px"
					this.baseStyles[i].top = res.data.sensorList[i].yPoint + "px"
					this.baseStyles[i].width = "10px"
					this.baseStyles[i].height = "10px"
					this.baseStyles[i].background = "url(../../assets/t1.png)"
					this.baseStyles[i].position = "absolute"
					if(res.data.sensorList[i].sensorCode==this.codes){
                    res.data.sensorList[i].nowdata =this.sensorDatas
					}else{
						res.data.sensorList[i].nowdata=0
					}
					
					console.log(res.data.sensorList[i].nowdata)
					this.images.push(res.data.sensorList[i])
				}
			})
		},

评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值