ประเมินบุคคล ==> ปรับ load

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2024-08-26 16:37:16 +07:00
parent eac2fd5878
commit e09d0afe73
10 changed files with 223 additions and 180 deletions

View file

@ -44,6 +44,7 @@ const props = defineProps({
});
const id = ref<string>(route.params.id as string); // id
const isLoadView = ref<boolean>(false);
const modalHistory = ref<boolean>(false);
const formCommand = reactive<FormCommand>({
@ -72,6 +73,7 @@ function updateformCommand(val: any, ref: any) {
/** function เช็คขั้นตอน*/
async function fetchCheckStep() {
isLoadView.value = false;
showLoader();
await http
.get(config.API.evaluateGetStep(id.value))
@ -100,12 +102,15 @@ async function fetchCheckStep() {
store.currentStep = step;
store.step = step;
isLoadView.value = true;
})
.catch((e) => {
messageError($q, e);
})
.finally(() => {
hideLoader();
setTimeout(() => {
hideLoader();
}, 3000);
});
}
@ -132,7 +137,7 @@ onMounted(async () => {
: "ประเมินชำนาญการ"
}}
</div>
<q-space/>
<q-space />
<div>
<q-btn
flat
@ -156,7 +161,7 @@ onMounted(async () => {
</div>
</div>
<div class="col-xs-12 col-sm-9 q-pa-md">
<div class="col-xs-12 col-sm-9 q-pa-md" v-if="isLoadView">
<div class="col-12 row q-pt-md">
<div class="toptitle2">
{{ store.step }}.{{ store.titel[store.step - 1] }}
@ -176,15 +181,15 @@ onMounted(async () => {
"
>
<q-card flat bordered class="col-12">
<Step1 v-if="store.step === 1" :data="props.data" />
<Step2 v-if="store.step === 2" @update:form="updateformCommand" />
<Step3 v-if="store.step === 3" :step="store.step" />
<Step4 v-if="store.step === 4" />
<Step5 v-if="store.step === 5" />
<Step6 v-if="store.step === 6" />
<Step7 v-if="store.step === 7" />
<Step8 v-if="store.step === 8" />
<Step9 v-if="store.step === 9" />
<Step1 v-if="store.step === 1" :data="props.data" />
<Step2 v-if="store.step === 2" @update:form="updateformCommand" />
<Step3 v-if="store.step === 3" :step="store.step" />
<Step4 v-if="store.step === 4" />
<Step5 v-if="store.step === 5" />
<Step6 v-if="store.step === 6" />
<Step7 v-if="store.step === 7" />
<Step8 v-if="store.step === 8" />
<Step9 v-if="store.step === 9" />
</q-card>
</div>
<div