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