|
|
@ -103,7 +103,7 @@ import { |
|
|
ElTableColumn, |
|
|
ElTableColumn, |
|
|
ElPagination |
|
|
ElPagination |
|
|
} from 'element-plus' |
|
|
} from 'element-plus' |
|
|
import { CARGO_CATEGORY, FACILITY_TYPE, getOperationTypeLabel, OPERATION_TYPE } from './dictionaryTable'; |
|
|
import { CARGO_CATEGORY, FACILITY_TYPE, HARBOR_DISTRICT, getOperationTypeLabel, OPERATION_TYPE } from './dictionaryTable'; |
|
|
import { formatDuration, formatTimestamp, showStatus } from './utils'; |
|
|
import { formatDuration, formatTimestamp, showStatus } from './utils'; |
|
|
import { RealtimeDeviceData } from '@/types/shorepower'; |
|
|
import { RealtimeDeviceData } from '@/types/shorepower'; |
|
|
|
|
|
|
|
|
@ -173,14 +173,14 @@ const berthingColumns = ref([ |
|
|
{ prop: 'shipBasicInfo.tonnage', label: '最大载重', width: 150 }, |
|
|
{ prop: 'shipBasicInfo.tonnage', label: '最大载重', width: 150 }, |
|
|
{ prop: 'shipBasicInfo.voyage', label: '航线', width: 150 }, |
|
|
{ prop: 'shipBasicInfo.voyage', label: '航线', width: 150 }, |
|
|
{ prop: 'applyInfo.departureHarborDistrict', label: '起运港', width: 150 }, |
|
|
{ prop: 'applyInfo.departureHarborDistrict', label: '起运港', width: 150 }, |
|
|
{ prop: 'applyInfo.arrivalHarborDistrict', label: '到达港', width: 150 }, |
|
|
{ prop: 'arrivalHarborDistrict', label: '到达港', width: 150 }, |
|
|
{ prop: 'applyInfo.operationType', label: '靠泊类型', width: 150, formatter: (_row, _column, cellValue) => getOperationTypeLabel(cellValue, OPERATION_TYPE) }, |
|
|
{ prop: 'applyInfo.operationType', label: '靠泊类型', width: 150, formatter: (_row, _column, cellValue) => getOperationTypeLabel(cellValue, OPERATION_TYPE) }, |
|
|
{ prop: '', label: '作业内容', width: 180 }, |
|
|
{ prop: '', label: '作业内容', width: 180 }, |
|
|
{ |
|
|
/* { |
|
|
prop: 'applyInfo.loadingCargoCategory', label: '货物类型', width: 180, |
|
|
prop: 'applyInfo.loadingCargoCategory', label: '货物类型', width: 180, |
|
|
formatter: (row) => { |
|
|
formatter: (row) => { |
|
|
if (row.applyInfo.operationType === 1) { |
|
|
if (row.applyInfo.operationType === 1) { |
|
|
return row.applyInfo.loadingCargoCategory; |
|
|
return getOperationTypeLabel(row.applyInfo.loadingCargoCategory, CARGO_CATEGORY); |
|
|
} else if (row.applyInfo.operationType === 2) { |
|
|
} else if (row.applyInfo.operationType === 2) { |
|
|
return row.applyInfo.unloadingCargoCategory; |
|
|
return row.applyInfo.unloadingCargoCategory; |
|
|
} else if (row.applyInfo.operationType === 3) { |
|
|
} else if (row.applyInfo.operationType === 3) { |
|
|
@ -188,7 +188,7 @@ const berthingColumns = ref([ |
|
|
} |
|
|
} |
|
|
return ''; |
|
|
return ''; |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, */ |
|
|
|
|
|
|
|
|
{ |
|
|
{ |
|
|
prop: 'applyInfo.loadingCargoCategory', label: '货物名称', width: 180, |
|
|
prop: 'applyInfo.loadingCargoCategory', label: '货物名称', width: 180, |
|
|
@ -392,9 +392,10 @@ const handleGetShipHistortyList = async (param) => { |
|
|
const startIndex = (pageNo - 1) * pageSize; |
|
|
const startIndex = (pageNo - 1) * pageSize; |
|
|
const endIndex = startIndex + pageSize; |
|
|
const endIndex = startIndex + pageSize; |
|
|
const paginatedList = filteredList.slice(startIndex, endIndex); |
|
|
const paginatedList = filteredList.slice(startIndex, endIndex); |
|
|
|
|
|
const harborDistructList = await HARBOR_DISTRICT() |
|
|
const buildData = await Promise.all(paginatedList.map(async item => ({ |
|
|
const buildData = await Promise.all(paginatedList.map(async item => ({ |
|
|
...item, |
|
|
...item, |
|
|
|
|
|
arrivalHarborDistrict: getOperationTypeLabel(item.applyInfo.arrivalHarborDistrict, harborDistructList), |
|
|
}))) |
|
|
}))) |
|
|
berthingTableData.value = buildData |
|
|
berthingTableData.value = buildData |
|
|
berthingTotal.value = totalFiltered |
|
|
berthingTotal.value = totalFiltered |
|
|
|