修改声音传感器设备状态显示
This commit is contained in:
parent
8990947fd5
commit
3305a5d080
@ -200,7 +200,8 @@ export const useSocketStore = defineStore(Names.socketMechanics, {
|
|||||||
this.newVerticalNum[pIndex].value[cIndex].time = null
|
this.newVerticalNum[pIndex].value[cIndex].time = null
|
||||||
}
|
}
|
||||||
this.newVerticalNum[pIndex].value[cIndex].val = val.data.val
|
this.newVerticalNum[pIndex].value[cIndex].val = val.data.val
|
||||||
this.newVerticalNum[pIndex].value[cIndex].status = true
|
this.newVerticalNum[pIndex].value[cIndex].status = val.data.hasOwnProperty('status')?val.data.status:true
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
|
@ -68,7 +68,7 @@ const init = () => {
|
|||||||
labelLine: {
|
labelLine: {
|
||||||
show: true,
|
show: true,
|
||||||
},
|
},
|
||||||
top: '10%',
|
top: '13%',
|
||||||
data: prop.data,
|
data: prop.data,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
@ -154,7 +154,7 @@ async function getSensorData() {
|
|||||||
devId: item.devId,
|
devId: item.devId,
|
||||||
name: item.name + '噪音监测',
|
name: item.name + '噪音监测',
|
||||||
type: 'noise',
|
type: 'noise',
|
||||||
status: true,
|
status: item.status,
|
||||||
val: item.value,
|
val: item.value,
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@ -359,7 +359,7 @@ function getWebsocket(val) {
|
|||||||
if (data.type == "noise") {
|
if (data.type == "noise") {
|
||||||
data.msg.listData.forEach(ele => {
|
data.msg.listData.forEach(ele => {
|
||||||
if (noiseData.indexOf(ele.devId) > -1) {
|
if (noiseData.indexOf(ele.devId) > -1) {
|
||||||
let verticalData = { name: ele.name, val: ele.value, devId: ele.devId }
|
let verticalData = { name: ele.name, val: ele.value, devId: ele.devId,status:ele.status }
|
||||||
store.changeNewVerticalNum({ type: 'noise', data: verticalData })
|
store.changeNewVerticalNum({ type: 'noise', data: verticalData })
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user