You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
75 lines
2.1 KiB
75 lines
2.1 KiB
|
4 weeks ago
|
import { MapApi } from "@/api/shorepower/map";
|
||
|
|
|
||
|
|
export const getOperationTypeLabel = (value: string | number | undefined | null, options: { label: string, value: string | number }[]) => {
|
||
|
|
const item = options.find(opt => opt.value === value);
|
||
|
|
return item ? item.label : '';
|
||
|
|
};
|
||
|
|
|
||
|
|
// 装货/卸货
|
||
|
|
export const OPERATION_TYPE = [
|
||
|
|
{ label: '装货', value: 1 },
|
||
|
|
{ label: '卸货', value: 2 },
|
||
|
|
{ label: '卸货并装货', value: 2 },
|
||
|
|
]
|
||
|
|
|
||
|
|
// 获取类型
|
||
|
|
export const CARGO_CATEGORY = [
|
||
|
|
{ label: '空船', value: 0 },
|
||
|
|
{ label: '散货', value: 1 },
|
||
|
|
{ label: '集装箱', value: 2 },
|
||
|
|
{ label: '液体货物', value: 3 },
|
||
|
|
{ label: '件杂货', value: 4 },
|
||
|
|
{ label: '危险品', value: 5 },
|
||
|
|
{ label: '冷藏货物', value: 6 },
|
||
|
|
]
|
||
|
|
|
||
|
|
// 未使用岸电原因
|
||
|
|
export const UNUSED_SHORE_POWER_REASON = [
|
||
|
|
{ label: '岸电用电接口不匹配', value: 1 },
|
||
|
|
{ label: '岸电设施电压/频率不匹配', value: 2 },
|
||
|
|
{ label: '电缆长度不匹配', value: 3 },
|
||
|
|
{ label: '气象因素禁止作业', value: 4 },
|
||
|
|
{ label: '船电设施损坏', value: 5 },
|
||
|
|
{ label: '岸电设施维护中', value: 6 },
|
||
|
|
{ label: '无受电设备', value: 7 },
|
||
|
|
{ label: '拒绝使用岸电', value: 8 },
|
||
|
|
{ label: '其他', value: 9 },
|
||
|
|
]
|
||
|
|
|
||
|
|
// 港区map
|
||
|
|
export const HARBOR_DISTRICT = async () => {
|
||
|
|
const res = await MapApi.getHarborDistrictIdAndNameList()
|
||
|
|
return res.map(item => ({
|
||
|
|
...item,
|
||
|
|
label: item.name,
|
||
|
|
value: item.id
|
||
|
|
}))
|
||
|
|
}
|
||
|
|
|
||
|
|
// doc 码头map
|
||
|
|
export const DOCK_DISTRICT = async () => {
|
||
|
|
const res = await MapApi.getDockIdAndNameList()
|
||
|
|
return res.map(item => ({
|
||
|
|
...item,
|
||
|
|
label: item.name,
|
||
|
|
value: item.id
|
||
|
|
}))
|
||
|
|
}
|
||
|
|
|
||
|
|
// 岸电状态
|
||
|
|
export const SHORE_POWER_STATUS = [
|
||
|
|
{ label: '待靠泊', value: 1 },
|
||
|
|
{ label: '靠泊中', value: 2 },
|
||
|
|
{ label: '岸电接入中', value: 3 },
|
||
|
|
{ label: '用电中', value: 4 },
|
||
|
|
{ label: '岸电卸载中', value: 5 },
|
||
|
|
{ label: '岸电卸载完成', value: 6 },
|
||
|
|
{ label: '离泊', value: 7 },
|
||
|
|
{ label: '未使用岸电', value: 9 }
|
||
|
|
]
|
||
|
|
|
||
|
|
export const BERTH_TYPE = [
|
||
|
|
{ label: '左舷停舶', value: 'left' },
|
||
|
|
{ label: '右舷停舶', value: 'right' },
|
||
|
|
]
|