refector code
This commit is contained in:
parent
067ac5f173
commit
23d6801f80
9 changed files with 338 additions and 217 deletions
|
|
@ -2,17 +2,18 @@
|
|||
import { onMounted, ref } from 'vue'
|
||||
import { loadModules } from 'esri-loader'
|
||||
import axios from 'axios'
|
||||
|
||||
import type { LocationObject } from '@/interface/index/Main'
|
||||
|
||||
const emit = defineEmits(['update:location'])
|
||||
|
||||
function updateLocation(latitude: any, longitude: any, namePOI: string) {
|
||||
function updateLocation(latitude: number, longitude: number, namePOI: string) {
|
||||
// ส่ง event ไปยัง parent component เพื่ออัพเดทค่า props
|
||||
emit('update:location', latitude, longitude, namePOI)
|
||||
}
|
||||
|
||||
const currentPosition = ref<LocationObject>()
|
||||
const poiPlaceName = ref<string>('')
|
||||
const currentPosition = ref<LocationObject>() //ตำแหน่งปัจจุบัน
|
||||
const poiPlaceName = ref<string>('') // ชื่อพื้นที่ใกล้เคียง
|
||||
|
||||
// Replace ArcGIS api key
|
||||
const apiKey = ref<string>(
|
||||
|
|
@ -123,7 +124,7 @@ async function initializeMap() {
|
|||
}
|
||||
|
||||
onMounted(async () => {
|
||||
initializeMap()
|
||||
await initializeMap()
|
||||
})
|
||||
</script>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,24 +1,32 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, watch, onMounted } from 'vue'
|
||||
import { PropType } from 'vue'
|
||||
import { useQuasar } from 'quasar'
|
||||
import moment from 'moment'
|
||||
|
||||
import http from '@/plugins/http'
|
||||
import config from '@/app.config'
|
||||
import { useCounterMixin } from '@/stores/mixin'
|
||||
|
||||
import type { FormRef } from '@/interface/index/Main'
|
||||
import type { FormRef, DataCheckIn } from '@/interface/index/Main'
|
||||
import type { FormTimeStemp } from '@/interface/response/checkin'
|
||||
|
||||
// importStores
|
||||
import { useCounterMixin } from '@/stores/mixin'
|
||||
// importType
|
||||
|
||||
const $q = useQuasar()
|
||||
const mixin = useCounterMixin()
|
||||
const { date2Thai, success, dialogConfirm, showLoader, hideLoader } = mixin
|
||||
const {
|
||||
date2Thai,
|
||||
success,
|
||||
dialogConfirm,
|
||||
showLoader,
|
||||
hideLoader,
|
||||
messageError,
|
||||
} = useCounterMixin()
|
||||
|
||||
/**
|
||||
* props จาก components Popup
|
||||
*/
|
||||
const props = defineProps({
|
||||
dataById: {
|
||||
type: Object,
|
||||
type: Object as PropType<DataCheckIn>,
|
||||
default: null,
|
||||
},
|
||||
closePopup: {
|
||||
|
|
@ -34,16 +42,25 @@ const props = defineProps({
|
|||
},
|
||||
})
|
||||
|
||||
const dataByIdVal = ref<any>([])
|
||||
const date = ref<Date | string>(new Date())
|
||||
const checkboxIn = ref<boolean>(false)
|
||||
const checkboxOut = ref<boolean>(false)
|
||||
const reason = ref<string>('')
|
||||
const statusAction = ref<boolean>(false)
|
||||
|
||||
const dateNow = ref<Date>(new Date())
|
||||
const timeNoew = ref<string>('')
|
||||
const dataByIdVal = ref<DataCheckIn>() //ข้อมูลประวัติการลงเวลา
|
||||
const date = ref<Date | string>(new Date()) //วันที่ข้อแก้ไข
|
||||
const checkboxIn = ref<boolean>(false) //ขอแก้ไขเวลาเข้างาน
|
||||
const checkboxOut = ref<boolean>(false) //ขอแก้ไขเวลาออกงาน
|
||||
const reason = ref<string>('') // เหตุผล
|
||||
const statusAction = ref<boolean>(false) //สถานะ เพิ่ม,แก้ไข
|
||||
const dateNow = ref<Date>(new Date()) // วันปัจจุบัน
|
||||
const timeNoew = ref<string>('') //เวลาปัจจุบัน
|
||||
const dateRef = ref<object | null>(null) //ref วันที่ข้อแก้ไข
|
||||
const reasonRef = ref<object | null>(null) //ref เหตุผล
|
||||
const objectRef: FormRef = {
|
||||
date: dateRef,
|
||||
reason: reasonRef,
|
||||
}
|
||||
const checkstatusBox = ref<boolean>(false) //สถานะการเลือกเวลาเข้า,ออก
|
||||
|
||||
/**
|
||||
* ฟังก์ชันอัปเดตเวลา
|
||||
*/
|
||||
function updateClock() {
|
||||
const date = Date.now()
|
||||
const hh = moment(date).format('HH')
|
||||
|
|
@ -51,16 +68,9 @@ function updateClock() {
|
|||
timeNoew.value = `${hh}:${mm} น.`
|
||||
}
|
||||
|
||||
const dateRef = ref<object | null>(null)
|
||||
const reasonRef = ref<object | null>(null)
|
||||
|
||||
const objectRef: FormRef = {
|
||||
date: dateRef,
|
||||
reason: reasonRef,
|
||||
}
|
||||
const checkstatusBox = ref<boolean>(false)
|
||||
|
||||
/** function checkValidate*/
|
||||
/**
|
||||
* function checkValidate
|
||||
*/
|
||||
function onCkickSave() {
|
||||
const hasError = []
|
||||
for (const key in objectRef) {
|
||||
|
|
@ -81,12 +91,13 @@ function onCkickSave() {
|
|||
)
|
||||
) {
|
||||
dialogConfirm($q, async () => {
|
||||
const data: FormTimeStemp = await {
|
||||
const data: FormTimeStemp = {
|
||||
checkDate: date.value,
|
||||
checkInEdit: checkboxIn.value,
|
||||
checkOutEdit: checkboxOut.value,
|
||||
description: reason.value,
|
||||
}
|
||||
|
||||
createListTime(data)
|
||||
})
|
||||
}
|
||||
|
|
@ -100,20 +111,37 @@ async function createListTime(data: FormTimeStemp) {
|
|||
showLoader()
|
||||
await http
|
||||
.post(config.API.createTimeStamp(), data)
|
||||
.then(() => {
|
||||
success($q, 'บันทึกข้อมูลสำเร็จ')
|
||||
.then(async () => {
|
||||
// เรียก function fetch รายการประวัติการลงเวลา
|
||||
await props.fetchData()
|
||||
await success($q, 'บันทึกข้อมูลสำเร็จ')
|
||||
props.closePopup?.()
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err)
|
||||
messageError($q, err)
|
||||
})
|
||||
.finally(() => {
|
||||
props.closePopup?.()
|
||||
hideLoader()
|
||||
props.fetchData()
|
||||
})
|
||||
}
|
||||
|
||||
/** Hook */
|
||||
/**
|
||||
* watch การเปลี่ยนแปลงของ checkboxIn และ checkboxOut
|
||||
*/
|
||||
watch(
|
||||
[() => checkboxIn.value, () => checkboxOut.value],
|
||||
([newCheckboxIn, newCheckboxOut]) => {
|
||||
if (checkstatusBox.value) {
|
||||
if (newCheckboxIn || newCheckboxOut) {
|
||||
checkstatusBox.value = false
|
||||
}
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
/**
|
||||
* Hook
|
||||
*/
|
||||
onMounted(() => {
|
||||
updateClock()
|
||||
dataByIdVal.value = props.dataById
|
||||
|
|
@ -126,17 +154,6 @@ onMounted(() => {
|
|||
)
|
||||
}
|
||||
})
|
||||
|
||||
watch(
|
||||
[() => checkboxIn.value, () => checkboxOut.value],
|
||||
([newCheckboxIn, newCheckboxOut]) => {
|
||||
if (checkstatusBox.value) {
|
||||
if (newCheckboxIn || newCheckboxOut) {
|
||||
checkstatusBox.value = false
|
||||
}
|
||||
}
|
||||
}
|
||||
)
|
||||
</script>
|
||||
<template>
|
||||
<div class="col-12 row">
|
||||
|
|
@ -149,7 +166,7 @@ watch(
|
|||
<q-card-section class="bg-primary text-white q-pa-sm">
|
||||
<div class="text-center text-bold">เวลาปัจจุบัน</div>
|
||||
</q-card-section>
|
||||
<!-- <div class="q-pa-sm text-primary">เวลาปัจจุบัน</div> -->
|
||||
|
||||
<q-card-section class="text-center q-pa-sm">
|
||||
<div class="row q-gutter-md">
|
||||
<div class="col">{{ date2Thai(dateNow) }}</div>
|
||||
|
|
@ -187,7 +204,7 @@ watch(
|
|||
:label="`${'วันที่ขอแก้ไข'}`"
|
||||
format-header="YYYY-MM-DD"
|
||||
lazy-rules
|
||||
:rules="[(val) => !!val || 'กรุณาเลือกวันที่']"
|
||||
:rules="[(val:string) => !!val || 'กรุณาเลือกวันที่']"
|
||||
hide-bottom-space
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
|
|
@ -203,15 +220,6 @@ watch(
|
|||
</div>
|
||||
</q-card>
|
||||
|
||||
<!-- <q-card flat bordered class="q-pa-sm col-12 bg-grey-1 q-mt-sm" v-else>
|
||||
<div class="row q-gutter-md text-grey-5">
|
||||
<div class="col-1">
|
||||
<q-icon color="grey-5" name="calendar_today" />
|
||||
</div>
|
||||
<div class="col">{{ dataByIdVal.checkInDate }}</div>
|
||||
</div>
|
||||
</q-card> -->
|
||||
|
||||
<q-card
|
||||
flat
|
||||
bordered
|
||||
|
|
@ -259,7 +267,7 @@ watch(
|
|||
type="textarea"
|
||||
:rows="4"
|
||||
label-color="grey-5"
|
||||
:rules="[(val) => !!val || 'กรุณากรอกเหตุผล']"
|
||||
:rules="[(val:string) => !!val || 'กรุณากรอกเหตุผล']"
|
||||
lazy-rules
|
||||
hide-bottom-space
|
||||
class="custom-aqua-border"
|
||||
|
|
|
|||
|
|
@ -1,9 +1,15 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, watch } from 'vue'
|
||||
import { PropType } from 'vue'
|
||||
|
||||
import HeaderPopup from '@/components/HeaderPopup.vue'
|
||||
import FormTime from '@/components/FormTime.vue'
|
||||
import type { DataCheckIn } from '@/interface/index/Main'
|
||||
|
||||
import HeaderPopup from '@/components/HeaderPopup.vue' // หัว popup
|
||||
import FormTime from '@/components/FormTime.vue' //
|
||||
|
||||
/**
|
||||
* props จาก components TableHistory
|
||||
*/
|
||||
const props = defineProps({
|
||||
modal: {
|
||||
type: Boolean,
|
||||
|
|
@ -18,7 +24,7 @@ const props = defineProps({
|
|||
default: null,
|
||||
},
|
||||
dataById: {
|
||||
type: Object,
|
||||
type: Object as PropType<DataCheckIn>,
|
||||
default: null,
|
||||
},
|
||||
fetchData: {
|
||||
|
|
@ -27,15 +33,25 @@ const props = defineProps({
|
|||
},
|
||||
})
|
||||
|
||||
const data = ref<any>()
|
||||
const data = ref<DataCheckIn>() // ข้อมูลลงเวลา
|
||||
|
||||
/**
|
||||
* ปิด popup
|
||||
* เรียกใช้ฟังก์ชัน props.clickClose()
|
||||
*/
|
||||
function clickClosePopup() {
|
||||
props.clickClose()
|
||||
}
|
||||
|
||||
/**
|
||||
* watch การเปลี่ยนแปลงของ props.modal
|
||||
*/
|
||||
watch(
|
||||
() => props.modal,
|
||||
() => {
|
||||
data.value = props.modal ? props.dataById : null
|
||||
if (props.modal) {
|
||||
data.value = props?.dataById
|
||||
}
|
||||
}
|
||||
)
|
||||
</script>
|
||||
|
|
@ -43,10 +59,11 @@ watch(
|
|||
<q-dialog v-model="props.modal" persistent>
|
||||
<q-card :style="$q.screen.lt.sm ? 'width: 100%;' : 'width: 320px;'">
|
||||
<HeaderPopup :title="props.title" :clickClose="clickClosePopup" />
|
||||
|
||||
<FormTime
|
||||
:dataById="data"
|
||||
:closePopup="clickClosePopup"
|
||||
:fetchData="props.fetchData"
|
||||
:data-byId="data"
|
||||
:close-popup="clickClosePopup"
|
||||
:fetch-data="props.fetchData"
|
||||
/>
|
||||
</q-card>
|
||||
</q-dialog>
|
||||
|
|
|
|||
|
|
@ -1,18 +1,20 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, watch } from 'vue'
|
||||
import type { QTableProps } from 'quasar'
|
||||
|
||||
import { useCounterMixin } from '@/stores/mixin'
|
||||
|
||||
import { useChekIn } from '@/stores/chekin'
|
||||
import Popup from '@/components/PopUp.vue' // dialog เพิ่ม/ขอแก้ไขลงเวลากรณีพิเศษ
|
||||
|
||||
const mixin = useCounterMixin()
|
||||
const { date2Thai } = mixin
|
||||
import type { QTableProps } from 'quasar'
|
||||
import type { Pagination, DataCheckIn } from '@/interface/index/Main'
|
||||
|
||||
import Popup from '@/components/PopUp.vue' // dialog เพิ่ม/ขอแก้ไขลงเวลากรณีพิเศษ
|
||||
const { date2Thai } = useCounterMixin()
|
||||
|
||||
const stores = useChekIn()
|
||||
const selected = ref<string[]>([])
|
||||
|
||||
/** props from page */
|
||||
/**
|
||||
* props ข้อมูลจาก Components Page HistoryView
|
||||
*/
|
||||
const props = defineProps({
|
||||
paging: {
|
||||
type: Boolean,
|
||||
|
|
@ -48,13 +50,13 @@ const props = defineProps({
|
|||
default: () => console.log('not function'),
|
||||
},
|
||||
})
|
||||
const emit = defineEmits(['update:change-page'])
|
||||
|
||||
const keyword = ref<string>('')
|
||||
const tab = ref<string>(props.tab?.toString())
|
||||
const selected = ref<string[]>([])
|
||||
|
||||
const emit = defineEmits(['update:change-page'])
|
||||
|
||||
/** column history table */
|
||||
// column history table
|
||||
const columns = ref<QTableProps['columns']>(
|
||||
props.tab == 'history'
|
||||
? [
|
||||
|
|
@ -181,35 +183,23 @@ const visibleColumns = ref<string[]>([
|
|||
'checkOutStatus',
|
||||
])
|
||||
|
||||
const currentPage = ref<number>(1) //หน้าปัจจุบัน
|
||||
// Pagination - initial pagination
|
||||
const initialPagination = ref({
|
||||
const initialPagination = ref<Pagination>({
|
||||
sortBy: null,
|
||||
descending: false,
|
||||
page: 1,
|
||||
rowsPerPage: props.pageSize, // set ตาม page หลักส่งมา
|
||||
})
|
||||
|
||||
// Pagination - page & change page & get new data
|
||||
const currentPage = ref<number>(1)
|
||||
watch(
|
||||
[() => currentPage.value, () => initialPagination.value.rowsPerPage],
|
||||
() => {
|
||||
emit(
|
||||
'update:change-page',
|
||||
currentPage.value,
|
||||
initialPagination.value.rowsPerPage,
|
||||
keyword.value
|
||||
)
|
||||
}
|
||||
)
|
||||
|
||||
// Pagination - update rowsPerPage
|
||||
async function updatePagination(newPagination: any) {
|
||||
async function updatePagination(newPagination: Pagination) {
|
||||
initialPagination.value = newPagination
|
||||
currentPage.value = 1 // set current page เป็น 1 เสมอเมื่อเปลี่ยน per row
|
||||
}
|
||||
|
||||
async function filterFn() {
|
||||
// ส่งอีเวนต์ 'update:change-page' เมื่อหน้าเปลี่ยนแปลง
|
||||
emit(
|
||||
'update:change-page',
|
||||
1,
|
||||
|
|
@ -217,24 +207,34 @@ async function filterFn() {
|
|||
keyword.value
|
||||
)
|
||||
}
|
||||
const modalPopup = ref<boolean>(false) // popup แก้ไขลงเวลา
|
||||
const titlePopup = ref<string>('') // หัวขข้อ popup แก้ไขลงเวลา
|
||||
const dataRow = ref<DataCheckIn>() // ข้อมูลการลงเวลา
|
||||
|
||||
// popup
|
||||
const modalPopup = ref<boolean>(false)
|
||||
const titlePopup = ref<string>('')
|
||||
const dataRow = ref<any>()
|
||||
function openPopup(data: any) {
|
||||
console.log(data)
|
||||
|
||||
/**
|
||||
* เปิด popup แก้ไขลงเวลา
|
||||
* กำหนดค่า titlePopup เป็น แก้ไขลงเวลา
|
||||
* @param data ข้อมูลการลงเวลา
|
||||
*/
|
||||
function openPopup(data: DataCheckIn) {
|
||||
const title = 'แก้ไขลงเวลา'
|
||||
modalPopup.value = true
|
||||
titlePopup.value = title
|
||||
dataRow.value = data
|
||||
}
|
||||
|
||||
/**
|
||||
* ปิด popup แก้ไขลงเวลา
|
||||
*/
|
||||
function closePopup() {
|
||||
modalPopup.value = false
|
||||
}
|
||||
|
||||
/**
|
||||
* ฟังก์ชั่นสำหรับ convert ข้อความสถานะของการลงเวลา ปกติ, ขาดราชการ หรือสาย
|
||||
* @param status ฟิลด์สถานะ
|
||||
* @returns ข้อความสถานะ ปกติ, ขาดราชการ ,สาย หรือปฏิบัติงานไม่ครบตามกำหนดเวลา
|
||||
*/
|
||||
function classStatus(status: string) {
|
||||
switch (status) {
|
||||
case 'ขาดราชการ':
|
||||
|
|
@ -250,14 +250,35 @@ function classStatus(status: string) {
|
|||
}
|
||||
}
|
||||
|
||||
const modalReject = ref<boolean>(false)
|
||||
const reasonRejrct = ref<string>('')
|
||||
function onClickOpenPopupRejrct(data: any) {
|
||||
const modalReject = ref<boolean>(false) // modal popup หมายเหตุการไม่อนุมัติ
|
||||
const reasonRejrct = ref<string>('') // หมายเหตุการไม่อนุมัติ
|
||||
|
||||
/**
|
||||
* เปิด popup หมายเหตุการไม่อนุมัติ
|
||||
* @param data ข้อมูลการลงเวลา
|
||||
*/
|
||||
function onClickOpenPopupRejrct(data: DataCheckIn) {
|
||||
if (data.editStatus === 'ไม่อนุมัติ') {
|
||||
reasonRejrct.value = data.editReason
|
||||
modalReject.value = true
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* watch currentPage และ rowsPerPage
|
||||
*/
|
||||
watch(
|
||||
[() => currentPage.value, () => initialPagination.value.rowsPerPage],
|
||||
() => {
|
||||
// ส่งอีเวนต์ 'update:change-page' เมื่อหน้าเปลี่ยนแปลง
|
||||
emit(
|
||||
'update:change-page',
|
||||
currentPage.value,
|
||||
initialPagination.value.rowsPerPage,
|
||||
keyword.value
|
||||
)
|
||||
}
|
||||
)
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
|
@ -295,6 +316,7 @@ function onClickOpenPopupRejrct(data: any) {
|
|||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<q-table
|
||||
flat
|
||||
bordered
|
||||
|
|
@ -442,6 +464,7 @@ function onClickOpenPopupRejrct(data: any) {
|
|||
</template>
|
||||
</q-table>
|
||||
|
||||
<!-- หมายเหตุการไม่อนุมัติ -->
|
||||
<q-dialog v-model="modalReject">
|
||||
<q-card style="width: 35vw; max-width: 35vw">
|
||||
<q-toolbar>
|
||||
|
|
@ -466,12 +489,13 @@ function onClickOpenPopupRejrct(data: any) {
|
|||
</q-card>
|
||||
</q-dialog>
|
||||
|
||||
<!-- แก้ไขลงเวลา -->
|
||||
<Popup
|
||||
:fetchData="props.fetchData"
|
||||
:fetch-data="props.fetchData"
|
||||
:modal="modalPopup"
|
||||
:clickClose="closePopup"
|
||||
:click-close="closePopup"
|
||||
:title="titlePopup"
|
||||
:dataById="dataRow"
|
||||
:data-ById="dataRow"
|
||||
/>
|
||||
</template>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,18 +1,19 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, watch } from 'vue'
|
||||
|
||||
import { useCounterMixin } from '@/stores/mixin'
|
||||
import { useChekIn } from '@/stores/chekin'
|
||||
|
||||
import type { DataDateMonthObject } from '@/interface/index/Main'
|
||||
|
||||
import Popup from '@/components/PopUp.vue'
|
||||
// import HeaderPopup from "@/components/HeaderPopup.vue";
|
||||
// import FormTime from "@/components/FormTime.vue";
|
||||
import { useCounterMixin } from '@/stores/mixin'
|
||||
import { useChekIn } from '@/stores/chekin'
|
||||
|
||||
const mixin = useCounterMixin() //เรียกฟังก์ชันกลาง
|
||||
const stores = useChekIn()
|
||||
const { monthYear2Thai } = mixin
|
||||
const { monthYear2Thai } = useCounterMixin()
|
||||
|
||||
/**
|
||||
* props จาก components HistoryView
|
||||
*/
|
||||
const props = defineProps({
|
||||
fetchData: {
|
||||
type: Function,
|
||||
|
|
@ -25,37 +26,57 @@ const props = defineProps({
|
|||
})
|
||||
const emit = defineEmits(['update:year'])
|
||||
|
||||
const filterYear = ref<number>(stores.year)
|
||||
const titleName = ref<string>('เพิ่มรายการลงเวลากรณีพิเศษ')
|
||||
const filterYear = ref<number>(stores.year) //ปีงบประมาณ
|
||||
const titleName = ref<string>('เพิ่มรายการลงเวลากรณีพิเศษ') //หัว popup
|
||||
const dateMonth = ref<DataDateMonthObject>({
|
||||
month: new Date().getMonth(),
|
||||
year: stores.year,
|
||||
})
|
||||
const modalPopup = ref<boolean>(false) // modal เพิ่มรายการลงเวลากรณีพิเศษ
|
||||
|
||||
watch(
|
||||
() => stores.year,
|
||||
() => {
|
||||
dateMonth.value.year = stores.year
|
||||
}
|
||||
)
|
||||
|
||||
/**
|
||||
* ฟังก์ชันอัปเดทปีงบประมาณ
|
||||
* @param type ประเภท year,mount
|
||||
*/
|
||||
function filterYearFn(type: string) {
|
||||
const year = type === 'year' ? filterYear.value : dateMonth.value.year
|
||||
//ส่งค่า ปีงบประมาณ กลับ
|
||||
emit('update:year', year, dateMonth.value.month)
|
||||
}
|
||||
|
||||
const modalPopup = ref<boolean>(false)
|
||||
/**
|
||||
* เปิด popup เพิ่มรายการลงเวลากรณีพิเศษ
|
||||
*/
|
||||
function onClickopen() {
|
||||
modalPopup.value = true
|
||||
}
|
||||
|
||||
/**
|
||||
* ปิด popup เพิ่มรายการลงเวลากรณีพิเศษ
|
||||
*/
|
||||
function onClickClose() {
|
||||
modalPopup.value = false
|
||||
}
|
||||
|
||||
/**
|
||||
* แปลงวันเดือนปีเป็นเดือนและปีในภาษาไทย
|
||||
* @param val วันเดือนปี
|
||||
* @returns เดือนและปีในภาษาไทย
|
||||
*/
|
||||
const monthYearThai = (val: DataDateMonthObject) => {
|
||||
if (val == null) return ''
|
||||
else return monthYear2Thai(val.month, val.year)
|
||||
}
|
||||
|
||||
/**
|
||||
* watch การเปลี่ยนแปลงของ stores.year
|
||||
*/
|
||||
watch(
|
||||
() => stores.year,
|
||||
(newYear) => {
|
||||
dateMonth.value.year = newYear
|
||||
}
|
||||
)
|
||||
</script>
|
||||
<template>
|
||||
<div class="items-center col-12 row q-pb-sm">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue