updated
This commit is contained in:
parent
43e36b7b74
commit
6eed463eb5
6 changed files with 313 additions and 190 deletions
|
|
@ -171,7 +171,6 @@ function backPage() {
|
|||
}
|
||||
|
||||
function copyLink(name: string) {
|
||||
console.log(name);
|
||||
showLoader();
|
||||
http
|
||||
.get(config.API.evaluationFilebyId("เล่ม 1", id.value, name))
|
||||
|
|
@ -194,9 +193,9 @@ function getDate() {
|
|||
.then((res) => {
|
||||
const data = res.data.result;
|
||||
AnnouncementStartDate.value = date2Thai(data.dateStartAnnounce);
|
||||
const endDate = new Date(data.dateStartAnnounce);
|
||||
endDate.setDate(endDate.getDate() + 30);
|
||||
AnnouncementEndDate.value = date2Thai(endDate);
|
||||
// const endDate = new Date(data.dateStartAnnounce);
|
||||
// endDate.setDate(endDate.getDate() + 30);
|
||||
AnnouncementEndDate.value = date2Thai(data.dateEndAnnounce);
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
|
|
@ -219,31 +218,31 @@ function getDate() {
|
|||
// });
|
||||
// }
|
||||
|
||||
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);
|
||||
}
|
||||
// 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;
|
||||
}
|
||||
// function onClickViewPDF(file: any) {
|
||||
// // pdfSrc.value = file.webkitRelativePath;
|
||||
// modalView.value = true;
|
||||
// }
|
||||
|
||||
const download10Url = ref<string>("");
|
||||
function checkDocResult() {
|
||||
|
|
@ -304,6 +303,16 @@ onMounted(() => {
|
|||
<q-item-section avatar>
|
||||
<div class="row">
|
||||
<div>
|
||||
<!-- <q-btn
|
||||
:href="file.pathName"
|
||||
target="_blank"
|
||||
flat
|
||||
round
|
||||
color="blue-6"
|
||||
icon="mdi-download"
|
||||
>
|
||||
<q-tooltip>คัดลอกลิ้งค์</q-tooltip>
|
||||
</q-btn> -->
|
||||
<q-btn
|
||||
flat
|
||||
round
|
||||
|
|
@ -344,33 +353,35 @@ onMounted(() => {
|
|||
>
|
||||
</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 v-if="store.currentStep == 5" class="row col-12">
|
||||
<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>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue