แก้ ฟิลเตอร์
This commit is contained in:
parent
2f1572bde0
commit
f8d5fe7ba0
7 changed files with 94 additions and 98 deletions
|
|
@ -15,7 +15,7 @@ import DialogCreateCommand from "@/modules/18_command/components/DialogCreateCom
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const storeCommand = useCommandMainStore();
|
const storeCommand = useCommandMainStore();
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { dialogConfirm, date2Thai,onSearchDataTable } = mixin;
|
const { dialogConfirm, date2Thai, onSearchDataTable } = mixin;
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
Modal: Boolean,
|
Modal: Boolean,
|
||||||
|
|
@ -31,9 +31,11 @@ const emit = defineEmits([
|
||||||
"update:selected",
|
"update:selected",
|
||||||
]);
|
]);
|
||||||
|
|
||||||
const filterKeyword2 = defineModel<string>('filterKeyword2',{required:true})
|
const filterKeyword2 = defineModel<string>("filterKeyword2", {
|
||||||
const rows = defineModel<PersonData[]>('rows',{required:true})
|
required: true,
|
||||||
const rowsData = defineModel<PersonData[]>('rowsData',{required:true})
|
});
|
||||||
|
const rows = defineModel<PersonData[]>("rows", { required: true });
|
||||||
|
const rowsData = defineModel<PersonData[]>("rowsData", { required: true });
|
||||||
|
|
||||||
const selected = ref<PersonData[]>([]); //ราชชื่อที่เลือกส่งไปออกคำสั่ง
|
const selected = ref<PersonData[]>([]); //ราชชื่อที่เลือกส่งไปออกคำสั่ง
|
||||||
const dataMapToSend = computed(() => {
|
const dataMapToSend = computed(() => {
|
||||||
|
|
@ -109,6 +111,9 @@ const columns2 = ref<QTableProps["columns"]>([
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
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" }),
|
||||||
|
format: (val, row) => {
|
||||||
|
return `${row.root} (${row.rootShortName}) ${row.nodeName} (${row.nodeShortName}${row.posMasterNo})`;
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "typeCommand",
|
name: "typeCommand",
|
||||||
|
|
@ -134,6 +139,9 @@ const columns2 = ref<QTableProps["columns"]>([
|
||||||
field: "dateOfBirth",
|
field: "dateOfBirth",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
|
format(val, row) {
|
||||||
|
return date2Thai(row.dateOfBirth);
|
||||||
|
},
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -110,6 +110,9 @@ const columns2 = ref<QTableProps["columns"]>([
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
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" }),
|
||||||
|
format: (val, row) => {
|
||||||
|
return `${row.root} (${row.rootShortName}) ${row.nodeName} (${row.nodeShortName}${row.posMasterNo})`;
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "typeCommand",
|
name: "typeCommand",
|
||||||
|
|
@ -137,6 +140,9 @@ const columns2 = ref<QTableProps["columns"]>([
|
||||||
field: "dateOfBirth",
|
field: "dateOfBirth",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
|
format(val, row) {
|
||||||
|
return date2Thai(row.dateOfBirth);
|
||||||
|
},
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
|
@ -330,8 +336,8 @@ watch(
|
||||||
v-for="col in props.cols"
|
v-for="col in props.cols"
|
||||||
:key="col.name"
|
:key="col.name"
|
||||||
:props="props"
|
:props="props"
|
||||||
@click="pageNext(props.row.id)"
|
|
||||||
>
|
>
|
||||||
|
<!-- @click="pageNext(props.row.id)" -->
|
||||||
<div v-if="col.name == 'no'">
|
<div v-if="col.name == 'no'">
|
||||||
{{ props.rowIndex + 1 }}
|
{{ props.rowIndex + 1 }}
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -341,13 +347,7 @@ watch(
|
||||||
props.row.status ? statusText(props.row.status) : "-"
|
props.row.status ? statusText(props.row.status) : "-"
|
||||||
}}
|
}}
|
||||||
</div>
|
</div>
|
||||||
<div v-else-if="col.name == 'dateOfBirth'">
|
|
||||||
{{
|
|
||||||
props.row.dateOfBirth
|
|
||||||
? date2Thai(props.row.dateOfBirth)
|
|
||||||
: "-"
|
|
||||||
}}
|
|
||||||
</div>
|
|
||||||
<div v-else-if="col.name == 'organizationName'">
|
<div v-else-if="col.name == 'organizationName'">
|
||||||
<div class="col-4">
|
<div class="col-4">
|
||||||
<div class="text-weight-medium">
|
<div class="text-weight-medium">
|
||||||
|
|
|
||||||
|
|
@ -1402,7 +1402,7 @@ onMounted(async () => {
|
||||||
</q-dialog>
|
</q-dialog>
|
||||||
|
|
||||||
<!-- dialog เพิ่มรายชื่อ -->
|
<!-- dialog เพิ่มรายชื่อ -->
|
||||||
<q-dialog v-model="modaladdlist">
|
<q-dialog v-model="modaladdlist" persistent>
|
||||||
<q-card style="width: 950px; max-width: 80vw">
|
<q-card style="width: 950px; max-width: 80vw">
|
||||||
<DialogHeader
|
<DialogHeader
|
||||||
tittle="ส่งรายชื่อไปยังหน่วยงาน"
|
tittle="ส่งรายชื่อไปยังหน่วยงาน"
|
||||||
|
|
|
||||||
|
|
@ -79,6 +79,9 @@ const columns2 = ref<QTableProps["columns"]>([
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
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" }),
|
||||||
|
format(val, row) {
|
||||||
|
return `${row.prefix ?? ""}${row.firstName ?? ""} ${row.lastName ?? ""}`;
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "organizationName",
|
name: "organizationName",
|
||||||
|
|
@ -90,6 +93,9 @@ const columns2 = ref<QTableProps["columns"]>([
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
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" }),
|
||||||
|
format: (val, row) => {
|
||||||
|
return `${row.root} (${row.rootShortName}) ${row.nodeName} (${row.nodeShortName}${row.posMasterNo})`;
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "dateOfBirth",
|
name: "dateOfBirth",
|
||||||
|
|
@ -101,7 +107,11 @@ const columns2 = ref<QTableProps["columns"]>([
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
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" }),
|
||||||
|
format(val, row) {
|
||||||
|
return date2Thai(row.dateOfBirth);
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
name: "createdAt",
|
name: "createdAt",
|
||||||
align: "left",
|
align: "left",
|
||||||
|
|
@ -113,6 +123,9 @@ const columns2 = ref<QTableProps["columns"]>([
|
||||||
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" }),
|
||||||
sortOrder: "da",
|
sortOrder: "da",
|
||||||
|
format(val, row) {
|
||||||
|
return date2Thai(row.createdAt);
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "status",
|
name: "status",
|
||||||
|
|
@ -124,6 +137,9 @@ const columns2 = ref<QTableProps["columns"]>([
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
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" }),
|
||||||
|
format(val, row) {
|
||||||
|
return statusText(row.status);
|
||||||
|
},
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
const visibleColumns2 = ref<string[]>([
|
const visibleColumns2 = ref<string[]>([
|
||||||
|
|
@ -182,7 +198,7 @@ watchEffect(() => {
|
||||||
<template>
|
<template>
|
||||||
<q-dialog v-model="props.modal" persistent>
|
<q-dialog v-model="props.modal" persistent>
|
||||||
<q-card style="width: 1200px; max-width: 80vw">
|
<q-card style="width: 1200px; max-width: 80vw">
|
||||||
<DialogHeader :tittle="'ส่งไปออกsคำสั่งรับโอน'" :close="clickClose" />
|
<DialogHeader :tittle="'ส่งไปออกคำสั่งรับโอน'" :close="clickClose" />
|
||||||
<q-separator />
|
<q-separator />
|
||||||
<q-card-section>
|
<q-card-section>
|
||||||
<div class="row col-12 q-col-gutter-sm">
|
<div class="row col-12 q-col-gutter-sm">
|
||||||
|
|
@ -261,29 +277,7 @@ watchEffect(() => {
|
||||||
<div v-if="col.name == 'no'">
|
<div v-if="col.name == 'no'">
|
||||||
{{ props.rowIndex + 1 }}
|
{{ props.rowIndex + 1 }}
|
||||||
</div>
|
</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 == 'dateOfBirth'">
|
|
||||||
{{
|
|
||||||
props.row.dateOfBirth
|
|
||||||
? date2Thai(props.row.dateOfBirth)
|
|
||||||
: "-"
|
|
||||||
}}
|
|
||||||
</div>
|
|
||||||
<div v-else-if="col.name == 'createdAt'">
|
|
||||||
{{
|
|
||||||
props.row.createdAt
|
|
||||||
? date2Thai(props.row.createdAt)
|
|
||||||
: "-"
|
|
||||||
}}
|
|
||||||
</div>
|
|
||||||
<div v-else-if="col.name == 'organizationName'">
|
<div v-else-if="col.name == 'organizationName'">
|
||||||
<div class="col-4">
|
<div class="col-4">
|
||||||
<div class="text-weight-medium">
|
<div class="text-weight-medium">
|
||||||
|
|
@ -308,11 +302,6 @@ watchEffect(() => {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-else-if="col.name == 'status'">
|
|
||||||
{{
|
|
||||||
props.row.status ? statusText(props.row.status) : "-"
|
|
||||||
}}
|
|
||||||
</div>
|
|
||||||
<div v-else>
|
<div v-else>
|
||||||
{{ col.value ? col.value : "-" }}
|
{{ col.value ? col.value : "-" }}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -113,6 +113,9 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
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" }),
|
||||||
|
format: (val, row) => {
|
||||||
|
return `${row.root} (${row.rootShortName}) ${row.nodeName} (${row.nodeShortName}${row.posMasterNo})`;
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "dateOfBirth",
|
name: "dateOfBirth",
|
||||||
|
|
@ -124,6 +127,9 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
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" }),
|
||||||
|
format(val, row) {
|
||||||
|
return date2Thai(row.dateOfBirth);
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "createdAt",
|
name: "createdAt",
|
||||||
|
|
@ -136,6 +142,9 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
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" }),
|
||||||
sortOrder: "da",
|
sortOrder: "da",
|
||||||
|
format(val, row) {
|
||||||
|
return date2Thai(row.createdAt);
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "status",
|
name: "status",
|
||||||
|
|
@ -147,6 +156,9 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
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" }),
|
||||||
|
format(val, row) {
|
||||||
|
return statusText(row.status);
|
||||||
|
},
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
|
@ -545,9 +557,6 @@ onMounted(async () => {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-else-if="col.name == 'status'">
|
|
||||||
{{ props.row.status ? statusText(props.row.status) : "-" }}
|
|
||||||
</div>
|
|
||||||
<div v-else>
|
<div v-else>
|
||||||
{{ col.value ? col.value : "-" }}
|
{{ col.value ? col.value : "-" }}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -80,6 +80,15 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
field: "fullname",
|
field: "fullname",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
|
format(val, row) {
|
||||||
|
return `${
|
||||||
|
row.firstName
|
||||||
|
? `${row.prefix ?? ""}${row.firstName ?? ""} ${
|
||||||
|
row.lastName ?? ""
|
||||||
|
}`
|
||||||
|
: "-"
|
||||||
|
}`;
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "organizationName",
|
name: "organizationName",
|
||||||
|
|
@ -89,6 +98,9 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
field: "organizationName",
|
field: "organizationName",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
|
format: (val, row) => {
|
||||||
|
return `${row.root} (${row.rootShortName}) ${row.nodeName} (${row.nodeShortName}${row.posMasterNo})`;
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "dateOfBirth",
|
name: "dateOfBirth",
|
||||||
|
|
@ -98,6 +110,9 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
field: "dateOfBirth",
|
field: "dateOfBirth",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
|
format(val, row) {
|
||||||
|
return date2Thai(row.dateOfBirth);
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "typeCommand",
|
name: "typeCommand",
|
||||||
|
|
@ -125,6 +140,9 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
field: "createdAt",
|
field: "createdAt",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
|
format(val, row) {
|
||||||
|
return date2Thai(row.createdAt);
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "status",
|
name: "status",
|
||||||
|
|
@ -134,6 +152,9 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
field: "status",
|
field: "status",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
|
format(val, row) {
|
||||||
|
return statusText(row.status);
|
||||||
|
},
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
const visibleColumns = ref<string[]>([
|
const visibleColumns = ref<string[]>([
|
||||||
|
|
@ -345,7 +366,7 @@ onMounted(async () => {
|
||||||
<d-table
|
<d-table
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
:rows="rows"
|
:rows="rows"
|
||||||
row-key="citizenId"
|
row-key="id"
|
||||||
:visible-columns="visibleColumns"
|
:visible-columns="visibleColumns"
|
||||||
v-model:pagination="pagination"
|
v-model:pagination="pagination"
|
||||||
>
|
>
|
||||||
|
|
@ -487,27 +508,6 @@ onMounted(async () => {
|
||||||
<div v-if="col.name == 'no'">
|
<div v-if="col.name == 'no'">
|
||||||
{{ props.rowIndex + 1 }}
|
{{ props.rowIndex + 1 }}
|
||||||
</div>
|
</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 v-else-if="col.name == 'organizationName'">
|
||||||
<div class="col-4">
|
<div class="col-4">
|
||||||
|
|
@ -532,12 +532,6 @@ onMounted(async () => {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-else-if="col.name == 'createdAt'">
|
|
||||||
{{
|
|
||||||
props.row.createdAt ? date2Thai(props.row.createdAt) : "-"
|
|
||||||
}}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div v-else>
|
<div v-else>
|
||||||
{{ col.value ? col.value : "-" }}
|
{{ col.value ? col.value : "-" }}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -95,6 +95,13 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
field: "fullname",
|
field: "fullname",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
|
format(val, row) {
|
||||||
|
return `${
|
||||||
|
row.firstName
|
||||||
|
? `${row.prefix ?? ""}${row.firstName ?? ""} ${row.lastName ?? ""}`
|
||||||
|
: "-"
|
||||||
|
}`;
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "organizationName",
|
name: "organizationName",
|
||||||
|
|
@ -104,6 +111,9 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
field: "organizationName",
|
field: "organizationName",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
|
format: (val, row) => {
|
||||||
|
return `${row.root} (${row.rootShortName}) ${row.nodeName} (${row.nodeShortName}${row.posMasterNo})`;
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "dateOfBirth",
|
name: "dateOfBirth",
|
||||||
|
|
@ -113,6 +123,9 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
field: "dateOfBirth",
|
field: "dateOfBirth",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
|
format(val, row) {
|
||||||
|
return date2Thai(row.dateOfBirth);
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "typeCommand",
|
name: "typeCommand",
|
||||||
|
|
@ -138,6 +151,9 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
field: "createdAt",
|
field: "createdAt",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
|
format(val, row) {
|
||||||
|
return date2Thai(row.createdAt);
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "status",
|
name: "status",
|
||||||
|
|
@ -147,6 +163,9 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
field: "status",
|
field: "status",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
|
format(val, row) {
|
||||||
|
return statusText(row.status);
|
||||||
|
},
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
|
@ -343,7 +362,7 @@ onMounted(async () => {
|
||||||
<d-table
|
<d-table
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
:rows="rows"
|
:rows="rows"
|
||||||
row-key="citizenId"
|
row-key="id"
|
||||||
:visible-columns="visibleColumns"
|
:visible-columns="visibleColumns"
|
||||||
v-model:pagination="pagination"
|
v-model:pagination="pagination"
|
||||||
>
|
>
|
||||||
|
|
@ -460,26 +479,7 @@ onMounted(async () => {
|
||||||
<div v-if="col.name == 'no'">
|
<div v-if="col.name == 'no'">
|
||||||
{{ props.rowIndex + 1 }}
|
{{ props.rowIndex + 1 }}
|
||||||
</div>
|
</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 v-else-if="col.name == 'organizationName'">
|
||||||
<div class="col-4">
|
<div class="col-4">
|
||||||
<div class="text-weight-medium">
|
<div class="text-weight-medium">
|
||||||
|
|
@ -502,11 +502,7 @@ onMounted(async () => {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-else-if="col.name == 'createdAt'">
|
|
||||||
{{
|
|
||||||
props.row.createdAt ? date2Thai(props.row.createdAt) : "-"
|
|
||||||
}}
|
|
||||||
</div>
|
|
||||||
<div v-else>
|
<div v-else>
|
||||||
{{ col.value ? col.value : "-" }}
|
{{ col.value ? col.value : "-" }}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue