fix: 修复更新状态的错误

main
sankeyangshu 2024-12-07 19:44:26 +08:00
parent b6b331bcc1
commit d2b8ecfffd
1 changed files with 14 additions and 0 deletions

View File

@ -106,9 +106,23 @@ const dialogProps = ref<DialogPropsType>({
row: {}, row: {},
}); });
//
const handleShipStatus = (row: BoatInfoType) => {
if (row.shipStatus === '有计划') {
dialogProps.value.row.shipStatus = 'PLAN';
} else if (row.shipStatus === '已靠港') {
dialogProps.value.row.shipStatus = 'REACH';
} else if (row.shipStatus === '作业中') {
dialogProps.value.row.shipStatus = 'WORK';
} else if (row.shipStatus === '已离港') {
dialogProps.value.row.shipStatus = 'LEAVE';
}
};
// dialog/ // dialog/
const isShowDialog = (params: DialogPropsType) => { const isShowDialog = (params: DialogPropsType) => {
dialogProps.value = params; dialogProps.value = params;
handleShipStatus(params.row as BoatInfoType);
dialogVisible.value = true; dialogVisible.value = true;
}; };