fix
This commit is contained in:
parent
fceabfa99c
commit
15fe87e0fc
2 changed files with 7 additions and 19 deletions
|
|
@ -29,6 +29,7 @@ const { messageError, success, dialogConfirm, showLoader, hideLoader } = mixin;
|
|||
const route = useRoute();
|
||||
|
||||
const assignId = ref<string>("baa3d9f6-9d21-4c58-85f2-114abf8de25c");
|
||||
const isData = defineModel<boolean>("isData", { required: true });
|
||||
const status = ref<boolean>(true);
|
||||
|
||||
const answer1 = ref<string>("");
|
||||
|
|
@ -39,11 +40,13 @@ const classBordered = ref<string>("");
|
|||
|
||||
/** ดึง ข้อมูลแบบสำรวจ */
|
||||
async function getSurveyData() {
|
||||
isData.value = true;
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.summaryDetail())
|
||||
.then(async (res: any) => {
|
||||
const data = await res.data.result.data;
|
||||
isData.value = true;
|
||||
assignId.value = res.data.result.assignId;
|
||||
store.assignId = res.data.result.assignId;
|
||||
if (data !== null) {
|
||||
|
|
@ -55,7 +58,8 @@ async function getSurveyData() {
|
|||
hideLoader();
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
// messageError($q, e);
|
||||
isData.value = false;
|
||||
hideLoader();
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,23 +13,7 @@ import ResultPage from "@/modules/15_probationReport/components/02_ResultPage.vu
|
|||
const store = useProbationReport();
|
||||
const router = useRouter();
|
||||
|
||||
const isData = ref<boolean>(false);
|
||||
|
||||
async function fetchCheckData() {
|
||||
isData.value = false;
|
||||
await http
|
||||
.get(config.API.summaryDetail())
|
||||
.then(() => {
|
||||
isData.value = true;
|
||||
})
|
||||
.catch((e) => {
|
||||
console.log("error", e);
|
||||
});
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
fetchCheckData();
|
||||
});
|
||||
const isData = ref<boolean>(true);
|
||||
</script>
|
||||
<template>
|
||||
<div class="col-12 row justify-center">
|
||||
|
|
@ -75,7 +59,7 @@ onMounted(() => {
|
|||
|
||||
<q-tab-panels v-model="store.tabMain" animated>
|
||||
<q-tab-panel name="SURVEY" class="q-pa-none">
|
||||
<SurveyPage />
|
||||
<SurveyPage v-model:is-data="isData" />
|
||||
</q-tab-panel>
|
||||
<q-tab-panel name="RESULT">
|
||||
<ResultPage />
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue