หน้ารายการประเมิน
This commit is contained in:
parent
c2e0e5cb59
commit
d271ff96b8
16 changed files with 386 additions and 134 deletions
|
|
@ -1,5 +1,5 @@
|
|||
<script setup lang="ts">
|
||||
import { reactive, ref,onMounted } from "vue";
|
||||
import { reactive, ref, onMounted } from "vue";
|
||||
import { VuePDF, usePDF } from "@tato30/vue-pdf";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { useEvaluateDetailStore } from "@/modules/12_evaluatePersonal/store/EvaluateDetail";
|
||||
|
|
@ -30,14 +30,14 @@ function handleItemClick(itemNumber: number) {
|
|||
// evaluationFilebyId
|
||||
function getFile(volume: number) {
|
||||
const fileText = numToThai(volume);
|
||||
console.log(fileText)
|
||||
console.log(fileText);
|
||||
showLoader();
|
||||
http
|
||||
.get(config.API.evaluationFilebyId("เล่ม 2", id.value, fileText))
|
||||
.then((res) => {
|
||||
const link = res.data.downloadUrl;
|
||||
const type = res.data.fileType;
|
||||
console.log(link,type)
|
||||
console.log(link, type);
|
||||
getPDF(link, type);
|
||||
})
|
||||
.catch((e) => {
|
||||
|
|
@ -67,6 +67,7 @@ function getPDF(url: string, type: string) {
|
|||
const pdfData = await usePDF(`${objectUrl}`);
|
||||
showLoader();
|
||||
setTimeout(() => {
|
||||
store.urlDownloadFile = url;
|
||||
store.log = 1;
|
||||
store.pdfSrcStore = pdfData.pdf.value;
|
||||
store.numOfPagesStore = pdfData.pages.value;
|
||||
|
|
@ -90,9 +91,9 @@ function numToThai(val: number) {
|
|||
}
|
||||
}
|
||||
|
||||
onMounted(()=>{
|
||||
getFile(1)
|
||||
})
|
||||
onMounted(() => {
|
||||
getFile(1);
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue