2025-06-18 01:01:17 +08:00
< template >
2025-06-28 14:52:49 +08:00
< div v-loading = "loading" >
2025-08-06 17:34:35 +08:00
< el-row :gutter = "15" style = "background:#fff;" >
< el-col :xs = "24" :sm = "24" :lg = "6" >
2025-06-18 01:01:17 +08:00
< el-card shadow = "always" class = "common-card-container common-card-container-body-no-padding" >
< div slot = "header" >
2025-08-06 17:34:35 +08:00
< span class = "card-title" > 静态信息 < / span >
< / div >
< div style = "box-sizing: border-box; height: 250px;padding:20px 15px;" >
< el-descriptions class = "single-zd-info-container" :column = "1" >
< el-descriptions-item size = "mini" v-for = "(item,index) in singleZdInfo" :key="index+'singleZdInfo'" :label="item.title" > {{ info [ item.attr ] | formatNumber }} < / el -descriptions -item >
< / el-descriptions >
2025-06-18 01:01:17 +08:00
< / div >
2025-08-06 17:34:35 +08:00
< / el-card >
< / el-col >
< el-col :xs = "24" :sm = "24" :lg = "8" >
< el-card shadow = "always" class = "common-card-container common-card-container-body-no-padding" >
< div slot = "header" >
< span class = "card-title" > 总累计运行数据 < / span >
< / div >
< div style = "box-sizing: border-box; height: 250px;padding:20px 15px;" >
2025-06-18 01:01:17 +08:00
< el-row :gutter = "20" >
< el-col :span = "12" v-for = "(item,index) in sjglData" :key="index+'sjglData'" class="sjgl-data" >
< div class = "sjgl-title" > { { item . title } } < / div >
2025-06-30 18:56:33 +08:00
< div class = "sjgl-value" > { { item . value | formatNumber } } < / div >
2025-06-18 01:01:17 +08:00
< / el-col >
< / el-row >
< / div >
< / el-card >
< / el-col >
2025-08-06 17:34:35 +08:00
< el-col :xs = "24" :sm = "24" :lg = "10" >
2025-06-18 01:01:17 +08:00
< el-card shadow = "always" class = "common-card-container common-card-container-body-no-padding" >
< div slot = "header" >
2025-08-06 17:34:35 +08:00
< span class = "card-title" > 当前报警 < / span >
2025-06-20 13:53:36 +08:00
<!-- < el-button style = "float: right; padding: 3px 0" type = "text" size = "small" > 通讯状态 : < span style = "color:red" > 超时 < / span > < / el-button > -- >
2025-06-18 01:01:17 +08:00
< / div >
< div class = "ssgj-container" >
< el-table
2025-06-23 13:56:43 +08:00
class = "common-table"
2025-06-18 01:01:17 +08:00
: data = "tableData"
height = "100%"
stripe
style = "width: 100%" >
< el-table-column
2025-06-20 02:00:10 +08:00
prop = "deviceName"
2025-06-18 01:01:17 +08:00
label = "名称" >
< / el-table-column >
< el-table-column
label = "状态"
2025-06-20 02:00:10 +08:00
>
< template slot -scope = " scope " >
2025-06-30 17:32:04 +08:00
< span : class = "{'circle warning-status' : scope.row.status !== 0}" > { { $store . state . ems . warnOptions [ scope . row . status ] } } < / span >
2025-06-20 02:00:10 +08:00
< / template >
2025-06-18 01:01:17 +08:00
< / el-table-column >
< el-table-column
2025-06-22 21:01:34 +08:00
class - name = "alarm-content"
2025-06-20 02:00:10 +08:00
prop = "alarmContent"
2025-08-06 17:34:35 +08:00
show - overflow - tooltip
2025-06-18 01:01:17 +08:00
label = "告警内容" >
< / el-table-column >
2025-07-10 21:10:04 +08:00
< el-table-column
label = "工单"
2025-07-11 00:14:58 +08:00
fixed = "right"
2025-08-06 17:34:35 +08:00
show - overflow - tooltip
2025-07-10 21:10:04 +08:00
>
< template slot -scope = " scope " >
2025-07-11 00:14:58 +08:00
< el-button type = "text" size = "mini" v-if = "scope.row.ticketNo" @click="toTicket" > 已生成工单 ( 工单号 : {{ scope.row.ticketNo }} ) < / el -button >
2025-07-10 21:10:04 +08:00
< el-button type = "primary" size = "mini" v-else @click ="toTicket" > 生成工单 < / el -button >
< / template >
< / el-table-column >
2025-06-18 01:01:17 +08:00
< / el-table >
< / div >
< / el-card >
< / el-col >
< / el-row >
2025-08-06 17:34:35 +08:00
< el-row :gutter = "15" style = "background:#fff;" >
< el-col :xs = "24" :sm = "24" :lg = "12" >
< week-chart ref = "weekChart" / >
< / el-col >
< el-col :xs = "24" :sm = "24" :lg = "12" >
< active-chart ref = "activeChart" / >
< / el-col >
< / el-row >
2025-06-18 01:01:17 +08:00
< / div >
< / template >
< script >
2025-08-06 17:34:35 +08:00
import { getSingleSiteBaseInfo } from '@/api/ems/zddt'
2025-06-20 02:00:10 +08:00
import { getDzjkHomeView } from '@/api/ems/dzjk'
2025-08-06 17:34:35 +08:00
// import NllzChart from "./NllzChart.vue";
import WeekChart from "./WeekChart.vue" ;
import ActiveChart from "./ActiveChart.vue" ;
2025-06-28 14:52:49 +08:00
import getQuerySiteId from '@/mixins/ems/getQuerySiteId'
2025-06-18 01:01:17 +08:00
export default {
2025-06-24 23:50:29 +08:00
name : 'DzjkSbjkHome' ,
2025-06-28 14:52:49 +08:00
computed : {
loader ( ) {
return loader
2025-06-20 02:00:10 +08:00
}
} ,
2025-08-06 17:34:35 +08:00
components : { WeekChart , ActiveChart } ,
2025-06-28 14:52:49 +08:00
mixins : [ getQuerySiteId ] ,
2025-06-18 01:01:17 +08:00
data ( ) {
return {
2025-06-28 14:52:49 +08:00
loading : false ,
2025-08-06 17:34:35 +08:00
singleZdInfo : [ {
title : '电站位置' ,
attr : 'siteAddress'
} , {
title : '投运时间' ,
attr : 'runningTime'
} , {
title : '装机功率(MW)' ,
attr : 'installPower'
} , {
title : '装机容量(MW)' ,
attr : 'installCapacity' ,
} ] ,
2025-06-18 01:01:17 +08:00
sjglData : [ {
title : '今日充电量( MWh) ' ,
2025-06-20 02:00:10 +08:00
value : '' ,
attr : 'dayChargedCap'
2025-06-18 01:01:17 +08:00
} , {
title : '今日放电量( MWh) ' ,
2025-06-20 02:00:10 +08:00
value : '' ,
attr : 'dayDisChargedCap'
2025-06-18 01:01:17 +08:00
} , {
title : '总充电量( MWh) ' ,
2025-06-20 02:00:10 +08:00
value : '' ,
attr : 'totalChargedCap'
2025-06-18 01:01:17 +08:00
} , {
title : '总放电量( MWh) ' ,
2025-06-20 02:00:10 +08:00
value : '' ,
attr : 'totalDischargedCap'
2025-06-18 01:01:17 +08:00
} ] ,
// todo 表格里的不同状态可能需要显示不同颜色 确定表格内容
2025-08-06 17:34:35 +08:00
tableData : [ ] ,
info : { }
2025-06-20 02:00:10 +08:00
}
} ,
methods : {
2025-07-10 21:10:04 +08:00
toTicket ( ) {
this . $router . push ( { path : '/ticket' } )
} ,
2025-06-28 14:52:49 +08:00
init ( ) {
this . loading = true
2025-08-06 17:34:35 +08:00
getSingleSiteBaseInfo ( this . siteId ) . then ( response => {
console . log ( '单个站点详情数据' , response )
this . info = response ? . data || { }
} )
2025-06-28 14:52:49 +08:00
getDzjkHomeView ( this . siteId ) . then ( response => {
const data = response ? . data || { }
2025-06-20 02:00:10 +08:00
this . sjglData . forEach ( item => {
2025-06-30 18:56:33 +08:00
item . value = data [ item . attr ]
2025-06-20 02:00:10 +08:00
} )
this . tableData = data ? . siteMonitorHomeAlarmVo || [ ]
2025-08-06 17:34:35 +08:00
// this.$refs.nllzChart.setOption(data)
this . $refs . weekChart . setOption ( data )
this . $refs . activeChart . setOption ( data )
2025-06-28 14:52:49 +08:00
} ) . finally ( ( ) => { this . loading = false } )
2025-08-06 17:34:35 +08:00
2025-06-18 01:01:17 +08:00
}
2025-06-20 02:00:10 +08:00
} ,
2025-06-18 01:01:17 +08:00
}
< / script >
< style scoped lang = "scss" >
//数据概览
. sjgl - data {
text - align : center ;
2025-08-06 17:34:35 +08:00
& : nth - child ( 1 ) , & : nth - child ( 2 ) {
margin - bottom : 25 px ;
}
2025-06-18 01:01:17 +08:00
. sjgl - title {
color : # 666666 ;
line - height : 14 px ;
}
. sjgl - value {
color : rgba ( 51 , 51 , 51 , 1 ) ;
font - size : 26 px ;
line - height : 26 px ;
font - weight : 500 ;
margin - top : 14 px ;
2025-08-06 17:34:35 +08:00
word - wrap : break - word ;
2025-06-18 01:01:17 +08:00
}
}
//实时告警
. ssgj - container {
padding : 20 px ;
2025-08-06 17:34:35 +08:00
height : 250 px ;
2025-06-18 01:01:17 +08:00
box - sizing : border - box ;
: : v - deep {
. el - table . el - table _ _header - wrapper th , . el - table . el - table _ _fixed - header - wrapper th {
background : # FFF2CB ;
2025-06-22 21:01:34 +08:00
}
2025-06-18 01:01:17 +08:00
}
}
< / style >