量测:修改实时值不存在列表不显示的问题
This commit is contained in:
parent
bea0be8bb2
commit
ded06566e9
@ -63,34 +63,34 @@ const tableColumn = [
|
||||
prop: 'porder',
|
||||
width: 76,
|
||||
align: 'center',
|
||||
sortable:'custom'
|
||||
sortable: 'custom',
|
||||
},
|
||||
{
|
||||
label: '属性名称',
|
||||
prop: 'attributeName',
|
||||
align: 'left',
|
||||
sortable:'custom'
|
||||
sortable: 'custom',
|
||||
},
|
||||
{
|
||||
label: '属性编码',
|
||||
prop: 'attributeCode',
|
||||
align: 'left',
|
||||
width: 200,
|
||||
sortable:'custom'
|
||||
sortable: 'custom',
|
||||
},
|
||||
{
|
||||
label: '子系统',
|
||||
prop: 'subSystem',
|
||||
align: 'left',
|
||||
width: 110,
|
||||
sortable:false
|
||||
sortable: false,
|
||||
},
|
||||
{
|
||||
label: '实时值',
|
||||
prop: 'realTimeValue',
|
||||
width: 140,
|
||||
align: 'center',
|
||||
sortable:false
|
||||
sortable: false,
|
||||
},
|
||||
]
|
||||
const tableData = ref<any[]>([])
|
||||
@ -156,10 +156,10 @@ const getCompleteData = () => {
|
||||
})
|
||||
.then((realData: any) => {
|
||||
const data = realData.list.map((item: any) => {
|
||||
const realValItem = realData.realVal[props.deviceId]?.[item.attributeCode] ?? '-'
|
||||
const realValItem = realData.realVal[props.deviceId]?.[item.attributeCode]
|
||||
return {
|
||||
...item,
|
||||
realTimeValue: realValItem % 1 === 0 ? realValItem : realValItem.toFixed(3),
|
||||
realTimeValue: realValItem ? (realValItem % 1 === 0 ? realValItem : realValItem.toFixed(3)) : '-',
|
||||
}
|
||||
})
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user