From 761ad3c2f89170459766d839663a891c5b9c9e29 Mon Sep 17 00:00:00 2001 From: guanj Date: Fri, 5 Dec 2025 11:22:36 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BC=A0=E5=85=A5=E6=95=B0?= =?UTF-8?q?=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/mt-preview-ypt/index.vue | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/src/components/mt-preview-ypt/index.vue b/src/components/mt-preview-ypt/index.vue index a61a9f7..ee24f8d 100644 --- a/src/components/mt-preview-ypt/index.vue +++ b/src/components/mt-preview-ypt/index.vue @@ -42,11 +42,9 @@ @drag-canvas-mouse-move="dragCanvasMouseMove" @drag-canvas-mouse-up="dragCanvasMouseUp" > - -
- -
+ + @@ -64,7 +62,7 @@ import { globalStore } from '../mt-edit/store/global' import type { IDoneJsonEventList } from '../mt-edit/store/types' import IframeDia from './iframeDia.vue' import MQTT from '@/utils/mqtt' - +const iframeDiaRef = ref(null) const tableData = [ { date: '2023-05-03 13:33:44:853', @@ -92,7 +90,7 @@ const tableData = [ // address: 'No. 189, Grove St, Los Angeles' // } ] -const askCSConfigRtDataList = ref([]) +const dataList = ref([]) // 节流函数实现 (替代lodash,减少依赖) const throttle = (func: (...args: any[]) => void, wait: number) => { @@ -706,6 +704,7 @@ storedSelectedId = localStorage.getItem('selectedId') || '' // 当前点击的元素lineId 通过mt-edit/render-core/index.vue传过来的click事件 const handleElementClick = (elementId: string, lineName: string) => { + iframeDiaRef.value .showNextCorner(elementId, lineName) // 保存当前点击的设备ID indicator(['00B78D0171091', '00B78D0171092']) // currentClickedElementId.value = elementId @@ -873,7 +872,7 @@ const setMqtt = async () => { console.log('🚀 ~ 接受消息:', subscribe, msg) if (subscribe.split('/')[2] === 'askCSConfigRtData') { // 指标数据 - askCSConfigRtDataList.value = JSON.parse(msg.message) + dataList.value = JSON.parse(msg.message) } }) } catch (error) { @@ -1014,4 +1013,13 @@ defineExpose({ /* background-color: #303b54; */ background-color: #5aa1ff29; } +/* .aaaa{ + position: absolute; + right: 0; + top: 0px; + z-index: 111123; + height: 100px; + width: 100px; + background-color: #ccc; +} */