Merge remote-tracking branch 'origin/0.8.X' into 0.8.X

This commit is contained in:
2026-03-26 10:42:32 +08:00
3 changed files with 1510 additions and 10 deletions

View File

@@ -1,11 +1,11 @@
<template>
<el-row>
<el-col :span="4">
<div style="padding: 10px;">
<!-- <div style="padding: 10px;">
<el-select v-model="energyType" placeholder="请选择能源类型" @change="refresh">
<el-option v-for="item in energyTypeList" :key="item.energyTypeId" :label="item.name" :value="item.energyTypeId" />
</el-select>
</div>
</div> -->
<!-- 区域选择默认展开最高高度为60%的屏幕尺寸 -->
@@ -21,17 +21,20 @@
</el-col>
<el-col :span="20" v-if="showRight">
<el-tabs v-model="activeTab" type="card">
<!-- <el-tabs v-model="activeTab" type="card">
<el-tab-pane label="环比概况" name="1"></el-tab-pane>
<el-tab-pane label="近期趋势" name="2"></el-tab-pane>
<el-tab-pane label="同比分析" name="3"></el-tab-pane>
<el-tab-pane label="环比分析" name="4"></el-tab-pane>
</el-tabs> -->
<el-tabs v-model="energyType" type="card">
<el-tab-pane v-for="item in energyTypeList" :key="item.energyTypeId" :label="item.name" :name="item.energyTypeId"></el-tab-pane>
</el-tabs>
<Overview ref="overview" v-if="activeTab === '1'" :unit="energyUnit" :energyName="energyName" :energyType="energyType" :locationId="locationId" :deviceId="deviceId" />
<RecentTrend ref="recentTrend" v-if="activeTab === '2'" :unit="energyUnit" :energyName="energyName" :energyType="energyType" :locationId="locationId" :deviceId="deviceId" />
<YearToYear ref="yearToYear" v-if="activeTab === '3'" :unit="energyUnit" :energyName="energyName" :energyType="energyType" :locationId="locationId" :deviceId="deviceId" />
<MonthToMonth ref="monthToMonth" v-if="activeTab === '4'" :unit="energyUnit" :energyName="energyName" :energyType="energyType" :locationId="locationId" :deviceId="deviceId" />
<Overview ref="overview" :unit="energyUnit" :energyName="energyName" :energyType="energyType" :locationId="locationId" :deviceId="deviceId" />
<RecentTrend ref="recentTrend" :unit="energyUnit" :energyName="energyName" :energyType="energyType" :locationId="locationId" :deviceId="deviceId" />
<YearToYear ref="yearToYear" :unit="energyUnit" :energyName="energyName" :energyType="energyType" :locationId="locationId" :deviceId="deviceId" />
<MonthToMonth ref="monthToMonth" :unit="energyUnit" :energyName="energyName" :energyType="energyType" :locationId="locationId" :deviceId="deviceId" />
</el-col>
<el-col :span="20" v-else>
<el-empty description="请选择能源类型和区域"></el-empty>
@@ -90,6 +93,7 @@ export default {
getEnergyTypeList() {
listEnergyType({ pageNum: 1, pageSize: 9999 }).then(response => {
this.energyTypeList = response.rows;
this.energyType = this.energyTypeList[0]?.energyTypeId;
});
},
getLocationList() {

File diff suppressed because it is too large Load Diff

View File

@@ -26,7 +26,7 @@ export async function fetchOutputList(queryParams) {
(a, b) => new Date(b.createTime) - new Date(a.createTime)
).map(item => {
// 计算宽度和厚度,将规格按照*分割,*前的是厚度,*后的是宽度
const [thickness, width] = item.specification.split('*')
const [thickness, width] = item.specification?.split('*') || [0, 0]
return {
...item,
computedThickness: parseFloat(thickness),
@@ -36,12 +36,14 @@ export async function fetchOutputList(queryParams) {
return sortedList
}
export async function fetchLossList(queryParams) {
const resultList = await Promise.all(this.actionTypes.map(actionType => {
export async function fetchLossList(actionTypes, queryParams) {
const resultList = await Promise.all(actionTypes.map(actionType => {
return listPendingAction({
...queryParams,
actionStatus: 2,
actionType,
startTime: queryParams.byCreateTimeStart,
endTime: queryParams.byCreateTimeEnd,
pageSize: 99999,
pageNum: 1,
})