ปรับหน้ารายการช่วยราชการ
This commit is contained in:
parent
7af4eb7a45
commit
e9e618ad41
3 changed files with 79 additions and 14 deletions
|
|
@ -31,6 +31,8 @@ const {
|
|||
hideLoader,
|
||||
success,
|
||||
dialogRemove,
|
||||
findOrgName,
|
||||
findPosMasterNo,
|
||||
} = mixin;
|
||||
|
||||
//ค้นหา คอลัมน์ คอลัมน์ที่แสดง
|
||||
|
|
@ -89,7 +91,7 @@ const columns = ref<QTableProps["columns"]>([
|
|||
{
|
||||
name: "positionLevel",
|
||||
align: "left",
|
||||
label: "ระดับ",
|
||||
label: "ประเภทตำแหน่ง",
|
||||
sortable: true,
|
||||
field: "positionLevel",
|
||||
headerStyle: "font-size: 14px",
|
||||
|
|
@ -196,9 +198,14 @@ const getData = async () => {
|
|||
rows.value = data.map((item: officerType) => ({
|
||||
id: item.id,
|
||||
fullname: `${item.prefix}${item.firstName} ${item.lastName}`,
|
||||
position: item.position,
|
||||
posNo: item.posNo,
|
||||
positionLevel: item.positionLevel,
|
||||
position: item.position != null ? item.position : "-",
|
||||
posNo: findPosMasterNo(item),
|
||||
positionLevel:
|
||||
item.posTypeName == null && item.posLevelName == null
|
||||
? "-"
|
||||
: (item.posTypeName != null ? item.posTypeName : "") +
|
||||
" " +
|
||||
(item.posLevelName != null ? ` (${item.posLevelName})` : ""),
|
||||
createdAt: date2Thai(item.createdAt),
|
||||
organization: item.organization,
|
||||
reason: item.reason,
|
||||
|
|
@ -209,13 +216,14 @@ const getData = async () => {
|
|||
positionTypeOld: item.positionTypeOld,
|
||||
positionLevelOld: item.positionLevelOld,
|
||||
positionNumberOld: item.positionNumberOld,
|
||||
organizationPositionOld: item.organizationPositionOld,
|
||||
organizationPositionOld: findOrgName(item),
|
||||
isActive: item.isActive,
|
||||
dateEnd: item.dateEnd == null ? "-" : date2Thai(new Date(item.dateEnd)),
|
||||
dateEnd: item.dateEnd == null ? "" : date2Thai(new Date(item.dateEnd)),
|
||||
dateStart:
|
||||
item.dateStart == null ? "-" : date2Thai(new Date(item.dateStart)),
|
||||
item.dateStart == null ? "" : date2Thai(new Date(item.dateStart)),
|
||||
}));
|
||||
})
|
||||
|
||||
.catch((e) => {})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
|
|
@ -243,6 +251,7 @@ onMounted(async () => {
|
|||
await getData();
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="toptitle text-dark col-12 row items-center">รายการช่วยราชการ</div>
|
||||
<q-card flat bordered class="col-12 q-mt-sm">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue