ทะเบียนประวัต => เพิ่ม function convert status
This commit is contained in:
parent
f5da1f8590
commit
cb0f198afc
1 changed files with 13 additions and 0 deletions
|
|
@ -87,6 +87,7 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
field: "isLive",
|
field: "isLive",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
|
format: (val) => convertisLive(val),
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
const rows = ref<any[]>([]);
|
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(() => {
|
onMounted(() => {
|
||||||
fetchData();
|
fetchData();
|
||||||
fetchDataRelationship();
|
fetchDataRelationship();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue