This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2024-05-17 16:35:22 +07:00
parent 14df149dc0
commit c39723338a

View file

@ -93,45 +93,45 @@ const columns = ref<QTableProps["columns"]>([
style: "font-size: 14px",
format(val, row) {
return row.posTypeShortName
? row.posTypeShortName +" "+ row.posLevel
? row.posTypeShortName + " " + row.posLevel
: row.posLevel;
},
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "posOc",
name: "org",
align: "left",
label: "สังกัด",
sortable: true,
field: "posOc",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "year",
align: "left",
label: "ปีงบประมาณ",
sortable: true,
field: "year",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "salary",
align: "left",
label: "ค่าจ้าง",
sortable: true,
field: "salary",
field: "org",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
// {
// name: "year",
// align: "left",
// label: "",
// sortable: true,
// field: "year",
// headerStyle: "font-size: 14px",
// style: "font-size: 14px",
// sort: (a: string, b: string) =>
// a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
// },
// {
// name: "salary",
// align: "left",
// label: "",
// sortable: true,
// field: "salary",
// 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[]>([
@ -142,9 +142,9 @@ const visibleColumns = ref<string[]>([
"posPath",
"posType",
"posLevel",
"posOc",
"year",
"salary",
"org",
// "year",
// "salary",
]);
function updatePagePagination() {
@ -292,11 +292,9 @@ watch(
<span class="text-weight-medium" v-if="col.name === 'posLevel'">{{
empType === "officer" ? col.label : "ระดับชั้นงาน"
}}</span>
<span
class="text-weight-medium"
v-else-if="col.name === 'posPath'"
>{{ empType === "officer" ? col.label : "กลุ่มงาน" }}</span
>
<span class="text-weight-medium" v-else-if="col.name === 'posPath'">{{
empType === "officer" ? col.label : "กลุ่มงาน"
}}</span>
<span class="text-weight-medium" v-else>{{ col.label }}</span>
</q-th>
@ -310,7 +308,7 @@ watch(
(formFilter.page - 1) * formFilter.pageSize + props.rowIndex + 1
}}
</div>
<template v-else-if="col.name == 'fullName'">
<div v-else-if="col.name == 'fullName'">
<div class="row col-12 wrap items-center">
<q-item>
<q-item-section avatar>
@ -332,10 +330,10 @@ watch(
</q-item-section>
</q-item>
</div>
</template>
<template v-else>
</div>
<div v-else class="table_ellipsis">
{{ col.value ? col.value : "-" }}
</template>
</div>
</q-td>
</q-tr>
</template>