合并develop最新代码

This commit is contained in:
白菜
2025-11-28 15:18:27 +08:00
22 changed files with 886 additions and 206 deletions

View File

@ -68,6 +68,7 @@ export default {
<style scoped lang="scss">
.dzjk-ems-content-container{
margin-top:0;
min-height: 60vh;
}
.lighting{
position: relative;

View File

@ -8,7 +8,19 @@
'running-card-container':baseInfo.workStatus === '0'
}">
<div slot="header">
<span class="large-title">{{index+1}}#{{baseInfo.parentDeviceName?`${baseInfo.parentDeviceName} > ` : ''}}{{baseInfo.deviceName}}</span>
<span class="large-title">{{baseInfo.parentDeviceName?`${baseInfo.parentDeviceName} -> ` : ''}}{{baseInfo.deviceName}}</span>
<div class="info">
<div>数据更新时间{{ baseInfo.dataUpdateTime || '-'}}</div>
</div>
<div class="alarm">
<el-button type="primary" size="small" style="margin-right:20px;" @click="pointDetail(baseInfo,'point')">详细</el-button>
<el-badge :value="baseInfo.alarmNum || 0" class="item">
<i
class="el-icon-message-solid alarm-icon"
@click="pointDetail(baseInfo,'alarmPoint')"
></i>
</el-badge>
</div>
</div>
<div class="descriptions-main">
<el-descriptions direction="vertical" :column="3" :colon="false">
@ -80,19 +92,21 @@
</div>
<el-empty v-show="baseInfoList.length<=0" :image-size="200"></el-empty>
<point-chart ref="pointChart" :site-id="siteId"/>
<point-table ref="pointTable"/>
</div>
</template>
<script>
import pointChart from "./../PointChart.vue";
import PointTable from "@/views/ems/site/sblb/PointTable.vue";
import {getBMSBatteryCluster} from '@/api/ems/dzjk'
import getQuerySiteId from "@/mixins/ems/getQuerySiteId";
import intervalUpdate from "@/mixins/ems/intervalUpdate";
export default {
name:'DzjkSbjkBmsdcc',
mixins:[getQuerySiteId,intervalUpdate],
components:{pointChart},
components:{PointTable, pointChart},
data() {
return {
loading:false,
@ -127,6 +141,11 @@ export default {
}
},
methods:{
// 查看设备电位表格
pointDetail(row,dataType){
const {siteId,deviceId} = row
this.$refs.pointTable.showTable({siteId,deviceId,deviceCategory:'CLUSTER'},dataType)
},
showChart(pointName,deviceId){
pointName && this.$refs.pointChart.showChart({pointName,deviceCategory:'CLUSTER',deviceId})
},

View File

@ -8,7 +8,19 @@
}" class="sbjk-card-container common-card-container-body-no-padding common-card-container-no-title-bg"
shadow="always">
<div slot="header">
<span class="large-title">{{index+1}}#{{baseInfo.deviceName}}</span>
<span class="large-title">{{baseInfo.deviceName}}</span>
<div class="info">
<div>数据更新时间{{ baseInfo.dataUpdateTime || '-'}}</div>
</div>
<div class="alarm">
<el-button type="primary" size="small" style="margin-right:20px;" @click="pointDetail(baseInfo,'point')">详细</el-button>
<el-badge :value="baseInfo.alarmNum || 0" class="item">
<i
class="el-icon-message-solid alarm-icon"
@click="pointDetail(baseInfo,'alarmPoint')"
></i>
</el-badge>
</div>
</div>
<div class="descriptions-main">
<el-descriptions :colon="false" :column="3" direction="vertical">
@ -111,6 +123,7 @@
</div>
<el-empty v-show="baseInfoList.length<=0" :image-size="200"></el-empty>
<point-chart ref="pointChart" :site-id="siteId"/>
<point-table ref="pointTable"/>
</div>
</template>
@ -119,9 +132,10 @@ import {getBMSOverView} from '@/api/ems/dzjk'
import getQuerySiteId from "@/mixins/ems/getQuerySiteId";
import intervalUpdate from "@/mixins/ems/intervalUpdate";
import pointChart from "./../PointChart.vue";
import PointTable from "@/views/ems/site/sblb/PointTable.vue";
export default {
name:'DzjkSbjkBmszl',
components: {pointChart,},
components: {pointChart,PointTable},
mixins:[getQuerySiteId,intervalUpdate],
data() {
return {
@ -141,6 +155,11 @@ export default {
}
},
methods:{
// 查看设备电位表格
pointDetail(row,dataType){
const {siteId,deviceId} = row
this.$refs.pointTable.showTable({siteId,deviceId,deviceCategory:'STACK'},dataType)
},
showChart(pointName,deviceId,deviceCategory = 'STACK'){
pointName && this.$refs.pointChart.showChart({pointName,deviceCategory,deviceId})
},

View File

@ -11,7 +11,7 @@
}"
>
<div slot="header">
<span class="large-title">{{index+1}}#{{ item.deviceName }}</span>
<span class="large-title">{{ item.deviceName }}</span>
<div class="info">
<div>
{{
@ -22,17 +22,27 @@
</div>
<div>数据更新时间{{ item.dataUpdateTime }}</div>
</div>
<div class="alarm">
<el-button type="primary" size="small" style="margin-right:20px;" @click="pointDetail(item,'point')">详细</el-button>
<el-badge :value="item.alarmNum || 0" class="item">
<i
class="el-icon-message-solid alarm-icon"
@click="pointDetail(item,'alarmPoint')"
></i>
</el-badge>
</div>
</div>
<el-row>
<el-col v-for="(tempDataItem,tempDataIndex) in deviceIdTypeMsg[item.deviceId]" :key="tempDataIndex+'dbTempData'" :span="8">
<el-row class="device-info-row">
<el-col v-for="(tempDataItem,tempDataIndex) in deviceIdTypeMsg[item.deviceId]" :key="tempDataIndex+'dbTempData'" :span="8" class="device-info-col">
<span class="pointer" @click="showChart(tempDataItem.pointName,item.deviceId)">
{{tempDataItem.name}}{{item[tempDataItem.attr]}}<span v-html="tempDataItem.unit"></span>
<span class="left">{{tempDataItem.name}}</span> <span class="right">{{item[tempDataItem.attr]}}<span v-html="tempDataItem.unit"></span></span>
</span>
</el-col>
</el-row>
</el-card>
<el-empty v-show="list.length<=0" :image-size="200"></el-empty>
<point-chart ref="pointChart" :site-id="siteId"/>
<point-table ref="pointTable"/>
</div>
</template>
@ -41,10 +51,11 @@ import pointChart from "./../PointChart.vue";
import getQuerySiteId from "@/mixins/ems/getQuerySiteId";
import { getAmmeterDataList } from "@/api/ems/dzjk";
import intervalUpdate from "@/mixins/ems/intervalUpdate";
import PointTable from "@/views/ems/site/sblb/PointTable.vue";
export default {
name: "DzjkSbjkDb",
mixins: [getQuerySiteId,intervalUpdate],
components:{pointChart},
components:{PointTable, pointChart},
data() {
return {
loading: false,
@ -140,6 +151,11 @@ export default {
};
},
methods: {
// 查看设备电位表格
pointDetail(row,dataType){
const {deviceId} = row
this.$refs.pointTable.showTable({siteId:this.siteId,deviceId,deviceCategory:'AMMETER'},dataType)
},
showChart(pointName,deviceId){
pointName && this.$refs.pointChart.showChart({pointName,deviceCategory:'AMMETER',deviceId})
},
@ -167,24 +183,6 @@ export default {
&.list:not(:last-child){
margin-bottom: 25px;
}
.el-row{
background-color: #ffffff;
border:1px solid #eeeeee;
font-size: 14px;
line-height: 16px;
color: #333333;
.el-col{
padding:12px 0;
text-align: center;
position: relative;
}
.el-col{
border-bottom: 1px solid #eeeeee;
}
.el-col:not(:nth-child(3n)){
border-right: 1px solid #eeeeee;
}
}
}
</style>

View File

@ -0,0 +1,109 @@
<template>
<div v-loading="loading">
<el-card
v-for="(item,index) in list"
:key="index+'ylLise'"
class="sbjk-card-container running-card-container"
shadow="always">
<div slot="header">
<span class="large-title">{{item.deviceName}}</span>
<div class="info">
<div>数据更新时间{{ item.dataUpdateTime || '-'}}</div>
</div>
<div class="alarm">
<el-button type="primary" size="small" style="margin-right:20px;" @click="pointDetail(item,'point')">详细</el-button>
<el-badge :value="item.alarmNum || 0" class="item">
<i
class="el-icon-message-solid alarm-icon"
@click="pointDetail(item,'alarmPoint')"
></i>
</el-badge>
</div>
</div>
<el-row class="device-info-row">
<el-col v-for="(tempDataItem,tempDataIndex) in tempData" :key="tempDataIndex+'hdTempData'" :span="12" class="device-info-col">
<span class="pointer" @click="showChart(tempDataItem.title,item.deviceId)">
<span class="left">{{tempDataItem.title}}</span> <span class="right">{{item[tempDataItem.attr]}}<span v-html="tempDataItem.unit"></span></span>
</span>
</el-col>
</el-row>
</el-card>
<el-empty v-show="list.length<=0" :image-size="200"></el-empty>
<point-chart ref="pointChart" :site-id="siteId"/>
<point-table ref="pointTable"/>
</div>
</template>
<script>
import getQuerySiteId from "@/mixins/ems/getQuerySiteId";
import {getDhDataList} from '@/api/ems/dzjk'
import intervalUpdate from "@/mixins/ems/intervalUpdate";
import pointChart from "./../PointChart.vue";
import PointTable from "@/views/ems/site/sblb/PointTable.vue";
export default {
name:'DzjkSbjkDh',
mixins:[getQuerySiteId,intervalUpdate],
components:{pointChart,PointTable},
data() {
return {
loading:false,
list:[],
tempData:[
{title:'湿度',attr:'humidity',unit:'&#8451;'},
{title:'温度',attr:'temperature',unit:''},
]
}
},
methods:{
// 查看设备电位表格
pointDetail(row,dataType){
const {deviceId} = row
this.$refs.pointTable.showTable({siteId:this.siteId,deviceId,deviceCategory:'DH'},dataType)
},
showChart(pointName,deviceId){
pointName && this.$refs.pointChart.showChart({pointName,deviceCategory:'DH',deviceId})
},
updateData(){
this.loading = true
getDhDataList(this.siteId).then(response => {
this.list = JSON.parse(JSON.stringify(response?.data || []));
}).finally(() => {this.loading = false})
},
init(){
this.updateData()
this.updateInterval(this.updateData)
}
},
mounted(){
}
}
</script>
<style scoped lang="scss">
.sbjk-card-container{
&:not(:last-child){
margin-bottom: 25px;
}
.el-row{
background-color: #ffffff;
border:1px solid #eeeeee;
font-size: 14px;
line-height: 16px;
color: #333333;
.el-col{
padding:12px 0;
text-align: center;
position: relative;
}
.el-col{
border-bottom: 1px solid #eeeeee;
}
.el-col:not(:nth-child(3n)){
border-right: 1px solid #eeeeee;
}
}
}
</style>

View File

@ -52,13 +52,16 @@
</el-button>
</template>
</el-table-column>
<!-- <el-table-column label="曲线图">
<el-table-column label="操作">
<template slot-scope="scope">
<el-button @click="chartDetail(scope.row)" type="text" size="small">
展示
<el-button @click="$emit('pointDetail',scope.row,'point')" type="text" size="small">
详细
</el-button>
<el-button @click="$emit('pointDetail',scope.row,'alarmPoint')" type="text" size="small">
报警点位详细
</el-button>
</template>
</el-table-column> -->
</el-table-column>
</el-table>
<!-- <el-pagination
v-show="tableData.length > 0"
@ -115,7 +118,6 @@ export default {
methods: {
//查看表格行图表
chartDetail(row, dataType = "") {
const { clusterDeviceId, deviceId } = row;
this.$emit("chart", { ...row, dataType });
},
},

View File

@ -88,6 +88,7 @@
:totalSize="totalSize"
:pointIdList="pointIdList"
@chart="chartDetail"
@pointDetail="pointDetail"
></component>
<el-pagination
v-show="tableData.length > 0"
@ -104,6 +105,7 @@
</el-pagination>
<chart-detail ref="chartDetail" />
<point-chart ref="pointChart" :site-id="siteId" />
<point-table ref="pointTable"/>
</el-card>
</template>
@ -119,10 +121,12 @@ import ChartDetail from "./ChartDetail.vue";
import Table from "./Table.vue";
import List from "./List.vue";
import pointChart from "./../PointChart.vue";
import PointTable from "@/views/ems/site/sblb/PointTable.vue";
export default {
name: "DzjkSbjkDtdc",
mixins: [getQuerySiteId],
components: {
PointTable,
BarChart,
ChartDetail,
DtdcTable: Table,
@ -165,6 +169,11 @@ export default {
};
},
methods: {
// 查看设备电位表格
pointDetail(row,dataType){
const {deviceId,clusterDeviceId} = row
this.$refs.pointTable.showTable({siteId:this.siteId,deviceId,deviceCategory:'BATTERY',parentId:clusterDeviceId},dataType)
},
changeMenu(menu) {
const { activeBtn } = this;
activeBtn !== menu && (this.activeBtn = menu);

View File

@ -18,7 +18,7 @@
>
<div slot="header">
<span class="large-title"
>{{ pcsIndex + 1 }}#{{ pcsItem.deviceName }}</span
>{{ pcsItem.deviceName }}</span
>
<div class="info">
<div>
@ -31,10 +31,11 @@
<div>数据更新时间{{ pcsItem.dataUpdateTime }}</div>
</div>
<div class="alarm">
<el-button type="primary" size="small" style="margin-right:20px;" @click="pointDetail(pcsItem,'point')">详细</el-button>
<el-badge :value="pcsItem.alarmNum || 0" class="item">
<i
class="el-icon-message-solid"
style="font-size: 26px; color: #fff; display: block"
class="el-icon-message-solid alarm-icon"
@click="pointDetail(pcsItem,'alarmPoint')"
></i>
</el-badge>
</div>
@ -170,18 +171,20 @@
</div>
<el-empty v-show="pcsList.length <= 0" :image-size="200"></el-empty>
<point-chart ref="pointChart" :site-id="siteId" />
<point-table ref="pointTable"/>
</div>
</template>
<script>
import pointChart from "./../PointChart.vue";
import PointTable from "@/views/ems/site/sblb/PointTable.vue";
import RealTimeBaseInfo from "./../RealTimeBaseInfo.vue";
import getQuerySiteId from "@/mixins/ems/getQuerySiteId";
import { getRunningHeadInfo, getPcsDetailInfo } from "@/api/ems/dzjk";
import intervalUpdate from "@/mixins/ems/intervalUpdate";
export default {
name: "DzjkSbjkPcs",
components: { RealTimeBaseInfo, pointChart },
components: { RealTimeBaseInfo, pointChart ,PointTable},
mixins: [getQuerySiteId, intervalUpdate],
data() {
return {
@ -269,6 +272,11 @@ export default {
};
},
methods: {
// 查看设备电位表格
pointDetail(row,dataType){
const {deviceId} = row
this.$refs.pointTable.showTable({siteId:this.siteId,deviceId,deviceCategory:'PCS'},dataType)
},
showChart(pointName, deviceId,isBranch=false) {
pointName &&
this.$refs.pointChart.showChart({ pointName,deviceCategory:isBranch ? 'BRANCH' : 'PCS', deviceId });

View File

@ -14,7 +14,6 @@
<script>
import * as echarts from "echarts";
import resize from "@/mixins/ems/resize";
import { formatDate } from "@/filters/ems";
import { storagePower } from "@/api/ems/dzjk";
export default {
@ -35,12 +34,10 @@ export default {
this.chart = null;
},
methods: {
init(siteId) {
init(siteId, timeRange) {
this.chart.showLoading();
const x = [];
const data1 = [],
data2 = [];
storagePower(siteId)
const [startTime='', endTime=''] = timeRange;
storagePower(siteId,startTime,endTime)
.then((response) => {
this.setOption(response?.data?.pcsPowerList || []);
})
@ -49,7 +46,6 @@ export default {
});
},
setOption(data) {
// data=[{deviceId:'pcs1',energyStoragePowList:[{createDate,deviceId,pcsTotalActPower,pcsTotalReactivePower}]}]
let xdata = [],
series = [];
data.forEach((element, index) => {
@ -64,8 +60,13 @@ export default {
// color:'#FFBD00'
},
data: (element.energyStoragePowList || []).map(
(i) => i.pcsTotalActPower
),
(i) => {
return {
value:i.pcsTotalActPower,
year:i.dateDay || ''
}
}
)
},
{
type: "line",
@ -74,7 +75,12 @@ export default {
// color:'#FFBD00'
},
data: (element.energyStoragePowList || []).map(
(i) => i.pcsTotalReactivePower
(i) => {
return {
value: i.pcsTotalReactivePower,
year:i.dateDay || ''
}
}
),
}
);
@ -93,11 +99,24 @@ export default {
containLabel: true,
},
tooltip: {
show:true,
trigger: "axis",
axisPointer: {
// 坐标轴指示器,坐标轴触发有效
type: "shadow", // 默认为直线,可选为:'line' | 'shadow'
},
formatter :(params)=>{
if(params.length <= 0) return
let result = (params[0].data.year || '')+' '+ params[0].name + '<div>'
params.forEach(item=>{
const {color,seriesName,value} = item
result += `<div style="position: relative;padding-left:20px;line-height: 20px;">
<div style="position: absolute;top:50%;left:0;width:12px;height:12px;border-radius:100%;background: ${color};transform: translateY(-50%)"></div>
<span>${seriesName}</span><span style="margin-left:20px;font-weight: 700">${value}</span></div>`
})
result+='</div>'
return result
}
},
textStyle: {
color: "#333333",

View File

@ -14,7 +14,6 @@
<script>
import * as echarts from "echarts";
import resize from "@/mixins/ems/resize";
import { formatDate } from "@/filters/ems";
import { batteryAveSoc } from "@/api/ems/dzjk";
export default {
mixins: [resize],
@ -34,9 +33,10 @@ export default {
this.chart = null;
},
methods: {
init(siteId) {
init(siteId,timeRange) {
this.chart.showLoading();
batteryAveSoc(siteId)
const [startTime='', endTime=''] = timeRange;
batteryAveSoc(siteId,startTime,endTime)
.then((response) => {
this.setOption(response?.data?.batteryAveSOCList || []);
})
@ -49,7 +49,10 @@ export default {
ydata = [];
data.forEach((element) => {
xdata.push(element.createDate);
ydata.push(element.batterySOC);
ydata.push({
value:element.batterySOC,
year:element.dateDay,
});
});
xdata = this.chart.setOption({
legend: {
@ -65,11 +68,24 @@ export default {
containLabel: true,
},
tooltip: {
show:true,
trigger: "axis",
axisPointer: {
// 坐标轴指示器,坐标轴触发有效
type: "shadow", // 默认为直线,可选为:'line' | 'shadow'
},
formatter :(params)=>{
if(params.length <= 0) return
let result = (params[0].data.year || '')+' '+params[0].name + '<div>'
params.forEach(item=>{
const {color,seriesName,value} = item
result += `<div style="position: relative;padding-left:20px;line-height: 20px;">
<div style="position: absolute;top:50%;left:0;width:12px;height:12px;border-radius:100%;background: ${color};transform: translateY(-50%)"></div>
<span>${seriesName}</span><span style="margin-left:20px;font-weight: 700">${value}</span></div>`
})
result+='</div>'
return result
}
},
textStyle: {
color: "#333333",

View File

@ -14,7 +14,6 @@
<script>
import * as echarts from "echarts";
import resize from "@/mixins/ems/resize";
import { formatDate } from "@/filters/ems";
import { batteryAveTemp } from "@/api/ems/dzjk";
export default {
@ -35,12 +34,10 @@ export default {
this.chart = null;
},
methods: {
init(siteId) {
init(siteId,timeRange) {
this.chart.showLoading();
const x = [];
const data1 = [],
data2 = [];
batteryAveTemp(siteId)
const [startTime='', endTime=''] = timeRange;
batteryAveTemp(siteId,startTime,endTime)
.then((response) => {
this.setOption(response?.data?.batteryAveTempList || []);
})
@ -53,7 +50,12 @@ export default {
ydata = [];
data.forEach((element) => {
xdata.push(element.createDate);
ydata.push(element.batteryTemp);
ydata.push(
{
value: element.batteryTemp,
year: element.dateDay
}
);
});
xdata = this.chart.setOption({
legend: {
@ -69,11 +71,24 @@ export default {
containLabel: true,
},
tooltip: {
show:true,
trigger: "axis",
axisPointer: {
// 坐标轴指示器,坐标轴触发有效
type: "shadow", // 默认为直线,可选为:'line' | 'shadow'
},
formatter :(params)=>{
if(params.length <= 0) return
let result = (params[0].data.year || '')+' '+params[0].name + '<div>'
params.forEach(item=>{
const {color,seriesName,value} = item
result += `<div style="position: relative;padding-left:20px;line-height: 20px;">
<div style="position: absolute;top:50%;left:0;width:12px;height:12px;border-radius:100%;background: ${color};transform: translateY(-50%)"></div>
<span>${seriesName}</span><span style="margin-left:20px;font-weight: 700">${value}</span></div>`
})
result+='</div>'
return result
}
},
textStyle: {
color: "#333333",

View File

@ -14,7 +14,6 @@
<script>
import * as echarts from "echarts";
import resize from "@/mixins/ems/resize";
import { formatDate } from "@/filters/ems";
import { pcsMaxTemp } from "@/api/ems/dzjk";
export default {
@ -35,11 +34,10 @@ export default {
this.chart = null;
},
methods: {
init(siteId) {
init(siteId,timeRange) {
this.chart.showLoading();
const x = [];
const data = [];
pcsMaxTemp(siteId)
const [startTime='', endTime=''] = timeRange;
pcsMaxTemp(siteId,startTime,endTime)
.then((response) => {
this.setOption(response?.data?.pcsMaxTempList || []);
})
@ -60,7 +58,12 @@ export default {
areaStyle: {
// color:'#FFBD00'
},
data: (element.maxTempVoList || []).map((i) => i.temp),
data: (element.maxTempVoList || []).map((i) => {
return {
value: i.temp,
year: i.dateDay
}
}),
});
});
this.chart.setOption({
@ -77,11 +80,24 @@ export default {
containLabel: true,
},
tooltip: {
show:true,
trigger: "axis",
axisPointer: {
// 坐标轴指示器,坐标轴触发有效
type: "shadow", // 默认为直线,可选为:'line' | 'shadow'
},
formatter :(params)=>{
if(params.length <= 0) return
let result = (params[0].data.year || '')+' '+params[0].name + '<div>'
params.forEach(item=>{
const {color,seriesName,value} = item
result += `<div style="position: relative;padding-left:20px;line-height: 20px;">
<div style="position: absolute;top:50%;left:0;width:12px;height:12px;border-radius:100%;background: ${color};transform: translateY(-50%)"></div>
<span>${seriesName}</span><span style="margin-left:20px;font-weight: 700">${value}</span></div>`
})
result+='</div>'
return result
}
},
textStyle: {
color: "#333333",

View File

@ -3,6 +3,8 @@
<div class="ssyx-ems-dashboard-editor-container">
<!-- 6个方块-->
<real-time-base-info :data="runningHeadData"/>
<!-- 时间选择 -->
<date-range-select ref="dateRangeSelect" @updateDate="updateDate" style="margin-top:20px;"/>
<!-- echart图表-->
<el-row :gutter="32" style="background:#fff;margin:30px 0;">
<el-col :xs="24" :sm="12" :lg="12">
@ -27,6 +29,7 @@
</style>
<script>
import DateRangeSelect from '@/components/Ems/DateRangeSelect/index.vue'
import RealTimeBaseInfo from "./../RealTimeBaseInfo.vue";
import CnglqxChart from './CnglqxChart.vue'
import PocpjwdChart from './PocpjwdChart.vue'
@ -38,11 +41,13 @@ import intervalUpdate from "@/mixins/ems/intervalUpdate";
export default {
name:'DzjkSbjkSsyx',
components:{RealTimeBaseInfo,CnglqxChart,PocpjwdChart,DcpjwdChart,DcpjsocChart},
components:{RealTimeBaseInfo,CnglqxChart,PocpjwdChart,DcpjwdChart,DcpjsocChart,DateRangeSelect},
mixins:[getQuerySiteId,intervalUpdate],
data() {
return {
runningHeadData:{},//运行信息
timeRange:[],
isInit:true
}
},
methods:{
@ -52,17 +57,27 @@ export default {
this.runningHeadData = response?.data || {}
})
},
// 更新时间范围 重置图表
updateDate(data){
this.timeRange=data
!this.isInit && this.updateChart()
this.isInit = false
},
updateChart(){
this.$refs.cnglqx.init(this.siteId,this.timeRange||[])
this.$refs.pocpjwd.init(this.siteId,this.timeRange||[])
this.$refs.dcpjsoc.init(this.siteId,this.timeRange||[])
this.$refs.dcpjwd.init(this.siteId,this.timeRange||[])
this.updateInterval(this.updateData)
},
updateData(){
this.getRunningHeadData()
this.$refs.cnglqx.init(this.siteId)
this.$refs.pocpjwd.init(this.siteId)
this.$refs.dcpjsoc.init(this.siteId)
this.$refs.dcpjwd.init(this.siteId)
this.updateChart()
},
init(){
this.$refs.dateRangeSelect.init(true)
this.$nextTick(()=>{
this.updateData()
this.updateInterval(this.updateData)
})
}
}

View File

@ -0,0 +1,122 @@
<template>
<div v-loading="loading">
<el-card
v-for="(item,index) in list"
:key="index+'ylLise'"
class="sbjk-card-container running-card-container"
:class="{
'warning-card-container':item.emsCommunicationStatus && item.emsCommunicationStatus !== '0',
'running-card-container':item.emsCommunicationStatus === '0'
}"
shadow="always">
<div slot="header">
<span class="large-title">{{item.deviceName}}</span>
<div class="info">
<div>
{{
$store.state.ems.communicationStatusOptions[
item.emsCommunicationStatus
]
}}
</div>
<div>数据更新时间{{ item.dataUpdateTime || '-'}}</div>
</div>
<div class="alarm">
<el-button type="primary" size="small" style="margin-right:20px;" @click="pointDetail(item,'point')">详细</el-button>
<el-badge :value="item.alarmNum || 0" class="item">
<i
class="el-icon-message-solid alarm-icon"
@click="pointDetail(item,'alarmPoint')"
></i>
</el-badge>
</div>
</div>
<el-row class="device-info-row">
<el-col v-for="(tempDataItem,tempDataIndex) in tempData" :key="tempDataIndex+'hdTempData'" :span="12" class="device-info-col">
<span class="pointer" @click="showChart(tempDataItem.title,item.deviceId)">
<span class="left">{{tempDataItem.title}}</span> <span class="right">{{item[tempDataItem.attr] || ''}}<span v-html="tempDataItem.unit"></span></span>
</span>
</el-col>
</el-row>
</el-card>
<el-empty v-show="list.length<=0" :image-size="200"></el-empty>
<point-chart ref="pointChart" :site-id="siteId"/>
<point-table ref="pointTable"/>
</div>
</template>
<script>
import getQuerySiteId from "@/mixins/ems/getQuerySiteId";
import {getXfDataList} from '@/api/ems/dzjk'
import intervalUpdate from "@/mixins/ems/intervalUpdate";
import pointChart from "./../PointChart.vue";
import PointTable from "@/views/ems/site/sblb/PointTable.vue";
export default {
name:'DzjkSbjkXf',
mixins:[getQuerySiteId,intervalUpdate],
components:{pointChart,PointTable},
data() {
return {
loading:false,
list:[],
tempData:[
{title:'主电源备用电池状态',attr:'dczt',unit:''},
{title:'手自动状态延时状态',attr:'yszt',unit:''},
{title:'启动喷洒气体喷洒状态',attr:'pszt',unit:''},
{title:'压力开关状态电磁阀状态',attr:'dcfzt',unit:''},
]
}
},
methods:{
// 查看设备电位表格
pointDetail(row,dataType){
const {deviceId} = row
this.$refs.pointTable.showTable({siteId:this.siteId,deviceId,deviceCategory:'XF'},dataType)
},
showChart(pointName,deviceId){
pointName && this.$refs.pointChart.showChart({pointName,deviceCategory:'XF',deviceId})
},
updateData(){
this.loading = true
getXfDataList(this.siteId).then(response => {
this.list = JSON.parse(JSON.stringify(response?.data || []));
}).finally(() => {this.loading = false})
},
init(){
this.updateData()
this.updateInterval(this.updateData)
}
},
mounted(){
}
}
</script>
<style scoped lang="scss">
.sbjk-card-container{
&:not(:last-child){
margin-bottom: 25px;
}
.el-row{
background-color: #ffffff;
border:1px solid #eeeeee;
font-size: 14px;
line-height: 16px;
color: #333333;
.el-col{
padding:12px 0;
text-align: center;
position: relative;
}
.el-col{
border-bottom: 1px solid #eeeeee;
}
.el-col:not(:nth-child(3n)){
border-right: 1px solid #eeeeee;
}
}
}
</style>

View File

@ -7,18 +7,31 @@
class="sbjk-card-container running-card-container"
shadow="always">
<div slot="header">
<span class="large-title">{{index+1}}#{{item.deviceName}}</span>
<span class="large-title">{{item.deviceName}}</span>
<div class="info">
<div>数据更新时间{{ item.dataUpdateTime || '-'}}</div>
</div>
<div class="alarm">
<el-button type="primary" size="small" style="margin-right:20px;" @click="pointDetail(item,'point')">详细</el-button>
<el-badge :value="item.alarmNum || 0" class="item">
<i
class="el-icon-message-solid alarm-icon"
@click="pointDetail(item,'alarmPoint')"
></i>
</el-badge>
</div>
</div>
<el-row>
<el-col v-for="(tempDataItem,tempDataIndex) in tempData" :key="tempDataIndex+'ylTempData'" :span="8">
<el-row class="device-info-row">
<el-col v-for="(tempDataItem,tempDataIndex) in tempData" :key="tempDataIndex+'ylTempData'" :span="8" class="device-info-col">
<span class="pointer" @click="showChart(tempDataItem.title,item.deviceId)">
{{tempDataItem.title}}{{item[tempDataItem.attr]}}<span v-html="tempDataItem.unit"></span>
<span class="left">{{tempDataItem.title}}</span> <span class="right">{{item[tempDataItem.attr]}}<span v-html="tempDataItem.unit"></span></span>
</span>
</el-col>
</el-row>
</el-card>
<el-empty v-show="list.length<=0" :image-size="200"></el-empty>
<point-chart ref="pointChart" :site-id="siteId"/>
<point-table ref="pointTable"/>
</div>
</template>
@ -28,10 +41,11 @@ import getQuerySiteId from "@/mixins/ems/getQuerySiteId";
import {getCoolingDataList} from '@/api/ems/dzjk'
import intervalUpdate from "@/mixins/ems/intervalUpdate";
import pointChart from "./../PointChart.vue";
import PointTable from "@/views/ems/site/sblb/PointTable.vue";
export default {
name:'DzjkSbjkYl',
mixins:[getQuerySiteId,intervalUpdate],
components:{pointChart},
components:{pointChart,PointTable},
data() {
return {
loading:false,
@ -48,6 +62,11 @@ export default {
}
},
methods:{
// 查看设备电位表格
pointDetail(row,dataType){
const {deviceId} = row
this.$refs.pointTable.showTable({siteId:this.siteId,deviceId,deviceCategory:'COOLING'},dataType)
},
showChart(pointName,deviceId){
pointName && this.$refs.pointChart.showChart({pointName,deviceCategory:'COOLING',deviceId})
},
@ -73,23 +92,5 @@ export default {
&:not(:last-child){
margin-bottom: 25px;
}
.el-row{
background-color: #ffffff;
border:1px solid #eeeeee;
font-size: 14px;
line-height: 16px;
color: #333333;
.el-col{
padding:12px 0;
text-align: center;
position: relative;
}
.el-col{
border-bottom: 1px solid #eeeeee;
}
.el-col:not(:nth-child(3n)){
border-right: 1px solid #eeeeee;
}
}
}
</style>

View File

@ -0,0 +1,204 @@
<template>
<div style="width:100%" v-loading="loading">
<!-- 搜索栏-->
<el-form :inline="true" class="select-container">
<el-form-item label="时间选择">
<el-date-picker
v-model="dateRange"
type="daterange"
range-separator=""
start-placeholder="开始日期"
end-placeholder="结束日期"
value-format="yyyy-MM-dd"
:clearable="false"
:picker-options="pickerOptions"
:default-value="defaultDateRange"
></el-date-picker>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="onSearch" native-type="button">搜索</el-button>
</el-form-item>
<el-form-item>
<el-button @click="onReset" native-type="button">重置</el-button>
</el-form-item>
</el-form>
<!--表格-->
<el-table
class="common-table"
:data="tableData"
stripe
style="width: 100%;margin-top:25px;">
<!-- 汇总列-->
<el-table-column label="汇总">
<el-table-column
prop="dataTime"
label="日期"
width="120">
</el-table-column>
</el-table-column>
<!--充电量列-->
<el-table-column label="充电价格" align="center">
<el-table-column
align="center"
prop="activePeakKwh"
label="尖">
</el-table-column>
<el-table-column
align="center"
prop="activeHighKwh"
label="峰">
</el-table-column>
<el-table-column
align="center"
prop="activeFlatKwh"
label="平">
</el-table-column>
<el-table-column
align="center"
prop="activeValleyKwh"
label="谷">
</el-table-column>
<el-table-column
align="center"
prop="activeTotalKwh"
label="总">
</el-table-column>
</el-table-column>
<!--充电量列-->
<el-table-column label="放电价格" align="center">
<el-table-column
align="center"
prop="reActivePeakKwh"
label="尖">
</el-table-column>
<el-table-column
align="center"
prop="reActiveHighKwh"
label="峰">
</el-table-column>
<el-table-column
align="center"
prop="reActiveFlatKwh"
label="平">
</el-table-column>
<el-table-column
align="center"
prop="reActiveValleyKwh"
label="谷">
</el-table-column>
<el-table-column
align="center"
prop="reActiveTotalKwh"
label="总">
</el-table-column>
</el-table-column>
<!-- 效率-->
<!-- <el-table-column label="效率(%)" align="center">-->
<!-- <el-table-column-->
<!-- align="center"-->
<!-- prop="effect">-->
<!-- </el-table-column>-->
<!-- </el-table-column>-->
</el-table>
<el-pagination
v-show="tableData.length>0"
background
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="pageNum"
:page-size="pageSize"
:page-sizes="[10, 20, 30, 40]"
layout="total, sizes, prev, pager, next, jumper"
:total="totalSize"
style="margin-top:15px;text-align: center"
>
</el-pagination>
</div>
</template>
<script>
import getQuerySiteId from "@/mixins/ems/getQuerySiteId";
import { getAmmeterData} from '@/api/ems/dzjk'
import {formatDate} from "@/filters/ems";
export default {
name:'DzjkTjbbSybb',
mixins: [getQuerySiteId],
data() {
return {
loading:false,
pickerOptions:{
disabledDate(time) {
return time.getTime() > Date.now();
},
},
defaultDateRange:[],//默认展示的时间
dateRange:[],
tableData:[],
pageSize:10,//分页栏当前每个数据总数
pageNum:1,//分页栏当前页数
totalSize:0,//table表格数据总数
}
},
methods:{
// 搜索
onSearch(){
this.pageNum =1//每次搜索从1开始搜索
this.getData()
},
// 重置
onReset(){
this.dateRange=this.defaultDateRange
this.pageNum =1//每次搜索从1开始搜索
this.getData()
},
// 分页
handleSizeChange(val) {
this.pageSize = val;
this.$nextTick(()=>{
this.getData()
})
},
handleCurrentChange(val) {
this.pageNum = val
this.$nextTick(()=>{
this.getData()
})
},
// 获取数据
getData(){
this.loading=true
const {siteId,pageNum,pageSize} =this
const [startTime='',endTime='']=(this.dateRange || [])
getAmmeterData({siteId:siteId,startTime,endTime,pageSize,pageNum}).then(response=>{
this.tableData=response?.rows || [];
this.totalSize = response?.total || 0
}).finally(()=> {
this.loading = false
})
},
init(){
this.dateRange=[]
this.tableData=[]
this.totalSize=0
this.pageSize=10
this.pageNum = 1
const now = new Date().getTime();
const lastMonth = new Date(now-30 * 24 * 60 * 60 * 1000).getTime();
this.defaultDateRange = [formatDate(lastMonth), formatDate(now)];
this.dateRange=[formatDate(lastMonth), formatDate(now)];
this.getData()
},
},
}
</script>
<style scoped lang="scss">
::v-deep{
.common-table.el-table .el-table__header-wrapper th, .common-table.el-table .el-table__fixed-header-wrapper th{
border-bottom: 1px solid #dfe6ec;
}
}
</style>