filter รายชื่อออกคำสั่ง

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2023-08-08 09:28:24 +07:00
parent eaec5470c4
commit 85632ec16c

View file

@ -72,25 +72,27 @@ const fecthlistRecevice = async () => {
.then((res) => {
let response = res.data.result;
listRecevice.value = response;
console.log(response);
// console.log(response);
rows.value = response.map((e: any) => ({
personalId: e.id,
citizenId: e.citizenId,
fullname: e.firstname + " " + e.lastname,
organizationName:
e.organizationName +
" " +
e.organizationShortName +
" " +
e.positionNumber +
" " +
e.positionPath,
orgName: e.organizationName,
organizationShortName: e.organizationShortName,
e.organizationName +
" " +
e.organizationShortName +
" " +
e.positionNumber +
" " +
e.positionPath,
orgName: e.organizationName,
organizationShortName: e.organizationShortName,
positionNumber: e.positionNumber,
positionPath: e.positionPath,
birthday: date2Thai(e.dateOfBirth),
}));
// console.log(rows.value);
rows2.value = rows.value.filter((e: any) => e.orgName !== null);
})
.catch((e) => {
console.log(typeof e);
@ -116,6 +118,19 @@ const rows = ref<any>([
// birthday: dateText(new Date("1989-09-03")),
// },
]);
const rows2 = ref<any>([
{
personalId: "08db721d-add6-47b0-8a13-5f45d106e8d1",
citizenId: "1234444332222",
fullname: "นางสาวอย พชช",
organizationName: "นักจัดการงานทั่วไป",
orgName: "กลุ่มงานช่วยนักบริหาร",
organizationShortName: "สกจ.",
positionNumber: "กก. 1",
positionPath: "นักจัดการงานทั่วไป",
birthday: dateText(new Date("1989-09-03")),
},
]);
const columns = ref<QTableProps["columns"]>([
{
name: "no",
@ -219,7 +234,7 @@ const openModalTree = (id: string) => {
personalId.value = id;
console.log(personalId.value);
personal.value = listRecevice.value.filter((e) => e.id === id);
personal.value = listRecevice.value.filter((e: any) => e.id === id);
modalTree.value = true;
};