map/ui/dasadmin/src/views/backend/dashboard.vue

1525 lines
57 KiB
Vue
Raw Normal View History

2024-06-13 11:30:23 +08:00
<template>
2024-11-11 16:24:03 +08:00
<div class="default-main" ref="HomeHight">
2024-10-24 09:04:51 +08:00
<el-row :gutter="20">
2024-11-13 10:46:37 +08:00
<el-col :md="24" :lg="6" :span="6">
2024-10-24 09:04:51 +08:00
<div class="grid-content ep-bg-purple">
<!--风场概览-->
<div class="overview panelBg">
<el-text class="mx-1 homelabel">风场概览</el-text>
<el-row :gutter="10">
2024-11-13 10:46:37 +08:00
<el-col :md="24" :lg="12" :span="12">
<div :sm="24" :lg="6" class="small-panel" style="margin-bottom: 10px">
2024-11-08 15:44:06 +08:00
<img class="small-panel-pic" src="~assets/dashboard/viewP.png" alt="" />
2024-10-24 09:04:51 +08:00
<div class="small-base">
2024-11-08 15:44:06 +08:00
<div>
<span class="content-number">{{ realData.attributeMap.windfarmactivepower }}</span> <span>MW</span>
</div>
2024-10-24 09:04:51 +08:00
<div>功率</div>
</div>
</div>
2024-11-13 10:46:37 +08:00
<div :sm="24" :lg="6" class="small-panel">
2024-11-08 15:44:06 +08:00
<img class="small-panel-pic" src="~assets/dashboard/viewW.png" alt="" />
2024-10-24 09:04:51 +08:00
<div class="small-base">
2024-11-08 15:44:06 +08:00
<div>
<span class="content-number">{{ realData.attributeMap.windfarmavgwindspeed }}</span> <span>m/s</span>
</div>
2024-10-24 09:04:51 +08:00
<div>风速</div>
</div>
</div>
</el-col>
2024-11-13 10:46:37 +08:00
<el-col :md="24" :lg="12" :span="12">
<div :sm="24" :lg="6" class="small-panel" style="margin-bottom: 10px">
2024-11-08 15:44:06 +08:00
<img class="small-panel-pic" src="~assets/dashboard/viewR.png" alt="" />
2024-10-24 09:04:51 +08:00
<div class="small-base">
2024-11-08 15:44:06 +08:00
<div>
<span class="content-number">{{ realData.attributeMap.windfarmdayoperationhours }}</span> <span>H</span>
</div>
2024-10-24 09:04:51 +08:00
<div>日利用小时</div>
</div>
</div>
2024-11-13 10:46:37 +08:00
<div :sm="24" :lg="6" class="small-panel">
2024-11-08 15:44:06 +08:00
<img class="small-panel-pic" src="~assets/dashboard/viewY.png" alt="" />
2024-10-24 09:04:51 +08:00
<div class="small-base">
2024-11-08 15:44:06 +08:00
<div>
<span class="content-number">{{ realData.attributeMap.windfarmmonthoperationhours }}</span> <span>H</span>
</div>
2024-10-24 09:04:51 +08:00
<div>月利用小时</div>
</div>
</div>
</el-col>
</el-row>
2024-06-13 11:30:23 +08:00
</div>
2024-10-24 09:04:51 +08:00
<!--今日运行状态-->
<div class="status panelBg">
2024-11-08 15:44:06 +08:00
<el-text class="mx-1 homelabel" style="margin-bottom: 0">今日运行状态</el-text>
<el-row :gutter="10" class="statusrow" style="margin-bottom: 0">
2024-10-24 09:04:51 +08:00
<el-col :span="12">
2024-11-11 16:24:03 +08:00
<div class="status-panel toal-panel">
2024-11-08 15:44:06 +08:00
<img class="status-panel-pic" src="~assets/dashboard/status1.png" alt="" />
2024-10-31 09:21:15 +08:00
<div class="status-base-main">
2024-11-08 15:44:06 +08:00
<div>
<span class="content-number">{{ currentDayStatus.windTurbineNum }}</span> <span></span>
</div>
2024-10-24 09:04:51 +08:00
<div>风机台数</div>
</div>
</div>
</el-col>
<el-col :span="12">
2024-11-11 16:24:03 +08:00
<div class="status-panel toal-panel">
2024-11-08 15:44:06 +08:00
<img class="status-panel-pic" src="~assets/dashboard/status2.png" alt="" />
2024-10-31 09:21:15 +08:00
<div class="status-base-main">
2024-11-08 15:44:06 +08:00
<div>
<span class="content-number">{{ currentDayStatus.installedCapacity }}</span> <span>MW</span>
</div>
2024-10-24 09:04:51 +08:00
<div>装机容量</div>
</div>
</div>
</el-col>
</el-row>
<el-row :gutter="10" class="statusrow">
<el-col :span="12">
<div class="status-panel status-con">
<div>
2024-11-08 15:44:06 +08:00
<img class="status-panel-piczt" src="~assets/dashboard/status04.png" alt="" />
2024-10-24 09:04:51 +08:00
<p>运行</p>
</div>
<div class="status-base">
2024-10-31 09:21:15 +08:00
<div class="capacity">
2024-11-08 15:44:06 +08:00
<p class="content-number">{{ currentDayStatus.runCapacityTotal }}</p>
2024-10-31 09:21:15 +08:00
<p>MW</p>
</div>
<div class="units">
2024-11-08 15:44:06 +08:00
<p class="content-number">{{ currentDayStatus.runNum }}</p>
2024-10-31 09:21:15 +08:00
<p></p>
</div>
2024-10-24 09:04:51 +08:00
</div>
</div>
</el-col>
<el-col :span="12">
<div class="status-panel status-con">
<div>
2024-11-08 15:44:06 +08:00
<img class="status-panel-piczt" src="~assets/dashboard/status03.png" alt="" />
2024-10-31 09:21:15 +08:00
<p>启动</p>
</div>
<div class="status-base">
<div class="capacity">
2024-11-08 15:44:06 +08:00
<p class="content-number">{{ currentDayStatus.StartCapacityTotal }}</p>
2024-10-31 09:21:15 +08:00
<p>MW</p>
</div>
<div class="units">
2024-11-08 15:44:06 +08:00
<p class="content-number">{{ currentDayStatus.StarteNum }}</p>
2024-10-31 09:21:15 +08:00
<p></p>
</div>
</div>
</div>
</el-col>
</el-row>
<el-row :gutter="10" class="statusrow">
<el-col :span="12">
<div class="status-panel status-con">
<div>
2024-11-08 15:44:06 +08:00
<img class="status-panel-piczt" src="~assets/dashboard/status01.png" alt="" />
2024-10-24 09:04:51 +08:00
<p>待机</p>
</div>
2024-10-31 09:21:15 +08:00
<div class="status-base">
<div class="capacity">
2024-11-08 15:44:06 +08:00
<p class="content-number">{{ currentDayStatus.faultCapacityTotal }}</p>
2024-10-31 09:21:15 +08:00
<p>MW</p>
</div>
<div class="units">
2024-11-08 15:44:06 +08:00
<p class="content-number">{{ currentDayStatus.faultNum }}</p>
2024-10-31 09:21:15 +08:00
<p></p>
</div>
</div>
</div>
</el-col>
<el-col :span="12">
<div class="status-panel status-con">
<div>
2024-11-08 15:44:06 +08:00
<img class="status-panel-piczt" src="~assets/dashboard/status06.png" alt="" />
2024-10-31 09:21:15 +08:00
<p>停机</p>
</div>
2024-10-24 09:04:51 +08:00
<div class="status-base">
2024-10-31 09:21:15 +08:00
<div class="capacity">
2024-11-08 15:44:06 +08:00
<p class="content-number">{{ currentDayStatus.standbyCapacityTotal }}</p>
2024-10-31 09:21:15 +08:00
<p>MW</p>
</div>
<div class="units">
2024-11-08 15:44:06 +08:00
<p class="content-number">{{ currentDayStatus.standbyNum }}</p>
2024-10-31 09:21:15 +08:00
<p></p>
</div>
2024-10-24 09:04:51 +08:00
</div>
</div>
</el-col>
</el-row>
<el-row :gutter="10">
<el-col :span="12">
<div class="status-panel status-con">
<div>
2024-11-08 15:44:06 +08:00
<img class="status-panel-piczt" src="~assets/dashboard/status02.png" alt="" />
2024-10-31 09:21:15 +08:00
<p>离线</p>
2024-10-24 09:04:51 +08:00
</div>
<div class="status-base">
2024-10-31 09:21:15 +08:00
<div class="capacity">
2024-11-08 15:44:06 +08:00
<p class="content-number">{{ currentDayStatus.offlineCapacityTotal }}</p>
2024-10-31 09:21:15 +08:00
<p>MW</p>
</div>
<div class="units">
2024-11-08 15:44:06 +08:00
<p class="content-number">{{ currentDayStatus.offlineNum }}</p>
2024-10-31 09:21:15 +08:00
<p></p>
</div>
2024-10-24 09:04:51 +08:00
</div>
</div>
</el-col>
<el-col :span="12">
<div class="status-panel status-con">
<div>
2024-11-08 15:44:06 +08:00
<img class="status-panel-piczt" src="~assets/dashboard/status05.png" alt="" />
2024-10-31 09:21:15 +08:00
<p>维修</p>
2024-10-24 09:04:51 +08:00
</div>
<div class="status-base">
2024-10-31 09:21:15 +08:00
<div class="capacity">
2024-11-08 15:44:06 +08:00
<p class="content-number">{{ currentDayStatus.StandCapacityTotal }}</p>
2024-10-31 09:21:15 +08:00
<p>MW</p>
</div>
<div class="units">
2024-11-08 15:44:06 +08:00
<p class="content-number">{{ currentDayStatus.StandNum }}</p>
2024-10-31 09:21:15 +08:00
<p></p>
</div>
2024-10-24 09:04:51 +08:00
</div>
</div>
</el-col>
</el-row>
2024-06-13 11:30:23 +08:00
</div>
2024-10-24 09:04:51 +08:00
<!--功率趋势-->
<div class="power panelBg" style="margin-bottom: 0; padding-bottom: 10px">
2024-11-11 16:24:03 +08:00
<div class="cardLabel">功率趋势</div>
<div class="chartBox">
<div class="power-chart" ref="powerChartRef"></div>
</div>
2024-06-13 11:30:23 +08:00
</div>
2024-10-24 09:04:51 +08:00
</div>
</el-col>
2024-11-13 10:46:37 +08:00
<el-col :md="24" :lg="12" :span="12" class="col-center">
2024-10-24 09:04:51 +08:00
<div class="grid-content ep-bg-purple-light">
<!--风机矩阵-->
<div class="matrix panelBg">
<el-text class="mx-1 homelabel">风机矩阵</el-text>
2024-11-11 16:38:43 +08:00
<el-scrollbar>
<WindContent :parentData="FanList" @StatusListData="StatusListData"></WindContent>
</el-scrollbar>
2024-06-13 11:30:23 +08:00
</div>
2024-10-24 09:04:51 +08:00
</div>
</el-col>
2024-11-13 10:46:37 +08:00
<el-col :md="24" :lg="6" :span="6">
2024-11-11 16:24:03 +08:00
<div class="grid-content ep-bg-purple cardContentRight">
2024-10-24 09:04:51 +08:00
<!--发电量概况-->
2024-11-11 16:24:03 +08:00
<div class="summarize">
<div class="cardLabel">发电量概况</div>
<div class="summarize-panel-list">
<div class="summarize-panel">
<div class="summarize-panel-pic">
<img src="~assets/dashboard/fdl1.png" alt="" />
2024-06-13 11:30:23 +08:00
</div>
2024-11-11 16:24:03 +08:00
<div class="summarize-panel-base">
<div>
<span class="content-number">{{ realData.attributeMap.windfarmdayprodenergy }}</span>
2024-06-13 11:30:23 +08:00
</div>
2024-11-11 16:24:03 +08:00
<div>kWh</div>
<div>日发电量</div>
2024-06-13 11:30:23 +08:00
</div>
2024-11-11 16:24:03 +08:00
</div>
<div class="summarize-panel">
<div class="summarize-panel-pic">
<img src="~assets/dashboard/fdl2.png" alt="" />
</div>
<div class="summarize-panel-base">
<div>
<span class="content-number">{{ realData.attributeMap.windfarmmonthprodenergy }}</span>
2024-06-13 11:30:23 +08:00
</div>
2024-11-11 16:24:03 +08:00
<div>kWh</div>
<div>月发电量</div>
2024-06-13 11:30:23 +08:00
</div>
2024-11-11 16:24:03 +08:00
</div>
<div class="summarize-panel">
<div class="summarize-panel-pic">
<img src="~assets/dashboard/fdl3.png" alt="" />
</div>
<div class="summarize-panel-base">
<div>
<span class="content-number">{{ realData.attributeMap.windfarmyearprodenergy }}</span>
2024-10-24 09:04:51 +08:00
</div>
2024-11-11 16:24:03 +08:00
<div>kWh</div>
<div>年发电量</div>
</div>
</div>
<div class="summarize-panel">
<div class="summarize-panel-pic">
<img src="~assets/dashboard/fdl4.png" alt="" />
</div>
<div class="summarize-panel-base">
<div>
<span class="content-number">{{ realData.attributeMap.windfarmtotalprodenergy }}</span>
2024-06-13 11:30:23 +08:00
</div>
2024-11-11 16:24:03 +08:00
<div>kWh</div>
<div>总发电量</div>
2024-06-13 11:30:23 +08:00
</div>
2024-11-11 16:24:03 +08:00
</div>
</div>
2024-10-24 09:04:51 +08:00
</div>
<!--发电量趋势-->
<div class="trend panelBg">
<el-text class="mx-1 homelabel">发电量趋势</el-text>
<el-row :gutter="10">
<el-col :span="24">
2024-10-31 16:49:12 +08:00
<el-tabs v-model="trendChartType" class="demo-tabs trend-tabs" @tab-click="tabhandleClick" ref="userTab">
<el-tab-pane label="日" name="day"> </el-tab-pane>
<el-tab-pane label="月" name="month"> </el-tab-pane>
2024-10-24 09:04:51 +08:00
</el-tabs>
2024-10-31 16:49:12 +08:00
<div class="trend-chart" ref="trendChartRef"></div>
2024-10-24 09:04:51 +08:00
</el-col>
</el-row>
</div>
<!--实时告警-->
<div class="realPart panelBg" style="margin-bottom: 0">
2024-10-24 09:04:51 +08:00
<el-text class="mx-1 homelabel">实时告警</el-text>
<el-row :gutter="10">
<el-col :span="24">
2024-11-08 15:44:06 +08:00
<el-table
:data="tableData"
class="tablePart"
height="250"
ref="myTable"
@mouseover.native="clearScroll"
@mouseleave.native="createScroll"
>
<el-table-column fixed prop="eventTimeFormate" label="时间" width="80" />
<el-table-column prop="deviceCode" label="风机" width="70" />
<el-table-column prop="eventText" label="告警内容" />
2024-11-07 11:50:13 +08:00
<el-table-column label="操作" width="70">
2024-10-24 09:04:51 +08:00
<template #default="scope">
2024-11-08 15:44:06 +08:00
<div class="tableOperate comfirmed" style="color: #333333" v-if="scope.row.confirmed">已确认</div>
<div class="tableOperate" v-else>
2024-11-08 15:44:06 +08:00
<a style="color: #0277b3; cursor: pointer" @click="open(scope.row)">确认</a>
</div>
2024-10-24 09:04:51 +08:00
</template>
</el-table-column>
</el-table>
</el-col>
</el-row>
</div>
</div>
</el-col>
</el-row>
2024-06-13 11:30:23 +08:00
</div>
</template>
<script setup lang="ts">
2024-11-08 15:44:06 +08:00
import { nextTick, onActivated, onMounted, reactive, ref, onBeforeMount, onUnmounted, VNodeRef } from 'vue'
2024-06-13 11:30:23 +08:00
import * as echarts from 'echarts'
2024-11-08 15:44:06 +08:00
import { useTemplateRefsList, useEventListener } from '@vueuse/core'
import { useI18n } from 'vue-i18n'
2024-10-24 09:04:51 +08:00
import WindContent from '/@/views/backend/home/windMatrix.vue'
import { equipList } from '/@/api/backend/realData/request'
2024-11-08 15:44:06 +08:00
import { getWindFarmRealData, getWindTurbineMatrixData, getHistoryData } from '/@/api/backend/dashboard.ts'
import { dayjs, ElMessage, ElMessageBox, TableInstance } from 'element-plus'
2024-10-31 13:48:17 +08:00
import { getRealTimeState } from '/@/views/backend/equipment/airBlower/utils.ts'
2024-11-08 15:44:06 +08:00
import { useRoute } from 'vue-router'
2024-11-06 16:31:28 +08:00
import { getAlarmListReq, eventComfirm } from '/@/api/backend/alarms/request'
2024-10-31 16:49:12 +08:00
const route = useRoute()
2024-10-24 09:04:51 +08:00
2024-06-13 11:30:23 +08:00
const d = new Date()
const { t } = useI18n()
2024-11-08 15:44:06 +08:00
let timer: any = null
2024-10-31 16:49:12 +08:00
let myTable = ref<TableInstance>()
2024-10-24 09:04:51 +08:00
2024-11-08 15:44:06 +08:00
const realData = ref({
2024-10-31 09:21:15 +08:00
windFarmId: '',
2024-11-08 15:44:06 +08:00
attributeMap: {},
2024-10-24 09:04:51 +08:00
})
2024-10-31 16:49:12 +08:00
2024-11-08 15:44:06 +08:00
const formatAttributeValue = (value: any) => {
if (value === undefined) {
return '-'
}
if (typeof value !== 'number') {
throw new Error('Invalid data type for attribute value')
}
return value % 1 === 0 ? value : value.toFixed(2)
2024-10-31 16:49:12 +08:00
}
2024-10-31 09:21:15 +08:00
const overviewList = () => {
getWindFarmRealData().then((res) => {
if (res.code == 200) {
2024-11-08 15:44:06 +08:00
res.data.attributeMap.windfarmdayprodenergy = formatAttributeValue(res.data.attributeMap.windfarmdayprodenergy)
res.data.attributeMap.windfarmmonthprodenergy = formatAttributeValue(res.data.attributeMap.windfarmmonthprodenergy)
res.data.attributeMap.windfarmactivepower = formatAttributeValue(res.data.attributeMap.windfarmactivepower)
res.data.attributeMap.windfarmavgwindspeed = formatAttributeValue(res.data.attributeMap.windfarmavgwindspeed)
res.data.attributeMap.windfarmdayoperationhours = formatAttributeValue(res.data.attributeMap.windfarmdayoperationhours)
res.data.attributeMap.windfarmmonthoperationhours = formatAttributeValue(res.data.attributeMap.windfarmmonthoperationhours)
res.data.attributeMap.windfarmyearprodenergy = formatAttributeValue(res.data.attributeMap.windfarmyearprodenergy)
res.data.attributeMap.windfarmtotalprodenergy = formatAttributeValue(res.data.attributeMap.windfarmtotalprodenergy)
const data: any = {
2024-10-31 13:48:17 +08:00
windFarmId: res.data.windFarmId,
attributeMap: {
windfarmdayprodenergy: res.data.attributeMap.windfarmdayprodenergy,
windfarmmonthprodenergy: res.data.attributeMap.windfarmmonthprodenergy,
windfarmactivepower: res.data.attributeMap.windfarmactivepower,
windfarmavgwindspeed: res.data.attributeMap.windfarmavgwindspeed,
windfarmdayoperationhours: res.data.attributeMap.windfarmdayoperationhours,
windfarmmonthoperationhours: res.data.attributeMap.windfarmmonthoperationhours,
windfarmyearprodenergy: res.data.attributeMap.windfarmyearprodenergy,
windfarmtotalprodenergy: res.data.attributeMap.windfarmtotalprodenergy,
2024-11-08 15:44:06 +08:00
},
2024-10-31 13:48:17 +08:00
}
2024-11-08 15:44:06 +08:00
realData.value = data
} else {
2024-10-31 09:21:15 +08:00
ElMessage.error({
message: res.msg,
type: 'error',
})
}
})
}
2024-11-08 15:44:06 +08:00
const currentDayStatus = ref({
2024-10-31 09:21:15 +08:00
windTurbineNum: 0,
installedCapacity: 0,
runCapacityTotal: 0,
runNum: 0,
standbyCapacityTotal: 0,
standbyNum: 0,
faultCapacityTotal: 0,
faultNum: 0,
offlineCapacityTotal: 0,
offlineNum: 0,
StandCapacityTotal: 0,
StandNum: 0,
StartCapacityTotal: 0,
2024-11-08 15:44:06 +08:00
StarteNum: 0,
2024-10-24 09:04:51 +08:00
})
2024-11-08 15:44:06 +08:00
const deviceCode = ref([])
2024-10-31 13:48:17 +08:00
const FanList = ref([])
2024-10-31 09:21:15 +08:00
const StatusListData = () => {
getWindTurbineMatrixData().then((res) => {
if (res.code == 200) {
2024-11-08 15:44:06 +08:00
currentDayStatus.value.windTurbineNum = res.data.length
const data = res.data.map((item, index) => {
2024-10-31 13:48:17 +08:00
const state = getRealTimeState(item.attributeMap)
2024-11-08 15:44:06 +08:00
item.attributeMap.iwindspeed =
item.attributeMap.iwindspeed !== undefined
? item.attributeMap.iwindspeed % 1 === 0
? item.attributeMap.iwindspeed
: item.attributeMap.iwindspeed.toFixed(2)
: '--'
item.attributeMap.igenpower =
item.attributeMap.igenpower !== undefined
? item.attributeMap.igenpower % 1 === 0
? item.attributeMap.igenpower
: item.attributeMap.igenpower.toFixed(2)
: '--'
item.attributeMap.ikwhthisday =
item.attributeMap.ikwhthisday !== undefined
? item.attributeMap.ikwhthisday % 1 === 0
? item.attributeMap.ikwhthisday
: item.attributeMap.ikwhthisday.toFixed(2)
: '--'
2024-10-31 09:21:15 +08:00
// 初始化计数器和累加器
if (index === 0) {
2024-11-08 15:44:06 +08:00
currentDayStatus.value.runNum = 0
currentDayStatus.value.standbyNum = 0
currentDayStatus.value.StandNum = 0
currentDayStatus.value.StarteNum = 0
currentDayStatus.value.offlineNum = 0
currentDayStatus.value.faultNum = 0
currentDayStatus.value.runCapacityTotal = 0
currentDayStatus.value.standbyCapacityTotal = 0
currentDayStatus.value.StandCapacityTotal = 0
currentDayStatus.value.StartCapacityTotal = 0
currentDayStatus.value.offlineCapacityTotal = 0
currentDayStatus.value.faultCapacityTotal = 0
currentDayStatus.value.installedCapacity = 0
2024-10-31 09:21:15 +08:00
}
// 更新容量
if (item.nominalCapacity !== undefined) {
2024-11-08 15:44:06 +08:00
currentDayStatus.value.installedCapacity += item.nominalCapacity
2024-10-31 09:21:15 +08:00
}
// 根据运行模式更新状态和数量
2024-10-31 13:48:17 +08:00
//const mode = item.attributeMap.iturbineoperationmode
if ([7, 8, 17, 18, 19, 20, 21].includes(state)) {
2024-11-08 15:44:06 +08:00
currentDayStatus.value.runCapacityTotal += item.nominalCapacity
currentDayStatus.value.runNum += 1
2024-10-31 13:48:17 +08:00
} else if ([1, 2, 3, 4, 5, 6].includes(state)) {
2024-11-08 15:44:06 +08:00
currentDayStatus.value.standbyCapacityTotal += item.nominalCapacity
currentDayStatus.value.standbyNum += 1
2024-10-31 13:48:17 +08:00
} else if ([9, 10, 12, 13, 14, 15].includes(state)) {
2024-11-08 15:44:06 +08:00
currentDayStatus.value.StandCapacityTotal += item.nominalCapacity
currentDayStatus.value.StandNum += 1
2024-10-31 13:48:17 +08:00
} else if (state === 16) {
2024-11-08 15:44:06 +08:00
currentDayStatus.value.StartCapacityTotal += item.nominalCapacity
currentDayStatus.value.StarteNum += 1
2024-10-31 13:48:17 +08:00
} else if (state === 0) {
2024-11-08 15:44:06 +08:00
currentDayStatus.value.offlineCapacityTotal += item.nominalCapacity
currentDayStatus.value.offlineNum += 1
2024-10-31 13:48:17 +08:00
} else if (state === 11) {
2024-11-08 15:44:06 +08:00
currentDayStatus.value.faultCapacityTotal += item.nominalCapacity
currentDayStatus.value.faultNum += 1
2024-10-31 09:21:15 +08:00
}
2024-10-31 13:48:17 +08:00
const propertiesToFormat = [
'runCapacityTotal',
'standbyCapacityTotal',
'StandCapacityTotal',
'StartCapacityTotal',
'offlineCapacityTotal',
'faultCapacityTotal',
2024-11-08 15:44:06 +08:00
'installedCapacity',
]
2024-10-31 13:48:17 +08:00
2024-11-08 15:44:06 +08:00
propertiesToFormat.forEach((property) => {
2024-10-31 13:48:17 +08:00
if (currentDayStatus.value[property] !== null && currentDayStatus.value[property] !== undefined) {
currentDayStatus.value[property] = Number(currentDayStatus.value[property].toFixed(1))
2024-10-31 13:48:17 +08:00
}
2024-11-08 15:44:06 +08:00
})
2024-10-31 13:48:17 +08:00
return {
2024-11-08 15:44:06 +08:00
irn: item.irn,
name: item.name ?? '-',
model: item.model || '-',
modelId: item.modelId,
belongLine: item.belongLine || '-',
standard: item.standard,
attributeMap: {
iwindspeed: item.attributeMap.iwindspeed,
igenpower: item.attributeMap.igenpower,
ikwhthisday: item.attributeMap.ikwhthisday,
iturbineoperationmode: state,
locked: item.attributeMap.locked,
},
2024-10-31 13:48:17 +08:00
}
2024-11-08 15:44:06 +08:00
})
FanList.value = data
} else {
2024-10-31 09:21:15 +08:00
ElMessage.error({
message: res.msg,
type: 'error',
})
}
})
}
2024-06-13 11:30:23 +08:00
const state: {
2024-10-31 16:49:12 +08:00
charts: { powerChart: any; trendChart: any }
2024-06-13 11:30:23 +08:00
remark: string
workingTimeFormat: string
pauseWork: boolean
} = reactive({
2024-11-08 15:44:06 +08:00
charts: { powerChart: null, trendChart: null },
2024-06-13 11:30:23 +08:00
remark: 'dashboard.Loading',
workingTimeFormat: '',
pauseWork: false,
})
2024-10-31 16:49:12 +08:00
const powerChartRef = ref()
const powerChartData: { time: any; values: any } = {
2024-10-31 16:49:12 +08:00
time: {},
values: {},
}
2024-10-24 09:04:51 +08:00
const initpowerChart = () => {
2024-10-31 16:49:12 +08:00
const powerChart = state.charts.powerChart ?? echarts.init(powerChartRef.value as unknown as HTMLElement)
const option = {
grid: {
top: 50,
2024-11-07 11:06:29 +08:00
right: 25,
2024-10-31 16:49:12 +08:00
bottom: 10,
2024-11-05 09:49:54 +08:00
left: 25,
2024-10-31 16:49:12 +08:00
containLabel: true,
},
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'shadow',
2024-06-13 11:30:23 +08:00
},
2024-10-31 16:49:12 +08:00
},
xAxis: {
type: 'category',
axisLine: {
show: true,
lineStyle: {
color: '#dadada',
width: 1,
type: 'solid',
},
},
axisLabel: {
//x轴文字的配置
show: true,
textStyle: {
color: '#4E5969',
},
interval: 'auto',
//rotate: 45
},
splitLine: {
//分割线配置
show: false,
lineStyle: {
color: '#999999',
},
2024-06-13 11:30:23 +08:00
},
2024-11-08 15:44:06 +08:00
data: powerChartData.time.WindFarmAvgWindSpee ?? powerChartData.time.WindFarmActivePower,
2024-10-31 16:49:12 +08:00
},
yAxis: [
{
type: 'value',
name: '功率MW',
nameTextStyle: {
color: '#4E5969',
},
axisLine: {
show: false,
2024-10-24 09:04:51 +08:00
lineStyle: {
color: '#dadada',
2024-10-31 16:49:12 +08:00
width: 0,
type: 'solid',
},
2024-10-24 09:04:51 +08:00
},
2024-10-31 16:49:12 +08:00
axisLabel: {
//x轴文字的配置
2024-10-24 09:04:51 +08:00
show: true,
textStyle: {
color: '#4E5969',
},
},
2024-10-31 16:49:12 +08:00
axisTick: { show: false },
splitLine: {
interval: 50,
2024-10-24 09:04:51 +08:00
lineStyle: {
2024-10-31 16:49:12 +08:00
type: 'dashed',
color: '#dadada',
},
2024-06-13 11:30:23 +08:00
},
},
2024-10-31 16:49:12 +08:00
{
type: 'value',
name: '风速m/s',
nameTextStyle: {
color: '#4E5969',
2024-11-07 11:06:29 +08:00
padding: [0, 50, 0, 0],
2024-10-31 16:49:12 +08:00
},
axisLine: {
show: false,
lineStyle: {
color: '#dadada',
width: 0,
type: 'solid',
2024-10-24 09:04:51 +08:00
},
},
2024-10-31 16:49:12 +08:00
axisLabel: {
//x轴文字的配置
show: true,
textStyle: {
2024-10-24 09:04:51 +08:00
color: '#4E5969',
},
2024-10-31 16:49:12 +08:00
},
axisTick: { show: false },
splitLine: {
interval: 50,
lineStyle: {
type: 'dashed',
color: '#dadada',
2024-10-24 09:04:51 +08:00
},
},
},
2024-10-31 16:49:12 +08:00
],
legend: {
data: ['全场总有功功率', '全场平均风速'],
2024-10-31 16:49:12 +08:00
textStyle: {
color: '#73767a',
},
},
series: [
{
name: '全场总有功功率',
2024-10-31 16:49:12 +08:00
type: 'bar',
//barWidth: 10,
2024-10-31 16:49:12 +08:00
itemStyle: {
color: '#00A7EB',
2024-11-08 15:44:06 +08:00
barBorderRadius: 2,
2024-10-31 16:49:12 +08:00
},
data: powerChartData.values?.WindFarmActivePower ?? [],
2024-10-31 16:49:12 +08:00
},
{
name: '全场平均风速',
2024-10-31 16:49:12 +08:00
type: 'line',
yAxisIndex: 1,
itemStyle: {
color: '#FF7E00',
barBorderRadius: 2,
},
smooth: 0.6,
symbol: 'none',
areaStyle: {
2024-11-08 15:44:06 +08:00
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
{
offset: 0,
color: 'rgba(255,126,0,0.8)',
},
]),
},
data: powerChartData.values?.WindFarmAvgWindSpeed ?? [],
2024-10-31 16:49:12 +08:00
},
],
}
powerChart.setOption(option)
state.charts.powerChart = powerChart
2024-06-13 11:30:23 +08:00
}
2024-10-31 16:49:12 +08:00
const trendChartRef = ref<VNodeRef>()
const TrendDataForDay: {
currentPeriod: {
time: string[]
value: number[]
}
samePeriod: {
time: string[]
value: number[]
}
} = {
currentPeriod: {
time: [],
value: [],
},
samePeriod: {
time: [],
value: [],
},
}
2024-11-08 15:44:06 +08:00
const TrendDataForMonth: {
currentPeriod: {
time: string[]
value: number[]
}
samePeriod: {
time: string[]
value: number[]
}
} = {
currentPeriod: {
time: [],
value: [],
},
samePeriod: {
time: [],
value: [],
},
}
2024-10-31 16:49:12 +08:00
const inittrendChart = (type: 'day' | 'month') => {
const currentPeriod: number[] = type === 'day' ? TrendDataForDay.currentPeriod.value : TrendDataForMonth.currentPeriod.value
const samePeriod: number[] = type === 'day' ? TrendDataForDay.samePeriod.value : TrendDataForMonth.samePeriod.value
const xAxisdata: string[] = type === 'day' ? TrendDataForDay.currentPeriod.time : TrendDataForMonth.currentPeriod.time
2024-10-31 16:49:12 +08:00
const trendChart = state.charts?.trendChart ?? echarts.init(trendChartRef.value as unknown as HTMLElement)
const option = {
grid: {
top: 30,
right: 10,
2024-11-11 16:24:03 +08:00
bottom: 30,
2024-10-31 16:49:12 +08:00
left: 25,
borderColor: '#dadada',
},
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'shadow',
2024-06-13 11:30:23 +08:00
},
2024-10-31 16:49:12 +08:00
},
xAxis: {
type: 'category',
axisLine: {
show: true,
lineStyle: {
color: '#dadada',
width: 1,
type: 'solid',
},
},
axisLabel: {
//x轴文字的配置
show: true,
textStyle: {
color: '#4E5969',
},
2024-06-13 11:30:23 +08:00
},
2024-10-31 16:49:12 +08:00
splitLine: {
//分割线配置
show: false,
lineStyle: {
color: '#999999',
},
},
data: xAxisdata,
},
yAxis: [
{
type: 'value',
name: 'kWh',
nameTextStyle: {
color: '#4E5969',
},
axisLine: {
show: false,
2024-10-24 09:04:51 +08:00
lineStyle: {
color: '#dadada',
2024-10-31 16:49:12 +08:00
width: 0,
type: 'solid',
},
2024-06-13 11:30:23 +08:00
},
2024-10-31 16:49:12 +08:00
axisLabel: {
//x轴文字的配置
2024-10-24 09:04:51 +08:00
show: true,
textStyle: {
color: '#4E5969',
2024-10-31 16:49:12 +08:00
},
2024-10-24 09:04:51 +08:00
},
2024-10-31 16:49:12 +08:00
axisTick: { show: false },
splitLine: {
interval: 50,
2024-10-24 09:04:51 +08:00
lineStyle: {
2024-10-31 16:49:12 +08:00
type: 'dashed',
color: '#dadada',
2024-06-13 11:30:23 +08:00
},
2024-10-24 09:04:51 +08:00
},
2024-10-31 16:49:12 +08:00
},
],
legend: {
data: ['本期', '同期'],
textStyle: {
color: '#73767a',
},
},
series: [
{
name: '本期',
data: currentPeriod,
type: 'bar',
smooth: true,
itemStyle: {
color: '#0277B3',
2024-10-24 09:04:51 +08:00
},
2024-06-13 11:30:23 +08:00
},
2024-10-31 16:49:12 +08:00
{
name: '同期',
data: samePeriod,
type: 'bar',
smooth: true,
itemStyle: {
color: '#00A096',
2024-06-13 11:30:23 +08:00
},
2024-10-31 16:49:12 +08:00
},
],
}
trendChart.setOption(option)
state.charts.trendChart = trendChart
2024-06-13 11:30:23 +08:00
}
const echartsResize = () => {
nextTick(() => {
2024-10-31 16:49:12 +08:00
const chartKeys = Object.keys(state.charts) as Array<keyof typeof state.charts>
chartKeys.forEach((key) => {
2024-06-13 11:30:23 +08:00
state.charts[key].resize()
2024-10-31 16:49:12 +08:00
})
2024-06-13 11:30:23 +08:00
})
}
2024-10-24 09:04:51 +08:00
onActivated(() => {
echartsResize()
})
const timestampToTime = (timestamp: any) => {
timestamp = timestamp ? timestamp : null
let date = new Date(timestamp)
let Y = date.getFullYear() + '-'
let M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-'
let D = (date.getDate() < 10 ? '0' + date.getDate() : date.getDate()) + ' '
let h = (date.getHours() < 10 ? '0' + date.getHours() : date.getHours()) + ':'
let m = date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()
return Y + M + D + h + m
}
2024-11-08 15:44:06 +08:00
const tableData = ref()
2024-06-13 11:30:23 +08:00
const getTableData = (deviceCode) => {
2024-11-08 15:44:06 +08:00
const today = new Date()
const threeDaysAgo = new Date(today)
threeDaysAgo.setDate(today.getDate() - 3)
const startTime = threeDaysAgo.getTime()
const data: any = {
startTime: startTime,
endTime: Date.now(),
2024-11-08 15:44:06 +08:00
deviceCode: deviceCode,
limit: 100,
2024-10-24 09:04:51 +08:00
}
console.log(JSON.stringify(data))
2024-11-06 16:31:28 +08:00
getAlarmListReq(data).then((res) => {
if (res.code == 200) {
//tableData.value = res.rows
tableData.value = res.rows.map((item: any) => {
return {
...item,
eventTimeFormate: timestampToTime(item.eventTime),
}
})
} else {
ElMessage.error(res.msg ?? '查询失败')
}
})
}
const open = (val: any) => {
ElMessageBox.confirm('是否确认?', '提示', {
confirmButtonText: '确认',
cancelButtonText: '取消',
type: 'warning',
})
.then(() => {
okSubmit(val)
})
.catch(() => {
ElMessage({
type: 'info',
message: '取消确认',
})
})
}
const okSubmit = (val: any) => {
const reqData: any = [
{
eventTime: val.eventTime,
eventId: val.eventId,
confirmed: 1,
deviceId: val.deviceId,
},
]
2024-11-06 16:31:28 +08:00
eventComfirm(reqData)
.then((res: any) => {
if (res.code == 200) {
ElMessage.success(res.msg ?? '确认成功')
getTableData(deviceCode.value)
} else {
ElMessage.error(res.msg ?? '查询失败')
}
})
.catch((err) => {
ElMessage.error(err?.response?.data?.msg ?? '查询失败')
})
}
2024-06-13 11:30:23 +08:00
2024-10-24 09:04:51 +08:00
const clearScroll = () => {
clearInterval(timer)
timer = null
2024-06-13 11:30:23 +08:00
}
2024-10-24 09:04:51 +08:00
const createScroll = () => {
clearScroll()
const table = myTable.value.layout.table.refs
const tableWrapper = table.bodyWrapper.firstElementChild.firstElementChild
2024-06-13 11:30:23 +08:00
2024-10-24 09:04:51 +08:00
timer = setInterval(() => {
tableWrapper.scrollTop += 1
if (tableWrapper.clientHeight + tableWrapper.scrollTop == tableWrapper.scrollHeight) {
tableWrapper.scrollTop = 0
2024-06-13 11:30:23 +08:00
}
2024-10-24 09:04:51 +08:00
}, 30)
2024-06-13 11:30:23 +08:00
}
const getChartData = <T extends string = any>(params: {
startTime: number
endTime: number
attr: T[]
interval: string
}): Promise<{ times: { [K in T]: string[] }; val: { [K in T]: number[] } }> => {
return new Promise((resolve) => {
2024-10-31 16:49:12 +08:00
const data = {
startTime: params.startTime,
endTime: params.endTime,
2024-10-31 16:49:12 +08:00
devices: [
{
deviceId: '',
attributes: params.attr,
2024-10-31 16:49:12 +08:00
},
],
interval: params.interval,
2024-10-31 16:49:12 +08:00
}
2024-11-08 15:44:06 +08:00
/* console.log(JSON.stringify(data))*/
getHistoryData(data).then((res) => {
2024-10-31 16:49:12 +08:00
if (res.success) {
2024-11-08 15:44:06 +08:00
if (typeof res.data === 'object' && res.data !== null && Object.keys(res.data).length === 0) {
const times: any = {}
const val: any = {}
resolve({ times, val })
} else {
const data = res.data['1848624295633317890']
const rangeKeys = Object.keys(data)
const times: any = {}
const val: any = {}
rangeKeys.forEach((key) => {
times[key] = []
val[key] = []
data[key].times.forEach((item: number) => {
2024-11-08 15:44:06 +08:00
if (params.interval == '5m') {
times[key].push(dayjs(item).format('HH:mm'))
2024-11-08 15:44:06 +08:00
} else if (params.interval == '1d') {
times[key].push(dayjs(item).format('DD'))
2024-11-08 15:44:06 +08:00
} else if (params.interval == '1n') {
times[key].push(dayjs(item).format('MM'))
}
})
data[key].values.forEach((item: number) => {
val[key].push(item)
})
2024-10-31 16:49:12 +08:00
})
resolve({ times, val })
}
2024-10-31 16:49:12 +08:00
}
})
})
}
const getThisDayChartData = () => {
return new Promise((resolve) => {
getChartData<'WindFarmActivePower' | 'WindFarmAvgWindSpeed '>({
startTime: new Date(new Date().toLocaleDateString()).getTime(),
endTime: Date.now(),
attr: ['WindFarmActivePower', 'WindFarmAvgWindSpeed '],
interval: '5m',
}).then(({ times, val }) => {
2024-11-08 15:44:06 +08:00
powerChartData.time = { WindFarmActivePower: times.WindFarmActivePower, WindFarmAvgWindSpeed: times.WindFarmAvgWindSpeed }
powerChartData.values = { WindFarmActivePower: val.WindFarmActivePower, WindFarmAvgWindSpeed: val.WindFarmAvgWindSpeed }
resolve(true)
})
})
}
const getLastYearTodayTimestamp = () => {
const now = new Date()
const lastYear = now.getFullYear() - 1
const lastYearToday = new Date(lastYear, now.getMonth(), now.getDate())
return lastYearToday.getTime()
}
const getLastYearChartData = () => {
return new Promise((resolve) => {
const start = getLastYearTodayTimestamp()
const end = new Date()
end.setFullYear(end.getFullYear() - 1)
2024-11-08 15:44:06 +08:00
end.setMonth(end.getMonth() + 1, 0) // 设置为下个月的第一天,然后减去一天
getChartData<'WindFarmDayProdEnergy'>({
startTime: start,
endTime: end.getTime(),
attr: ['WindFarmDayProdEnergy'],
interval: '1d',
}).then(({ times, val }) => {
TrendDataForDay.samePeriod.time = times.WindFarmDayProdEnergy
TrendDataForDay.samePeriod.value = val.WindFarmDayProdEnergy
resolve(true)
})
})
}
const getThisDayChartForHourData = () => {
return new Promise((resolve) => {
getChartData<'WindFarmDayProdEnergy'>({
startTime: new Date(new Date().toLocaleDateString()).getTime(),
endTime: Date.now(),
attr: ['WindFarmDayProdEnergy'],
interval: '1d',
}).then(({ times, val }) => {
TrendDataForDay.currentPeriod.time = times.WindFarmDayProdEnergy
TrendDataForDay.currentPeriod.value = val.WindFarmDayProdEnergy
resolve(true)
})
})
}
//发电连月
const getLastMonthTodayTimestamp = () => {
2024-11-08 15:44:06 +08:00
const now = new Date() // 当前日期
const thisYear = now.getFullYear() // 获取当前年份
const lastYear = thisYear - 1 // 计算去年年份
const firstDayOfLastYear = new Date(lastYear, 0, 1) // 设置为去年的一月一日
return firstDayOfLastYear.getTime()
}
const getThisMonthTodayTimestamp = () => {
2024-11-08 15:44:06 +08:00
const now = new Date() // 当前日期
const thisYear = now.getFullYear() // 获取当前年份
const firstDayOfYear = new Date(thisYear, 0, 1) // 设置为今年的一月一日
return firstDayOfYear.getTime()
}
const getLastYear = () => {
2024-11-08 15:44:06 +08:00
const now = new Date() // 当前日期
const thisYear = now.getFullYear() // 获取当前年份
const lastYear = thisYear - 1 // 计算去年年份
const lastDayOfLastYear = new Date(lastYear, 11, 0) // 设置为去年12月的最后一天
return lastDayOfLastYear.getTime()
}
const getLastMonthChartData = () => {
return new Promise((resolve) => {
const start = getLastMonthTodayTimestamp()
const end = getLastYear()
getChartData<'WIndFarmMonthProdEnergy'>({
startTime: start,
endTime: end,
attr: ['WIndFarmMonthProdEnergy'],
interval: '1n',
}).then(({ times, val }) => {
TrendDataForMonth.samePeriod.time = times.WIndFarmMonthProdEnergy
TrendDataForMonth.samePeriod.value = val.WIndFarmMonthProdEnergy
resolve(true)
})
})
}
const getThisMonthChartForHourData = () => {
return new Promise((resolve) => {
2024-11-08 15:44:06 +08:00
const start = getThisMonthTodayTimestamp()
getChartData<'WIndFarmMonthProdEnergy'>({
startTime: start,
endTime: Date.now(),
attr: ['WIndFarmMonthProdEnergy'],
interval: '1n',
}).then(({ times, val }) => {
TrendDataForMonth.currentPeriod.time = times.WIndFarmMonthProdEnergy
TrendDataForMonth.currentPeriod.value = val.WIndFarmMonthProdEnergy
resolve(true)
})
})
}
const getAllChartData = (type: ('power' | 'trend')[] = ['power', 'trend']) => {
if (type.includes('power')) {
getThisDayChartData().then(() => {
initpowerChart()
})
}
if (type.includes('trend')) {
const trendDataForLastYear = getLastYearChartData()
const trendDataForThisDay = getThisDayChartForHourData()
const trendDataForLastMonth = getLastMonthChartData()
const trendDataForThisMonth = getThisMonthChartForHourData()
2024-11-08 15:44:06 +08:00
Promise.all([trendDataForLastYear, trendDataForThisDay, trendDataForLastMonth, trendDataForThisMonth]).then(() => {
inittrendChart(trendChartType.value)
})
}
2024-10-31 16:49:12 +08:00
}
2024-06-13 11:30:23 +08:00
2024-10-31 16:49:12 +08:00
const trendChartType = ref<'day' | 'month'>('day')
const tabhandleClick = () => {
state.charts.trendChart.clear()
nextTick(() => {
inittrendChart(trendChartType.value)
})
}
2024-10-24 09:04:51 +08:00
const activeName = ref('first')
//let autoUpdateTimer: any = null
let autoUpdateForSecondTimer: any = null
let autoUpdateTimerForMinuteTimer: any = null
let autoUpdateTimerForHourTimer: any = null
2024-10-31 09:21:15 +08:00
const autoUpdate = () => {
if (!autoUpdateForSecondTimer) {
autoUpdateForSecondTimer = setInterval(() => {
2024-10-31 09:21:15 +08:00
StatusListData()
overviewList()
2024-10-31 09:21:15 +08:00
}, 2000)
}
if (!autoUpdateTimerForMinuteTimer) {
autoUpdateTimerForMinuteTimer = setInterval(() => {
getAllChartData(['power'])
//initpowerChart()
}, 60000)
}
if (!autoUpdateTimerForHourTimer) {
autoUpdateTimerForHourTimer = setInterval(() => {
getAllChartData(['trend'])
//inittrendChart(trendChartType.value)
}, 60000 * 30)
}
2024-10-31 09:21:15 +08:00
}
2024-11-11 16:24:03 +08:00
const HomeHight = ref()
const computedHeight = reactive({
powerHeight: '298px',
centerHeight: '1100px',
alarmHeight: '350px',
})
const sizeChange = () => {
const rect = HomeHight.value?.getBoundingClientRect()
if (!rect) return
computedHeight.powerHeight = rect.height - 636 + 'px'
computedHeight.alarmHeight = rect.height - 580 + 'px'
computedHeight.centerHeight = rect.height - 0 + 'px'
2024-11-13 10:46:37 +08:00
if (window.screen.width < 1360) {
computedHeight.alarmHeight = '200px'
computedHeight.powerHeight = '200px'
}
2024-11-11 16:24:03 +08:00
}
onMounted(() => {
window.addEventListener('resize', sizeChange)
sizeChange()
getAllChartData()
createScroll()
overviewList()
StatusListData()
autoUpdate()
equipList({ objectType: 10002 }).then((res) => {
res.data.map((item: any) => {
deviceCode.value.push(item.name)
})
getTableData(deviceCode.value)
})
useEventListener(window, 'resize', echartsResize)
})
2024-10-31 09:21:15 +08:00
onUnmounted(() => {
2024-11-11 16:24:03 +08:00
window.removeEventListener('resize', sizeChange)
2024-10-31 09:21:15 +08:00
clearInterval(timer)
autoUpdateForSecondTimer && clearInterval(autoUpdateForSecondTimer)
2024-10-31 16:49:12 +08:00
const chartKeys = Object.keys(state.charts) as Array<keyof typeof state.charts>
chartKeys.forEach((key) => {
state.charts[key].dispose()
})
2024-11-08 15:44:06 +08:00
})
2024-06-13 11:30:23 +08:00
</script>
<style scoped lang="scss">
2024-11-11 16:24:03 +08:00
$marginNum: 10px;
$labelHeight: 38px;
@mixin cardDefaultStyle {
margin-top: $marginNum;
margin-bottom: $marginNum;
padding: 10px;
border-radius: 10px;
background-color: #fff;
}
@mixin cardlabel {
.cardLabel {
width: 100%;
height: $labelHeight;
font-size: 18px;
line-height: 18px;
font-weight: 600;
color: #4e5969;
line-height: 38px;
padding-left: 10px;
2024-11-08 15:44:06 +08:00
}
}
2024-10-24 09:04:51 +08:00
.default-main {
2024-11-11 16:24:03 +08:00
width: 100%;
2024-11-13 10:46:37 +08:00
// height: 100%;
// min-height: 920px;
2024-10-24 09:04:51 +08:00
padding: 0;
margin: 0;
2024-11-08 15:44:06 +08:00
color: #4e5969;
background-color: #f2f3f5;
2024-11-11 16:24:03 +08:00
overflow: hidden;
2024-11-08 15:44:06 +08:00
.content-number {
2024-10-24 09:04:51 +08:00
color: #333333;
font-size: 20px;
}
2024-11-08 15:44:06 +08:00
.homelabel {
2024-10-24 09:04:51 +08:00
font-family: PingFangSC-Semibold;
font-size: 18px;
2024-11-08 15:44:06 +08:00
color: #4e5969;
2024-10-24 09:04:51 +08:00
letter-spacing: 0;
line-height: 18px;
font-weight: 600;
margin-bottom: 20px;
2024-06-13 11:30:23 +08:00
display: block;
}
2024-11-08 15:44:06 +08:00
.grid-content {
2024-11-13 10:46:37 +08:00
/* overflow-x: hidden;*/
width: 100%;
2024-10-24 09:04:51 +08:00
height: 100%;
2024-11-08 15:44:06 +08:00
.panelBg {
2024-10-24 09:04:51 +08:00
background-color: #ffffff;
padding: 20px;
border-radius: 5px;
margin-bottom: 20px;
2024-06-13 11:30:23 +08:00
}
2024-11-08 15:44:06 +08:00
.overview {
2024-11-13 10:46:37 +08:00
/* @include cardDefaultStyle;
2024-11-11 16:24:03 +08:00
@include cardlabel;*/
min-height: 216px;
2024-11-08 15:44:06 +08:00
.small-panel {
2024-10-24 09:04:51 +08:00
display: flex;
2024-11-08 15:44:06 +08:00
border: 1px solid #e1edf6;
2024-10-24 09:04:51 +08:00
border-radius: 10px;
padding: 10px;
2024-11-08 15:44:06 +08:00
.small-panel-pic {
2024-10-31 09:32:37 +08:00
width: 36px;
height: 36px;
2024-10-24 09:04:51 +08:00
}
2024-11-08 15:44:06 +08:00
.small-base {
2024-11-11 16:24:03 +08:00
word-break: keep-all;
2024-10-24 09:04:51 +08:00
margin-left: 10px;
color: #2c3f5d;
}
}
2024-06-13 11:30:23 +08:00
}
2024-11-08 15:44:06 +08:00
.status {
2024-11-13 10:46:37 +08:00
/* @include cardDefaultStyle;
2024-11-11 16:24:03 +08:00
@include cardlabel;*/
min-height: 374px;
2024-11-08 15:44:06 +08:00
.statusrow {
2024-10-24 09:04:51 +08:00
margin-bottom: 10px;
2024-06-13 11:30:23 +08:00
}
2024-11-08 15:44:06 +08:00
.status-con {
2024-10-24 09:04:51 +08:00
padding-left: 20px !important;
2024-11-08 15:44:06 +08:00
background: #f0f6ff;
2024-10-24 09:04:51 +08:00
border-radius: 10px;
2024-06-13 11:30:23 +08:00
}
2024-11-08 15:44:06 +08:00
.status-panel {
2024-10-24 09:04:51 +08:00
display: flex;
padding: 10px;
font-size: 12px;
2024-11-08 15:44:06 +08:00
.status-panel-pic {
2024-10-24 09:04:51 +08:00
width: 60px;
height: 60px;
}
2024-11-08 15:44:06 +08:00
.status-base-main {
2024-11-11 16:24:03 +08:00
word-break: keep-all;
2024-10-24 09:04:51 +08:00
margin-left: 10px;
line-height: 23px;
padding-top: 6px;
}
2024-11-08 15:44:06 +08:00
.status-base {
2024-10-31 09:21:15 +08:00
margin-left: 10px;
line-height: 23px;
2024-11-08 15:44:06 +08:00
padding: 6px 10px 0 10px;
2024-10-31 09:21:15 +08:00
display: flex;
justify-content: space-between;
width: 100%;
}
2024-11-08 15:44:06 +08:00
.status-panel-piczt {
2024-10-31 09:32:37 +08:00
width: 24px;
height: 24px;
2024-10-24 09:04:51 +08:00
}
}
2024-06-13 11:30:23 +08:00
}
2024-11-08 15:44:06 +08:00
.power {
2024-11-11 16:24:03 +08:00
@include cardDefaultStyle;
@include cardlabel;
width: 100%;
min-height: 298px;
height: v-bind('computedHeight.powerHeight');
2024-11-13 10:46:37 +08:00
.chartBox {
2024-11-11 16:24:03 +08:00
height: calc(100% - $labelHeight);
2024-11-08 17:45:25 +08:00
.power-chart {
2024-11-11 16:24:03 +08:00
width: 100%;
height: 100%;
2024-11-07 16:06:22 +08:00
}
2024-10-24 09:04:51 +08:00
}
2024-06-13 11:30:23 +08:00
}
2024-11-08 15:44:06 +08:00
.matrix {
2024-11-13 10:46:37 +08:00
/* @include cardDefaultStyle;
2024-11-11 16:24:03 +08:00
@include cardlabel;*/
2024-11-08 15:44:06 +08:00
background: url('/@/assets/dashboard/bg1.png') no-repeat #ffffff;
2024-10-24 09:04:51 +08:00
background-size: 100% 100%;
2024-11-11 16:24:03 +08:00
min-height: 900px;
width: 100%;
height: v-bind('computedHeight.centerHeight');
margin-bottom: 0;
2024-06-13 11:30:23 +08:00
}
2024-11-08 15:44:06 +08:00
.summarize {
2024-11-11 16:24:03 +08:00
padding: 10px;
border-radius: 10px;
background-color: #fff;
margin-bottom: 20px;
word-break: keep-all;
/*@include cardDefaultStyle;*/
@include cardlabel;
min-height: 224px;
.summarize-panel-list {
width: 100%;
2024-10-24 09:04:51 +08:00
display: flex;
justify-content: space-between;
}
2024-11-08 15:44:06 +08:00
.summarize-panel {
2024-10-24 09:04:51 +08:00
margin: 5px;
2024-11-11 16:24:03 +08:00
width: 25%;
display: flex;
padding: 20px 0;
flex-direction: column;
align-items: center;
background-color: #f0f6ff;
border-radius: 10px;
2024-11-08 15:44:06 +08:00
.summarize-panel-base {
2024-11-11 16:24:03 +08:00
width: 100%;
flex-direction: column;
align-items: center;
div {
display: flex;
justify-content: center;
font-size: 14px;
color: rgb(78, 89, 105);
.content-number {
color: #333333;
font-size: 20px;
}
}
2024-10-24 09:04:51 +08:00
}
}
2024-06-13 11:30:23 +08:00
}
2024-11-11 16:24:03 +08:00
.cardContentRight {
width: 100%;
height: 100%;
}
2024-11-08 15:44:06 +08:00
.trend {
2024-11-13 10:46:37 +08:00
/* @include cardDefaultStyle;
2024-11-11 16:24:03 +08:00
@include cardlabel;*/
min-height: 300px;
height: 335px;
2024-10-24 09:04:51 +08:00
overflow: hidden;
2024-11-08 15:44:06 +08:00
.trend-tabs {
:deep(.el-tabs__item) {
2024-10-24 09:04:51 +08:00
border: none;
text-align: center;
width: 40px;
padding: 0;
line-height: 24px;
height: 24px;
}
2024-11-08 15:44:06 +08:00
:deep(.el-tabs__header .el-tabs__nav) {
2024-10-24 09:04:51 +08:00
border-radius: 0;
border: none;
}
2024-11-08 15:44:06 +08:00
:deep(.el-tabs__header) {
2024-10-24 09:04:51 +08:00
border-bottom: 0;
float: right;
2024-11-08 15:44:06 +08:00
margin-top: -43px;
2024-10-24 09:04:51 +08:00
}
2024-11-08 15:44:06 +08:00
:deep(.el-tabs__content) {
2024-10-24 09:04:51 +08:00
clear: both;
}
2024-11-08 15:44:06 +08:00
:deep(.el-tabs__item.is-active) {
background: rgba(2, 119, 179, 0.2);
2024-10-24 09:04:51 +08:00
border-radius: 4px;
border: none;
}
2024-11-08 15:44:06 +08:00
:deep(.el-tabs__nav-wrap:after) {
2024-10-24 09:04:51 +08:00
background: none;
}
2024-11-08 15:44:06 +08:00
:deep(.el-tabs__active-bar) {
2024-10-24 09:04:51 +08:00
background: none;
}
}
2024-11-08 15:44:06 +08:00
.trend-chart {
2024-10-24 09:04:51 +08:00
width: 100%;
height: 260px;
}
2024-06-13 11:30:23 +08:00
}
.realPart {
2024-11-13 10:46:37 +08:00
/* @include cardDefaultStyle;
2024-11-11 16:24:03 +08:00
@include cardlabel;*/
/*height: 370px;*/
min-height: 350px;
height: v-bind('computedHeight.alarmHeight');
2024-11-08 11:31:40 +08:00
}
2024-11-11 16:24:03 +08:00
}
}
@media screen and (max-width: 1920px) {
.default-main {
2024-11-13 10:46:37 +08:00
.trend {
height: 315px !important;
2024-11-08 17:45:25 +08:00
}
2024-11-13 10:46:37 +08:00
}
2024-11-11 16:24:03 +08:00
}
@media screen and (max-width: 1280px) {
.default-main {
2024-11-13 10:46:37 +08:00
overflow: none;
2024-11-11 16:24:03 +08:00
.summarize {
2024-11-13 10:46:37 +08:00
.summarize-panel {
2024-11-11 16:24:03 +08:00
margin: 2px !important;
2024-11-08 11:31:40 +08:00
}
2024-11-11 16:24:03 +08:00
}
}
}
@media screen and (max-width: 1360px) {
.default-main {
2024-11-13 10:46:37 +08:00
.overview {
.small-panel {
2024-11-11 16:24:03 +08:00
.small-base {
margin-left: 0px !important;
}
2024-11-07 16:06:22 +08:00
}
}
2024-06-13 11:30:23 +08:00
}
}
2024-11-11 16:24:03 +08:00
@media screen and (max-width: 1480px) {
.default-main {
2024-11-11 16:24:03 +08:00
font-size: 12px !important;
2024-11-13 10:46:37 +08:00
.overview {
.small-panel {
2024-11-11 16:24:03 +08:00
padding: 13px 0px !important;
}
}
.status {
.status-panel {
2024-11-13 10:46:37 +08:00
.status-base-main {
2024-11-11 16:24:03 +08:00
margin-left: 5px !important;
}
}
}
2024-06-13 11:30:23 +08:00
}
}
2024-11-11 16:24:03 +08:00
@media screen and (max-width: 1680px) {
2024-11-08 17:45:25 +08:00
.default-main {
2024-11-11 16:24:03 +08:00
/*font-size: 12px !important;*/
.content-number {
font-size: 16px !important;
}
.homelabel {
font-size: 16px !important;
margin-bottom: 10px !important;
}
.grid-content {
.panelBg {
/* padding: 10px !important;*/
margin-bottom: 10px !important;
}
2024-11-13 10:46:37 +08:00
.summarize {
2024-11-11 16:24:03 +08:00
margin-bottom: 10px !important;
}
}
2024-11-13 10:46:37 +08:00
.toal-panel {
2024-11-11 16:24:03 +08:00
padding: 0 !important;
padding-bottom: 10px !important;
}
.col-center {
padding: 0 !important;
}
2024-11-13 10:46:37 +08:00
.matrix {
2024-11-11 16:24:03 +08:00
height: 908px !important;
}
:deep(.el-tabs__header) {
margin-top: -33px !important;
}
2024-11-13 10:46:37 +08:00
.overview {
.small-panel {
2024-11-11 16:24:03 +08:00
.small-base {
margin-left: 5px !important;
}
}
}
2024-11-08 17:45:25 +08:00
}
}
2024-06-13 11:30:23 +08:00
</style>