ทะเบียนประวัต => เพิ่ม function convert status

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2024-05-14 19:45:02 +07:00
parent f5da1f8590
commit cb0f198afc

View file

@ -87,6 +87,7 @@ const columns = ref<QTableProps["columns"]>([
field: "isLive",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
format: (val) => convertisLive(val),
},
]);
const rows = ref<any[]>([]);
@ -262,6 +263,18 @@ const filterSelectorRelation = (val: any, update: Function) => {
});
};
function convertisLive(status: number) {
switch (status) {
case 1:
return "ถึงแก่กรรม";
case 2:
return "มีชีวิต";
default:
break;
}
}
onMounted(() => {
fetchData();
fetchDataRelationship();