fix columns

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2025-04-09 16:06:11 +07:00
parent b3a1e1b174
commit 4fecce4663
4 changed files with 52 additions and 14 deletions

View file

@ -61,6 +61,20 @@ const columns = ref<QTableProps["columns"]>([
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
{
name: "posNo",
align: "left",
label: "ตำแหน่งเลขที่",
sortable: false,
field: "posNo",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
format(val, row) {
return row.orgShortName && row.posMasterNo
? `${row.orgShortName} ${row.posMasterNo}`
: "-";
},
},
{
name: "position",
align: "left",

View file

@ -54,15 +54,7 @@ const baseColumns = ref<QTableProps["columns"]>([
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
{
name: "posNo",
align: "left",
label: "ตำแหน่งเลขที่",
sortable: false,
field: "posNo",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
{
name: "fullName",
align: "left",
@ -72,6 +64,15 @@ const baseColumns = ref<QTableProps["columns"]>([
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
{
name: "posNo",
align: "left",
label: "ตำแหน่งเลขที่",
sortable: false,
field: "posNo",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
{
name: "position",
align: "left",
@ -441,6 +442,7 @@ watch(
</q-menu>
</q-btn>
</q-td>
<q-td
v-for="col in props.cols"
:key="col.name"

View file

@ -72,14 +72,20 @@ const columns = ref<QTableProps["columns"]>([
style: "font-size: 14px",
},
{
name: "posType",
name: "posNo",
align: "left",
label: "กลุ่มงาน",
label: "ตำแหน่งเลขที่",
sortable: false,
field: "posType",
field: "posNo",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
format(val, row) {
return row.orgShortName && row.posMasterNo
? `${row.orgShortName} ${row.posMasterNo}`
: "-";
},
},
{
name: "position",
align: "left",
@ -89,6 +95,15 @@ const columns = ref<QTableProps["columns"]>([
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
{
name: "posType",
align: "left",
label: "กลุ่มงาน",
sortable: false,
field: "posType",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
{
name: "posLevel",
align: "left",
@ -107,7 +122,7 @@ const columns = ref<QTableProps["columns"]>([
headerStyle: "font-size: 14px",
style: "font-size: 14px",
format(val, row) {
return val ? "กลุ่ม" + val : "-";
return val ? `กลุ่ม${val}` : "-";
},
},
{
@ -186,6 +201,7 @@ const columns = ref<QTableProps["columns"]>([
const visibleColumns = ref<string[]>([
"no",
"fullName",
"posNo",
"posType",
"position",
"posLevel",
@ -512,7 +528,9 @@ watch(
dense
icon="info"
class="q-pa-none q-ml-xs"
color="info"
:color="
col.name == 'discipline' && props.row.isPunish ? 'red' : 'info'
"
size="12px"
@click.pervent="onClickViewInfo(col.name, props.row.profileId)"
>

View file

@ -196,6 +196,7 @@ async function getAgency(id: string) {
})
.catch((err) => {
messageError($q, err);
hideLoader();
}));
}
@ -227,6 +228,7 @@ async function getAgencyPosition(id: string) {
})
.catch((err) => {
messageError($q, err);
hideLoader();
});
} else agencyFilter.value = "";
}
@ -263,6 +265,7 @@ async function fetchSalalyPeriod(
})
.catch((err) => {
messageError($q, err);
hideLoader();
});
}
}
@ -380,6 +383,7 @@ async function fetchCheckisOfficer() {
})
.catch((e) => {
messageError($q, e);
hideLoader();
});
}