From 37e7d38469d2b0558426dddcf78c8771a66cf6fc Mon Sep 17 00:00:00 2001 From: jiangAB Date: Wed, 17 Dec 2025 11:20:45 +0800 Subject: [PATCH] update --- public/img/未连接.png | Bin 0 -> 1164 bytes public/map/components/PortOverview.vue | 90 ++++--- public/map/components/ShipShorePower.vue | 306 ++++++++++++----------- public/map/components/cesiumMap.vue | 43 +++- public/map/components/dictionaryTable.ts | 37 +++ public/map/components/utils.ts | 6 +- public/map/index.vue | 142 +++++++---- src/types/shorepower.d.ts | 5 + 8 files changed, 386 insertions(+), 243 deletions(-) create mode 100644 public/img/未连接.png diff --git a/public/img/未连接.png b/public/img/未连接.png new file mode 100644 index 0000000000000000000000000000000000000000..04a47de8ee3fc5e3a7258ff9568c8bfa0d8e04e7 GIT binary patch literal 1164 zcmV;71atd|P)_ z?QWYe6owDEm)=JrZTqq9dbU)G)KrSpF4r^l$2O_mb@X29`GGkBW5C83oD}KQ80_Qs zePRe7=}O+w@_qOCOw=vE8vqzrB5Q(m1L0i&z%a&*Y1Y|BJ$nG#-NTyrwtLtknqb`o z`!LcKw8yZ$pKa{R761kj_$I|OAyV8Snqb`o`@ZcS745}Z=wG$BcGRlb0l)}`r2^6a$*cS0;dak3SpdL1Q@LL>a^qtqYGcfk zZE*lhS)J#;(U^72OZ1c%uZ82?Hc!VO0IwgvJWKI* z3hKZhQE1F*9&H?Ely-Onc>VNQpET6EnLyVykWdJ7n@6+im}y=BN`p%7NaTzF2uqkp zv(lHrly-Olusb>H9uSr?Z}hqjgXsV;N)Lpk%_C1a4g)U$H-CP*e}0eTM--_RQXLtP_;AOP10 zAsE25K^O(#QXv%jh6wHT7!80Vmv&B2qW+@09#H^DbZHRKT#sk~B)b#{)z>kK&k+rv zy2=yDAA)jTheQD|&+sk*g6q>~9*hQn`SYbE4)_nZywb_0Q$|7j>rYVuzA#a1Mo9XN@8gUXY;7(3oig+=FM@%#)g!8$y_Q6!rq(`~Cb?NAoc;7ld&0xakCdd2u{Mlu=7+2;6yIhV2=O{Z8~}>$ zcYsrjc*>Cnga!cDyR(ztBrD59XaIO~yg5nYyODHR2n_%YU9(n}gOCXTXfFdHBLK@l zXaLX^zgOUBO&0Uc1noJQlZeFQA@C!v@+Uo>qc;Fdab@K>ZcwwB2dzT`H2~1KaJ)Zb z`@GSHEw?p-hN-50Ojrtfj?N>hL`ELt491pkqV;~4kP2XT~tZ$2> z?oXbaqMQL;f)H=a*V|y^s6jB5MVJ*;(4Jr$`w03UGc<1etPog#Ujv(416xhw%-5W^TJSZCWMM6AYt00030|FHp^WdHyG e21!IgR09CKs6Ha12+R!t0000{{ shorepower.name }}
-
- {{ StatusText(shorepower.status) }} +
+ {{ shorepower.storePowerStatus }}
@@ -261,6 +271,10 @@ {{ getValueById(realtimeDeviceData, shorepowerSelectedItem.totalPowerDeviceId, 'measureValue') }}
+
+ 当前状态: + {{ shorepowerSelectedItem.storePowerStatus }} +
@@ -345,6 +359,7 @@ const filteredShorePowerList = computed(() => { }) const handleSelectItem = async (item: ShipRespVo) => { + show_type.value = 'ship' const deviceId = item.shorePower?.totalPowerDeviceId; const res = await MapApi.getRealtimeDataByIdList({ ids: deviceId }) console.log(res) @@ -420,10 +435,9 @@ const handleSwitch = (ship: ShipItem, type: string) => { } const handleSelectShorePower = async (shorepower: ShorePowerBerth & { position: string }) => { - console.log('shorepower', shorepower) + show_type.value = 'shorepower' // selectedItem.value = shorepower shorepowerSelectedItem.value = shorepower - show_type.value = 'shorepower' emit('item-click', { type: 'shorepower_box', item: shorepower @@ -432,25 +446,7 @@ const handleSelectShorePower = async (shorepower: ShorePowerBerth & { position: // console.log('voltageDeviceId', data) } -const StatusMap = { - 1: '故障', - 2: '故障', - 3: '在线', - 4: '在线', - 5: '离线', - 6: '在线', - 8: '故障', - 9: '离线', -} - -// 状态转换函数 -const StatusText = (status: number | string) => { - const statusNum = Number(status); - // console.log(status) - return StatusMap[statusNum] || status; -} - -const getStatusClass = (status: string) => { +const getStatusClass = (status: string | undefined) => { switch (status) { case '正常': return 'status-normal' @@ -460,6 +456,8 @@ const getStatusClass = (status: string) => { return 'status-idle' case '故障': return 'status-fault' + case '超容': + return 'status-fault' case '异常': return 'status-abnormal' case '维修中': diff --git a/public/map/components/ShipShorePower.vue b/public/map/components/ShipShorePower.vue index 6acf71a..9d767a3 100644 --- a/public/map/components/ShipShorePower.vue +++ b/public/map/components/ShipShorePower.vue @@ -83,6 +83,8 @@ + +

船舶代理信息

@@ -96,15 +98,18 @@ + +

航行计划信息

- - {{ selectedShip.applyInfo?.applyShorePower ? '是' : '否' }} + + {{ selectedShip.applyInfo?.departureHarborDistrict || '-' }} - - {{ findNameById(selectedShip.applyInfo?.arrivalBerth, berthIdAndNameList) }} + + {{ findNameById(selectedShip.applyInfo?.arrivalHarborDistrict, harborDistrictIdAndNameList) + }} @@ -116,125 +121,121 @@ - - {{ findNameById(selectedShip.applyInfo?.arrivalHarborDistrict, harborDistrictIdAndNameList) - }} + + {{ findNameById(selectedShip.applyInfo?.arrivalBerth, berthIdAndNameList) }} - - {{ selectedShip.applyInfo?.departureHarborDistrict || '-' }} + + {{ selectedShip.applyInfo?.plannedBerthTime ? new + Date(selectedShip.applyInfo.plannedBerthTime).toLocaleString() : '-' }} - + - - {{ selectedShip.applyInfo?.loadingCargoCategory || '-' }} + + {{ selectedShip.applyInfo?.voyage || '-' }} + + + +

货物信息

+ - - {{ selectedShip.applyInfo?.loadingCargoName || '-' }} + + {{ getOperationTypeLabel(selectedShip.applyInfo?.operationType, OPERATION_TYPE) || '-' }} - - {{ selectedShip.applyInfo?.loadingCargoTonnage || '-' }} + + {{ getOperationTypeLabel(selectedShip.applyInfo?.loadingCargoCategory, CARGO_CATEGORY) || '-' + }} - - {{ selectedShip.applyInfo?.operationType || '-' }} + + {{ selectedShip.applyInfo?.loadingCargoName || '-' }} - - {{ selectedShip.applyInfo?.plannedBerthTime ? new - Date(selectedShip.applyInfo.plannedBerthTime).toLocaleString() : '-' }} - - - - - {{ selectedShip.applyInfo?.plannedDepartureTime ? new - Date(selectedShip.applyInfo.plannedDepartureTime).toLocaleString() : '-' }} + + {{ selectedShip.applyInfo?.loadingCargoTonnage || '-' }} - - {{ getReasonText(selectedShip.applyInfo?.reason) }} + + {{ getOperationTypeLabel(selectedShip.applyInfo?.unloadingCargoCategory, CARGO_CATEGORY) || '-' + }} - + - - - {{ selectedShip.applyInfo?.status || '-' }} + + {{ selectedShip.applyInfo?.unloadingCargoTonnage || '-' }} + +

岸电申请状态

- - {{ selectedShip.applyInfo?.tradeType || '-' }} + + {{ selectedShip.applyInfo?.applyShorePower ? '是' : '否' }} - - - {{ selectedShip.applyInfo?.unloadingCargoCategory || '-' }} + + + {{ getOperationTypeLabel(selectedShip.applyInfo?.reason, UNUSED_SHORE_POWER_REASON) || '-' + }} - - {{ selectedShip.applyInfo?.unloadingCargoName || '-' }} + + {{ getOperationTypeLabel(selectedShip.applyInfo?.status, APPLY_STATUS) || '-' }} - - {{ selectedShip.applyInfo?.unloadingCargoTonnage || '-' }} + + {{ getOperationTypeLabel(selectedShip.applyInfo?.tradeType, TRADE_TYPE) || '-' }} + +

其他信息

- - - {{ selectedShip.applyInfo?.voyage || '-' }} - - {{ selectedShip.applyInfo?.createTime ? new @@ -247,6 +248,8 @@
+ +

用电时间信息

@@ -260,105 +263,108 @@ - + + +

电量读数信息

- + - - {{ formatDateTime(selectedShip.usageRecordInfo?.beginTime) }} + + {{ selectedShip.usageRecordInfo?.powerStartSystemReading !== undefined ? + selectedShip.usageRecordInfo?.powerStartSystemReading : '-' }} - + - - {{ formatDateTime(selectedShip.usageRecordInfo?.endTime) }} + + {{ selectedShip.usageRecordInfo?.powerEndSystemReading !== undefined ? + selectedShip.usageRecordInfo?.powerEndSystemReading : '-' }} - +

操作人员信息

+ - - {{ selectedShip.usageRecordInfo?.id || '-' }} + + {{ selectedShip.usageRecordInfo?.beginPowerSupplyOperator || '-' }} - - {{ selectedShip.usageRecordInfo?.overPowerSupplyOperator || '-' }} + + {{ selectedShip.usageRecordInfo?.beginPowerUsageOperator || '-' }} - --> + - + + +

状态信息

- - {{ selectedShip.usageRecordInfo?.powerEndSystemReading !== undefined ? - selectedShip.usageRecordInfo?.powerEndSystemReading : '-' }} - - - - - {{ selectedShip.usageRecordInfo?.powerStartManualReading !== undefined ? - selectedShip.usageRecordInfo?.powerStartManualReading : '-' }} + + {{ getOperationTypeLabel(selectedShip.usageRecordInfo?.status, WORK_STATUS) || '-' }} - + +

其他信息

+ -
+ + --> - - {{ selectedShip.usageRecordInfo?.status || '-' }} + + {{ formatDateTime(selectedShip.usageRecordInfo?.createTime) }} @@ -366,98 +372,102 @@
+ +

船舶识别信息

- - {{ selectedShip.shipBasicInfo?.callSign || '-' }} + + {{ selectedShip.shipBasicInfo?.name || '-' }} - - {{ formatDateTime(selectedShip.shipBasicInfo?.createTime) }} + + {{ selectedShip.shipBasicInfo?.nameEn || '-' }} - - {{ selectedShip.shipBasicInfo?.fullLoadDraft !== undefined ? - selectedShip.shipBasicInfo?.fullLoadDraft : '-' }} + + {{ selectedShip.shipBasicInfo?.callSign || '-' }} - - - - {{ selectedShip.shipBasicInfo?.inspectionNo || '-' }} + + + +

船舶技术参数

+ {{ selectedShip.shipBasicInfo?.length !== undefined ? selectedShip.shipBasicInfo?.length : '-' - }} + }} + + + + + {{ selectedShip.shipBasicInfo?.width !== undefined ? selectedShip.shipBasicInfo?.width : '-' + }} - - {{ selectedShip.shipBasicInfo?.name || '-' }} + + {{ selectedShip.shipBasicInfo?.tonnage !== undefined ? selectedShip.shipBasicInfo?.tonnage : '-' + }} - - {{ selectedShip.shipBasicInfo?.nameEn || '-' }} + + {{ selectedShip.shipBasicInfo?.fullLoadDraft !== undefined ? + selectedShip.shipBasicInfo?.fullLoadDraft : '-' }} - +

联系信息

+ {{ selectedShip.shipBasicInfo?.shorePowerContact || '-' }} - --> - - {{ selectedShip.shipBasicInfo?.shorePowerContactPhone || '-' }} + + + +

运营信息

+ - - {{ selectedShip.shipBasicInfo?.tonnage !== undefined ? selectedShip.shipBasicInfo?.tonnage : '-' - }} + + {{ selectedShip.shipBasicInfo?.shippingCompany || '-' }} + +

系统信息

- - {{ selectedShip.shipBasicInfo?.width !== undefined ? selectedShip.shipBasicInfo?.width : '-' - }} + + {{ formatDateTime(selectedShip.shipBasicInfo?.createTime) }}
-