From 70058457b8ad624b09f42e72588b46925daf8fb6 Mon Sep 17 00:00:00 2001 From: Yangwl <1726150332@qq.com> Date: Mon, 31 Mar 2025 10:54:57 +0800 Subject: [PATCH] =?UTF-8?q?2F=E7=9B=91=E6=8E=A7=E7=95=8C=E9=9D=A2=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/cs/index.vue | 78 +++++++++++++++++++++--------------------- 1 file changed, 39 insertions(+), 39 deletions(-) diff --git a/src/views/cs/index.vue b/src/views/cs/index.vue index 983400b..a4e00f8 100644 --- a/src/views/cs/index.vue +++ b/src/views/cs/index.vue @@ -150,7 +150,8 @@
+ :style="`width: ${i.width}%; height: ${i.height}%;top: ${i.top}%;left: ${i.left}%;transform: rotate(${i.rotate}deg); + background: ${i.alpha};border-radius: ${i.radius}%; `">
{{ i.equipmentName }}
({ ...item, })) + const descList = receivedData.map(item => + `${item.params?.equipmentName || '未知'} ${item.orderDesc || '无故障描述'} 维修人:${item.orderRepairmanName}` + ); + this.scrollText = descList.join('★★★★★★★★'); // 用两个全角空格分隔 + + // 提取所有有效的设备名称 + const activeEquipmentNames = new Set( + receivedData + .map(item => item.params?.equipmentName) + .filter(name => name) + ); + + // 更新infoData的高亮状态 + this.infoData.forEach((item, index) => { + if (activeEquipmentNames.has(item.equipmentName)) { + // 响应式设置alpha + this.$set(this.infoData[index], 'alpha', '#CB4C4C80'); + } else { + // 移除alpha属性 + if (this.infoData[index].hasOwnProperty('alpha')) { + this.$delete(this.infoData[index], 'alpha'); + } + } + }); + } else { console.warn('收到非数组格式数据:', receivedData) } @@ -519,7 +519,7 @@ export default { console.error("JSON parsing failed:", error) this.$notify.error({ title: '数据错误', message: '接收数据格式异常' }) } - }; + }.bind(this);; this.ws.onclose = function (event) { self.text_content = self.text_content + "已经关闭连接!" + "\n"; };