style(registry-temp):display columns isPosition
This commit is contained in:
parent
a65e6645bc
commit
7a833e0ee5
1 changed files with 12 additions and 21 deletions
|
|
@ -58,15 +58,6 @@ const expanded = ref<string[]>([]);
|
|||
const filters = ref<string>(""); // ค้นหาตำแหน่ง
|
||||
const rowsPosition = ref<Position[]>([]); //รายการตำแหน่ง
|
||||
const columns = ref<QTableProps["columns"]>([
|
||||
{
|
||||
name: "isPosition",
|
||||
align: "left",
|
||||
label: "",
|
||||
sortable: true,
|
||||
field: "isPosition",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
{
|
||||
name: "no",
|
||||
align: "left",
|
||||
|
|
@ -203,7 +194,6 @@ const columnsPostition = ref<QTableProps["columns"]>([
|
|||
// },
|
||||
]);
|
||||
const visibleColumns = ref<string[]>([
|
||||
"isPosition",
|
||||
"no",
|
||||
"posMasterNo",
|
||||
"positionName",
|
||||
|
|
@ -661,6 +651,7 @@ onBeforeMount(async () => {
|
|||
>
|
||||
<template v-slot:header="props">
|
||||
<q-tr :props="props">
|
||||
<q-th auto-width />
|
||||
<q-th
|
||||
v-for="col in props.cols"
|
||||
:key="col.name"
|
||||
|
|
@ -674,6 +665,17 @@ onBeforeMount(async () => {
|
|||
</template>
|
||||
<template v-slot:body="props">
|
||||
<q-tr :props="props" class="cursor-pointer">
|
||||
<q-td auto-width>
|
||||
<div v-if="props.row.isPosition">
|
||||
<q-icon
|
||||
name="done"
|
||||
color="primary"
|
||||
size="24px"
|
||||
>
|
||||
<q-tooltip>ตรงตามตำแหน่ง </q-tooltip>
|
||||
</q-icon>
|
||||
</div>
|
||||
</q-td>
|
||||
<q-td
|
||||
v-for="col in props.cols"
|
||||
:key="col.name"
|
||||
|
|
@ -700,17 +702,6 @@ onBeforeMount(async () => {
|
|||
<q-tooltip>ผู้อำนวยการ/หัวหน้า</q-tooltip>
|
||||
</q-icon>
|
||||
</div>
|
||||
<div v-else-if="col.name === 'isPosition'">
|
||||
<div v-if="col.value">
|
||||
<q-icon
|
||||
name="done"
|
||||
color="primary"
|
||||
size="24px"
|
||||
>
|
||||
<q-tooltip>ตรงตามตำแหน่ง </q-tooltip>
|
||||
</q-icon>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-else>
|
||||
{{ col.value ? col.value : "-" }}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue