电表状态显示
This commit is contained in:
@ -1,11 +1,24 @@
|
||||
|
||||
<template>
|
||||
<div v-loading="loading">
|
||||
<el-card shadow="always" class="common-card-container" :class="zbInfo.emsCommunicationStatus === '1' ? 'zb-common-card-container' : 'cnb-common-card-container'">
|
||||
<el-card
|
||||
shadow="always"
|
||||
class="common-card-container"
|
||||
:class="
|
||||
zbInfo.emsCommunicationStatus !== '0'
|
||||
? 'zb-common-card-container'
|
||||
: 'cnb-common-card-container'
|
||||
"
|
||||
>
|
||||
<div slot="header">
|
||||
<span class="large-title">1#{{ zbInfo.deviceName }}</span>
|
||||
<div class="status">
|
||||
<div>{{$store.state.ems.communicationStatusOptions[zbInfo.emsCommunicationStatus]}}</div>
|
||||
<div>
|
||||
{{
|
||||
$store.state.ems.communicationStatusOptions[
|
||||
zbInfo.emsCommunicationStatus
|
||||
]
|
||||
}}
|
||||
</div>
|
||||
<div>数据更新时间:{{ zbInfo.dataUpdateTime }}</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -13,39 +26,36 @@
|
||||
class="common-table"
|
||||
:data="zbInfo.loadDataDetailInfo"
|
||||
stripe
|
||||
style="width: 100%;">
|
||||
<el-table-column
|
||||
prop="category"
|
||||
label="类别">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="totalKwh"
|
||||
label="总/kWh"
|
||||
style="width: 100%"
|
||||
>
|
||||
</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-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" class="common-card-container" style="margin-top:20px" :class="cnbInfo.emsCommunicationStatus === '1' ? 'zb-common-card-container' : 'cnb-common-card-container'">
|
||||
<el-card
|
||||
shadow="always"
|
||||
class="common-card-container"
|
||||
style="margin-top: 20px"
|
||||
:class="
|
||||
cnbInfo.emsCommunicationStatus !== '0'
|
||||
? 'zb-common-card-container'
|
||||
: 'cnb-common-card-container'
|
||||
"
|
||||
>
|
||||
<div slot="header">
|
||||
<span class="large-title">2#{{ cnbInfo.deviceName }}</span>
|
||||
<div class="status">
|
||||
<div>{{$store.state.ems.communicationStatusOptions[cnbInfo.emsCommunicationStatus]}}</div>
|
||||
<div>
|
||||
{{
|
||||
$store.state.ems.communicationStatusOptions[
|
||||
cnbInfo.emsCommunicationStatus
|
||||
]
|
||||
}}
|
||||
</div>
|
||||
<div>数据更新时间:{{ cnbInfo.dataUpdateTime }}</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -53,60 +63,58 @@
|
||||
class="common-table"
|
||||
:data="cnbInfo.meteDataDetailInfo"
|
||||
stripe
|
||||
style="width: 100%;">
|
||||
<el-table-column
|
||||
prop="category"
|
||||
label="类别">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="activePower"
|
||||
label="有功功率"
|
||||
style="width: 100%"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="reactivePower"
|
||||
label="无功功率">
|
||||
<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>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
<script>
|
||||
import getQuerySiteId from "@/mixins/ems/getQuerySiteId";
|
||||
import {getAmmeterDataList} from '@/api/ems/dzjk'
|
||||
import { getAmmeterDataList } from "@/api/ems/dzjk";
|
||||
export default {
|
||||
name:'DzjkSbjkDb',
|
||||
name: "DzjkSbjkDb",
|
||||
mixins: [getQuerySiteId],
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
zbInfo: {},
|
||||
cnbInfo: {},
|
||||
}
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
init() {
|
||||
this.loading = true
|
||||
getAmmeterDataList(this.siteId).then(response => {
|
||||
this.zbInfo =JSON.parse(JSON.stringify(response?.data?.ammeterLoadData || {}));
|
||||
this.cnbInfo =JSON.parse(JSON.stringify(response?.data?.ammeterMeteData || {}));
|
||||
}).finally(() => {this.loading = false})
|
||||
}
|
||||
this.loading = true;
|
||||
getAmmeterDataList(this.siteId)
|
||||
.then((response) => {
|
||||
this.zbInfo = JSON.parse(
|
||||
JSON.stringify(response?.data?.ammeterLoadData || {})
|
||||
);
|
||||
this.cnbInfo = JSON.parse(
|
||||
JSON.stringify(response?.data?.ammeterMeteData || {})
|
||||
);
|
||||
})
|
||||
.finally(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
mounted(){
|
||||
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.zb-common-card-container,.cnb-common-card-container{
|
||||
.zb-common-card-container,
|
||||
.cnb-common-card-container {
|
||||
::v-deep {
|
||||
.el-card__header {
|
||||
padding: 10px 14px;
|
||||
background-color: #FC6B69;
|
||||
background-color: #fc6b69;
|
||||
color: #ffffff;
|
||||
position: relative;
|
||||
}
|
||||
@ -116,7 +124,7 @@ export default {
|
||||
margin-top: 25px;
|
||||
::v-deep {
|
||||
.el-card__header {
|
||||
background-color: #05AEA3;
|
||||
background-color: #05aea3;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -129,6 +137,4 @@ export default {
|
||||
font-size: 12px;
|
||||
line-height: 20px;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user