list able ทะเบียนประวัติ
This commit is contained in:
parent
a4a59f8729
commit
fca496acd4
1 changed files with 21 additions and 3 deletions
|
|
@ -75,7 +75,7 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
{
|
{
|
||||||
name: "posPath",
|
name: "posPath",
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "สายงาน",
|
label: "ประเภทตำแหน่ง",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "posType",
|
field: "posType",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
|
|
@ -91,6 +91,11 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
field: "posLevel",
|
field: "posLevel",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
|
format(val, row) {
|
||||||
|
return row.posTypeShortName
|
||||||
|
? row.posTypeShortName +" "+ row.posLevel
|
||||||
|
: row.posLevel;
|
||||||
|
},
|
||||||
sort: (a: string, b: string) =>
|
sort: (a: string, b: string) =>
|
||||||
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||||
},
|
},
|
||||||
|
|
@ -284,7 +289,16 @@ watch(
|
||||||
<template v-slot:header="props">
|
<template v-slot:header="props">
|
||||||
<q-tr :props="props">
|
<q-tr :props="props">
|
||||||
<q-th v-for="col in props.cols" :key="col.name" :props="props">
|
<q-th v-for="col in props.cols" :key="col.name" :props="props">
|
||||||
<span class="text-weight-medium">{{ col.label }}</span>
|
<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>{{ col.label }}</span>
|
||||||
</q-th>
|
</q-th>
|
||||||
</q-tr>
|
</q-tr>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -398,7 +412,11 @@ watch(
|
||||||
<q-item-section>
|
<q-item-section>
|
||||||
<q-item-label caption class="text-black">
|
<q-item-label caption class="text-black">
|
||||||
{{
|
{{
|
||||||
props.row.posLevel ? props.row.posLevel : "-"
|
props.row.posLevel
|
||||||
|
? props.row.posTypeShortName
|
||||||
|
? `${props.row.posTypeShortName} ${props.row.posLevel}`
|
||||||
|
: props.row.posLevel
|
||||||
|
: "-"
|
||||||
}}</q-item-label
|
}}</q-item-label
|
||||||
>
|
>
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue