แก้ ฟิลเตอร์
This commit is contained in:
parent
2f1572bde0
commit
f8d5fe7ba0
7 changed files with 94 additions and 98 deletions
|
|
@ -80,6 +80,15 @@ const columns = ref<QTableProps["columns"]>([
|
|||
field: "fullname",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
format(val, row) {
|
||||
return `${
|
||||
row.firstName
|
||||
? `${row.prefix ?? ""}${row.firstName ?? ""} ${
|
||||
row.lastName ?? ""
|
||||
}`
|
||||
: "-"
|
||||
}`;
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "organizationName",
|
||||
|
|
@ -89,6 +98,9 @@ const columns = ref<QTableProps["columns"]>([
|
|||
field: "organizationName",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
format: (val, row) => {
|
||||
return `${row.root} (${row.rootShortName}) ${row.nodeName} (${row.nodeShortName}${row.posMasterNo})`;
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "dateOfBirth",
|
||||
|
|
@ -98,6 +110,9 @@ const columns = ref<QTableProps["columns"]>([
|
|||
field: "dateOfBirth",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
format(val, row) {
|
||||
return date2Thai(row.dateOfBirth);
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "typeCommand",
|
||||
|
|
@ -125,6 +140,9 @@ const columns = ref<QTableProps["columns"]>([
|
|||
field: "createdAt",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
format(val, row) {
|
||||
return date2Thai(row.createdAt);
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "status",
|
||||
|
|
@ -134,6 +152,9 @@ const columns = ref<QTableProps["columns"]>([
|
|||
field: "status",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
format(val, row) {
|
||||
return statusText(row.status);
|
||||
},
|
||||
},
|
||||
]);
|
||||
const visibleColumns = ref<string[]>([
|
||||
|
|
@ -345,7 +366,7 @@ onMounted(async () => {
|
|||
<d-table
|
||||
:columns="columns"
|
||||
:rows="rows"
|
||||
row-key="citizenId"
|
||||
row-key="id"
|
||||
:visible-columns="visibleColumns"
|
||||
v-model:pagination="pagination"
|
||||
>
|
||||
|
|
@ -487,27 +508,6 @@ onMounted(async () => {
|
|||
<div v-if="col.name == 'no'">
|
||||
{{ props.rowIndex + 1 }}
|
||||
</div>
|
||||
<div v-else-if="col.name == 'fullname'">
|
||||
{{
|
||||
props.row.firstName
|
||||
? `${props.row.prefix ?? ""}${
|
||||
props.row.firstName ?? ""
|
||||
} ${props.row.lastName ?? ""}`
|
||||
: "-"
|
||||
}}
|
||||
</div>
|
||||
|
||||
<div v-else-if="col.name == 'status'">
|
||||
{{ props.row.status ? statusText(props.row.status) : "-" }}
|
||||
</div>
|
||||
|
||||
<div v-else-if="col.name == 'dateOfBirth'">
|
||||
{{
|
||||
props.row.dateOfBirth
|
||||
? date2Thai(props.row.dateOfBirth)
|
||||
: "-"
|
||||
}}
|
||||
</div>
|
||||
|
||||
<div v-else-if="col.name == 'organizationName'">
|
||||
<div class="col-4">
|
||||
|
|
@ -532,12 +532,6 @@ onMounted(async () => {
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div v-else-if="col.name == 'createdAt'">
|
||||
{{
|
||||
props.row.createdAt ? date2Thai(props.row.createdAt) : "-"
|
||||
}}
|
||||
</div>
|
||||
|
||||
<div v-else>
|
||||
{{ col.value ? col.value : "-" }}
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue