From 373d36199dcc8d06a590141bdd1e405bbceba118 Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Wed, 24 Jan 2024 11:18:58 +0700 Subject: [PATCH] no message --- src/views/HomeView.vue | 29 ++++++++++++----------------- 1 file changed, 12 insertions(+), 17 deletions(-) diff --git a/src/views/HomeView.vue b/src/views/HomeView.vue index 49d7d8e..900305a 100644 --- a/src/views/HomeView.vue +++ b/src/views/HomeView.vue @@ -18,12 +18,7 @@ import MapCheck from '@/components/AscGISMap.vue' import { useCounterMixin } from '@/stores/mixin' const mixin = useCounterMixin() -const { - date2Thai, - showLoader, - hideLoader, - messageError, -} = mixin +const { date2Thai, showLoader, hideLoader, messageError } = mixin const $q = useQuasar() const dialogTime = ref(false) @@ -47,7 +42,6 @@ async function fetchCheckTime() { }) } - /** ref อัพเดทเวลา*/ const dateNow = ref(new Date()) const Thai = ref(dateNow.value) @@ -189,12 +183,13 @@ const timeChickin = ref() async function confirm() { showLoader() const isLocation = workplace.value === 'in-place' //*true คือ ณ สถานที่ตั้ง, false คือ นอกสถานที่ตั้ง + const locationName = workplace.value === 'in-place' ? '' : useLocation.value const formdata = new FormData() formdata.append('lat', formLocation.lat.toString()) formdata.append('lon', formLocation.lng.toString()) formdata.append('POI', formLocation.POI) formdata.append('isLocation', isLocation.toString()) - formdata.append('locationName', useLocation.value) + formdata.append('locationName', locationName) formdata.append('img', fileImg.value) formdata.append('remark', remark.value) formdata.append('checkInId', checkInId.value) @@ -230,6 +225,10 @@ async function onClickConfirm() { dialogTime.value = false } +function updateWorkplace() { + useLocation.value = '' + model.value = '' +} // class const getClass = (val: boolean) => { @@ -370,6 +369,7 @@ onMounted(async () => { unchecked-icon="panorama_fish_eye" val="in-place" label="ในสถานที่" + @update:model-value="updateWorkplace" /> { unchecked-icon="panorama_fish_eye" val="off-site" label="นอกสถานที่" + @update:model-value="updateWorkplace" />
{
- +
{ >
หมายเหตุ
- +
- - +