diff --git a/public/img/未连接.png b/public/img/未连接.png new file mode 100644 index 0000000..04a47de Binary files /dev/null and b/public/img/未连接.png differ diff --git a/public/map/components/PortOverview.vue b/public/map/components/PortOverview.vue index 65eda0d..94c9ea2 100644 --- a/public/map/components/PortOverview.vue +++ b/public/map/components/PortOverview.vue @@ -28,8 +28,8 @@ {{ 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) }}
-