แก้วินัย

This commit is contained in:
setthawutttty 2024-01-05 15:24:22 +07:00
parent 386e1a9811
commit 6646f8f6f4
9 changed files with 98 additions and 62 deletions

View file

@ -298,17 +298,17 @@ watch(props.data, async () => {
);
const dataMap = props.data.directors.map((item: any) => ({
id: item.id ? item.id:'-',
directorId: item.directorId ? item.directorId:'-',
id: item.id ? item.id : "-",
directorId: item.directorId ? item.directorId : "-",
name: `${item.prefix}${item.firstName} ${item.lastName}`,
prefix: item.prefix ? item.prefix:'-',
firstName: item.firstName ? item.firstName:'-',
lastName: item.lastName ? item.lastName:'-',
position: item.position ? item.position:'-',
email: item.email ? item.email:'-',
phone: item.phone ? item.phone:'-',
commandNo: item.commandNo ? item.commandNo:'-',
duty: item.duty ? item.duty:'-',
prefix: item.prefix ? item.prefix : "-",
firstName: item.firstName ? item.firstName : "-",
lastName: item.lastName ? item.lastName : "-",
position: item.position ? item.position : "-",
email: item.email ? item.email : "-",
phone: item.phone ? item.phone : "-",
commandNo: item.commandNo ? item.commandNo : "-",
duty: item.duty ? item.duty : "-",
check: "props",
}));
@ -741,6 +741,7 @@ onMounted(async () => {
>
<template v-slot:header="props">
<q-tr :props="props">
<q-th auto-width></q-th>
<q-th
v-for="col in props.cols"
:key="col.name"
@ -756,6 +757,17 @@ onMounted(async () => {
</template>
<template v-slot:body="props">
<q-tr :props="props" class="cursor-pointer">
<td>
<router-link
target="_blank"
:to="`/registry/${props.row.personId}`"
><q-icon name="info" color="info" size="sm"
><q-tooltip
>อมลในทะเบยนประว</q-tooltip
>
</q-icon></router-link
>
</td>
<q-td
v-for="col in props.cols"
:key="col.name"
@ -764,23 +776,15 @@ onMounted(async () => {
<div v-if="col.name == 'no'">
{{ props.rowIndex + 1 }}
</div>
<div v-else-if="col.name == 'info'">
<router-link
target="_blank"
:to="`/registry/${props.row.personId}`"
><q-icon name="info" color="info" size="sm"
><q-tooltip
>อมลในทะเบยนประว</q-tooltip
>
</q-icon></router-link
>
</div>
<div
v-else-if="col.name === 'organization'"
class="table_ellipsis"
>
{{ props.row.organization }}
</div>
<div v-else-if="col.name === 'salary'">
{{ props.row.salary.toLocaleString() }}
</div>
<div v-else>
{{ col.value }}
</div>