This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2024-07-17 15:47:47 +07:00
parent abddd04570
commit 2899af3c5d
2 changed files with 12 additions and 4 deletions

View file

@ -231,9 +231,9 @@ onMounted(async () => {
dense
outlined
hide-bottom-space
:model-value="!!year ? year + 543 : null"
:model-value="year === null ? 'ทั้งหมด' : Number(year) + 543"
:label="`${'ปีงบประมาณ'}`"
clearable
:clearable="year !== null"
@clear="clearYear"
>
<template v-slot:prepend>
@ -260,6 +260,7 @@ onMounted(async () => {
emit-value
map-options
@update:model-value="changRound"
:disable="year === null"
/>
<q-btn round color="primary" flat icon="add" @click="onDialog()">
<q-tooltip>เพมผประเม</q-tooltip>

View file

@ -1,5 +1,5 @@
<script setup lang="ts">
import { ref, reactive, onMounted, watch } from "vue";
import { ref, reactive, onMounted, watch, nextTick } from "vue";
import { useQuasar, type QTableProps } from "quasar";
import { useRouter } from "vue-router";
import http from "@/plugins/http";
@ -352,6 +352,13 @@ watch(
}
);
function test() {
nextTick(() => {
formQuery.page = 1;
fetchList();
});
}
onMounted(() => {
fetchList();
});
@ -371,7 +378,7 @@ onMounted(() => {
autoApply
year-picker
:enableTimePicker="false"
@update:model-value="(formQuery.page = 1), fetchList()"
@update:model-value="test"
>
<template #year="{ year }">{{ year + 543 }}</template>
<template #year-overlay-value="{ value }">{{