ทะเบียนประวัติ ปรับ table

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2024-02-14 14:07:55 +07:00
parent fb5017b0e2
commit 0a6feb0c9c
13 changed files with 143 additions and 116 deletions

View file

@ -44,7 +44,7 @@
{{ col.value ? "ใช่" : "ไม่ใช่" }}
</div>
<div v-else class="table_ellipsis">
{{ col.value }}
{{ col.value ? col.value : "-" }}
</div>
</q-td>
<q-td auto-width>
@ -392,7 +392,7 @@
dense
/>
<datepicker
v-else
v-else
menu-class-name="modalfix"
:readonly="!edit"
v-model="finishDate"
@ -644,13 +644,13 @@
v-else-if="col.name == 'finishDate' || col.name == 'createdAt'"
class="table_ellipsis"
>
{{ date2Thai(col.value) }}
{{ col.value ? date2Thai(col.value) : "-" }}
</div>
<div v-else-if="col.name == 'isEducation'" class="table_ellipsis">
{{ col.value ? "ใช่" : "ไม่ใช่" }}
</div>
<div v-else class="table_ellipsis">
{{ col.value }}
{{ col.value ? col.value : "-" }}
</div>
</q-td>
</q-tr>
@ -734,7 +734,7 @@ const durationYear = ref<number>(0);
const other = ref<string>();
const fundName = ref<string>();
const isDate = ref<string | null>("true");
const finishDate = ref<Date | null|string>(null);
const finishDate = ref<Date | null | string>(null);
const startDate = ref<Date | string | number>(new Date().getFullYear());
const startDate2 = ref<Date | string | null>(new Date());
const endDate = ref<number | string | Date>(new Date().getFullYear());
@ -1301,7 +1301,9 @@ const getData = () => {
inputEndDate.value = (Number(row.endDate) + 543).toLocaleString();
inputStartDate2.value = convertDateDisplay(row.startDate2);
inputEndDate2.value = convertDateDisplay(row.endDate2);
finishDateInput.value = row.finishDate ? convertDateDisplay(row.finishDate):'-';
finishDateInput.value = row.finishDate
? convertDateDisplay(row.finishDate)
: "-";
endDate2.value = row.endDate2;
id.value = row.id;
};
@ -1405,7 +1407,9 @@ const saveData = async () => {
other: other.value,
fundName: fundName.value,
isDate: isDate.value == "true" ? true : false,
finishDate: finishDate.value ? dateToISO(finishDate.value as Date) : null,
finishDate: finishDate.value
? dateToISO(finishDate.value as Date)
: null,
startDate:
isDate.value == "true"
? dateToISO(startDate2.value as Date)
@ -1536,7 +1540,7 @@ const clickClose = async () => {
* @param _props props ใน row เลอก
*/
const selectData = async (_props: DataProps) => {
console.log(_props)
console.log(_props);
modalEdit.value = true;
modal.value = true;
edit.value = false;
@ -1564,7 +1568,9 @@ const selectData = async (_props: DataProps) => {
inputEndDate.value = (Number(_props.row.endDate) + 543).toLocaleString();
inputStartDate2.value = convertDateDisplay(_props.row.startDate2);
inputEndDate2.value = convertDateDisplay(_props.row.endDate2);
finishDateInput.value = _props.row.finishDate ? convertDateDisplay(_props.row.finishDate):'-';
finishDateInput.value = _props.row.finishDate
? convertDateDisplay(_props.row.finishDate)
: "-";
await checkRowPage();
};
@ -1598,10 +1604,10 @@ const addData = () => {
inputEndDate.value = "";
finishDateInput.value = "";
dayChecked2.value = false
dayEndChecked2.value = false
dayChecked.value = false
dayEndChecked.value = false
dayChecked2.value = false;
dayEndChecked2.value = false;
dayChecked.value = false;
dayEndChecked.value = false;
};
/**
@ -1765,7 +1771,6 @@ watch(
} else {
finishDateInput.value = "";
}
}
}
);