厂中厂园中园视频点击事件、模拟登录接口调用

prodLv
吕天方 3 months ago
parent fa8c0c9e54
commit f9ce658f49

@ -20,9 +20,9 @@
background-image: url('../images/personInfo.png'); background-image: url('../images/personInfo.png');
background-size: 100% 100%; background-size: 100% 100%;
margin-bottom: 5px; margin-bottom: 5px;
overflow: hidden; // overflow: hidden;
white-space: nowrap; // white-space: nowrap;
text-overflow: ellipsis; // text-overflow: ellipsis;
} }
.tag { .tag {
display: flex; display: flex;

@ -4,7 +4,7 @@
* @Author: JC9527 * @Author: JC9527
* @Date: 2024-01-09 23:08:15 * @Date: 2024-01-09 23:08:15
* @LastEditors: JC9527 * @LastEditors: JC9527
* @LastEditTime: 2024-10-15 11:16:00 * @LastEditTime: 2024-11-28 14:58:43
--> -->
<template> <template>
<div class="map-main"> <div class="map-main">
@ -920,14 +920,15 @@ export default {
_renderMarkerTwo (context) { _renderMarkerTwo (context) {
// ${context.data[0].info.deviceName.length * 17} // ${context.data[0].info.deviceName.length * 17}
var content = `<div class="markerStyles"><div class="marker-Text" style="width:85px">${context.data[0].info.deviceName}</div><img src="${require("../../../assets/images/icon/icon5.png")}" alt=""></div>`; var content = `<div class="markerStyles"><div class="marker-Text" style="width:85px">${context.data[0].info.deviceName}</div><img src="${require("../../../assets/images/icon/icon5.png")}" alt=""></div>`;
var offset = new AMap.Pixel(-32.5, -48.5); let strLength = context.data[0].info.deviceName.length / 5;
var offset = new AMap.Pixel(-28.5, -(Math.floor(strLength) * 36));
context.marker.setContent(content) context.marker.setContent(content)
context.marker.setOffset(offset) context.marker.setOffset(offset)
context.marker.on('click',(ev)=>{ context.marker.on('click',(ev)=>{
// this.monitoringInfo.position = context.data[0].position; // this.monitoringInfo.position = context.data[0].position;
// this.monitoringInfo.info = context.data[0].info; // this.monitoringInfo.info = context.data[0].info;
// this.monitoringInfo.visible = true; // this.monitoringInfo.visible = true;
getDeviceMediaUrlHls({deviceCode:this.monitoringInfo.info.deviceCode}).then(res=>{ getDeviceMediaUrlHls({deviceCode:context.data[0].info.deviceCode}).then(res=>{
if(res.url) { if(res.url) {
this.$refs.aloneVideo.open(res.url); this.$refs.aloneVideo.open(res.url);
} }
@ -2603,6 +2604,9 @@ export default {
this.markerOffset = new AMap.Pixel(-27, -94); this.markerOffset = new AMap.Pixel(-27, -94);
} else if (id == 6) { } else if (id == 6) {
this.MyInput = false; this.MyInput = false;
this.switches[0].active = true;
this.switches[1].active = false;
this.switches[2].active = false;
this.markerOffset = new AMap.Pixel(-27, -94); this.markerOffset = new AMap.Pixel(-27, -94);
} }
this.getMarkers(id); this.getMarkers(id);
@ -2887,7 +2891,7 @@ export default {
mounted() { mounted() {
// this.getPersonIcon(); // this.getPersonIcon();
this.getCarList(); this.getCarList();
// this.getrobotToken(); this.getrobotToken();
window.addEventListener('beforeunload', e => this.beforeunloadHandler(e)); window.addEventListener('beforeunload', e => this.beforeunloadHandler(e));
window.addEventListener('unload', e => this.unloadHandler(e)); window.addEventListener('unload', e => this.unloadHandler(e));
// this.markerInterval(); // this.markerInterval();

Loading…
Cancel
Save