ต่อ api รายละเอียดการประเมินของ
This commit is contained in:
parent
cab89c78f3
commit
4521f80918
17 changed files with 1226 additions and 191 deletions
|
|
@ -3,13 +3,16 @@ import { ref, reactive, onMounted } from "vue";
|
|||
import keycloak from "@/plugins/keycloak";
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
import { useRouter, useRoute } from "vue-router";
|
||||
import genReport from "@/plugins/genreport";
|
||||
import { useQuasar } from "quasar";
|
||||
|
||||
import type { FormCommand } from "@/modules/12_evaluatePersonal/interface/index/evalute";
|
||||
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
|
||||
const router = useRouter();
|
||||
const route = useRoute();
|
||||
const id = ref<string>(route.params.id as string);
|
||||
const $q = useQuasar();
|
||||
|
||||
const mixin = useCounterMixin();
|
||||
|
|
@ -96,7 +99,26 @@ async function onClickDowloadFile(
|
|||
await genReport(body, fileName);
|
||||
}
|
||||
|
||||
function getSigner() {
|
||||
showLoader();
|
||||
http
|
||||
.get(config.API.evaluationSigner(id.value, 1))
|
||||
.then((res) => {
|
||||
const data = res.data.result;
|
||||
formCommand.elementaryFullName = data.commanderFullname;
|
||||
formCommand.elementaryPosition = data.commanderPosition;
|
||||
formCommand.abovelevelFullname = data.commanderAboveFullname;
|
||||
formCommand.abovelevelPosition = data.commanderAbovePosition;
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
}
|
||||
onMounted(() => {
|
||||
getSigner();
|
||||
const ref = {
|
||||
elementaryFullNameRef: elementaryFullNameRef.value,
|
||||
elementaryPositonRef: elementaryPositonRef.value,
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ function getPDF(url: string,type:string) {
|
|||
messageError($q,e)
|
||||
})
|
||||
.finally(()=>{
|
||||
|
||||
store.log = 0
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -8,9 +8,17 @@ import keycloak from "@/plugins/keycloak";
|
|||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import genReport from "@/plugins/genreport";
|
||||
import { useQuasar } from "quasar";
|
||||
import PopupReason from "@/components/Dialogs/PopupReason.vue";
|
||||
const $q = useQuasar();
|
||||
const mixin = useCounterMixin();
|
||||
const { date2Thai, showLoader, hideLoader, messageError,success } = mixin;
|
||||
const {
|
||||
date2Thai,
|
||||
showLoader,
|
||||
hideLoader,
|
||||
messageError,
|
||||
success,
|
||||
dialogConfirm,
|
||||
} = mixin;
|
||||
|
||||
const router = useRouter();
|
||||
const route = useRoute();
|
||||
|
|
@ -18,7 +26,7 @@ const id = ref<string>(route.params.id as string);
|
|||
const fullName = ref<string>(
|
||||
keycloak.tokenParsed ? keycloak.tokenParsed.name!.toString() : ""
|
||||
);
|
||||
const mesasger = ref<string>("");
|
||||
const messenger = ref<string>("");
|
||||
const title = ref<string>("");
|
||||
const modalEvaluation = ref<boolean>(false);
|
||||
const fileEvaluationUpload = ref<any>();
|
||||
|
|
@ -125,33 +133,24 @@ function getPDF(url: string, type: string, fileName: string) {
|
|||
}
|
||||
|
||||
/** ส่งไปประกาศบนเว็บไซต์ */
|
||||
function onWebSite() {}
|
||||
|
||||
// function getFileList() {
|
||||
// showLoader();
|
||||
// http
|
||||
// .get(config.API.evaluationFilebyId("เล่ม 1", id.value))
|
||||
// .then((res) => {
|
||||
// const fileList = res.data;
|
||||
// files.forEach((file, index) => {
|
||||
// const apiFile = fileList[index];
|
||||
// file.pathName = apiFile.pathname;
|
||||
// });
|
||||
|
||||
// console.log(files);
|
||||
// })
|
||||
// .catch((e) => {})
|
||||
// .finally(() => {
|
||||
// hideLoader();
|
||||
// });
|
||||
// }
|
||||
function onWebSite() {
|
||||
showLoader();
|
||||
http
|
||||
.put(config.API.evaluationApproveDoc1(id.value))
|
||||
.then((res) => {})
|
||||
.catch((e) => {})
|
||||
.finally(() => {
|
||||
success($q, "ส่งไปประกาศบนเว็บไซต์ สำเร็จ");
|
||||
hideLoader();
|
||||
});
|
||||
}
|
||||
|
||||
function upLoadFile() {
|
||||
showLoader();
|
||||
http
|
||||
.post(config.API.evaluationFileListbyId("เล่ม 1", id.value), {
|
||||
fileList: {
|
||||
fileName: "4-แบบประเมินคุณลักษณะบุคคล",
|
||||
fileName: "10-ประกาศผลการคัดเลือกบุคคล (เอกสารหมายเลข 10)",
|
||||
metadata: {
|
||||
tag: "value",
|
||||
},
|
||||
|
|
@ -175,15 +174,39 @@ function upLoadFile() {
|
|||
}
|
||||
|
||||
function fileUpLoad(url: string) {
|
||||
axios.put(url, fileEvaluationUpload.value, {
|
||||
headers: { "Content-Type": fileEvaluationUpload.value?.type },
|
||||
onUploadProgress: (e) => console.log(e),
|
||||
}).catch((e)=>{
|
||||
messageError($q,e)
|
||||
}).finally(()=>{
|
||||
fileEvaluationUpload.value = null
|
||||
success($q, "อัปโหลดไฟล์สำเร็จ");
|
||||
})
|
||||
axios
|
||||
.put(url, fileEvaluationUpload.value, {
|
||||
headers: { "Content-Type": fileEvaluationUpload.value?.type },
|
||||
onUploadProgress: (e) => console.log(e),
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
fileEvaluationUpload.value = null;
|
||||
success($q, "อัปโหลดไฟล์สำเร็จ");
|
||||
});
|
||||
}
|
||||
|
||||
function sentMessenger() {
|
||||
dialogConfirm($q, () => {
|
||||
showLoader();
|
||||
http
|
||||
.put(config.API.evaluationSentToContact(id.value), {
|
||||
subject: title.value,
|
||||
body: messenger.value,
|
||||
})
|
||||
.then((res) => {
|
||||
console.log(res);
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
modalEvaluation.value = false;
|
||||
hideLoader();
|
||||
});
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
|
|
@ -338,7 +361,7 @@ function fileUpLoad(url: string) {
|
|||
</div>
|
||||
<div class="col-12">
|
||||
<q-input
|
||||
v-model="mesasger"
|
||||
v-model="messenger"
|
||||
label="ข้อความ"
|
||||
type="textarea"
|
||||
outlined
|
||||
|
|
@ -357,6 +380,7 @@ function fileUpLoad(url: string) {
|
|||
id="onSubmit"
|
||||
class="q-px-md q-py-xs"
|
||||
label="ส่งข้อความ"
|
||||
@click="sentMessenger"
|
||||
>
|
||||
</q-btn>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,21 +1,31 @@
|
|||
<script setup lang="ts">
|
||||
import { ref } from "vue";
|
||||
import { ref, onMounted } from "vue";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { useQuasar } from "quasar";
|
||||
import keycloak from "@/plugins/keycloak";
|
||||
|
||||
import axios from "axios";
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
import { useRouter, useRoute } from "vue-router";
|
||||
import genReport from "@/plugins/genreport";
|
||||
|
||||
const modalView = ref<boolean>(false);
|
||||
const fullName = ref<string>(
|
||||
keycloak.tokenParsed ? keycloak.tokenParsed.name!.toString() : ""
|
||||
);
|
||||
|
||||
const router = useRouter();
|
||||
const route = useRoute();
|
||||
|
||||
const numOfPages = ref<number>(0);
|
||||
const page = ref<number>(1);
|
||||
const $q = useQuasar();
|
||||
const mixin = useCounterMixin();
|
||||
const { date2Thai, showLoader, hideLoader, messageError, success } = mixin;
|
||||
const AnnouncementDate = ref<string | null>(date2Thai(new Date()));
|
||||
const AnnouncementStartDate = ref<string | null>();
|
||||
const AnnouncementEndDate = ref<string | null>();
|
||||
const id = ref<string>(route.params.id as string);
|
||||
|
||||
|
||||
const pdfSrc = ref<any>();
|
||||
const fileEvaluation5 = ref<any>();
|
||||
const status = ref<string>("ANNOUNCE_WEB");
|
||||
const website = ref<string>("https://bma-ehr.frappet.com/");
|
||||
|
|
@ -24,17 +34,17 @@ const files = [
|
|||
{
|
||||
id: "file1",
|
||||
fileName: "แบบสรุปข้อมูลของผู้ขอรับการคัดเลือก (เอกสารหมายเลข 9)",
|
||||
pathName: "12",
|
||||
pathName: "5-แบบสรุปข้อมูลของผู้ขอรับการคัดเลือก (เอกสารหมายเลข 9)",
|
||||
},
|
||||
{
|
||||
id: "file2",
|
||||
fileName: "ประกาศผลการคัดเลือกบุคคล (เอกสารหมายเลข 10)",
|
||||
pathName: "12",
|
||||
pathName: "10-ประกาศผลการคัดเลือกบุคคล (เอกสารหมายเลข 10)",
|
||||
},
|
||||
{
|
||||
id: "file3",
|
||||
fileName: "เอกสารแสดงผลงานที่จะส่งประเมิน (เอกสารหมายเลข 11)",
|
||||
pathName: "12",
|
||||
fileName: "ผลงานที่จะส่งประเมิน (เอกสารหมายเลข 11)",
|
||||
pathName: "6-ผลงานที่จะส่งประเมิน (เอกสารหมายเลข 11)",
|
||||
},
|
||||
];
|
||||
|
||||
|
|
@ -106,19 +116,113 @@ function fileUpLoad(url: string) {
|
|||
});
|
||||
}
|
||||
|
||||
function copyLink(link: string) {
|
||||
navigator.clipboard
|
||||
.writeText(link)
|
||||
.then(() => {
|
||||
console.log(`Copied link for file: ${link}`);
|
||||
function getFileName(fileName: string) {
|
||||
if (fileName && fileName.lastIndexOf(".") !== -1) {
|
||||
const index = fileName.indexOf("(");
|
||||
if (index !== -1) {
|
||||
return fileName.substring(0, index).trim();
|
||||
} else {
|
||||
// กรณีไม่มีวงเล็บ
|
||||
return fileName.split(".").slice(0, -1).join(".");
|
||||
}
|
||||
} else {
|
||||
// ในกรณีที่ไม่มีนามสกุล
|
||||
return fileName;
|
||||
}
|
||||
}
|
||||
|
||||
/** ไปหน้าต่อไปของรายงาน */
|
||||
function nextPage() {
|
||||
if (page.value < numOfPages.value) {
|
||||
page.value++;
|
||||
}
|
||||
}
|
||||
|
||||
/** กลับหน้าก่อนหน้าของรายงาน */
|
||||
function backPage() {
|
||||
if (page.value !== 1) {
|
||||
page.value--;
|
||||
}
|
||||
}
|
||||
|
||||
function copyLink(name: string) {
|
||||
console.log(name);
|
||||
showLoader();
|
||||
http
|
||||
.get(config.API.evaluationFilebyId("เล่ม 1", id.value, name))
|
||||
.then((res) => {
|
||||
console.log(res.data);
|
||||
const link = res.data.downloadUrl;
|
||||
navigator.clipboard.writeText(link);
|
||||
})
|
||||
.catch((e) => {})
|
||||
.finally(() => {
|
||||
success($q, "คัดลอก URL สำเร็จ");
|
||||
hideLoader();
|
||||
});
|
||||
}
|
||||
|
||||
function getDate() {
|
||||
showLoader();
|
||||
http
|
||||
.get(config.API.evaluationDateAnnounce(id.value))
|
||||
.then((res) => {
|
||||
const data = res.data.result;
|
||||
AnnouncementStartDate.value = date2Thai(data.dateStartAnnounce);
|
||||
const endDate = new Date(data.dateEndAnnounce);
|
||||
endDate.setDate(endDate.getDate() + 30);
|
||||
AnnouncementEndDate.value = date2Thai(endDate);
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
success($q, "คัดลอกสำเร็จ");
|
||||
hideLoader();
|
||||
});
|
||||
}
|
||||
// function linkCopy(link: string) {
|
||||
// navigator.clipboard
|
||||
// .writeText(link)
|
||||
// .then(() => {
|
||||
// console.log(`Copied link for file: ${link}`);
|
||||
// })
|
||||
// .catch((e) => {
|
||||
// messageError($q, e);
|
||||
// })
|
||||
// .finally(() => {
|
||||
// success($q, "คัดลอกสำเร็จ");
|
||||
// });
|
||||
// }
|
||||
|
||||
async function onClickDowloadFile(
|
||||
tp: string,
|
||||
templateName: string,
|
||||
fileName: string
|
||||
) {
|
||||
showLoader();
|
||||
const data = Object.assign(
|
||||
{ fullName: fullName.value },
|
||||
tp === "EV1_005" || tp === "EV1_007" ? { organizationName: "-" } : null,
|
||||
tp === "EV1_007" ? { positionName: "-" } : null,
|
||||
tp === "EV1_007" ? { positionLeaveName: "-" } : null
|
||||
);
|
||||
const body = {
|
||||
template: tp,
|
||||
reportName: templateName,
|
||||
data: data,
|
||||
};
|
||||
console.log(body);
|
||||
await genReport(body, fileName);
|
||||
}
|
||||
|
||||
function onClickViewPDF(file: any) {
|
||||
// pdfSrc.value = file.webkitRelativePath;
|
||||
modalView.value = true;
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
getDate();
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
|
@ -127,7 +231,8 @@ function copyLink(link: string) {
|
|||
<q-banner class="text-weight-bold text-red-14 bg-red-2 text-center">
|
||||
<div class="text-weight-bold">
|
||||
<q-icon name="info_outline" color="red-14" size="24px" />
|
||||
ประกาศเมื่อวันที่ {{ AnnouncementDate }}
|
||||
ประกาศเมื่อวันที่ {{ AnnouncementStartDate }} ถึงวันที่
|
||||
{{ AnnouncementEndDate }}
|
||||
</div>
|
||||
</q-banner>
|
||||
</div>
|
||||
|
|
@ -156,7 +261,7 @@ function copyLink(link: string) {
|
|||
round
|
||||
color="primary"
|
||||
icon="mdi-clipboard-outline"
|
||||
@click="copyLink(file.fileName)"
|
||||
@click="copyLink(file.pathName)"
|
||||
>
|
||||
<q-tooltip>คัดลอกลิ้งค์</q-tooltip>
|
||||
</q-btn>
|
||||
|
|
@ -168,6 +273,80 @@ function copyLink(link: string) {
|
|||
</q-card>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<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">
|
||||
<div class="col-12 q-pa-sm">
|
||||
<div class="row q-col-gutter-md col-12">
|
||||
<!-- <div class="col-xs-12 col-sm-6 row">
|
||||
<q-btn
|
||||
class="col-12"
|
||||
outline
|
||||
icon="download"
|
||||
label="ดาวน์โหลดต้นแบบ"
|
||||
color="primary"
|
||||
@click="
|
||||
onClickDowloadFile(
|
||||
'EV1_005',
|
||||
'template-1',
|
||||
'แบบพิจารณาคุณสมบัติบุคคล'
|
||||
)
|
||||
"
|
||||
>
|
||||
<q-tooltip> ดาวน์โหลดต้นแบบ </q-tooltip></q-btn
|
||||
>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-6 row">
|
||||
<q-btn
|
||||
v-if="fileEvaluation5"
|
||||
class="col-12"
|
||||
outline
|
||||
icon="visibility"
|
||||
label="ดูไฟล์เอกสาร"
|
||||
color="primary"
|
||||
@click="onClickViewPDF(fileEvaluation5)"
|
||||
>
|
||||
<q-tooltip> ดูไฟล์เอกสาร </q-tooltip></q-btn
|
||||
>
|
||||
</div> -->
|
||||
<div class="col-xs-12 col-sm-10 row">
|
||||
<q-file
|
||||
ref="fileEvaluation1Ref"
|
||||
v-model="fileEvaluation5"
|
||||
class="col-12"
|
||||
outlined
|
||||
dense
|
||||
label="อัปโหลดไฟล์"
|
||||
hide-bottom-space
|
||||
lazy-rules
|
||||
accept=".pdf"
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<q-icon name="attach_file" />
|
||||
</template>
|
||||
</q-file>
|
||||
</div>
|
||||
<div class="col-2 self-center text-center q-pl-none">
|
||||
<q-btn
|
||||
flat
|
||||
round
|
||||
dense
|
||||
color="primary"
|
||||
icon="mdi-upload"
|
||||
@click="upLoadFile"
|
||||
><q-tooltip>อัปโหลดไฟล์</q-tooltip></q-btn
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</q-card>
|
||||
</div>
|
||||
|
||||
<!-- <div class="col-12">
|
||||
<q-card bordered style="border: 1px solid #d6dee1">
|
||||
<div class="text-weight-medium bg-grey-1 q-py-sm q-px-md">
|
||||
บันทึกแจ้งผลการประกาศคัดเลือก
|
||||
|
|
@ -251,7 +430,7 @@ function copyLink(link: string) {
|
|||
</div>
|
||||
</div>
|
||||
</q-card>
|
||||
</div>
|
||||
</div> -->
|
||||
<div class="col-12">
|
||||
<div class="q-mt-xs q-gutter-md" align="right">
|
||||
<q-btn
|
||||
|
|
@ -263,6 +442,93 @@ function copyLink(link: string) {
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<q-dialog
|
||||
v-model="modalView"
|
||||
persistent
|
||||
:maximized="true"
|
||||
transition-show="slide-up"
|
||||
transition-hide="slide-down"
|
||||
>
|
||||
<q-card class="bg-white">
|
||||
<div class="flex justify-end items-center align-center q-mr-md q-mt-sm">
|
||||
<q-btn
|
||||
icon="close"
|
||||
unelevated
|
||||
round
|
||||
dense
|
||||
style="color: #ff8080; background-color: #ffdede"
|
||||
size="12px"
|
||||
v-close-popup
|
||||
/>
|
||||
</div>
|
||||
<div class="q-pa-md">
|
||||
<div class="row items-start items-center">
|
||||
<div class="col">
|
||||
<q-btn
|
||||
padding="xs"
|
||||
icon="mdi-chevron-left"
|
||||
color="grey-2"
|
||||
text-color="grey-5"
|
||||
size="md"
|
||||
class="my-auto"
|
||||
@click="backPage"
|
||||
:disable="page == 1"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-12 col-md-auto">
|
||||
<div class="q-pa-md flex">
|
||||
หน้าที่ {{ page }} จาก {{ numOfPages }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col text-right">
|
||||
<q-btn
|
||||
padding="xs"
|
||||
icon="mdi-chevron-right"
|
||||
color="grey-2"
|
||||
text-color="grey-5"
|
||||
size="md"
|
||||
@click="nextPage"
|
||||
:disable="page === numOfPages"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row items- items-center">
|
||||
<VuePDF ref="vuePDFRef" :pdf="pdfSrc" :page="page" fit-parent />
|
||||
</div>
|
||||
<div class="row items- items-end">
|
||||
<div class="col">
|
||||
<q-btn
|
||||
padding="xs"
|
||||
icon="mdi-chevron-left"
|
||||
color="grey-2"
|
||||
text-color="grey-5"
|
||||
size="md"
|
||||
class="my-auto"
|
||||
@click="backPage"
|
||||
:disable="page == 1"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-12 col-md-auto">
|
||||
<div class="q-pa-md flex">
|
||||
หน้าที่ {{ page }} จาก {{ numOfPages }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col text-right">
|
||||
<q-btn
|
||||
padding="xs"
|
||||
icon="mdi-chevron-right"
|
||||
color="grey-2"
|
||||
text-color="grey-5"
|
||||
size="md"
|
||||
@click="nextPage"
|
||||
:disable="page === numOfPages"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</q-card>
|
||||
</q-dialog>
|
||||
</template>
|
||||
|
||||
<style scoped></style>
|
||||
|
|
|
|||
|
|
@ -1,10 +1,19 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, reactive } from "vue";
|
||||
import { ref, reactive, onMounted } from "vue";
|
||||
import ViewPDF from "@/modules/12_evaluatePersonal/components/Detail/viewstep/viewPDF.vue";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { useRouter, useRoute } from "vue-router";
|
||||
import { useQuasar } from "quasar";
|
||||
import type { FormCommand } from "@/modules/12_evaluatePersonal/interface/index/evalute";
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
|
||||
const router = useRouter();
|
||||
const route = useRoute();
|
||||
const id = ref<string>(route.params.id as string);
|
||||
const $q = useQuasar();
|
||||
const AnnouncementStartDate = ref<string | null>();
|
||||
const AnnouncementEndDate = ref<string | null>();
|
||||
const mixin = useCounterMixin();
|
||||
const { date2Thai, showLoader, hideLoader, messageError, success } = mixin;
|
||||
const AnnouncementDate = ref<string | null>(date2Thai(new Date()));
|
||||
|
|
@ -28,6 +37,49 @@ function onClickViewPDF(file: any) {
|
|||
const updateInput = (value: any) => {
|
||||
emit("update:form", value, ref);
|
||||
};
|
||||
|
||||
function getDate() {
|
||||
showLoader();
|
||||
http
|
||||
.get(config.API.evaluationDateAnnounce(id.value))
|
||||
.then((res) => {
|
||||
const data = res.data.result;
|
||||
AnnouncementStartDate.value = date2Thai(data.dateStartAnnounce);
|
||||
const endDate = new Date(data.dateEndAnnounce);
|
||||
endDate.setDate(endDate.getDate() + 30);
|
||||
AnnouncementEndDate.value = date2Thai(endDate);
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
}
|
||||
|
||||
function getSigner() {
|
||||
showLoader();
|
||||
http
|
||||
.get(config.API.evaluationSigner(id.value, 2))
|
||||
.then((res) => {
|
||||
const data = res.data.result;
|
||||
formCommand.elementaryFullName = data.commanderFullnameDoc2;
|
||||
formCommand.elementaryPosition = data.commanderPositionDoc2;
|
||||
formCommand.abovelevelFullname = data.commanderAboveFullnameDoc2;
|
||||
formCommand.abovelevelPosition = data.commanderAbovePositionDoc2;
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
getSigner();
|
||||
getDate();
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
|
@ -36,11 +88,12 @@ const updateInput = (value: any) => {
|
|||
<q-banner class="text-weight-bold text-red-14 bg-red-2 text-center">
|
||||
<div class="text-weight-bold">
|
||||
<q-icon name="info_outline" color="red-14" size="24px" />
|
||||
ประกาศเมื่อวันที่ {{ AnnouncementDate }}
|
||||
ประกาศเมื่อวันที่ {{ AnnouncementStartDate }} ถึงวันที่
|
||||
{{ AnnouncementEndDate }}
|
||||
</div>
|
||||
</q-banner>
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<!-- <div class="col-6">
|
||||
<q-card bordered style="border: 1px solid #d6dee1">
|
||||
<div class="text-weight-medium bg-grey-1 q-py-sm q-px-md">
|
||||
เอกสารเล่ม 2
|
||||
|
|
@ -49,7 +102,7 @@ const updateInput = (value: any) => {
|
|||
<div class="row">
|
||||
<div class="col-12 q-pa-sm">
|
||||
<div class="row q-col-gutter-md col-12">
|
||||
<!-- <div class="col-xs-12 col-sm-6 row">
|
||||
<div class="col-xs-12 col-sm-6 row">
|
||||
<q-btn
|
||||
class="col-12"
|
||||
outline
|
||||
|
|
@ -59,7 +112,7 @@ const updateInput = (value: any) => {
|
|||
>
|
||||
<q-tooltip> ดาวน์โหลดต้นแบบ </q-tooltip></q-btn
|
||||
>
|
||||
</div> -->
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-6 row">
|
||||
<q-btn
|
||||
v-if="fileEvaluation1"
|
||||
|
|
@ -97,7 +150,7 @@ const updateInput = (value: any) => {
|
|||
</div>
|
||||
</div>
|
||||
</q-card>
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<div class="col-12">
|
||||
<q-card bordered style="border: 1px solid #d6dee1">
|
||||
|
|
@ -114,6 +167,7 @@ const updateInput = (value: any) => {
|
|||
</div>
|
||||
<div class="row col-12 q-col-gutter-md q-pa-sm">
|
||||
<q-input
|
||||
readonly
|
||||
ref="elementaryFullNameRef"
|
||||
dense
|
||||
class="col-xs-12 col-sm-6"
|
||||
|
|
@ -125,6 +179,7 @@ const updateInput = (value: any) => {
|
|||
lazy-rules
|
||||
/>
|
||||
<q-input
|
||||
readonly
|
||||
ref="elementaryPositonRef"
|
||||
class="col-xs-12 col-sm-6"
|
||||
dense
|
||||
|
|
@ -146,6 +201,7 @@ const updateInput = (value: any) => {
|
|||
</div>
|
||||
<div class="row col-12 q-col-gutter-md q-pa-sm">
|
||||
<q-input
|
||||
readonly
|
||||
ref="abovelevelFullnameRef"
|
||||
dense
|
||||
class="col-xs-12 col-sm-6"
|
||||
|
|
@ -160,6 +216,7 @@ const updateInput = (value: any) => {
|
|||
ref="abovelevelPositionRef"
|
||||
class="col-xs-12 col-sm-6"
|
||||
dense
|
||||
readonly
|
||||
outlined
|
||||
v-model="formCommand.abovelevelPosition"
|
||||
label="ตำแหน่ง"
|
||||
|
|
|
|||
|
|
@ -1,19 +1,98 @@
|
|||
<script setup lang="ts">
|
||||
import { reactive, ref } 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";
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
import axios from "axios";
|
||||
import { useRouter, useRoute } from "vue-router";
|
||||
import { useQuasar } from "quasar";
|
||||
|
||||
const $q = useQuasar();
|
||||
const router = useRouter();
|
||||
const route = useRoute();
|
||||
const id = ref<string>(route.params.id as string);
|
||||
|
||||
const store = useEvaluateDetailStore();
|
||||
const mixin = useCounterMixin();
|
||||
const { date2Thai } = mixin;
|
||||
|
||||
const { date2Thai, showLoader, hideLoader, messageError } = mixin;
|
||||
|
||||
const selectedItem = ref(1);
|
||||
|
||||
function handleItemClick(itemNumber: number) {
|
||||
store.tabPanels = itemNumber.toString();
|
||||
selectedItem.value = itemNumber;
|
||||
|
||||
getFile(itemNumber);
|
||||
}
|
||||
// evaluationFilebyId
|
||||
function getFile(volume: number) {
|
||||
const fileText = numToThai(volume);
|
||||
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)
|
||||
getPDF(link, type);
|
||||
})
|
||||
.catch((e) => {
|
||||
// messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
}
|
||||
|
||||
function getPDF(url: string, type: string) {
|
||||
axios
|
||||
.get(url, {
|
||||
method: "GET",
|
||||
responseType: "blob",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
Accept: type, // ถ้ามีการระบุเมื่ออัปโหลด
|
||||
},
|
||||
})
|
||||
.then(async (res) => {
|
||||
store.log = 0;
|
||||
console.log(res);
|
||||
const blob = new Blob([res.data]);
|
||||
const objectUrl = URL.createObjectURL(blob);
|
||||
|
||||
const pdfData = await usePDF(`${objectUrl}`);
|
||||
showLoader();
|
||||
setTimeout(() => {
|
||||
store.log = 1;
|
||||
store.pdfSrcStore = pdfData.pdf.value;
|
||||
store.numOfPagesStore = pdfData.pages.value;
|
||||
hideLoader();
|
||||
}, 1500);
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
store.log = 0;
|
||||
});
|
||||
}
|
||||
|
||||
function numToThai(val: number) {
|
||||
switch (val) {
|
||||
case 1:
|
||||
return "1-เอกสารเล่ม 2";
|
||||
default:
|
||||
return "1-เอกสารเล่ม 2";
|
||||
}
|
||||
}
|
||||
|
||||
onMounted(()=>{
|
||||
getFile(1)
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,24 @@
|
|||
<script setup lang="ts">
|
||||
import { ref } from "vue";
|
||||
import axios from "axios";
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
import { useRouter, useRoute } from "vue-router";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { useQuasar } from "quasar";
|
||||
import keycloak from "@/plugins/keycloak";
|
||||
|
||||
import genReport from "@/plugins/genreport";
|
||||
|
||||
const fullName = ref<string>(
|
||||
keycloak.tokenParsed ? keycloak.tokenParsed.name!.toString() : ""
|
||||
);
|
||||
const $q = useQuasar();
|
||||
const mixin = useCounterMixin();
|
||||
const { date2Thai, showLoader, hideLoader, messageError, success } = mixin;
|
||||
const router = useRouter();
|
||||
const route = useRoute();
|
||||
const id = ref<string>(route.params.id as string);
|
||||
const modalConfirm = ref<boolean>(false);
|
||||
const modalView = ref<boolean>(false);
|
||||
const pdfSrc = ref<any>();
|
||||
|
|
@ -9,33 +27,26 @@ const nameOfWork = ref<string>("");
|
|||
const nameOfOwner = ref<string>("");
|
||||
const position = ref<string>("");
|
||||
const status = ref<string>("WAIT_CHECK_DOC_V2");
|
||||
const fileEvaluation91 = ref<any>();
|
||||
const fileEvaluation92 = ref<any>();
|
||||
const fileEvaluation93 = ref<any>();
|
||||
const fileEvaluation94 = ref<any>();
|
||||
const fileEvaluation95 = ref<any>();
|
||||
const fileEvaluation96 = ref<any>();
|
||||
const fileEvaluation81 = ref<any>();
|
||||
const fileEvaluation82 = ref<any>();
|
||||
const fileEvaluation83 = ref<any>();
|
||||
const fileEvaluation84 = ref<any>();
|
||||
const fileEvaluation85 = ref<any>();
|
||||
const fileEvaluation86 = ref<any>();
|
||||
|
||||
async function onClickDowloadFile(
|
||||
tp: string,
|
||||
templateName: string,
|
||||
fileName: string
|
||||
) {
|
||||
// showLoader();
|
||||
// const data = Object.assign(
|
||||
// { fullName: fullName.value },
|
||||
// tp === "EV1_005" || tp === "EV1_007"
|
||||
// ? { organizationName: "หน่วยงาน" }
|
||||
// : null,
|
||||
// tp === "EV1_007" ? { positionName: "ตำแหน่ง" } : null,
|
||||
// tp === "EV1_007" ? { positionLeaveName: "ระดับ" } : null
|
||||
// );
|
||||
// const body = {
|
||||
// template: tp,
|
||||
// reportName: templateName,
|
||||
// data: data,
|
||||
// };
|
||||
// await genReport(body, fileName);
|
||||
showLoader();
|
||||
|
||||
const body = {
|
||||
template: tp,
|
||||
reportName: templateName,
|
||||
data:{}
|
||||
};
|
||||
await genReport(body, fileName);
|
||||
}
|
||||
|
||||
function onClickViewPDF(file: any) {
|
||||
|
|
@ -46,6 +57,113 @@ function onClickViewPDF(file: any) {
|
|||
function openConfirmEvalution() {
|
||||
modalConfirm.value = true;
|
||||
}
|
||||
|
||||
function upLoadFile(name: string, file: any) {
|
||||
showLoader();
|
||||
http
|
||||
.post(config.API.evaluationFileListbyId("เล่ม 2", id.value), {
|
||||
fileList: {
|
||||
fileName: name,
|
||||
metadata: {
|
||||
tag: "value",
|
||||
},
|
||||
},
|
||||
})
|
||||
.then((res) => {
|
||||
const foundKey: any = Object.keys(res.data).find(
|
||||
(key) =>
|
||||
res.data[key]?.fileName !== undefined &&
|
||||
res.data[key]?.fileName !== ""
|
||||
);
|
||||
const link = res.data[foundKey]?.uploadUrl;
|
||||
fileUpLoad(link, file);
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
}
|
||||
|
||||
function fileUpLoad(url: string, file: any) {
|
||||
axios
|
||||
.put(url, file, {
|
||||
headers: { "Content-Type": file?.type },
|
||||
onUploadProgress: (e) => console.log(e),
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
fileEvaluation81.value = null;
|
||||
fileEvaluation82.value = null;
|
||||
fileEvaluation83.value = null;
|
||||
fileEvaluation84.value = null;
|
||||
fileEvaluation85.value = null;
|
||||
fileEvaluation86.value = null;
|
||||
success($q, "อัปโหลดไฟล์สำเร็จ");
|
||||
});
|
||||
}
|
||||
|
||||
function downloadFile() {
|
||||
showLoader();
|
||||
http
|
||||
.get(config.API.evaluationFilebyId("เล่ม 2", id.value, '2-เอกสารเล่ม 2 (ฉบับแก้ไข)'))
|
||||
.then((res) => {
|
||||
const link = res.data.downloadUrl;
|
||||
const type = res.data.fileType;
|
||||
const fileName = res.data.fileName;
|
||||
getPDF(link, type, fileName);
|
||||
})
|
||||
.catch((e) => {})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
}
|
||||
|
||||
function getPDF(url: string, type: string, fileName: string) {
|
||||
axios
|
||||
.get(url, {
|
||||
method: "GET",
|
||||
responseType: "blob",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
Accept: type, // ถ้ามีการระบุเมื่ออัปโหลด
|
||||
},
|
||||
})
|
||||
.then(async (res) => {
|
||||
console.log(res);
|
||||
const a = document.createElement("a");
|
||||
a.href = window.URL.createObjectURL(res.data);
|
||||
a.download = fileName;
|
||||
// a.download = res.data.fileName + `.${mime.getExtension(res.data.fileType)}`
|
||||
a.click();
|
||||
})
|
||||
.catch((e) => {})
|
||||
.finally(() => {});
|
||||
}
|
||||
|
||||
function confirmApprove(){
|
||||
const data = {
|
||||
metadata: {
|
||||
additionalProp1: nameOfWork.value,
|
||||
additionalProp2: nameOfOwner.value,
|
||||
additionalProp3: position.value,
|
||||
},
|
||||
}
|
||||
showLoader()
|
||||
http
|
||||
.patch(config.API.evaluationPatchData('เล่ม 2',id.value,'2-เอกสารเล่ม 2 (ฉบับแก้ไข)'),data)
|
||||
.then((res)=>{
|
||||
console.log(res)
|
||||
}).catch((e)=>{
|
||||
messageError($q,e)
|
||||
}).finally(()=>{
|
||||
modalConfirm.value = false
|
||||
hideLoader()
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
|
@ -78,9 +196,9 @@ function openConfirmEvalution() {
|
|||
color="primary"
|
||||
@click="
|
||||
onClickDowloadFile(
|
||||
'EV1_005',
|
||||
'template-1',
|
||||
'แบบพิจารณาคุณสมบัติบุคคล'
|
||||
'เอกสารแบบ ค',
|
||||
'template-4',
|
||||
'เอกสารแบบ ค'
|
||||
)
|
||||
"
|
||||
>
|
||||
|
|
@ -89,20 +207,20 @@ function openConfirmEvalution() {
|
|||
</div>
|
||||
<div class="col-xs-12 col-sm-6 row">
|
||||
<q-btn
|
||||
v-if="fileEvaluation91"
|
||||
v-if="fileEvaluation81"
|
||||
class="col-12"
|
||||
outline
|
||||
icon="visibility"
|
||||
label="ดูไฟล์เอกสาร"
|
||||
color="primary"
|
||||
@click="onClickViewPDF(fileEvaluation91)"
|
||||
@click="onClickViewPDF(fileEvaluation81)"
|
||||
>
|
||||
<q-tooltip> ดูไฟล์เอกสาร </q-tooltip></q-btn
|
||||
>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-10 row">
|
||||
<q-file
|
||||
v-model="fileEvaluation91"
|
||||
v-model="fileEvaluation81"
|
||||
class="col-12"
|
||||
outlined
|
||||
dense
|
||||
|
|
@ -110,6 +228,7 @@ function openConfirmEvalution() {
|
|||
lazy-rules
|
||||
label="อัปโหลดไฟล์"
|
||||
accept=".pdf"
|
||||
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<q-icon name="attach_file" />
|
||||
|
|
@ -123,6 +242,12 @@ function openConfirmEvalution() {
|
|||
dense
|
||||
color="primary"
|
||||
icon="mdi-upload"
|
||||
@click="
|
||||
upLoadFile(
|
||||
'แบบตรวจสอบความถูกต้องครบถ้วนของข้อมูลประกอบการประเมินผลงาน (เอกสารแบบ ค)',
|
||||
fileEvaluation81
|
||||
)
|
||||
"
|
||||
><q-tooltip>อัปโหลดไฟล์</q-tooltip></q-btn
|
||||
>
|
||||
</div>
|
||||
|
|
@ -149,9 +274,9 @@ function openConfirmEvalution() {
|
|||
color="primary"
|
||||
@click="
|
||||
onClickDowloadFile(
|
||||
'EV1_005',
|
||||
'template-1',
|
||||
'แบบพิจารณาคุณสมบัติบุคคล'
|
||||
'เอกสารหมายเลข 15',
|
||||
'template-4',
|
||||
'เอกสารหมายเลข 15'
|
||||
)
|
||||
"
|
||||
>
|
||||
|
|
@ -160,20 +285,20 @@ function openConfirmEvalution() {
|
|||
</div>
|
||||
<div class="col-xs-12 col-sm-6 row">
|
||||
<q-btn
|
||||
v-if="fileEvaluation92"
|
||||
v-if="fileEvaluation82"
|
||||
class="col-12"
|
||||
outline
|
||||
icon="visibility"
|
||||
label="ดูไฟล์เอกสาร"
|
||||
color="primary"
|
||||
@click="onClickViewPDF(fileEvaluation92)"
|
||||
@click="onClickViewPDF(fileEvaluation82)"
|
||||
>
|
||||
<q-tooltip> ดูไฟล์เอกสาร </q-tooltip></q-btn
|
||||
>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-10 row">
|
||||
<q-file
|
||||
v-model="fileEvaluation92"
|
||||
v-model="fileEvaluation82"
|
||||
class="col-12"
|
||||
outlined
|
||||
dense
|
||||
|
|
@ -181,6 +306,7 @@ function openConfirmEvalution() {
|
|||
lazy-rules
|
||||
label="อัปโหลดไฟล์"
|
||||
accept=".pdf"
|
||||
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<q-icon name="attach_file" />
|
||||
|
|
@ -194,6 +320,12 @@ function openConfirmEvalution() {
|
|||
dense
|
||||
color="primary"
|
||||
icon="mdi-upload"
|
||||
@click="
|
||||
upLoadFile(
|
||||
'บัญชีแสดงการรับ-ส่งผลงาน (เอกสารหมายเลข 15)',
|
||||
fileEvaluation82
|
||||
)
|
||||
"
|
||||
><q-tooltip>อัปโหลดไฟล์</q-tooltip></q-btn
|
||||
>
|
||||
</div>
|
||||
|
|
@ -220,9 +352,9 @@ function openConfirmEvalution() {
|
|||
color="primary"
|
||||
@click="
|
||||
onClickDowloadFile(
|
||||
'EV1_005',
|
||||
'template-1',
|
||||
'แบบพิจารณาคุณสมบัติบุคคล'
|
||||
'เอกสารหมายเลข 16',
|
||||
'template-4',
|
||||
'เอกสารหมายเลข 16'
|
||||
)
|
||||
"
|
||||
>
|
||||
|
|
@ -231,20 +363,20 @@ function openConfirmEvalution() {
|
|||
</div>
|
||||
<div class="col-xs-12 col-sm-6 row">
|
||||
<q-btn
|
||||
v-if="fileEvaluation93"
|
||||
v-if="fileEvaluation83"
|
||||
class="col-12"
|
||||
outline
|
||||
icon="visibility"
|
||||
label="ดูไฟล์เอกสาร"
|
||||
color="primary"
|
||||
@click="onClickViewPDF(fileEvaluation93)"
|
||||
@click="onClickViewPDF(fileEvaluation83)"
|
||||
>
|
||||
<q-tooltip> ดูไฟล์เอกสาร </q-tooltip></q-btn
|
||||
>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-10 row">
|
||||
<q-file
|
||||
v-model="fileEvaluation93"
|
||||
v-model="fileEvaluation83"
|
||||
class="col-12"
|
||||
outlined
|
||||
dense
|
||||
|
|
@ -265,6 +397,12 @@ function openConfirmEvalution() {
|
|||
dense
|
||||
color="primary"
|
||||
icon="mdi-upload"
|
||||
@click="
|
||||
upLoadFile(
|
||||
'แบบประเมินผลงาน (เอกสารหมายเลข 16)',
|
||||
fileEvaluation83
|
||||
)
|
||||
"
|
||||
><q-tooltip>อัปโหลดไฟล์</q-tooltip></q-btn
|
||||
>
|
||||
</div>
|
||||
|
|
@ -291,9 +429,9 @@ function openConfirmEvalution() {
|
|||
color="primary"
|
||||
@click="
|
||||
onClickDowloadFile(
|
||||
'EV1_005',
|
||||
'template-1',
|
||||
'แบบพิจารณาคุณสมบัติบุคคล'
|
||||
'เอกสารหมายเลข 17',
|
||||
'template-4',
|
||||
'เอกสารหมายเลข 17'
|
||||
)
|
||||
"
|
||||
>
|
||||
|
|
@ -302,20 +440,20 @@ function openConfirmEvalution() {
|
|||
</div>
|
||||
<div class="col-xs-12 col-sm-6 row">
|
||||
<q-btn
|
||||
v-if="fileEvaluation94"
|
||||
v-if="fileEvaluation84"
|
||||
class="col-12"
|
||||
outline
|
||||
icon="visibility"
|
||||
label="ดูไฟล์เอกสาร"
|
||||
color="primary"
|
||||
@click="onClickViewPDF(fileEvaluation94)"
|
||||
@click="onClickViewPDF(fileEvaluation84)"
|
||||
>
|
||||
<q-tooltip> ดูไฟล์เอกสาร </q-tooltip></q-btn
|
||||
>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-10 row">
|
||||
<q-file
|
||||
v-model="fileEvaluation94"
|
||||
v-model="fileEvaluation84"
|
||||
class="col-12"
|
||||
outlined
|
||||
dense
|
||||
|
|
@ -336,6 +474,12 @@ function openConfirmEvalution() {
|
|||
dense
|
||||
color="primary"
|
||||
icon="mdi-upload"
|
||||
@click="
|
||||
upLoadFile(
|
||||
'แบบแสดงการประเมินผลงาน (เอกสารหมายเลข 17)',
|
||||
fileEvaluation84
|
||||
)
|
||||
"
|
||||
><q-tooltip>อัปโหลดไฟล์</q-tooltip></q-btn
|
||||
>
|
||||
</div>
|
||||
|
|
@ -362,9 +506,9 @@ function openConfirmEvalution() {
|
|||
color="primary"
|
||||
@click="
|
||||
onClickDowloadFile(
|
||||
'EV1_005',
|
||||
'template-1',
|
||||
'แบบพิจารณาคุณสมบัติบุคคล'
|
||||
'เอกสารหมายเลข 18',
|
||||
'template-4',
|
||||
'เอกสารหมายเลข 18'
|
||||
)
|
||||
"
|
||||
>
|
||||
|
|
@ -373,20 +517,20 @@ function openConfirmEvalution() {
|
|||
</div>
|
||||
<div class="col-xs-12 col-sm-6 row">
|
||||
<q-btn
|
||||
v-if="fileEvaluation95"
|
||||
v-if="fileEvaluation85"
|
||||
class="col-12"
|
||||
outline
|
||||
icon="visibility"
|
||||
label="ดูไฟล์เอกสาร"
|
||||
color="primary"
|
||||
@click="onClickViewPDF(fileEvaluation95)"
|
||||
@click="onClickViewPDF(fileEvaluation85)"
|
||||
>
|
||||
<q-tooltip> ดูไฟล์เอกสาร </q-tooltip></q-btn
|
||||
>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-10 row">
|
||||
<q-file
|
||||
v-model="fileEvaluation95"
|
||||
v-model="fileEvaluation85"
|
||||
class="col-12"
|
||||
outlined
|
||||
dense
|
||||
|
|
@ -407,6 +551,12 @@ function openConfirmEvalution() {
|
|||
dense
|
||||
color="primary"
|
||||
icon="mdi-upload"
|
||||
@click="
|
||||
upLoadFile(
|
||||
'แบบรายงานผลการประเมินบุคคล (เอกสารหมายเลข 18)',
|
||||
fileEvaluation85
|
||||
)
|
||||
"
|
||||
><q-tooltip>อัปโหลดไฟล์</q-tooltip></q-btn
|
||||
>
|
||||
</div>
|
||||
|
|
@ -433,9 +583,9 @@ function openConfirmEvalution() {
|
|||
color="primary"
|
||||
@click="
|
||||
onClickDowloadFile(
|
||||
'EV1_005',
|
||||
'template-1',
|
||||
'แบบพิจารณาคุณสมบัติบุคคล'
|
||||
'เอกสารแบบ ง',
|
||||
'template-4',
|
||||
'เอกสารแบบ ง'
|
||||
)
|
||||
"
|
||||
>
|
||||
|
|
@ -444,20 +594,20 @@ function openConfirmEvalution() {
|
|||
</div>
|
||||
<div class="col-xs-12 col-sm-6 row">
|
||||
<q-btn
|
||||
v-if="fileEvaluation96"
|
||||
v-if="fileEvaluation86"
|
||||
class="col-12"
|
||||
outline
|
||||
icon="visibility"
|
||||
label="ดูไฟล์เอกสาร"
|
||||
color="primary"
|
||||
@click="onClickViewPDF(fileEvaluation96)"
|
||||
@click="onClickViewPDF(fileEvaluation86)"
|
||||
>
|
||||
<q-tooltip> ดูไฟล์เอกสาร </q-tooltip></q-btn
|
||||
>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-10 row">
|
||||
<q-file
|
||||
v-model="fileEvaluation96"
|
||||
v-model="fileEvaluation86"
|
||||
class="col-12"
|
||||
outlined
|
||||
dense
|
||||
|
|
@ -478,6 +628,12 @@ function openConfirmEvalution() {
|
|||
dense
|
||||
color="primary"
|
||||
icon="mdi-upload"
|
||||
@click="
|
||||
upLoadFile(
|
||||
'แบบสรุปผลการประเมิน (เอกสารแบบ ง)',
|
||||
fileEvaluation86
|
||||
)
|
||||
"
|
||||
><q-tooltip>อัปโหลดไฟล์</q-tooltip></q-btn
|
||||
>
|
||||
</div>
|
||||
|
|
@ -506,13 +662,7 @@ function openConfirmEvalution() {
|
|||
icon="download"
|
||||
label="ดาวน์โหลด"
|
||||
color="primary"
|
||||
@click="
|
||||
onClickDowloadFile(
|
||||
'EV1_005',
|
||||
'template-1',
|
||||
'แบบพิจารณาคุณสมบัติบุคคล'
|
||||
)
|
||||
"
|
||||
@click="downloadFile"
|
||||
>
|
||||
<q-tooltip> ดาวน์โหลดต้นแบบ </q-tooltip></q-btn
|
||||
>
|
||||
|
|
@ -591,6 +741,7 @@ function openConfirmEvalution() {
|
|||
id="onSubmit"
|
||||
class="q-px-md q-py-xs"
|
||||
label="ยืนยัน"
|
||||
@click="confirmApprove"
|
||||
>
|
||||
</q-btn>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,19 +1,42 @@
|
|||
<script setup lang="ts">
|
||||
import { ref } from "vue";
|
||||
import { useRouter, useRoute } from "vue-router";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { useQuasar } from "quasar";
|
||||
|
||||
const $q = useQuasar();
|
||||
const mixin = useCounterMixin();
|
||||
const { success } = mixin;
|
||||
const route = useRoute();
|
||||
const id = ref<string>(route.params.id as string);
|
||||
const status = ref<string>("DONE");
|
||||
const link = ref<string>('https://bma-ehr-publish.frappet.synology.me')
|
||||
|
||||
function copyLink(){
|
||||
const linkById = `${link.value}/${id.value}`
|
||||
navigator.clipboard.writeText(linkById);
|
||||
success($q,'คัดลอกสำเร็จ')
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="row">
|
||||
<div class="col-12 text-center">
|
||||
<div>
|
||||
<p class="text-weight-bold" style="font-size: 18px;">Public URL</p>
|
||||
<a :href="link" target="_blank">{{ link }}</a>
|
||||
</div>
|
||||
|
||||
<q-btn
|
||||
class="q-mt-md"
|
||||
outline
|
||||
color="green"
|
||||
label="คัดลอก URL"
|
||||
class="q-pa-sm"
|
||||
style="font-size: 16px"
|
||||
/>
|
||||
icon="mdi-clipboard-outline"
|
||||
label="คัดลอกลิ้งค์"
|
||||
color="primary"
|
||||
@click="copyLink"
|
||||
>
|
||||
<q-tooltip> คัดลอกลิ้งค์ </q-tooltip></q-btn
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue