ประเมินผล
This commit is contained in:
parent
257b4a1424
commit
95714e5ac2
3 changed files with 76 additions and 17 deletions
|
|
@ -8,7 +8,7 @@ import { useCounterMixin } from "@/stores/mixin";
|
||||||
|
|
||||||
const mixins = useCounterMixin();
|
const mixins = useCounterMixin();
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const { date2Thai, success, messageError } = mixins;
|
const { date2Thai, success } = mixins;
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
evaluateId: {
|
evaluateId: {
|
||||||
|
|
@ -34,22 +34,27 @@ const items = ref<any>([
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
|
||||||
async function onClickfetchDocument(fileName: string) {
|
const statusFile = ref<boolean>(false);
|
||||||
|
|
||||||
|
async function onClickfetchDocument(fileName: string, type: string) {
|
||||||
props.evaluateId &&
|
props.evaluateId &&
|
||||||
(await http
|
(await http
|
||||||
.get(config.API.loadFileDocument("เล่ม 1", props.evaluateId, fileName))
|
.get(config.API.loadFileDocument("เล่ม 1", props.evaluateId, fileName))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
const downloadUrl = res.data.downloadUrl;
|
const downloadUrl = res.data.downloadUrl;
|
||||||
const textarea = document.createElement("textarea");
|
type === "COPPY" && coppyLink(downloadUrl);
|
||||||
textarea.value = downloadUrl;
|
statusFile.value = true;
|
||||||
document.body.appendChild(textarea);
|
|
||||||
textarea.select();
|
|
||||||
document.execCommand("copy");
|
|
||||||
success($q, "คัดลอกลิ้งค์สำเร็จ");
|
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {}));
|
||||||
messageError($q, err);
|
}
|
||||||
}));
|
|
||||||
|
async function coppyLink(link: string) {
|
||||||
|
const textarea = document.createElement("textarea");
|
||||||
|
textarea.value = link;
|
||||||
|
document.body.appendChild(textarea);
|
||||||
|
textarea.select();
|
||||||
|
document.execCommand("copy");
|
||||||
|
success($q, "คัดลอกลิ้งค์สำเร็จ");
|
||||||
}
|
}
|
||||||
|
|
||||||
async function fetchCheckDate() {
|
async function fetchCheckDate() {
|
||||||
|
|
@ -66,6 +71,7 @@ async function fetchCheckDate() {
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
fetchCheckDate();
|
fetchCheckDate();
|
||||||
|
await onClickfetchDocument("บันทึกแจ้งผลการประกาศคัดเลือก", "CHECK");
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
@ -111,7 +117,44 @@ onMounted(async () => {
|
||||||
round
|
round
|
||||||
color="primary"
|
color="primary"
|
||||||
icon="mdi-clipboard-outline"
|
icon="mdi-clipboard-outline"
|
||||||
@click="onClickfetchDocument(item.fileName)"
|
@click="onClickfetchDocument(item.fileName, 'COPPY')"
|
||||||
|
>
|
||||||
|
<q-tooltip>คัดลอกลิ้งค์</q-tooltip>
|
||||||
|
</q-btn>
|
||||||
|
</q-item-section>
|
||||||
|
</q-item>
|
||||||
|
</q-list>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</q-card>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-12" v-if="statusFile">
|
||||||
|
<q-card bordered style="border: 1px solid #d6dee1">
|
||||||
|
<div class="text-weight-medium bg-grey-1 q-py-sm q-px-md">
|
||||||
|
บันทึกแจ้งผลการประกาศคัดเลือก
|
||||||
|
</div>
|
||||||
|
<div class="col-12"><q-separator /></div>
|
||||||
|
<div class="row q-pa-md">
|
||||||
|
<div class="col-12">
|
||||||
|
<q-list>
|
||||||
|
<q-item>
|
||||||
|
<q-item-section>
|
||||||
|
<q-item-label>บันทึกแจ้งผลการประกาศคัดเลือก</q-item-label>
|
||||||
|
</q-item-section>
|
||||||
|
|
||||||
|
<q-item-section side top>
|
||||||
|
<q-btn
|
||||||
|
flat
|
||||||
|
round
|
||||||
|
color="primary"
|
||||||
|
icon="mdi-clipboard-outline"
|
||||||
|
@click="
|
||||||
|
onClickfetchDocument(
|
||||||
|
'บันทึกแจ้งผลการประกาศคัดเลือก',
|
||||||
|
'COPPY'
|
||||||
|
)
|
||||||
|
"
|
||||||
>
|
>
|
||||||
<q-tooltip>คัดลอกลิ้งค์</q-tooltip>
|
<q-tooltip>คัดลอกลิ้งค์</q-tooltip>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,27 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref } from "vue";
|
import { ref } from "vue";
|
||||||
|
import { useQuasar } from "quasar";
|
||||||
|
|
||||||
import { useEvaluateStore } from "@/modules/06_evaluate/store";
|
import { useEvaluateStore } from "@/modules/06_evaluate/store";
|
||||||
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
|
|
||||||
|
const mixin = useCounterMixin();
|
||||||
const stroe = useEvaluateStore();
|
const stroe = useEvaluateStore();
|
||||||
const link = ref<string>("https://bma-ehr-publish.frappet.synology.me/");
|
const $q = useQuasar();
|
||||||
|
|
||||||
|
|
||||||
|
const { success } = mixin;
|
||||||
|
const link = ref<string>(
|
||||||
|
`https://bma-ehr-publish.frappet.synology.me/${stroe.evaluateId}`
|
||||||
|
);
|
||||||
|
|
||||||
|
async function onClickCopyLink() {
|
||||||
|
const textarea = document.createElement("textarea");
|
||||||
|
textarea.value = link.value;
|
||||||
|
document.body.appendChild(textarea);
|
||||||
|
textarea.select();
|
||||||
|
document.execCommand("copy");
|
||||||
|
success($q, "คัดลอกลิ้งค์สำเร็จ");
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|
@ -20,9 +35,10 @@ const link = ref<string>("https://bma-ehr-publish.frappet.synology.me/");
|
||||||
<q-btn
|
<q-btn
|
||||||
class="q-mt-md"
|
class="q-mt-md"
|
||||||
outline
|
outline
|
||||||
icon-right="mdi-clipboard-outline"
|
icon="mdi-clipboard-outline"
|
||||||
label="คัดลอกลิ้งค์"
|
label="คัดลอกลิ้งค์"
|
||||||
color="primary"
|
color="primary"
|
||||||
|
@click="onClickCopyLink"
|
||||||
>
|
>
|
||||||
<q-tooltip> คัดลอกลิ้งค์ </q-tooltip></q-btn
|
<q-tooltip> คัดลอกลิ้งค์ </q-tooltip></q-btn
|
||||||
>
|
>
|
||||||
|
|
|
||||||
|
|
@ -61,8 +61,8 @@ async function fetchCheckStep(id: string) {
|
||||||
? 9
|
? 9
|
||||||
: 1;
|
: 1;
|
||||||
|
|
||||||
store.currentStep = 8;
|
store.currentStep = step;
|
||||||
store.step = 8;
|
store.step = step;
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
messageError($q, err);
|
messageError($q, err);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue