ปรับ dialog บรรจุ
This commit is contained in:
parent
508fb3b02b
commit
1881aa1b2f
23 changed files with 1064 additions and 1072 deletions
|
|
@ -35,6 +35,7 @@ const {
|
|||
hideLoader,
|
||||
success,
|
||||
dialogMessage,
|
||||
dialogRemove,
|
||||
} = mixin;
|
||||
|
||||
const modal = ref<boolean>(false);
|
||||
|
|
@ -62,7 +63,6 @@ const resetFilter = () => {
|
|||
filterRef.value.focus();
|
||||
};
|
||||
|
||||
|
||||
const rows = ref<relocationType[]>([]);
|
||||
const rows2 = ref<any[]>([]);
|
||||
const columns = ref<QTableProps["columns"]>([
|
||||
|
|
@ -122,7 +122,6 @@ const columns = ref<QTableProps["columns"]>([
|
|||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
|
||||
]);
|
||||
const columns2 = ref<QTableProps["columns"]>([
|
||||
{
|
||||
|
|
@ -214,7 +213,7 @@ const getData = async () => {
|
|||
dateOfBirth: date2Thai(item.dateOfBirth),
|
||||
gender: item.gender,
|
||||
status: item.status,
|
||||
statusText:statusText(item.status),
|
||||
statusText: statusText(item.status),
|
||||
recruitDate: item.recruitDate,
|
||||
positionNumber: item.positionNumber,
|
||||
positionPath: item.positionPath,
|
||||
|
|
@ -289,15 +288,13 @@ const deleteData = async (id: string) => {
|
|||
};
|
||||
|
||||
const clickDelete = async (name: string, id: string) => {
|
||||
dialogMessage(
|
||||
dialogRemove(
|
||||
$q,
|
||||
`ลบข้อมูลของ ${name}`,
|
||||
`ต้องการทำการลบข้อมูลนี้ใช่หรือไม่?`,
|
||||
"delete",
|
||||
"ยืนยัน",
|
||||
"red",
|
||||
async () => await deleteData(id),
|
||||
async () => await getData()
|
||||
async () => {
|
||||
await deleteData(id);
|
||||
await getData();
|
||||
},
|
||||
`ลบข้อมูลของ ${name}`
|
||||
);
|
||||
};
|
||||
const closeModalTree = async () => {
|
||||
|
|
@ -413,7 +410,9 @@ onMounted(async () => {
|
|||
<div class="col-4">
|
||||
<div class="text-weight-medium">
|
||||
{{
|
||||
props.row.organizationName !== null ? props.row.organizationName : "-"
|
||||
props.row.organizationName !== null
|
||||
? props.row.organizationName
|
||||
: "-"
|
||||
}}
|
||||
{{
|
||||
props.row.organizationShortName !== null
|
||||
|
|
@ -440,16 +439,14 @@ onMounted(async () => {
|
|||
<div class="text-weight-medium">-</div>
|
||||
</div>
|
||||
</div>
|
||||
</q-td>
|
||||
</q-td>
|
||||
<q-td
|
||||
key="dateOfBirth"
|
||||
:props="props"
|
||||
@click="openDetail(props.row.id)"
|
||||
>
|
||||
{{
|
||||
props.row.dateOfBirth !== null
|
||||
? props.row.dateOfBirth
|
||||
: "-"
|
||||
props.row.dateOfBirth !== null ? props.row.dateOfBirth : "-"
|
||||
}}
|
||||
</q-td>
|
||||
<q-td
|
||||
|
|
@ -595,7 +592,7 @@ onMounted(async () => {
|
|||
</div>
|
||||
|
||||
<d-table
|
||||
:columns="columns2"
|
||||
:columns="columns2"
|
||||
:rows="rows2"
|
||||
:filter="filterKeyword2"
|
||||
row-key="id"
|
||||
|
|
@ -610,7 +607,6 @@ onMounted(async () => {
|
|||
color="primary"
|
||||
dense
|
||||
v-model="scope.selected"
|
||||
|
||||
/>
|
||||
</template>
|
||||
<template v-slot:body="props">
|
||||
|
|
@ -621,7 +617,6 @@ onMounted(async () => {
|
|||
color="primary"
|
||||
dense
|
||||
v-model="props.selected"
|
||||
|
||||
/>
|
||||
</q-td>
|
||||
<q-td key="no" :props="props">
|
||||
|
|
@ -633,10 +628,7 @@ onMounted(async () => {
|
|||
<q-td key="fullname" :props="props">
|
||||
{{ props.row.fullname }}
|
||||
</q-td>
|
||||
<q-td
|
||||
key="organizationName"
|
||||
:props="props"
|
||||
>
|
||||
<q-td key="organizationName" :props="props">
|
||||
<div
|
||||
v-if="
|
||||
props.row.organizationName !== null ||
|
||||
|
|
@ -645,7 +637,11 @@ onMounted(async () => {
|
|||
>
|
||||
<div class="col-4">
|
||||
<div class="text-weight-medium">
|
||||
{{ props.row.organizationName !== null ? props.row.organizationName : "-" }}
|
||||
{{
|
||||
props.row.organizationName !== null
|
||||
? props.row.organizationName
|
||||
: "-"
|
||||
}}
|
||||
{{
|
||||
props.row.organizationShortName !== null
|
||||
? `(${props.row.organizationShortName})`
|
||||
|
|
@ -675,7 +671,6 @@ onMounted(async () => {
|
|||
<q-td key="dateOfBirth" :props="props">
|
||||
{{ props.row.dateOfBirth }}
|
||||
</q-td>
|
||||
|
||||
</q-tr>
|
||||
</template>
|
||||
</d-table>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue