fix กรรมการและการประชุม

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2024-10-24 10:04:36 +07:00
parent c10b32e899
commit 95dcc45177
5 changed files with 39 additions and 50 deletions

View file

@ -54,6 +54,7 @@ function onSubmit(formData: FormData) {
});
}
</script>
<template>
<div class="col-xs-12 col-sm-12 col-md-12">
<div class="toptitle col-12 row items-center">

View file

@ -1,29 +1,21 @@
<script setup lang="ts">
import { ref, onMounted, reactive, computed } from "vue";
import { ref, onMounted, reactive, computed, onBeforeMount } from "vue";
import { useQuasar } from "quasar";
import { useRoute } from "vue-router";
import router from "@/router";
import http from "@/plugins/http";
import config from "@/app.config";
/**
* importTyep
*/
/** importTyep*/
import type { FormData } from "@/modules/12_evaluatePersonal/interface/index/meeting";
/**
* importComponents
*/
/** importComponents*/
import Form from "@/modules/12_evaluatePersonal/components/Meeting/Form.vue";
/**
* importStore
*/
/** importStore*/
import { useCounterMixin } from "@/stores/mixin";
/**
* use
*/
/** use*/
const route = useRoute();
const $q = useQuasar();
const {
@ -55,12 +47,13 @@ const data = reactive({
file: [],
});
/**
* function fetch อมลการประช
*/
function fetchData() {
const isLoad = ref<boolean>(false);
/** function fetch ข้อมูลการประชุม*/
async function fetchData() {
isLoad.value = false;
showLoader();
http
await http
.get(config.API.meetingById(personalId.value))
.then(async (res) => {
const dataApi = await res.data.result;
@ -74,11 +67,10 @@ function fetchData() {
})
.catch((e) => {
messageError($q, e);
hideLoader();
})
.finally(() => {
setTimeout(() => {
hideLoader();
}, 2000);
isLoad.value = true;
});
}
@ -115,10 +107,11 @@ function onSubmit(formData: FormData) {
});
}
onMounted(() => {
fetchData();
onMounted(async () => {
await fetchData();
});
</script>
<template>
<div class="col-xs-12 col-sm-12 col-md-11">
<div class="toptitle col-12 row items-center">
@ -135,6 +128,6 @@ onMounted(() => {
{{ title }}
</div>
<Form :on-submit="onSubmit" :data="data" />
<Form v-if="isLoad" :on-submit="onSubmit" :data="data" />
</div>
</template>