修改点离线样式
This commit is contained in:
@@ -588,6 +588,7 @@ const setImportJson = (exportJson: IExportJson) => {
|
||||
//报警设备闪烁
|
||||
if (findTransmissionDeviceIdsByKeyList(list.value).includes(item.id)) {
|
||||
// item.props.fill.val = '#fcfc57'
|
||||
|
||||
item.props.fill.val = sendColor.value
|
||||
item.common_animations.val = 'flash'
|
||||
if (findTransmissionDeviceIdsByKeyList(listMax.value).includes(item.id)) {
|
||||
@@ -1027,16 +1028,26 @@ const setMqtt = async () => {
|
||||
await mqttClient.value.subscribe('/zl/rtData/#')
|
||||
|
||||
// 设置消息接收回调
|
||||
mqttClient.value.onMessage((subscribe: string, message: any) => {
|
||||
mqttClient.value.onMessage(async (subscribe: string, message: any) => {
|
||||
const msg: any = uint8ArrayToObject(message)
|
||||
console.log('🚀 ~ 接受消息:', msg)
|
||||
setTimeout(() => {
|
||||
list.value = [...new Set(msg.filter((item: any) => item.devStatus === 1).map((item: any) => item.lineId))]
|
||||
sendColor.value = '#ff0000'
|
||||
// await setImportJson(savedExportJson.value)
|
||||
|
||||
await setTimeout(() => {
|
||||
done_json.value.forEach(item => {
|
||||
msg.forEach((msgValue: any) => {
|
||||
if (item.id == msgValue.id) {
|
||||
item.props.text.val = item.props.text.val.replace(/#{3}/g, msgValue.value) //'B相负载电流-CP95:31'
|
||||
}
|
||||
})
|
||||
list.value.forEach((listValue: any) => {
|
||||
if (listValue == item.lineId && item.type == 'svg') {
|
||||
item.props.fill.val = '#ff0000'
|
||||
// item.common_animations.val = 'flash'
|
||||
}
|
||||
})
|
||||
})
|
||||
}, 100)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user