diff --git a/src/api/ems/dzjk.js b/src/api/ems/dzjk.js index bbb7104..f0584d6 100644 --- a/src/api/ems/dzjk.js +++ b/src/api/ems/dzjk.js @@ -8,6 +8,14 @@ export function getDzjkHomeView(siteId) { }) } +//获取单个站点总累计运行数据(基于日表) +export function getDzjkHomeTotalView(siteId) { + return request({ + url: `/ems/siteMonitor/homeTotalView?siteId=${siteId}`, + method: 'get' + }) +} + // 单站监控项目点位配置(供单站监控功能查询) export function getProjectPointMapping(siteId) { return request({ @@ -738,88 +746,25 @@ export function getLoadNameList(siteId) { // 电表报表 export function getAmmeterData({siteId, startTime, endTime, pageSize, pageNum}) { - const kind = 'day' - const aliasMap = { - activePeakKwh: 'activePeakKwh', - activeHighKwh: 'activeHighKwh', - activeFlatKwh: 'activeFlatKwh', - activeValleyKwh: 'activeValleyKwh', - activeTotalKwh: 'activeTotalKwh', - reActivePeakKwh: 'reActivePeakKwh', - reActiveHighKwh: 'reActiveHighKwh', - reActiveFlatKwh: 'reActiveFlatKwh', - reActiveValleyKwh: 'reActiveValleyKwh', - reActiveTotalKwh: 'reActiveTotalKwh', - effect: 'effect', - } - return queryMenuPointCurves({ - siteId, - menuCode: 'TJBB_DBBB', - startDate: startTime, - endDate: endTime, - }).then((records) => { - const rowMap = new Map() - records.forEach((record) => { - const alias = aliasMap[record.fieldName] - if (!alias) return - ;(record.curve || []).forEach((point) => { - const time = point?.dataTime ? new Date(point.dataTime) : null - if (!time || isNaN(time.getTime())) return - const label = formatTimeLabelByKind(time, kind) - if (!rowMap.has(label)) rowMap.set(label, {dataTime: label}) - rowMap.get(label)[alias] = normalizePointValue(point?.pointValue) - }) - }) - const labels = buildSortedLabels(new Set(Array.from(rowMap.keys())), kind) - const fullRows = labels.map(label => rowMap.get(label)) - return { - rows: paginateRows(fullRows, pageNum, pageSize), - total: fullRows.length, + return request({ + url: `/ems/statsReport/getAmmeterDataFromDaily`, + method: 'get', + params: { + siteId, + startTime, + endTime, + pageSize, + pageNum, } }) } // 电价报表 export function getAmmeterRevenueData(data) { - const {siteId, startTime, endTime, pageNum, pageSize} = data || {} - const kind = 'day' - const aliasMap = { - activePeakPrice: 'activePeakPrice', - activeHighPrice: 'activeHighPrice', - activeFlatPrice: 'activeFlatPrice', - activeValleyPrice: 'activeValleyPrice', - activeTotalPrice: 'activeTotalPrice', - reActivePeakPrice: 'reActivePeakPrice', - reActiveHighPrice: 'reActiveHighPrice', - reActiveFlatPrice: 'reActiveFlatPrice', - reActiveValleyPrice: 'reActiveValleyPrice', - reActiveTotalPrice: 'reActiveTotalPrice', - actualRevenue: 'actualRevenue', - } - return queryMenuPointCurves({ - siteId, - menuCode: 'TJBB_SYBB', - startDate: startTime, - endDate: endTime, - }).then((records) => { - const rowMap = new Map() - records.forEach((record) => { - const alias = aliasMap[record.fieldName] - if (!alias) return - ;(record.curve || []).forEach((point) => { - const time = point?.dataTime ? new Date(point.dataTime) : null - if (!time || isNaN(time.getTime())) return - const label = formatTimeLabelByKind(time, kind) - if (!rowMap.has(label)) rowMap.set(label, {dataTime: label}) - rowMap.get(label)[alias] = normalizePointValue(point?.pointValue) - }) - }) - const labels = buildSortedLabels(new Set(Array.from(rowMap.keys())), kind) - const fullRows = labels.map(label => rowMap.get(label)) - return { - rows: paginateRows(fullRows, pageNum, pageSize), - total: fullRows.length, - } + return request({ + url: `/ems/statsReport/getAmmeterRevenueData`, + method: 'get', + params: data }) } diff --git a/src/api/ems/site.js b/src/api/ems/site.js index 77ec512..a7dd588 100644 --- a/src/api/ems/site.js +++ b/src/api/ems/site.js @@ -8,6 +8,15 @@ export function getSiteInfoList({siteName, startTime, endTime, pageSize, pageNum }) } +// 手动同步站点天气(收益报表) +export function syncSiteWeatherByDateRange({siteId, startTime, endTime}) { + return request({ + url: `/ems/statsReport/syncWeatherByDateRange`, + method: 'post', + params: {siteId, startTime, endTime} + }) +} + // 新增站点 export function addSite(data) { return request({ @@ -309,6 +318,18 @@ export function getPointConfigCurve(data) { }) } +// 点位配置-生成最近7天数据 +export function generatePointConfigRecent7Days(data) { + return request({ + url: `/ems/pointConfig/generateRecent7Days`, + method: 'post', + data, + headers: { + repeatSubmit: false + } + }) +} + // 计算点配置列表 export function getPointCalcConfigList(params) { return request({ @@ -352,6 +373,92 @@ export function deletePointCalcConfig(ids) { }) } +// 数据修正列表(ems_daily_energy_data) +export function getDailyEnergyDataList(params) { + return request({ + url: `/ems/dailyEnergyData/list`, + method: 'get', + params + }) +} + +// 数据修正详情 +export function getDailyEnergyDataDetail(id) { + return request({ + url: `/ems/dailyEnergyData/${id}`, + method: 'get', + }) +} + +// 新增数据修正 +export function addDailyEnergyData(data) { + return request({ + url: `/ems/dailyEnergyData`, + method: 'post', + data + }) +} + +// 编辑数据修正 +export function updateDailyEnergyData(data) { + return request({ + url: `/ems/dailyEnergyData`, + method: 'put', + data + }) +} + +// 删除数据修正 +export function deleteDailyEnergyData(ids) { + return request({ + url: `/ems/dailyEnergyData/${ids}`, + method: 'delete', + }) +} + +// 充放电修正列表(ems_daily_charge_data) +export function getDailyChargeDataList(params) { + return request({ + url: `/ems/dailyChargeData/list`, + method: 'get', + params + }) +} + +// 充放电修正详情 +export function getDailyChargeDataDetail(id) { + return request({ + url: `/ems/dailyChargeData/${id}`, + method: 'get', + }) +} + +// 新增充放电修正 +export function addDailyChargeData(data) { + return request({ + url: `/ems/dailyChargeData`, + method: 'post', + data + }) +} + +// 编辑充放电修正 +export function updateDailyChargeData(data) { + return request({ + url: `/ems/dailyChargeData`, + method: 'put', + data + }) +} + +// 删除充放电修正 +export function deleteDailyChargeData(ids) { + return request({ + url: `/ems/dailyChargeData/${ids}`, + method: 'delete', + }) +} + //mqtt export function getMqttList({pageSize, pageNum, mqttTopic, topicName, siteId}) { return request({ diff --git a/src/components/Ems/SingleSquareBox/index.vue b/src/components/Ems/SingleSquareBox/index.vue index 2402d4d..568d7a7 100644 --- a/src/components/Ems/SingleSquareBox/index.vue +++ b/src/components/Ems/SingleSquareBox/index.vue @@ -17,13 +17,13 @@ color:#666666; text-align: left; .single-square-box-title{ - font-size: 12px; - line-height: 12px; - padding-bottom: 12px; + font-size: 10px; + line-height: 10px; + padding-bottom: 8px; } .single-square-box-value{ - font-size: 26px; - line-height: 26px; + font-size: 18px; + line-height: 18px; font-weight: 500; } .point-loading-icon{ @@ -33,7 +33,7 @@ animation: pointLoadingSpinPulse 1.1s linear infinite; } ::v-deep .el-card__body{ - padding: 12px 10px; + padding: 8px 7px; } } @keyframes pointLoadingSpinPulse { diff --git a/src/views/ems/dzjk/home/index.vue b/src/views/ems/dzjk/home/index.vue index 93f8035..96cc194 100644 --- a/src/views/ems/dzjk/home/index.vue +++ b/src/views/ems/dzjk/home/index.vue @@ -42,7 +42,7 @@ class="sjgl-col power-col" >