首页字段、收益表格

This commit is contained in:
白菜
2026-01-23 14:18:22 +08:00
parent fb90d81bb3
commit bfe72cf2c3
3 changed files with 38 additions and 64 deletions

View File

@ -35,19 +35,14 @@
</div>
</div>
<el-row class="device-info-row">
<template v-if="deviceIdTypeMsg[item.deviceId]">
<el-col v-for="(tempDataItem,tempDataIndex) in deviceIdTypeMsg[item.deviceId]"
:key="tempDataIndex+'dbTempData'"
:span="8" class="device-info-col">
<el-col v-for="(tempDataItem,tempDataIndex) in (deviceIdTypeMsg[item.deviceId] || otherTypeMsg)"
:key="tempDataIndex+'dbTempData'"
:span="8" class="device-info-col">
<span class="pointer" @click="showChart(tempDataItem.pointName,item.deviceId)">
<span class="left">{{ tempDataItem.name }}</span> <span class="right">{{ item[tempDataItem.attr] || '-' }}<span
v-html="tempDataItem.unit"></span></span>
</span>
</el-col>
</template>
<template v-else>
<el-empty :image-size="80" description="未知的电表数据"></el-empty>
</template>
</el-col>
</el-row>
</el-card>
<el-empty v-show="list.length<=0" :image-size="200"></el-empty>
@ -174,7 +169,27 @@ export default {
unit: 'kvar'
}
]
}
},
otherTypeMsg: [
{
name: '正向有功电能',
attr: 'forwardActive',
pointName: '正向有功电能',
unit: 'kWh'
},
{
name: '反向有功电能',
attr: 'reverseActive',
pointName: '反向有功电能',
unit: 'kWh'
},
{
name: '有功功率',
attr: 'activePower',
pointName: '总有功功率',
unit: 'kW'
},
]
};
},
methods: {