首页看板、电表报表接口联调,部分接口参数更新

This commit is contained in:
白菜
2025-07-09 21:16:54 +08:00
parent b3b4d9c0dc
commit b8827248cb
10 changed files with 159 additions and 134 deletions

View File

@ -1,32 +1,29 @@
<template>
<div class="ems-dashboard-editor-container">
<div class="ems-dashboard-editor-container" v-loading="loading">
<zd-info></zd-info>
<div class="ems-content-container ems-content-container-padding">
<div class="content-title">数据概览</div>
<el-row :gutter="32" style="background:#fff;margin:30px 0;">
<el-col :xs="24" :sm="12" :lg="12">
<dlzb-chart/>
<dlzb-chart ref="dlzbchart"/>
</el-col>
<el-col :xs="24" :sm="12" :lg="12">
<xtxl-chart/>
<xtxl-chart ref="xtxlchart"/>
</el-col>
</el-row>
<el-row :gutter="32" style="background:#fff;margin:0;">
<el-col :xs="24" :sm="8" :lg="8">
<gjqs-chart/>
<gjqs-chart ref="gjqsChart"/>
</el-col>
<el-col :xs="24" :sm="8" :lg="8">
<sbgjzb-chart/>
<sbgjzb-chart ref="sbgjzbChart"/>
</el-col>
<el-col :xs="24" :sm="8" :lg="8">
<gjdjfb-chart/>
<gjdjfb-chart ref="gjdjfbChart"/>
</el-col>
</el-row>
</div>
</div>
</template>
@ -37,6 +34,7 @@ import XtxlChart from './XtxlChart.vue'
import GjqsChart from './GjqsChart.vue'
import SbgjzbChart from './SbgjzbChart.vue'
import GjdjfbChart from './GjdjfbChart.vue'
import { dataList } from '@/api/ems/home'
export default {
name: 'Index',
components: {
@ -49,10 +47,25 @@ export default {
},
data() {
return {
loading:false,
}
},
methods: {
},
mounted() {
this.loading = true
dataList().then(response => {
const data = JSON.parse(JSON.stringify(response?.data || {}))
this.$refs.dlzbchart.initChart(data?.elecDataList || [])
this.$refs.xtxlchart.initChart(data?.sysEfficList || [])
this.$refs.gjqsChart.initChart(data?.alarmDataList || [])
this.$refs.sbgjzbChart.initChart(data?.deviceAlarmList || [])
this.$refs.gjdjfbChart.initChart(data?.alarmLevelList || [])
}).finally(() => {
this.loading = false
})
}
}
</script>