Merge branch 'NiceDev' into develop
This commit is contained in:
parent
37bef4e836
commit
0b8b5d497c
13 changed files with 168 additions and 357 deletions
|
|
@ -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();
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue