|
|
|
@ -1,58 +1,6 @@ |
|
|
|
<template> |
|
|
|
<div class="company-shore-power"> |
|
|
|
<div class="left" style="width: 1000px;"> |
|
|
|
<!-- 码头信息卡片 --> |
|
|
|
<div class="card digital-twin-card--deep-blue"> |
|
|
|
<div class="card-title" style="display: flex; align-items: center; justify-content: space-between;"> |
|
|
|
<div class="card-title"> |
|
|
|
<div class="vertical-line"></div> |
|
|
|
<img src="@/assets/svgs/data.svg" class="title-icon" /> |
|
|
|
<span class="title-text">码头与泊位信息</span> |
|
|
|
</div> |
|
|
|
<!-- 返回上个页面 --> |
|
|
|
<el-button type="primary" @click.stop="handleGoBack()">返回</el-button> |
|
|
|
|
|
|
|
<!-- <div> |
|
|
|
<el-date-picker type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" |
|
|
|
format="YYYY-MM-DD" value-format="YYYY-MM-DD" class="date-range-picker" /> |
|
|
|
</div> --> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="card-content"> |
|
|
|
<div v-for="company in companyComparisonData" :key="company.name" class="company-section"> |
|
|
|
<div class="data-update-time">起始时间: {{ getStartTimeByRange(getCompanyTimeRange(company.id)) }} 更新时间: {{ |
|
|
|
realtimeDeviceDataTime }}</div> |
|
|
|
<div class="company-header"> |
|
|
|
<div class="company-info"> |
|
|
|
<div class="company-name">{{ company.name }}</div> |
|
|
|
<div class="company-berth-count">泊位数: {{ company.children?.length || 0 }}</div> |
|
|
|
</div> |
|
|
|
<div class="time-range-container"> |
|
|
|
<button v-for="option in timeRangeOptions" :key="option.value" |
|
|
|
:class="['time-range-btn', { active: getCompanyTimeRange(company.id) === option.value }]" |
|
|
|
@click.stop="() => handleTimeRangeChange(company.id, option.value)"> |
|
|
|
{{ option.label }} |
|
|
|
</button> |
|
|
|
<div class="company-total">总量: {{ calculateTotal(company.children).toFixed(2) }}</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
<div class="overview-grid"> |
|
|
|
<div v-for="(berth, index) in (company.children || [])" :key="index" class="overview-item" |
|
|
|
@click="handleClickBerthItem(berth)"> |
|
|
|
<div class="overview-value">{{ berth.measureValue?.toFixed(2) |
|
|
|
|| 0 }}</div> |
|
|
|
|
|
|
|
<div class="overview-label">{{ berth.name }}</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="right" style="width: 800px;" :style="{ width: selectedShorePowerItem ? '800px' : '420px' }"> |
|
|
|
<div class="left" style="width: 800px;" :style="{ width: selectedShorePowerItem ? '800px' : '420px' }"> |
|
|
|
<div style="display: flex; gap: 12px; height: 100%;"> |
|
|
|
<div v-if="selectedShorePowerItem" class="card digital-twin-card--deep-blue"> |
|
|
|
<div style="display: flex; align-items: center; justify-content: space-between;"> |
|
|
|
@ -163,6 +111,58 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="right" style="width: 1000px;"> |
|
|
|
<!-- 码头信息卡片 --> |
|
|
|
<div class="card digital-twin-card--deep-blue"> |
|
|
|
<div class="card-title" style="display: flex; align-items: center; justify-content: space-between;"> |
|
|
|
<div class="card-title"> |
|
|
|
<div class="vertical-line"></div> |
|
|
|
<img src="@/assets/svgs/data.svg" class="title-icon" /> |
|
|
|
<span class="title-text">码头与泊位信息</span> |
|
|
|
</div> |
|
|
|
<!-- 返回上个页面 --> |
|
|
|
<el-button type="primary" @click.stop="handleGoBack()">返回</el-button> |
|
|
|
|
|
|
|
<!-- <div> |
|
|
|
<el-date-picker type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" |
|
|
|
format="YYYY-MM-DD" value-format="YYYY-MM-DD" class="date-range-picker" /> |
|
|
|
</div> --> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="card-content"> |
|
|
|
<div v-for="company in companyComparisonData" :key="company.name" class="company-section"> |
|
|
|
<div class="data-update-time">起始时间: {{ getStartTimeByRange(getCompanyTimeRange(company.id)) }} 更新时间: {{ |
|
|
|
realtimeDeviceDataTime }}</div> |
|
|
|
<div class="company-header"> |
|
|
|
<div class="company-info"> |
|
|
|
<div class="company-name">{{ company.name }}</div> |
|
|
|
<div class="company-berth-count">泊位数: {{ company.children?.length || 0 }}</div> |
|
|
|
</div> |
|
|
|
<div class="time-range-container"> |
|
|
|
<button v-for="option in timeRangeOptions" :key="option.value" |
|
|
|
:class="['time-range-btn', { active: getCompanyTimeRange(company.id) === option.value }]" |
|
|
|
@click.stop="() => handleTimeRangeChange(company.id, option.value)"> |
|
|
|
{{ option.label }} |
|
|
|
</button> |
|
|
|
<div class="company-total">总量: {{ calculateTotal(company.children).toFixed(2) }}</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
<div class="overview-grid"> |
|
|
|
<div v-for="(berth, index) in (company.children || [])" :key="index" class="overview-item" |
|
|
|
@click="handleClickBerthItem(berth)"> |
|
|
|
<div class="overview-value">{{ berth.measureValue?.toFixed(2) |
|
|
|
|| 0 }}</div> |
|
|
|
|
|
|
|
<div class="overview-label">{{ berth.name }}</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<ship-history-dialog v-model="historyVisible.visible" :ship-param="historyVisible.searchParams" |
|
|
|
:realtime-device-data="realtimeDeviceData" /> |
|
|
|
</div> |
|
|
|
@ -383,6 +383,165 @@ const handleGetBuildData = async () => { |
|
|
|
})) |
|
|
|
})) |
|
|
|
companyComparisonData.value = buildData |
|
|
|
companyComparisonData.value.push( |
|
|
|
{ |
|
|
|
"id": 4, |
|
|
|
"harborDistrictId": 1, |
|
|
|
"name": "模拟码头公司4", |
|
|
|
"children": [ |
|
|
|
{ |
|
|
|
"id": 6, |
|
|
|
"dockId": 3, |
|
|
|
"districtId": 1, |
|
|
|
"name": "模拟-201#泊位", |
|
|
|
"deviceId": 6, |
|
|
|
"deviceName": "模拟-1号岸电-201泊位", |
|
|
|
"deviceCode": "CFD_GT_201_0.4KV.Kwh", |
|
|
|
"deviceStatus": 3, |
|
|
|
"measureValue": 3344627.0265, |
|
|
|
"incrementValue": 17.846733086563358, |
|
|
|
"incrementCost": 17.846733086563358, |
|
|
|
"measureTime": 1766479519223, |
|
|
|
"createTime": null |
|
|
|
}, |
|
|
|
{ |
|
|
|
"id": 7, |
|
|
|
"dockId": 3, |
|
|
|
"districtId": 1, |
|
|
|
"name": "模拟-202#泊位", |
|
|
|
"deviceId": 7, |
|
|
|
"deviceName": "模拟-1号岸电-202泊位", |
|
|
|
"deviceCode": "CFD_GT_202_0.4KV.Kwh", |
|
|
|
"deviceStatus": 3, |
|
|
|
"measureValue": 5338783.7211, |
|
|
|
"incrementValue": 20.846911166236122, |
|
|
|
"incrementCost": 20.846911166236122, |
|
|
|
"measureTime": 1766479519223, |
|
|
|
"createTime": null |
|
|
|
}, |
|
|
|
{ |
|
|
|
"id": 8, |
|
|
|
"dockId": 3, |
|
|
|
"districtId": 1, |
|
|
|
"name": "模拟-203#泊位", |
|
|
|
"deviceId": 8, |
|
|
|
"deviceName": "模拟-2号岸电-203泊位", |
|
|
|
"deviceCode": "CFD_GT_203_6/6.6KV.Kwh", |
|
|
|
"deviceStatus": 3, |
|
|
|
"measureValue": 10921413.801, |
|
|
|
"incrementValue": 19.737663764627705, |
|
|
|
"incrementCost": 19.737663764627705, |
|
|
|
"measureTime": 1766479519223, |
|
|
|
"createTime": null |
|
|
|
}, |
|
|
|
{ |
|
|
|
"id": 9, |
|
|
|
"dockId": 3, |
|
|
|
"districtId": 2, |
|
|
|
"name": "模拟-204#泊位", |
|
|
|
"deviceId": 9, |
|
|
|
"deviceName": "模拟-2号岸电-204泊位", |
|
|
|
"deviceCode": "CFD_GT_204_6/6.6KV.Kwh", |
|
|
|
"deviceStatus": 3, |
|
|
|
"measureValue": 2680281.7026, |
|
|
|
"incrementValue": 21.264192979883447, |
|
|
|
"incrementCost": 21.264192979883447, |
|
|
|
"measureTime": 1766479519223, |
|
|
|
"createTime": null |
|
|
|
}, |
|
|
|
{ |
|
|
|
"id": 10, |
|
|
|
"dockId": 3, |
|
|
|
"districtId": 2, |
|
|
|
"name": "模拟-205#泊位", |
|
|
|
"deviceId": 10, |
|
|
|
"deviceName": "模拟-2号岸电-205泊位", |
|
|
|
"deviceCode": "CFD_GT_205_6/6.6KV.Kwh", |
|
|
|
"deviceStatus": 3, |
|
|
|
"measureValue": 4975354.5181, |
|
|
|
"incrementValue": 21.75554591307556, |
|
|
|
"incrementCost": 21.75554591307556, |
|
|
|
"measureTime": 1766479519223, |
|
|
|
"createTime": null |
|
|
|
}, |
|
|
|
{ |
|
|
|
"id": 11, |
|
|
|
"dockId": 3, |
|
|
|
"districtId": null, |
|
|
|
"name": "模拟-206#泊位", |
|
|
|
"deviceId": 11, |
|
|
|
"deviceName": "模拟-3号岸电-206泊位", |
|
|
|
"deviceCode": "CFD_GT_206_6/6.6KV.Kwh", |
|
|
|
"deviceStatus": 3, |
|
|
|
"measureValue": 4900877.9997, |
|
|
|
"incrementValue": 17.841940952939577, |
|
|
|
"incrementCost": 17.841940952939577, |
|
|
|
"measureTime": 1766479519223, |
|
|
|
"createTime": null |
|
|
|
}, |
|
|
|
{ |
|
|
|
"id": 12, |
|
|
|
"dockId": 3, |
|
|
|
"districtId": null, |
|
|
|
"name": "国投-207#泊位", |
|
|
|
"deviceId": 12, |
|
|
|
"deviceName": "模拟-3号岸电-207泊位", |
|
|
|
"deviceCode": "CFD_GT_207_6/6.6KV.Kwh", |
|
|
|
"deviceStatus": 3, |
|
|
|
"measureValue": 5093718.3972, |
|
|
|
"incrementValue": 21.524539074803123, |
|
|
|
"incrementCost": 21.524539074803123, |
|
|
|
"measureTime": 1766479519223, |
|
|
|
"createTime": null |
|
|
|
}, |
|
|
|
{ |
|
|
|
"id": 13, |
|
|
|
"dockId": 3, |
|
|
|
"districtId": null, |
|
|
|
"name": "模拟-208#泊位", |
|
|
|
"deviceId": 13, |
|
|
|
"deviceName": "模拟-3号岸电-208泊位", |
|
|
|
"deviceCode": "CFD_GT_208_6/6.6KV.Kwh", |
|
|
|
"deviceStatus": 4, |
|
|
|
"measureValue": 7700103.7496, |
|
|
|
"incrementValue": 0, |
|
|
|
"incrementCost": 0, |
|
|
|
"measureTime": 1766479519223, |
|
|
|
"createTime": null |
|
|
|
}, |
|
|
|
{ |
|
|
|
"id": 14, |
|
|
|
"dockId": 3, |
|
|
|
"districtId": null, |
|
|
|
"name": "模拟-209#泊位", |
|
|
|
"deviceId": 14, |
|
|
|
"deviceName": "模拟-4号岸电-209泊位", |
|
|
|
"deviceCode": "CFD_GT_209_6/6.6KV.Kwh", |
|
|
|
"deviceStatus": 4, |
|
|
|
"measureValue": 3845558.9787, |
|
|
|
"incrementValue": 0, |
|
|
|
"incrementCost": 0, |
|
|
|
"measureTime": 1766479519223, |
|
|
|
"createTime": null |
|
|
|
}, |
|
|
|
{ |
|
|
|
"id": 15, |
|
|
|
"dockId": 3, |
|
|
|
"districtId": null, |
|
|
|
"name": "模拟-210#泊位", |
|
|
|
"deviceId": 15, |
|
|
|
"deviceName": "模拟-4号岸电-210泊位", |
|
|
|
"deviceCode": "CFD_GT_210_6/6.6KV.Kwh", |
|
|
|
"deviceStatus": 4, |
|
|
|
"measureValue": 3649994.7502, |
|
|
|
"incrementValue": 0, |
|
|
|
"incrementCost": 0, |
|
|
|
"measureTime": 1766479519223, |
|
|
|
"createTime": null |
|
|
|
} |
|
|
|
] |
|
|
|
} |
|
|
|
) |
|
|
|
/* MapApi.getBerthIdAndNameList().then(res => { |
|
|
|
console.log(res) |
|
|
|
const buildData = res.map(item => ({ |
|
|
|
@ -440,6 +599,7 @@ onMounted(() => { |
|
|
|
} |
|
|
|
|
|
|
|
.overview-item { |
|
|
|
width: 224px; |
|
|
|
cursor: pointer; |
|
|
|
display: flex; |
|
|
|
flex-direction: column; |
|
|
|
|