ระบบพัฒนา

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2024-09-26 18:11:08 +07:00
parent 59d8de0234
commit 29007e97c9
3 changed files with 88 additions and 19 deletions

View file

@ -28,6 +28,24 @@ const listPerson = defineModel<ResRecord[]>("listPerson", { required: true });
const keyword = ref<string>("");
const rows = ref<ResRecord[]>([]);
const columns = ref<QTableProps["columns"]>([
{
name: "isDone",
align: "left",
label: "บันทึกที่ทะเบียนประวัติแล้ว",
sortable: true,
field: "isDone",
headerStyle: "font-size: 14px; width: 50px;",
style: "font-size: 14px",
},
{
name: "isDoneIDP",
align: "left",
label: "บันทึก IDP ที่ทะเบียนประวัติแล้ว",
sortable: true,
field: "isDoneIDP",
headerStyle: "font-size: 14px; width: 50px;",
style: "font-size: 14px",
},
{
name: "type",
align: "left",
@ -177,6 +195,8 @@ const columns = ref<QTableProps["columns"]>([
},
]);
const visibleColumns = ref<string[]>([
"isDone",
"isDoneIDP",
"type",
"idcard",
"fullName",
@ -268,26 +288,37 @@ onMounted(() => {
>
<template v-slot:header="props">
<q-tr :props="props">
<q-th auto-width />
<q-th v-for="col in props.cols" :key="col.name" :props="props">
<span class="text-weight-medium">{{ col.label }}</span>
</q-th>
</q-tr>
</template>
<template v-slot:body="props">
<q-tr :props="props" class="cursor-pointer">
<q-td>
<q-icon
v-if="props.row.isDone"
name="mdi-check"
color="green"
size="xs"
>
<q-tooltip>งไปบนทกททะเบยนประวแล</q-tooltip>
</q-icon>
</q-td>
<q-tr :props="props">
<q-td v-for="col in props.cols" :key="col.id">
<div v-if="col.name == 'fullName'">
<div v-if="col.name === 'isDone'" class="text-center">
<q-icon
v-if="props.row.isDone"
name="mdi-check"
color="green"
size="xs"
>
<q-tooltip>งไปบนทกททะเบยนประวแล</q-tooltip>
</q-icon>
</div>
<div v-else-if="col.name === 'isDoneIDP'" class="text-center">
<q-icon
v-if="props.row.isDoneIDP"
name="mdi-check"
color="blue"
size="xs"
>
<q-tooltip>งไปบนท IDP ทะเบยนประวแล</q-tooltip>
</q-icon>
</div>
<div v-else-if="col.name == 'fullName'">
{{ props.row.prefix ? props.row.prefix : ""
}}{{ props.row.firstName ? props.row.firstName : "" }}
{{ props.row.lastName ? props.row.lastName : "" }}