Merge branch 'NiceDev' into develop

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2024-01-08 14:19:08 +07:00
parent 37bef4e836
commit 0b8b5d497c
13 changed files with 168 additions and 357 deletions

View file

@ -1,33 +1,30 @@
<script setup lang="ts">
import { onMounted, ref } from "vue";
import { useRoute } from "vue-router";
import { useQuasar } from "quasar";
import http from "@/plugins/http";
import config from "@/app.config";
import { useQuasar } from "quasar";
import axios from "axios";
/** importStroe*/
import { useCounterMixin } from "@/stores/mixin";
import { useEvaluateStore } from "@/modules/06_evaluate/store";
const store = useEvaluateStore();
/** use*/
const mixin = useCounterMixin();
const $q = useQuasar();
const route = useRoute();
const evaluateId = ref<string>(route.params.id.toString());
const { showLoader, hideLoader, messageError } = mixin;
const props = defineProps({
evaluateId: {
type: String,
},
});
/** emit*/
const emit = defineEmits(["update:file"]);
/** id ประเมิน*/
const evaluateId = ref<string>(route.params.id.toString());
const selectedItem = ref(1);
/** function เรีกยเอกสาร*/
async function fetchDocument() {
showLoader();
evaluateId.value &&
@ -47,6 +44,10 @@ async function fetchDocument() {
}));
}
/**
* function ดาวนโหลดไฟล
* @param url งกดาวนโหลดไฟล
*/
async function downloadFile(url: string) {
await axios
.get(url, {
@ -69,6 +70,7 @@ async function downloadFile(url: string) {
});
}
/** HooK lifecycle*/
onMounted(async () => {
await fetchDocument();
});