ทะเบียนประวัติ == > TableSort

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2025-02-25 15:27:01 +07:00
parent e47184c4d4
commit fd120a918f
35 changed files with 800 additions and 373 deletions

View file

@ -105,6 +105,18 @@ const columns = ref<QTableProps["columns"]>([
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "lastUpdatedAt",
align: "left",
label: "วันที่แก้ไข",
sortable: true,
field: "lastUpdatedAt",
format: (v) => date2Thai(v, false, true),
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
]);
const visibleColumns = ref<string[]>([
"certificateType",
@ -112,10 +124,10 @@ const visibleColumns = ref<string[]>([
"certificateNo",
"issueDate",
"expireDate",
"lastUpdatedAt",
]);
const pagination = ref({
page: 1,
rowsPerPage: 10,
sortBy: "lastUpdatedAt",
});
//Table
@ -215,8 +227,7 @@ const historyVisibleColumns = ref<string[]>([
"lastUpdatedAt",
]);
const historyPagination = ref({
page: 1,
rowsPerPage: 10,
sortBy: "lastUpdatedAt",
});
const profesLicenseData = reactive<RequestItemsObject>({
@ -470,10 +481,8 @@ onMounted(() => {
row-key="name"
flat
bordered
:paging="true"
dense
v-model:pagination="pagination"
:rows-per-page-options="[20, 50, 100]"
class="custom-header-table"
:visible-columns="visibleColumns"
>

View file

@ -100,7 +100,9 @@ const columns = ref<QTableProps["columns"]>([
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
a
.toString()
.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "endDate",
@ -116,7 +118,9 @@ const columns = ref<QTableProps["columns"]>([
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
a
.toString()
.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "yearly",
@ -128,7 +132,9 @@ const columns = ref<QTableProps["columns"]>([
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
a
.toString()
.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "place",
@ -186,6 +192,18 @@ const columns = ref<QTableProps["columns"]>([
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "lastUpdatedAt",
align: "left",
label: "วันที่แก้ไข",
sortable: true,
field: "lastUpdatedAt",
format: (v) => date2Thai(v, false, true),
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
]);
const visibleColumns = ref<string[]>([
"name", //
@ -198,10 +216,10 @@ const visibleColumns = ref<string[]>([
"dateOrder", //
"startDate", //
"endDate", //
"lastUpdatedAt",
]);
const pagination = ref({
page: 1,
rowsPerPage: 10,
sortBy: "lastUpdatedAt",
});
//Table
@ -245,7 +263,9 @@ const historyColumns = ref<QTableProps["columns"]>([
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
a
.toString()
.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "endDate",
@ -261,7 +281,9 @@ const historyColumns = ref<QTableProps["columns"]>([
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
a
.toString()
.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "yearly",
@ -273,7 +295,9 @@ const historyColumns = ref<QTableProps["columns"]>([
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
a
.toString()
.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "place",
@ -370,8 +394,7 @@ const historyVisibleColumns = ref<string[]>([
"lastUpdatedAt", //
]);
const historyPagination = ref({
page: 1,
rowsPerPage: 10,
sortBy: "lastUpdatedAt",
});
/** ยืนยันการบันทึกข้อมูล*/
@ -630,9 +653,7 @@ onMounted(() => {
row-key="name"
flat
bordered
:paging="true"
dense
:rows-per-page-options="[20, 50, 100]"
v-model:pagination="pagination"
class="custom-header-table"
:visible-columns="visibleColumns"
@ -1163,9 +1184,7 @@ onMounted(() => {
flat
v-model:pagination="historyPagination"
bordered
:paging="true"
dense
:rows-per-page-options="[10, 25, 50, 100]"
class="custom-header-table"
:visible-columns="historyVisibleColumns"
>

View file

@ -13,7 +13,6 @@ import config from "@/app.config";
import type { QTableProps } from "quasar";
import type {
DataOption,
DataOptionInsignia,
InsigniaOps,
InsigniasType,
InsigniasTypeSub,
@ -76,19 +75,11 @@ const isEdit = ref<boolean>(false); //สถานะการแก้ไขข
const modal = ref<boolean>(false); // popup
const modeView = ref<string>("table"); // Table,Card
const modalHistory = ref<boolean>(false); // popup
//
const OpsFilter = ref<InsigniaOps>({
insigniaOptions: [],
});
const insigniaOptions = ref<InsigniasType[]>([]);
const insigniaOptionsMain = ref<InsigniasType[]>([]);
const insigniaOptionsName = ref<InsigniasTypeSub[]>([]);
const insigniaOptionsNameMain = ref<InsigniasTypeSub[]>([]);
//
const Ops = ref<InsigniaOps>({
insigniaOptions: [],
});
//Table Main
const rows = ref<ResponseObject[]>([]);
@ -104,6 +95,11 @@ const columns = ref<QTableProps["columns"]>([
headerStyle: "font-size: 14px",
style: "font-size: 14px",
format: (v) => v + 543,
sort: (a: string, b: string) =>
a.toString().localeCompare(b, undefined, {
numeric: true,
sensitivity: "base",
}),
},
{
name: "receiveDate",
@ -255,6 +251,18 @@ const columns = ref<QTableProps["columns"]>([
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "lastUpdatedAt",
align: "left",
label: "วันที่แก้ไข",
sortable: true,
field: "lastUpdatedAt",
format: (v) => date2Thai(v, false, true),
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
]);
const visibleColumns = ref<String[]>([
"insignia",
@ -271,10 +279,10 @@ const visibleColumns = ref<String[]>([
"refCommandNo",
"refCommandDate",
"note",
"lastUpdatedAt",
]);
const pagination = ref({
page: 1,
rowsPerPage: 10,
sortBy: "lastUpdatedAt",
});
//Table
@ -291,6 +299,10 @@ const columnsHistory = ref<QTableProps["columns"]>([
headerStyle: "font-size: 14px",
style: "font-size: 14px",
format: (v) => v + 543,
sort: (a: string, b: string) =>
a
.toString()
.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "receiveDate",
@ -473,8 +485,7 @@ const visibleColumnsHistory = ref<String[]>([
"lastUpdatedAt",
]);
const historyPagination = ref({
page: 1,
rowsPerPage: 10,
sortBy: "lastUpdatedAt",
});
/** fetch ข้อมูลรายการเครื่องราชอิสริยาภรณ์*/
@ -527,15 +538,14 @@ async function addEditData(editStatus: boolean = false) {
isUpload: !isEdit.value ? undefined : isUpload.value,
profileEmployeeId:
!editStatus && empType.value !== "" ? profileId.value : undefined,
profileId:
!editStatus && empType.value === "" ? profileId.value : undefined,
};
try {
await http[method](url, reqBody).then(async (res) => {
if ((fileUpload.value && id.value) || res.data.result) {
await uploadProfile(editStatus ? id.value:res.data.result);
await uploadProfile(editStatus ? id.value : res.data.result);
}
});
@ -568,7 +578,7 @@ async function uploadProfile(id: string) {
)
.then(async (res) => {
uploadUrl.value = res.data["เอกสารหลักฐาน"].uploadUrl;
await uploadFileURL(uploadUrl.value, fileUpload.value,id);
await uploadFileURL(uploadUrl.value, fileUpload.value, id);
})
.catch((err) => {
messageError($q, err);
@ -580,7 +590,7 @@ async function uploadProfile(id: string) {
* @param uploadUrl Path ปโหลดไฟล
* @param file ไฟลเอกสาร
*/
async function uploadFileURL(uploadUrl: string, file: any,id:string) {
async function uploadFileURL(uploadUrl: string, file: any, id: string) {
await axios
.put(uploadUrl, file, {
headers: {
@ -598,7 +608,7 @@ async function uploadFileURL(uploadUrl: string, file: any,id:string) {
});
}
async function isUploadFn(id:string) {
async function isUploadFn(id: string) {
await http
.patch(config.API.profileNewInsignById(id, empType.value), {
isUpload: fileUpload.value ? true : false,
@ -904,12 +914,10 @@ onMounted(async () => {
dense
bordered
:rows="rows"
:paging="true"
:columns="columns"
v-model:pagination="pagination"
:grid="modeView === 'card'"
:visible-columns="visibleColumns"
:rows-per-page-options="[20, 50, 100]"
:card-container-class="modeView === 'card' ? 'q-col-gutter-md' : ''"
>
<template v-slot:header="props">
@ -1517,8 +1525,6 @@ onMounted(async () => {
dense
:columns="columnsHistory"
:rows="rowsHistory"
:paging="true"
:rows-per-page-options="[10, 25, 50, 100]"
:visible-columns="visibleColumnsHistory"
>
>

View file

@ -93,6 +93,10 @@ const columns = ref<QTableProps["columns"]>([
},
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a
.toString()
.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "issuer",
@ -139,6 +143,18 @@ const columns = ref<QTableProps["columns"]>([
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "lastUpdatedAt",
align: "left",
label: "วันที่แก้ไข",
sortable: true,
field: "lastUpdatedAt",
format: (v) => date2Thai(v, false, true),
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
]);
const visibleColumns = ref<String[]>([
"issuer",
@ -146,10 +162,10 @@ const visibleColumns = ref<String[]>([
"issueDate",
"refCommandNo",
"refCommandDate",
"lastUpdatedAt",
]);
const pagination = ref({
page: 1,
rowsPerPage: 10,
sortBy: "lastUpdatedAt",
});
//Table
@ -170,6 +186,10 @@ const columnsHistory = ref<QTableProps["columns"]>([
},
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a
.toString()
.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "issuer",
@ -250,8 +270,7 @@ const visibleColumnsHistory = ref<String[]>([
"lastUpdatedAt",
]);
const historyPagination = ref({
page: 1,
rowsPerPage: 10,
sortBy: "lastUpdatedAt",
});
/** fetch รายการข้อมูลประกาศเกียรติคุณ*/
@ -301,7 +320,7 @@ async function addEditData(editStatus: boolean = false) {
try {
await http[method](url, reqBody).then(async (res) => {
if ((fileUpload.value && id.value) || res.data.result) {
await uploadProfile(editStatus ? id.value:res.data.result);
await uploadProfile(editStatus ? id.value : res.data.result);
}
});
await fetchData();
@ -338,7 +357,7 @@ async function uploadProfile(id: string) {
)
.then(async (res) => {
uploadUrl.value = res.data["เอกสารหลักฐาน"].uploadUrl;
await uploadFileURL(uploadUrl.value, fileUpload.value,id);
await uploadFileURL(uploadUrl.value, fileUpload.value, id);
})
.catch((err) => {
messageError($q, err);
@ -350,7 +369,7 @@ async function uploadProfile(id: string) {
* @param uploadUrl Path ปโหลดไฟล
* @param file ไฟลเอกสาร
*/
async function uploadFileURL(uploadUrl: string, file: any,id:string) {
async function uploadFileURL(uploadUrl: string, file: any, id: string) {
await axios
.put(uploadUrl, file, {
headers: {
@ -368,7 +387,7 @@ async function uploadFileURL(uploadUrl: string, file: any,id:string) {
});
}
async function isUploadFn(id:string) {
async function isUploadFn(id: string) {
await http
.patch(config.API.profileNewHonorById(id, empType.value), {
isUpload: fileUpload.value ? true : false,
@ -594,12 +613,10 @@ onMounted(() => {
dense
bordered
:rows="rows"
:paging="true"
:columns="columns"
:grid="modeView === 'card'"
v-model:pagination="pagination"
:visible-columns="visibleColumns"
:rows-per-page-options="[20, 50, 100]"
:card-container-class="modeView === 'card' ? 'q-col-gutter-md' : ''"
>
<template v-slot:header="props">
@ -1090,9 +1107,7 @@ onMounted(() => {
dense
:columns="columnsHistory"
:rows="rowsHistory"
:paging="true"
v-model:pagination="historyPagination"
:rows-per-page-options="[10, 25, 50, 100]"
:visible-columns="visibleColumnsHistory"
>
>

View file

@ -93,6 +93,10 @@ const columns = ref<QTableProps["columns"]>([
headerStyle: "font-size: 14px",
style: "font-size: 14px",
format: (v) => date2Thai(v),
sort: (a: string, b: string) =>
a
.toString()
.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "year",
@ -105,6 +109,10 @@ const columns = ref<QTableProps["columns"]>([
format: (v) => {
return `${v ? Number(v) + 543 : "-"}`;
},
sort: (a: string, b: string) =>
a
.toString()
.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "period",
@ -119,6 +127,10 @@ const columns = ref<QTableProps["columns"]>([
periodOp.value.find((item: DataOptions) => item.id === v)?.name || "-"
);
},
sort: (a: string, b: string) =>
a
.toString()
.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "point1Total",
@ -129,7 +141,9 @@ const columns = ref<QTableProps["columns"]>([
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
a
.toString()
.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "point1",
@ -140,7 +154,9 @@ const columns = ref<QTableProps["columns"]>([
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
a
.toString()
.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "point2Total",
@ -151,7 +167,9 @@ const columns = ref<QTableProps["columns"]>([
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
a
.toString()
.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "point2",
@ -162,7 +180,9 @@ const columns = ref<QTableProps["columns"]>([
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
a
.toString()
.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "pointSumTotal",
@ -173,7 +193,9 @@ const columns = ref<QTableProps["columns"]>([
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
a
.toString()
.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "pointSum",
@ -184,7 +206,9 @@ const columns = ref<QTableProps["columns"]>([
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
a
.toString()
.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "name",
@ -197,6 +221,20 @@ const columns = ref<QTableProps["columns"]>([
},
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a
.toString()
.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "lastUpdatedAt",
align: "left",
label: "วันที่แก้ไข",
sortable: true,
field: "lastUpdatedAt",
format: (v) => date2Thai(v, false, true),
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
@ -212,10 +250,10 @@ const visibleColumns = ref<String[]>([
"pointSum",
"name",
"date",
"lastUpdatedAt",
]);
const pagination = ref({
page: 1,
rowsPerPage: 10,
sortBy: "lastUpdatedAt",
});
//Table (Individual Development Plan)
@ -226,7 +264,7 @@ const columnsPlan = ref<QTableProps["columns"]>([
name: "no",
align: "left",
label: "ลำดับ",
sortable: true,
sortable: false,
field: "no",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
@ -236,7 +274,7 @@ const columnsPlan = ref<QTableProps["columns"]>([
name: "name",
align: "left",
label: "ความรู้/ทักษะ/สมรรถนะที่ต้องได้รับการพัฒนา",
sortable: true,
sortable: false,
field: "name",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
@ -247,7 +285,7 @@ const columnsPlan = ref<QTableProps["columns"]>([
name: "developmentProjects",
align: "left",
label: "วิธีการพัฒนา",
sortable: true,
sortable: false,
field: "developmentProjects",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
@ -258,7 +296,7 @@ const columnsPlan = ref<QTableProps["columns"]>([
name: "developmentTarget",
align: "left",
label: "เป้าหมายการพัฒนา",
sortable: true,
sortable: false,
field: "developmentTarget",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
@ -269,7 +307,7 @@ const columnsPlan = ref<QTableProps["columns"]>([
name: "developmentResults",
align: "left",
label: "วิธีการวัดผลการพัฒนา",
sortable: true,
sortable: false,
field: "developmentResults",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
@ -280,7 +318,7 @@ const columnsPlan = ref<QTableProps["columns"]>([
name: "developmentReport",
align: "left",
label: "รายงานผลการพัฒนา",
sortable: true,
sortable: false,
field: "developmentReport",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
@ -311,6 +349,10 @@ const columnsHistory = ref<QTableProps["columns"]>([
headerStyle: "font-size: 14px",
style: "font-size: 14px",
format: (v) => date2Thai(v),
sort: (a: string, b: string) =>
a
.toString()
.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "year",
@ -323,6 +365,10 @@ const columnsHistory = ref<QTableProps["columns"]>([
format: (v) => {
return `${v ? Number(v) + 543 : "-"}`;
},
sort: (a: string, b: string) =>
a
.toString()
.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "period",
@ -337,6 +383,10 @@ const columnsHistory = ref<QTableProps["columns"]>([
periodOp.value.find((item: DataOptions) => item.id === v)?.name || "-"
);
},
sort: (a: string, b: string) =>
a
.toString()
.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "point1Total",
@ -346,6 +396,10 @@ const columnsHistory = ref<QTableProps["columns"]>([
field: "point1Total",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a
.toString()
.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "point1",
@ -356,7 +410,9 @@ const columnsHistory = ref<QTableProps["columns"]>([
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
a
.toString()
.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "point2Total",
@ -367,7 +423,9 @@ const columnsHistory = ref<QTableProps["columns"]>([
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
a
.toString()
.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "point2",
@ -378,7 +436,9 @@ const columnsHistory = ref<QTableProps["columns"]>([
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
a
.toString()
.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "pointSumTotal",
@ -389,7 +449,9 @@ const columnsHistory = ref<QTableProps["columns"]>([
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
a
.toString()
.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "pointSum",
@ -400,7 +462,9 @@ const columnsHistory = ref<QTableProps["columns"]>([
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
a
.toString()
.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "name",
@ -414,7 +478,9 @@ const columnsHistory = ref<QTableProps["columns"]>([
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
a
.toString()
.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "lastUpdateFullName",
@ -455,8 +521,7 @@ const visibleColumnsHistory = ref<String[]>([
"lastUpdatedAt",
]);
const historyPagination = ref({
page: 1,
rowsPerPage: 10,
sortBy: "lastUpdatedAt",
});
/** fetch รายการข้อมูลผลการประเมินการปฏิบัติราชการ*/
@ -747,12 +812,10 @@ onMounted(async () => {
dense
bordered
:rows="rows"
:paging="true"
:columns="columns"
v-model:pagination="pagination"
:grid="modeView === 'card'"
:visible-columns="visibleColumns"
:rows-per-page-options="[20, 50, 100]"
:card-container-class="modeView === 'card' ? 'q-col-gutter-md' : ''"
>
<template v-slot:header="props">
@ -943,7 +1006,6 @@ onMounted(async () => {
:card-container-class="
modeViewPlan === 'card' ? 'q-col-gutter-md' : ''
"
:rows-per-page-options="[10, 25, 50, 100]"
@update:pagination="updatePaginationIdp"
>
<template v-slot:pagination="scope">
@ -1378,8 +1440,6 @@ onMounted(async () => {
:columns="columnsHistory"
v-model:pagination="historyPagination"
:rows="rowsHistory"
:paging="true"
:rows-per-page-options="[10, 25, 50, 100]"
:visible-columns="visibleColumnsHistory"
>
>