fix date
This commit is contained in:
parent
99dc42737d
commit
975113fe3f
1 changed files with 8 additions and 5 deletions
|
|
@ -256,7 +256,7 @@ const columns = computed<QTableProps["columns"]>(() => {
|
|||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
format(val, row) {
|
||||
return val ? date2Thai(row.dateAppointFull) : "";
|
||||
return val ? date2Thai(val) : "";
|
||||
},
|
||||
sort: (a: string, b: string) =>
|
||||
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||
|
|
@ -541,8 +541,7 @@ async function onSearch() {
|
|||
gender: item.gender ?? "-",
|
||||
status: item.relationship ?? "-",
|
||||
education: item.degree ?? "-",
|
||||
dateAppoint: item.dateAppoint ? date2Thai(item.dateAppoint) : "-",
|
||||
dateAppointFull: item.dateAppoint,
|
||||
dateAppoint: item.dateAppoint ?? "-",
|
||||
age: item.age ?? "-",
|
||||
currentPosition: item.currentPosition ?? "-",
|
||||
lengthPosition: item.lengthPosition ?? "-",
|
||||
|
|
@ -564,8 +563,12 @@ async function onSearch() {
|
|||
|
||||
function exportToExcel() {
|
||||
const newData = rows.value.map((e: any) => {
|
||||
const { dateAppointFull, profileId, empType, ...rest } = e;
|
||||
return { ...rest, dateRetireLaw: date2Thai(e.dateRetireLaw) };
|
||||
const { profileId, empType, ...rest } = e;
|
||||
return {
|
||||
...rest,
|
||||
dateAppoint: date2Thai(e.dateAppoint),
|
||||
dateRetireLaw: date2Thai(e.dateRetireLaw),
|
||||
};
|
||||
});
|
||||
|
||||
const headers = columns.value?.map((item: any) => item.label) || []; // หัวคอลัมน์ภาษาไทย
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue