2025-06-22 17:22:40 +08:00
|
|
|
|
<template>
|
2025-08-15 14:13:54 +08:00
|
|
|
|
<div v-loading="loading">
|
|
|
|
|
|
<el-card
|
|
|
|
|
|
shadow="always"
|
2025-09-17 14:52:08 +08:00
|
|
|
|
class="sbjk-card-container"
|
2025-09-10 09:54:29 +08:00
|
|
|
|
:class="{
|
2025-09-17 14:52:08 +08:00
|
|
|
|
'warning-card-container':zbInfo.emsCommunicationStatus && zbInfo.emsCommunicationStatus !== '0',
|
|
|
|
|
|
'running-card-container':zbInfo.emsCommunicationStatus === '0'
|
2025-09-10 09:54:29 +08:00
|
|
|
|
}"
|
2025-08-15 14:13:54 +08:00
|
|
|
|
>
|
|
|
|
|
|
<div slot="header">
|
|
|
|
|
|
<span class="large-title">1#{{ zbInfo.deviceName }}</span>
|
2025-09-17 14:52:08 +08:00
|
|
|
|
<div class="info">
|
2025-08-15 14:13:54 +08:00
|
|
|
|
<div>
|
|
|
|
|
|
{{
|
|
|
|
|
|
$store.state.ems.communicationStatusOptions[
|
|
|
|
|
|
zbInfo.emsCommunicationStatus
|
|
|
|
|
|
]
|
|
|
|
|
|
}}
|
2025-06-22 17:22:40 +08:00
|
|
|
|
</div>
|
2025-08-15 14:13:54 +08:00
|
|
|
|
<div>数据更新时间:{{ zbInfo.dataUpdateTime }}</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<el-table
|
|
|
|
|
|
class="common-table"
|
|
|
|
|
|
:data="zbInfo.loadDataDetailInfo"
|
2025-09-13 22:56:07 +08:00
|
|
|
|
@cell-click="(row,col)=>{handlerCell(zbInfo.deviceId,row,col)}"
|
2025-08-15 14:13:54 +08:00
|
|
|
|
stripe
|
|
|
|
|
|
style="width: 100%"
|
|
|
|
|
|
>
|
|
|
|
|
|
<el-table-column prop="category" label="类别"> </el-table-column>
|
|
|
|
|
|
<el-table-column prop="totalKwh" label="总/kWh"> </el-table-column>
|
|
|
|
|
|
<el-table-column prop="peakKwh" label="尖/kWh"> </el-table-column>
|
|
|
|
|
|
<el-table-column prop="highKwh" label="峰/kWh"> </el-table-column>
|
|
|
|
|
|
<el-table-column prop="flatKwh" label="平/kWh"> </el-table-column>
|
|
|
|
|
|
<el-table-column prop="valleyKwh" label="谷/kWh"> </el-table-column>
|
|
|
|
|
|
</el-table>
|
|
|
|
|
|
</el-card>
|
|
|
|
|
|
<el-card
|
|
|
|
|
|
shadow="always"
|
2025-09-17 14:52:08 +08:00
|
|
|
|
class="sbjk-card-container"
|
2025-08-15 14:13:54 +08:00
|
|
|
|
style="margin-top: 20px"
|
2025-09-10 09:54:29 +08:00
|
|
|
|
:class="{
|
2025-09-17 14:52:08 +08:00
|
|
|
|
'warning-card-container':zbInfo.emsCommunicationStatus && zbInfo.emsCommunicationStatus !== '0',
|
|
|
|
|
|
'running-card-container':zbInfo.emsCommunicationStatus === '0'
|
2025-09-10 09:54:29 +08:00
|
|
|
|
}"
|
2025-08-15 14:13:54 +08:00
|
|
|
|
>
|
|
|
|
|
|
<div slot="header">
|
|
|
|
|
|
<span class="large-title">2#{{ cnbInfo.deviceName }}</span>
|
2025-09-17 14:52:08 +08:00
|
|
|
|
<div class="info">
|
2025-08-15 14:13:54 +08:00
|
|
|
|
<div>
|
|
|
|
|
|
{{
|
|
|
|
|
|
$store.state.ems.communicationStatusOptions[
|
|
|
|
|
|
cnbInfo.emsCommunicationStatus
|
|
|
|
|
|
]
|
|
|
|
|
|
}}
|
2025-06-22 17:22:40 +08:00
|
|
|
|
</div>
|
2025-08-15 14:13:54 +08:00
|
|
|
|
<div>数据更新时间:{{ cnbInfo.dataUpdateTime }}</div>
|
|
|
|
|
|
</div>
|
2025-06-22 17:22:40 +08:00
|
|
|
|
</div>
|
2025-08-15 14:13:54 +08:00
|
|
|
|
<el-table
|
|
|
|
|
|
class="common-table"
|
|
|
|
|
|
:data="cnbInfo.meteDataDetailInfo"
|
2025-09-13 22:56:07 +08:00
|
|
|
|
@cell-click="(row,col)=>{handlerCellCN(cnbInfo.deviceId,row,col)}"
|
2025-08-15 14:13:54 +08:00
|
|
|
|
stripe
|
|
|
|
|
|
style="width: 100%"
|
|
|
|
|
|
>
|
|
|
|
|
|
<el-table-column prop="category" label="类别"> </el-table-column>
|
|
|
|
|
|
<el-table-column prop="activePower" label="有功功率"> </el-table-column>
|
|
|
|
|
|
<el-table-column prop="reactivePower" label="无功功率">
|
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
</el-table>
|
|
|
|
|
|
</el-card>
|
2025-09-13 20:36:46 +08:00
|
|
|
|
<point-chart ref="pointChart" :site-id="siteId"/>
|
2025-08-15 14:13:54 +08:00
|
|
|
|
</div>
|
2025-06-22 17:22:40 +08:00
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
2025-09-13 20:36:46 +08:00
|
|
|
|
import pointChart from "./../PointChart.vue";
|
2025-06-30 17:32:04 +08:00
|
|
|
|
import getQuerySiteId from "@/mixins/ems/getQuerySiteId";
|
2025-08-15 14:13:54 +08:00
|
|
|
|
import { getAmmeterDataList } from "@/api/ems/dzjk";
|
2025-09-10 09:54:29 +08:00
|
|
|
|
import intervalUpdate from "@/mixins/ems/intervalUpdate";
|
2025-06-22 17:22:40 +08:00
|
|
|
|
export default {
|
2025-08-15 14:13:54 +08:00
|
|
|
|
name: "DzjkSbjkDb",
|
2025-09-10 09:54:29 +08:00
|
|
|
|
mixins: [getQuerySiteId,intervalUpdate],
|
2025-09-13 20:36:46 +08:00
|
|
|
|
components:{pointChart},
|
2025-06-22 17:22:40 +08:00
|
|
|
|
data() {
|
|
|
|
|
|
return {
|
2025-08-15 14:13:54 +08:00
|
|
|
|
loading: false,
|
|
|
|
|
|
zbInfo: {},
|
|
|
|
|
|
cnbInfo: {},
|
|
|
|
|
|
};
|
2025-06-22 17:22:40 +08:00
|
|
|
|
},
|
2025-08-15 14:13:54 +08:00
|
|
|
|
methods: {
|
2025-09-13 22:56:07 +08:00
|
|
|
|
handlerCell(id,row,column){
|
2025-09-13 20:36:46 +08:00
|
|
|
|
if(column.label !== '类别'){
|
|
|
|
|
|
const arr = row.category.split('')
|
|
|
|
|
|
arr.splice(6,0,column.label[0])
|
2025-09-13 22:56:07 +08:00
|
|
|
|
this.showChart(arr.join(''),'电表',id)
|
2025-09-13 20:36:46 +08:00
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-09-13 22:56:07 +08:00
|
|
|
|
handlerCellCN(id,row,column){
|
2025-09-13 20:36:46 +08:00
|
|
|
|
if(column.label !== '类别'){
|
|
|
|
|
|
const arr = row.category.split('')
|
|
|
|
|
|
arr.splice(2,arr.length-2,column.label)
|
2025-09-13 22:56:07 +08:00
|
|
|
|
this.showChart(arr.join(''),'电表',id)
|
2025-09-13 20:36:46 +08:00
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
showChart(pointName,categoryName,deviceId){
|
|
|
|
|
|
console.log('点击查询图表',pointName,categoryName,deviceId)
|
|
|
|
|
|
pointName && this.$refs.pointChart.showChart({pointName,categoryName,deviceId})
|
|
|
|
|
|
},
|
2025-09-10 09:54:29 +08:00
|
|
|
|
updateData(){
|
2025-08-15 14:13:54 +08:00
|
|
|
|
this.loading = true;
|
|
|
|
|
|
getAmmeterDataList(this.siteId)
|
2025-09-10 09:54:29 +08:00
|
|
|
|
.then((response) => {
|
|
|
|
|
|
this.zbInfo = JSON.parse(
|
|
|
|
|
|
JSON.stringify(response?.data?.ammeterLoadData || {})
|
|
|
|
|
|
);
|
|
|
|
|
|
this.cnbInfo = JSON.parse(
|
|
|
|
|
|
JSON.stringify(response?.data?.ammeterMeteData || {})
|
|
|
|
|
|
);
|
|
|
|
|
|
})
|
|
|
|
|
|
.finally(() => {
|
|
|
|
|
|
this.loading = false;
|
|
|
|
|
|
});
|
|
|
|
|
|
},
|
|
|
|
|
|
init() {
|
|
|
|
|
|
this.updateData()
|
|
|
|
|
|
this.updateInterval(this.updateData)
|
2025-08-15 14:13:54 +08:00
|
|
|
|
},
|
2025-06-22 17:22:40 +08:00
|
|
|
|
},
|
2025-08-15 14:13:54 +08:00
|
|
|
|
mounted() {},
|
|
|
|
|
|
};
|
2025-06-22 17:22:40 +08:00
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<style scoped lang="scss">
|
2025-09-22 17:57:30 +08:00
|
|
|
|
.sbjk-card-container {
|
2025-08-15 14:13:54 +08:00
|
|
|
|
::v-deep {
|
2025-09-13 20:36:46 +08:00
|
|
|
|
.el-table__row td{
|
|
|
|
|
|
&:not(:first-child){
|
|
|
|
|
|
.cell{
|
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2025-06-22 17:22:40 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
2025-09-17 14:52:08 +08:00
|
|
|
|
|
2025-06-22 17:22:40 +08:00
|
|
|
|
</style>
|