Merge branch 'develop' into devTee
This commit is contained in:
commit
8a1fd45d11
19 changed files with 643 additions and 212 deletions
|
|
@ -73,7 +73,7 @@ const store = useEvaluateDetailStore();
|
|||
<q-step
|
||||
:name="7"
|
||||
prefix="7"
|
||||
title="ตรวจสอบเอกสารเล่ม 2"
|
||||
title="รอพิจารณาผลการประเมิน 2"
|
||||
:done="store.step >= 7"
|
||||
:disable="store.currentStep < 7"
|
||||
>
|
||||
|
|
@ -82,7 +82,7 @@ const store = useEvaluateDetailStore();
|
|||
<q-step
|
||||
:name="8"
|
||||
prefix="8"
|
||||
title="รอพิจารณาผล"
|
||||
title="ตรวจสอบความถูกต้องของเอกสารเล่ม 2"
|
||||
:done="store.step >= 8"
|
||||
:disable="store.currentStep < 8"
|
||||
>
|
||||
|
|
|
|||
|
|
@ -233,7 +233,7 @@ onMounted(() => {
|
|||
</script>
|
||||
|
||||
<template>
|
||||
<div class="row q-col-gutter-md">
|
||||
<q-card bordered class="col-12 row caedNone q-pa-md q-col-gutter-md">
|
||||
<div class="col-xs-12 col-sm-3">
|
||||
<div class="toptitle">
|
||||
{{
|
||||
|
|
@ -275,7 +275,7 @@ onMounted(() => {
|
|||
: 'col-xs-12 col-sm-5 row'
|
||||
"
|
||||
>
|
||||
<q-card flat bordered class="col-12">
|
||||
<q-card flat bordered class="col-12 q-pa-md">
|
||||
<q-card-section>
|
||||
<Step1 v-if="store.step === 1" :data="props.data" />
|
||||
<Step2 v-if="store.step === 2" @update:form="updateformCommand" />
|
||||
|
|
@ -293,16 +293,18 @@ onMounted(() => {
|
|||
class="col-xs-12 col-sm-7 row"
|
||||
v-if="store.step === 1 || store.step === 3 || store.step === 7"
|
||||
>
|
||||
<q-card flat bordered class="col-12">
|
||||
<q-card-section>
|
||||
<ViewStep1 v-if="store.step === 1" :data="data" />
|
||||
<ViewStep3 v-if="store.step === 3" />
|
||||
<ViewStep7 v-if="store.step === 7" /> </q-card-section
|
||||
></q-card>
|
||||
<!-- <q-card flat bordered class="col-12"> -->
|
||||
<div class="col-12">
|
||||
<ViewStep1 v-if="store.step === 1" :data="data" />
|
||||
<ViewStep3 v-if="store.step === 3" />
|
||||
<ViewStep7 v-if="store.step === 7" />
|
||||
</div>
|
||||
<!-- <q-card-section> </q-card-section -->
|
||||
<!-- ></q-card> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</q-card>
|
||||
|
||||
<PopupHistory :modal="modalHistory" :close="onClickPopupHistory" :id="id" />
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -68,6 +68,11 @@ const columns = ref<QTableProps["columns"]>([
|
|||
const row = ref<any>();
|
||||
|
||||
async function fetchListHistory(id: string) {
|
||||
const thaiOptions: Intl.DateTimeFormatOptions = {
|
||||
hour: "2-digit",
|
||||
minute: "2-digit",
|
||||
second: "2-digit",
|
||||
};
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.evaluationHistory(id))
|
||||
|
|
@ -76,7 +81,9 @@ async function fetchListHistory(id: string) {
|
|||
const list = data.map((e: any) => ({
|
||||
step: e.step,
|
||||
lastUpdateFullName: e.lastUpdateFullName,
|
||||
lastUpdatedAt: date2Thai(e.lastUpdatedAt),
|
||||
lastUpdatedAt: `${date2Thai(e.lastUpdatedAt)} เวลา ${new Date(
|
||||
e.lastUpdatedAt
|
||||
).toLocaleTimeString("th-TH", thaiOptions)} น.`,
|
||||
}));
|
||||
row.value = list;
|
||||
})
|
||||
|
|
|
|||
|
|
@ -30,6 +30,8 @@ const formCommand = reactive<FormCommand>({
|
|||
abovelevelFullname: "",
|
||||
abovelevelPosition: "",
|
||||
});
|
||||
const author = ref<string>("");
|
||||
const subject = ref<string>("");
|
||||
|
||||
const elementaryFullNameRef = ref<object | null>(null);
|
||||
const elementaryPositonRef = ref<object | null>(null);
|
||||
|
|
@ -105,10 +107,17 @@ function getSigner() {
|
|||
.get(config.API.evaluationSigner(id.value, 1))
|
||||
.then((res) => {
|
||||
const data = res.data.result;
|
||||
formCommand.elementaryFullName = data == null ? "" : data.commanderFullname;
|
||||
formCommand.elementaryPosition = data == null ? "" : data.commanderPosition;
|
||||
formCommand.abovelevelFullname = data == null ? "" : data.commanderAboveFullname;
|
||||
formCommand.abovelevelPosition = data == null ? "" : data.commanderAbovePosition;
|
||||
formCommand.elementaryFullName =
|
||||
data == null ? "" : data.commanderFullname;
|
||||
formCommand.elementaryPosition =
|
||||
data == null ? "" : data.commanderPosition;
|
||||
formCommand.abovelevelFullname =
|
||||
data == null ? "" : data.commanderAboveFullname;
|
||||
formCommand.abovelevelPosition =
|
||||
data == null ? "" : data.commanderAbovePosition;
|
||||
|
||||
author.value = data.author;
|
||||
subject.value = data.subject;
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
|
|
@ -527,6 +536,43 @@ onMounted(() => {
|
|||
</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">ผลงาน</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-12 row">
|
||||
<div class="row col-12 q-col-gutter-md q-pa-sm">
|
||||
<q-input
|
||||
dense
|
||||
class="col-xs-12 col-sm-6"
|
||||
outlined
|
||||
label="ชื่อผลงาน"
|
||||
v-model="subject"
|
||||
@update:model-value="updateInput(formCommand)"
|
||||
:rules="[(val) => !!val || `${'กรุณากรอกชื่อผลงาน'}`]"
|
||||
lazy-rules
|
||||
/>
|
||||
<q-input
|
||||
readonly
|
||||
class="col-xs-12 col-sm-6"
|
||||
dense
|
||||
outlined
|
||||
v-model="author"
|
||||
@update:model-value="updateInput(formCommand)"
|
||||
label="เจ้าของผลงาน"
|
||||
:rules="[(val) => !!val || `${'กรุณากรอกเจ้าของผลงาน'}`]"
|
||||
lazy-rules
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</q-card>
|
||||
</div>
|
||||
|
||||
<!-- เลือกผู้เซ็นเอกสาร -->
|
||||
<div class="col-12">
|
||||
|
|
|
|||
|
|
@ -34,7 +34,8 @@ function getFile(volume: number) {
|
|||
.then((res) => {
|
||||
const link = res.data.downloadUrl;
|
||||
const type = res.data.fileType;
|
||||
getPDF(link,type);
|
||||
|
||||
getPDF(link, type);
|
||||
})
|
||||
.catch((e) => {
|
||||
// messageError($q, e);
|
||||
|
|
@ -44,7 +45,7 @@ function getFile(volume: number) {
|
|||
});
|
||||
}
|
||||
|
||||
function getPDF(url: string,type:string) {
|
||||
function getPDF(url: string, type: string) {
|
||||
axios
|
||||
.get(url, {
|
||||
method: "GET",
|
||||
|
|
@ -55,25 +56,26 @@ function getPDF(url: string,type:string) {
|
|||
},
|
||||
})
|
||||
.then(async (res) => {
|
||||
store.log = 0
|
||||
console.log(res);
|
||||
store.log = 0;
|
||||
store.urlDownloadFile = url;
|
||||
const blob = new Blob([res.data]);
|
||||
const objectUrl = URL.createObjectURL(blob);
|
||||
|
||||
const pdfData = await usePDF(`${objectUrl}`);
|
||||
showLoader();
|
||||
setTimeout(() => {
|
||||
store.log = 1
|
||||
store.log = 1;
|
||||
store.pdfSrcStore = pdfData.pdf.value;
|
||||
store.numOfPagesStore = pdfData.pages.value;
|
||||
hideLoader();
|
||||
}, 1500);
|
||||
}).catch((e)=>{
|
||||
messageError($q,e)
|
||||
})
|
||||
.finally(()=>{
|
||||
store.log = 0
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
store.log = 0;
|
||||
});
|
||||
}
|
||||
|
||||
function numToThai(val: number) {
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@ const messenger = ref<string>("");
|
|||
const title = ref<string>("");
|
||||
const modalEvaluation = ref<boolean>(false);
|
||||
const fileEvaluationUpload = ref<any>();
|
||||
const fileEvaluationUploadRef = ref<any>();
|
||||
const status = ref<string>("WAIT_CHECK_DOC_V1");
|
||||
const files = [
|
||||
{
|
||||
|
|
@ -153,22 +154,31 @@ function getPDF(url: string, type: string, fileName: string) {
|
|||
|
||||
/** ส่งไปประกาศบนเว็บไซต์ */
|
||||
function onWebSite() {
|
||||
dialogConfirm(
|
||||
$q,
|
||||
() => {
|
||||
showLoader();
|
||||
http
|
||||
.put(config.API.evaluationApproveDoc1(id.value))
|
||||
.then((res) => {})
|
||||
.catch((e) => {})
|
||||
.finally(() => {
|
||||
success($q, "ส่งไปประกาศบนเว็บไซต์สำเร็จ");
|
||||
getStep();
|
||||
});
|
||||
},
|
||||
"ยืนยันการส่งไปประกาศบนเว็บไซต์",
|
||||
"ยืนยันการส่งไปประกาศบนเว็บไซต์ใช่หรือไม่?"
|
||||
);
|
||||
download10Url.value === ""
|
||||
? (fileEvaluationUpload.value = "")
|
||||
: fileEvaluationUpload.value;
|
||||
fileEvaluationUploadRef.value.validate();
|
||||
if (
|
||||
fileEvaluationUploadRef.value.hasError === false &&
|
||||
download10Url.value !== ""
|
||||
) {
|
||||
dialogConfirm(
|
||||
$q,
|
||||
() => {
|
||||
showLoader();
|
||||
http
|
||||
.put(config.API.evaluationApproveDoc1(id.value))
|
||||
.then((res) => {})
|
||||
.catch((e) => {})
|
||||
.finally(() => {
|
||||
success($q, "ส่งไปประกาศบนเว็บไซต์สำเร็จ");
|
||||
getStep();
|
||||
});
|
||||
},
|
||||
"ยืนยันการส่งไปประกาศบนเว็บไซต์",
|
||||
"ยืนยันการส่งไปประกาศบนเว็บไซต์ใช่หรือไม่?"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
function getStep() {
|
||||
|
|
@ -210,32 +220,36 @@ function getStep() {
|
|||
});
|
||||
}
|
||||
|
||||
function upLoadFile() {
|
||||
showLoader();
|
||||
http
|
||||
.post(config.API.evaluationFileListbyId("เล่ม 1", id.value), {
|
||||
fileList: {
|
||||
fileName: "10-ประกาศผลการคัดเลือกบุคคล (เอกสารหมายเลข 10)",
|
||||
metadata: {
|
||||
tag: "value",
|
||||
function upLoadFile(file: any) {
|
||||
if (file) {
|
||||
showLoader();
|
||||
http
|
||||
.post(config.API.evaluationFileListbyId("เล่ม 1", id.value), {
|
||||
fileList: {
|
||||
fileName: "10-ประกาศผลการคัดเลือกบุคคล (เอกสารหมายเลข 10)",
|
||||
metadata: {
|
||||
tag: "value",
|
||||
subject: subject.value,
|
||||
author: author.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);
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
})
|
||||
.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);
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function fileUpLoad(url: string) {
|
||||
|
|
@ -248,7 +262,6 @@ function fileUpLoad(url: string) {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
fileEvaluationUpload.value = null;
|
||||
checkDoc10();
|
||||
success($q, "อัปโหลดไฟล์สำเร็จ");
|
||||
});
|
||||
|
|
@ -319,8 +332,29 @@ async function fetchProfile() {
|
|||
});
|
||||
}
|
||||
|
||||
const author = ref<string>("");
|
||||
const subject = ref<string>("");
|
||||
|
||||
function fetchDataSigner() {
|
||||
showLoader();
|
||||
http
|
||||
.get(config.API.evaluationSigner(id.value, 1))
|
||||
.then((res) => {
|
||||
const data = res.data.result;
|
||||
author.value = data.author;
|
||||
subject.value = data.subject;
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
checkDoc10();
|
||||
fetchDataSigner();
|
||||
});
|
||||
</script>
|
||||
|
||||
|
|
@ -408,6 +442,7 @@ onMounted(() => {
|
|||
<div v-if="store.currentStep == 4" class="row col-12">
|
||||
<div class="col-xs-12 col-sm-11 row">
|
||||
<q-file
|
||||
ref="fileEvaluationUploadRef"
|
||||
v-model="fileEvaluationUpload"
|
||||
class="col-12"
|
||||
outlined
|
||||
|
|
@ -415,6 +450,11 @@ onMounted(() => {
|
|||
hide-bottom-space
|
||||
lazy-rules
|
||||
accept=".pdf"
|
||||
:rules="
|
||||
download10Url === ''
|
||||
? [(val) => !!val || 'กรุณาเลือกไฟล์']
|
||||
: []
|
||||
"
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<q-icon name="attach_file" />
|
||||
|
|
@ -428,7 +468,7 @@ onMounted(() => {
|
|||
dense
|
||||
color="primary"
|
||||
icon="mdi-upload "
|
||||
@click="upLoadFile"
|
||||
@click="upLoadFile(fileEvaluationUpload)"
|
||||
><q-tooltip>อัปโหลดไฟล์</q-tooltip></q-btn
|
||||
>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@ const AnnouncementEndDate = ref<string | null>();
|
|||
const id = ref<string>(route.params.id as string);
|
||||
const pdfSrc = ref<any>();
|
||||
const fileEvaluation5 = ref<any>();
|
||||
const fileEvaluation5Ref = ref<any>();
|
||||
const status = ref<string>("ANNOUNCE_WEB");
|
||||
const website = ref<string>("https://bma-ehr.frappet.com/");
|
||||
|
||||
|
|
@ -80,49 +81,62 @@ function deleteFile(name: string) {
|
|||
}
|
||||
|
||||
function save() {
|
||||
dialogConfirm($q, () => {
|
||||
download10Url.value === ""
|
||||
? (fileEvaluation5.value = "")
|
||||
: fileEvaluation5.value;
|
||||
fileEvaluation5Ref.value.validate();
|
||||
if (
|
||||
fileEvaluation5Ref.value.hasError === false &&
|
||||
download10Url.value !== ""
|
||||
) {
|
||||
dialogConfirm($q, () => {
|
||||
showLoader();
|
||||
http
|
||||
.put(config.API.evaluationNext5To6(id.value))
|
||||
// .then((res) => {})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
success($q, "บันทึกแจ้งผลการประกาศคัดเลือกสำเร็จ");
|
||||
store.step = 6;
|
||||
store.currentStep = 6;
|
||||
hideLoader();
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function upLoadFile(file: any) {
|
||||
if (file) {
|
||||
showLoader();
|
||||
http
|
||||
.put(config.API.evaluationNext5To6(id.value))
|
||||
// .then((res) => {})
|
||||
.post(config.API.evaluationFileListbyId("เล่ม 1", id.value), {
|
||||
fileList: {
|
||||
fileName: "บันทึกแจ้งผลการประกาศคัดเลือก",
|
||||
metadata: {
|
||||
tag: "value",
|
||||
author: author.value,
|
||||
subject: subject.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);
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
success($q, "บันทึกแจ้งผลการประกาศคัดเลือกสำเร็จ");
|
||||
store.step = 6;
|
||||
store.currentStep = 6;
|
||||
hideLoader();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function upLoadFile() {
|
||||
showLoader();
|
||||
http
|
||||
.post(config.API.evaluationFileListbyId("เล่ม 1", id.value), {
|
||||
fileList: {
|
||||
fileName: "บันทึกแจ้งผลการประกาศคัดเลือก",
|
||||
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);
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function fileUpLoad(url: string) {
|
||||
|
|
@ -135,7 +149,6 @@ function fileUpLoad(url: string) {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
fileEvaluation5.value = null;
|
||||
checkDocResult();
|
||||
success($q, "อัปโหลดไฟล์สำเร็จ");
|
||||
});
|
||||
|
|
@ -266,9 +279,30 @@ function checkDocResult() {
|
|||
});
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
getDate();
|
||||
checkDocResult();
|
||||
const author = ref<string>("");
|
||||
const subject = ref<string>("");
|
||||
|
||||
function fetchDataSigner() {
|
||||
showLoader();
|
||||
http
|
||||
.get(config.API.evaluationSigner(id.value, 1))
|
||||
.then((res) => {
|
||||
const data = res.data.result;
|
||||
author.value = data.author;
|
||||
subject.value = data.subject;
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
}
|
||||
|
||||
onMounted(async () => {
|
||||
await getDate();
|
||||
await checkDocResult();
|
||||
await fetchDataSigner();
|
||||
});
|
||||
</script>
|
||||
|
||||
|
|
@ -356,7 +390,7 @@ onMounted(() => {
|
|||
<div v-if="store.currentStep == 5" class="row col-12">
|
||||
<div class="col-xs-12 col-sm-10 row">
|
||||
<q-file
|
||||
ref="fileEvaluation1Ref"
|
||||
ref="fileEvaluation5Ref"
|
||||
v-model="fileEvaluation5"
|
||||
class="col-12"
|
||||
outlined
|
||||
|
|
@ -365,6 +399,11 @@ onMounted(() => {
|
|||
hide-bottom-space
|
||||
lazy-rules
|
||||
accept=".pdf"
|
||||
:rules="
|
||||
download10Url === ''
|
||||
? [(val) => !!val || 'กรุณาเลือกไฟล์']
|
||||
: []
|
||||
"
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<q-icon name="attach_file" />
|
||||
|
|
@ -378,7 +417,7 @@ onMounted(() => {
|
|||
dense
|
||||
color="primary"
|
||||
icon="mdi-upload"
|
||||
@click="upLoadFile"
|
||||
@click="upLoadFile(fileEvaluation5)"
|
||||
><q-tooltip>อัปโหลดไฟล์</q-tooltip></q-btn
|
||||
>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -56,6 +56,10 @@ function getDate() {
|
|||
});
|
||||
}
|
||||
|
||||
const author = ref<string>("");
|
||||
const subject = ref<string>("");
|
||||
const assignedPosition = ref<string>("");
|
||||
|
||||
function getSigner() {
|
||||
showLoader();
|
||||
http
|
||||
|
|
@ -66,6 +70,9 @@ function getSigner() {
|
|||
formCommand.elementaryPosition = data.commanderPositionDoc2;
|
||||
formCommand.abovelevelFullname = data.commanderAboveFullnameDoc2;
|
||||
formCommand.abovelevelPosition = data.commanderAbovePositionDoc2;
|
||||
author.value = data.authorDoc2;
|
||||
subject.value = data.subjectDoc2;
|
||||
assignedPosition.value = data.assignedPosition;
|
||||
})
|
||||
// .catch((e) => {
|
||||
// messageError($q, e);
|
||||
|
|
@ -91,6 +98,55 @@ onMounted(() => {
|
|||
</div>
|
||||
</q-banner>
|
||||
</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-12 row">
|
||||
<div class="row col-12 q-col-gutter-md q-pa-sm">
|
||||
<q-input
|
||||
dense
|
||||
class="col-xs-12 col-sm-6"
|
||||
outlined
|
||||
label="ชื่อผลงาน"
|
||||
v-model="subject"
|
||||
@update:model-value="updateInput(formCommand)"
|
||||
:rules="[(val) => !!val || `${'กรุณากรอกชื่อผลงาน'}`]"
|
||||
lazy-rules
|
||||
/>
|
||||
<q-input
|
||||
readonly
|
||||
class="col-xs-12 col-sm-6"
|
||||
dense
|
||||
outlined
|
||||
v-model="author"
|
||||
@update:model-value="updateInput(formCommand)"
|
||||
label="เจ้าของผลงาน"
|
||||
:rules="[(val) => !!val || `${'กรุณากรอกเจ้าของผลงาน'}`]"
|
||||
lazy-rules
|
||||
/>
|
||||
<q-input
|
||||
readonly
|
||||
class="col-xs-12 col-sm-6"
|
||||
dense
|
||||
outlined
|
||||
v-model="assignedPosition"
|
||||
@update:model-value="updateInput(formCommand)"
|
||||
label="ต่ำแหน่งที่ได้รับ"
|
||||
:rules="[(val) => !!val || `${'กรุณากรอกเจ้าของผลงาน'}`]"
|
||||
lazy-rules
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</q-card>
|
||||
</div>
|
||||
<!-- <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">
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<script setup lang="ts">
|
||||
import { reactive, ref,onMounted } 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";
|
||||
|
|
@ -30,14 +30,14 @@ function handleItemClick(itemNumber: number) {
|
|||
// evaluationFilebyId
|
||||
function getFile(volume: number) {
|
||||
const fileText = numToThai(volume);
|
||||
console.log(fileText)
|
||||
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)
|
||||
console.log(link, type);
|
||||
getPDF(link, type);
|
||||
})
|
||||
.catch((e) => {
|
||||
|
|
@ -67,6 +67,7 @@ function getPDF(url: string, type: string) {
|
|||
const pdfData = await usePDF(`${objectUrl}`);
|
||||
showLoader();
|
||||
setTimeout(() => {
|
||||
store.urlDownloadFile = url;
|
||||
store.log = 1;
|
||||
store.pdfSrcStore = pdfData.pdf.value;
|
||||
store.numOfPagesStore = pdfData.pages.value;
|
||||
|
|
@ -90,9 +91,9 @@ function numToThai(val: number) {
|
|||
}
|
||||
}
|
||||
|
||||
onMounted(()=>{
|
||||
getFile(1)
|
||||
})
|
||||
onMounted(() => {
|
||||
getFile(1);
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
|
|
|||
|
|
@ -8,6 +8,8 @@ import { useCounterMixin } from "@/stores/mixin";
|
|||
import { useQuasar } from "quasar";
|
||||
import keycloak from "@/plugins/keycloak";
|
||||
|
||||
import type { FileEvaluationRefRef } from "@/modules/12_evaluatePersonal/interface/index/evalute";
|
||||
|
||||
import genReport from "@/plugins/genreport";
|
||||
import { useEvaluateDetailStore } from "@/modules/12_evaluatePersonal/store/EvaluateDetail";
|
||||
|
||||
|
|
@ -42,7 +44,21 @@ const fileEvaluation83 = ref<any>();
|
|||
const fileEvaluation84 = ref<any>();
|
||||
const fileEvaluation85 = ref<any>();
|
||||
const fileEvaluation86 = ref<any>();
|
||||
const fileEvaluation81Ref = ref<object | null>(null);
|
||||
const fileEvaluation82Ref = ref<object | null>(null);
|
||||
const fileEvaluation83Ref = ref<object | null>(null);
|
||||
const fileEvaluation84Ref = ref<object | null>(null);
|
||||
const fileEvaluation85Ref = ref<object | null>(null);
|
||||
const fileEvaluation86Ref = ref<object | null>(null);
|
||||
const profile = ref<any>();
|
||||
const fileEvaluationRef: FileEvaluationRefRef = {
|
||||
fileEvaluation81: fileEvaluation81Ref,
|
||||
fileEvaluation82: fileEvaluation82Ref,
|
||||
fileEvaluation83: fileEvaluation83Ref,
|
||||
fileEvaluation84: fileEvaluation84Ref,
|
||||
fileEvaluation85: fileEvaluation85Ref,
|
||||
fileEvaluation86: fileEvaluation86Ref,
|
||||
};
|
||||
|
||||
async function onClickDowloadFile(
|
||||
tp: string,
|
||||
|
|
@ -89,32 +105,37 @@ function openConfirmEvalution() {
|
|||
}
|
||||
|
||||
function upLoadFile(name: string, file: any) {
|
||||
showLoader();
|
||||
http
|
||||
.post(config.API.evaluationFileListbyId("เล่ม 2", id.value), {
|
||||
fileList: {
|
||||
fileName: name,
|
||||
metadata: {
|
||||
tag: "value",
|
||||
if (file) {
|
||||
showLoader();
|
||||
http
|
||||
.post(config.API.evaluationFileListbyId("เล่ม 2", id.value), {
|
||||
fileList: {
|
||||
fileName: name,
|
||||
metadata: {
|
||||
tag: "value",
|
||||
author: author.value,
|
||||
subject: subject.value,
|
||||
assignedPosition: assignedPosition.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(() => {
|
||||
downloadFileList(name);
|
||||
hideLoader();
|
||||
});
|
||||
})
|
||||
.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(() => {
|
||||
downloadFileList(name);
|
||||
hideLoader();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function fileUpLoad(url: string, file: any) {
|
||||
|
|
@ -127,12 +148,12 @@ function fileUpLoad(url: string, file: any) {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
fileEvaluation81.value = null;
|
||||
fileEvaluation82.value = null;
|
||||
fileEvaluation83.value = null;
|
||||
fileEvaluation84.value = null;
|
||||
fileEvaluation85.value = null;
|
||||
fileEvaluation86.value = null;
|
||||
// fileEvaluation81.value = null;
|
||||
// fileEvaluation82.value = null;
|
||||
// fileEvaluation83.value = null;
|
||||
// fileEvaluation84.value = null;
|
||||
// fileEvaluation85.value = null;
|
||||
// fileEvaluation86.value = null;
|
||||
success($q, "อัปโหลดไฟล์สำเร็จ");
|
||||
});
|
||||
}
|
||||
|
|
@ -183,38 +204,77 @@ function fileUpLoad(url: string, file: any) {
|
|||
// .finally(() => {});
|
||||
// }
|
||||
|
||||
function confirmApprove() {
|
||||
dialogConfirm(
|
||||
$q,
|
||||
() => {
|
||||
const data = {
|
||||
metadata: {
|
||||
additionalProp1: nameOfWork.value,
|
||||
additionalProp2: nameOfOwner.value,
|
||||
additionalProp3: position.value,
|
||||
async function confirmApprove() {
|
||||
const fileEvaluationValues = [
|
||||
fileEvaluation81,
|
||||
fileEvaluation82,
|
||||
fileEvaluation83,
|
||||
fileEvaluation84,
|
||||
fileEvaluation85,
|
||||
fileEvaluation86,
|
||||
];
|
||||
const downloadFileValues = [
|
||||
downloadFile1,
|
||||
downloadFile2,
|
||||
downloadFile3,
|
||||
downloadFile4,
|
||||
downloadFile5,
|
||||
downloadFile6,
|
||||
];
|
||||
|
||||
for (let i = 0; i < downloadFileValues.length; i++) {
|
||||
if (downloadFileValues[i].value === "") {
|
||||
fileEvaluationValues[i].value = null;
|
||||
}
|
||||
}
|
||||
setTimeout(() => {
|
||||
const hasError = [];
|
||||
for (const key in fileEvaluationRef) {
|
||||
if (Object.prototype.hasOwnProperty.call(fileEvaluationRef, key)) {
|
||||
const property = fileEvaluationRef[key];
|
||||
if (property.value && typeof property.value.validate === "function") {
|
||||
const isValid = property.value.validate();
|
||||
hasError.push(isValid);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (hasError.every((result) => result === true)) {
|
||||
dialogConfirm(
|
||||
$q,
|
||||
() => {
|
||||
const data = {
|
||||
metadata: {
|
||||
additionalProp1: nameOfWork.value,
|
||||
additionalProp2: nameOfOwner.value,
|
||||
additionalProp3: position.value,
|
||||
},
|
||||
};
|
||||
showLoader();
|
||||
http
|
||||
.patch(
|
||||
config.API.evaluationPatchData(
|
||||
"เล่ม 2",
|
||||
id.value,
|
||||
"1-เอกสารเล่ม 2"
|
||||
),
|
||||
data
|
||||
)
|
||||
.then(() => {})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
nextStep();
|
||||
modalConfirm.value = false;
|
||||
hideLoader();
|
||||
});
|
||||
},
|
||||
};
|
||||
showLoader();
|
||||
http
|
||||
.patch(
|
||||
config.API.evaluationPatchData("เล่ม 2", id.value, "1-เอกสารเล่ม 2"),
|
||||
data
|
||||
)
|
||||
.then((res) => {
|
||||
console.log(res);
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
nextStep();
|
||||
modalConfirm.value = false;
|
||||
hideLoader();
|
||||
});
|
||||
},
|
||||
"ยืนยันผลการพิจารณา",
|
||||
"ต้องการยืนยันผลการพิจารณาใช่หรือไม่?"
|
||||
);
|
||||
"ยืนยันผลการพิจารณา",
|
||||
"ต้องการยืนยันผลการพิจารณาใช่หรือไม่?"
|
||||
);
|
||||
}
|
||||
}, 100);
|
||||
}
|
||||
|
||||
function nextStep() {
|
||||
|
|
@ -282,7 +342,6 @@ async function downloadFileList(fileName: string) {
|
|||
await http
|
||||
.get(config.API.evaluationFilebyId("เล่ม 2", id.value, fileName))
|
||||
.then((res) => {
|
||||
console.log(res.data);
|
||||
if (
|
||||
fileName ===
|
||||
"แบบตรวจสอบความถูกต้องครบถ้วนของข้อมูลประกอบการประเมินผลงาน (เอกสารแบบ ค)"
|
||||
|
|
@ -305,8 +364,31 @@ async function downloadFileList(fileName: string) {
|
|||
});
|
||||
}
|
||||
|
||||
const author = ref<string>("");
|
||||
const subject = ref<string>("");
|
||||
const assignedPosition = ref<string>("");
|
||||
|
||||
async function fetchDataSigner() {
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.evaluationSigner(id.value, 2))
|
||||
.then((res) => {
|
||||
const data = res.data.result;
|
||||
author.value = data.authorDoc2;
|
||||
subject.value = data.subjectDoc2;
|
||||
assignedPosition.value = data.assignedPosition;
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
fetchProfile();
|
||||
fetchDataSigner();
|
||||
downloadFileList(
|
||||
"แบบตรวจสอบความถูกต้องครบถ้วนของข้อมูลประกอบการประเมินผลงาน (เอกสารแบบ ค)"
|
||||
);
|
||||
|
|
@ -379,6 +461,7 @@ onMounted(() => {
|
|||
<div v-if="store.currentStep == 8" class="row col-12">
|
||||
<div class="col-xs-12 col-sm-10 row">
|
||||
<q-file
|
||||
ref="fileEvaluation81Ref"
|
||||
v-model="fileEvaluation81"
|
||||
class="col-12"
|
||||
outlined
|
||||
|
|
@ -387,6 +470,11 @@ onMounted(() => {
|
|||
lazy-rules
|
||||
label="อัปโหลดไฟล์"
|
||||
accept=".pdf"
|
||||
:rules="
|
||||
downloadFile1 === ''
|
||||
? [(val) => !!val || 'กรุณาเลือกไฟล์']
|
||||
: []
|
||||
"
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<q-icon name="attach_file" />
|
||||
|
|
@ -463,6 +551,7 @@ onMounted(() => {
|
|||
<div v-if="store.currentStep == 8" class="row col-12">
|
||||
<div class="col-xs-12 col-sm-10 row">
|
||||
<q-file
|
||||
ref="fileEvaluation82Ref"
|
||||
v-model="fileEvaluation82"
|
||||
class="col-12"
|
||||
outlined
|
||||
|
|
@ -471,6 +560,11 @@ onMounted(() => {
|
|||
lazy-rules
|
||||
label="อัปโหลดไฟล์"
|
||||
accept=".pdf"
|
||||
:rules="
|
||||
downloadFile2 === ''
|
||||
? [(val) => !!val || 'กรุณาเลือกไฟล์']
|
||||
: []
|
||||
"
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<q-icon name="attach_file" />
|
||||
|
|
@ -547,6 +641,7 @@ onMounted(() => {
|
|||
<div v-if="store.currentStep == 8" class="row col-12">
|
||||
<div class="col-xs-12 col-sm-10 row">
|
||||
<q-file
|
||||
ref="fileEvaluation83Ref"
|
||||
v-model="fileEvaluation83"
|
||||
class="col-12"
|
||||
outlined
|
||||
|
|
@ -555,6 +650,11 @@ onMounted(() => {
|
|||
lazy-rules
|
||||
label="อัปโหลดไฟล์"
|
||||
accept=".pdf"
|
||||
:rules="
|
||||
downloadFile3 === ''
|
||||
? [(val) => !!val || 'กรุณาเลือกไฟล์']
|
||||
: []
|
||||
"
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<q-icon name="attach_file" />
|
||||
|
|
@ -631,6 +731,7 @@ onMounted(() => {
|
|||
<div v-if="store.currentStep == 8" class="row col-12">
|
||||
<div class="col-xs-12 col-sm-10 row">
|
||||
<q-file
|
||||
ref="fileEvaluation84Ref"
|
||||
v-model="fileEvaluation84"
|
||||
class="col-12"
|
||||
outlined
|
||||
|
|
@ -639,6 +740,11 @@ onMounted(() => {
|
|||
lazy-rules
|
||||
label="อัปโหลดไฟล์"
|
||||
accept=".pdf"
|
||||
:rules="
|
||||
downloadFile4 === ''
|
||||
? [(val) => !!val || 'กรุณาเลือกไฟล์']
|
||||
: []
|
||||
"
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<q-icon name="attach_file" />
|
||||
|
|
@ -715,6 +821,7 @@ onMounted(() => {
|
|||
<div v-if="store.currentStep == 8" class="row col-12">
|
||||
<div class="col-xs-12 col-sm-10 row">
|
||||
<q-file
|
||||
ref="fileEvaluation85Ref"
|
||||
v-model="fileEvaluation85"
|
||||
class="col-12"
|
||||
outlined
|
||||
|
|
@ -723,6 +830,11 @@ onMounted(() => {
|
|||
lazy-rules
|
||||
label="อัปโหลดไฟล์"
|
||||
accept=".pdf"
|
||||
:rules="
|
||||
downloadFile5 === ''
|
||||
? [(val) => !!val || 'กรุณาเลือกไฟล์']
|
||||
: []
|
||||
"
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<q-icon name="attach_file" />
|
||||
|
|
@ -799,6 +911,7 @@ onMounted(() => {
|
|||
<div v-if="store.currentStep == 8" class="row col-12">
|
||||
<div class="col-xs-12 col-sm-10 row">
|
||||
<q-file
|
||||
ref="fileEvaluation86Ref"
|
||||
v-model="fileEvaluation86"
|
||||
class="col-12"
|
||||
outlined
|
||||
|
|
@ -807,6 +920,11 @@ onMounted(() => {
|
|||
lazy-rules
|
||||
label="อัปโหลดไฟล์"
|
||||
accept=".pdf"
|
||||
:rules="
|
||||
downloadFile6 === ''
|
||||
? [(val) => !!val || 'กรุณาเลือกไฟล์']
|
||||
: []
|
||||
"
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<q-icon name="attach_file" />
|
||||
|
|
@ -876,7 +994,7 @@ onMounted(() => {
|
|||
unelevated
|
||||
label="ยืนยันผลการพิจารณา"
|
||||
color="public"
|
||||
@click="openConfirmEvalution"
|
||||
@click="confirmApprove"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -32,11 +32,11 @@ function copyLink() {
|
|||
class="q-mt-md"
|
||||
outline
|
||||
icon="mdi-clipboard-outline"
|
||||
label="คัดลอกลิ้งค์"
|
||||
label="คัดลอกลิงก์"
|
||||
color="primary"
|
||||
@click="copyLink"
|
||||
>
|
||||
<q-tooltip> คัดลอกลิ้งค์ </q-tooltip></q-btn
|
||||
<q-tooltip> คัดลอกลิงก์ </q-tooltip></q-btn
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,11 @@
|
|||
<script setup lang="ts">
|
||||
const props = defineProps({
|
||||
columns: {
|
||||
type: Object,
|
||||
type: Array as () => any[],
|
||||
require: true,
|
||||
},
|
||||
row: {
|
||||
type: Array as () => any[],
|
||||
require: true,
|
||||
},
|
||||
});
|
||||
|
|
@ -11,12 +15,14 @@ const props = defineProps({
|
|||
<d-table
|
||||
ref="table"
|
||||
:columns="props.columns"
|
||||
:rows="props.row"
|
||||
row-key="name"
|
||||
flat
|
||||
bordered
|
||||
dense
|
||||
class="custom-header-table"
|
||||
style="width: 580px"
|
||||
style="width: 610px"
|
||||
:rows-per-page-options="[10, 25, 50, 100]"
|
||||
>
|
||||
<!-- <template v-slot:header="props">
|
||||
<q-tr :props="props">
|
||||
|
|
|
|||
|
|
@ -1,10 +1,16 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, watch } from "vue";
|
||||
import { ref, watch, onMounted } from "vue";
|
||||
import { VuePDF, usePDF } from "@tato30/vue-pdf";
|
||||
import { useEvaluateDetailStore } from "@/modules/12_evaluatePersonal/store/EvaluateDetail";
|
||||
|
||||
const store = useEvaluateDetailStore();
|
||||
|
||||
const props = defineProps({
|
||||
type: {
|
||||
type: String,
|
||||
},
|
||||
});
|
||||
|
||||
const splitterModel = ref(14);
|
||||
const numOfPages = ref<number>(0);
|
||||
const page = ref<number>(1);
|
||||
|
|
@ -24,11 +30,18 @@ function backPage() {
|
|||
}
|
||||
}
|
||||
|
||||
watch(()=>store.log, () => {
|
||||
if(store.log === 1){
|
||||
numOfPages.value = store.numOfPagesStore;
|
||||
pdfSrc.value = store.pdfSrcStore;
|
||||
watch(
|
||||
() => store.log,
|
||||
() => {
|
||||
if (store.log === 1) {
|
||||
numOfPages.value = store.numOfPagesStore;
|
||||
pdfSrc.value = store.pdfSrcStore;
|
||||
}
|
||||
}
|
||||
);
|
||||
onMounted(() => {
|
||||
numOfPages.value = store.numOfPagesStore;
|
||||
pdfSrc.value = store.pdfSrcStore;
|
||||
});
|
||||
</script>
|
||||
|
||||
|
|
@ -36,10 +49,10 @@ watch(()=>store.log, () => {
|
|||
<q-splitter
|
||||
v-model="splitterModel"
|
||||
horizontal
|
||||
style="
|
||||
height: 50vh;
|
||||
border: 1px solid rgb(210, 210, 210);
|
||||
border-radius: 5px;
|
||||
:style="
|
||||
props.type !== 'popup'
|
||||
? 'height: 50vh; border: 1px solid rgb(210, 210, 210);border-radius: 5px;'
|
||||
: 'border: 1px solid rgb(210, 210, 210);border-radius: 5px;'
|
||||
"
|
||||
before-class="overflow-hidden disable"
|
||||
separator-class="bg-white disabled"
|
||||
|
|
|
|||
|
|
@ -50,14 +50,12 @@ const formDetail = reactive({
|
|||
|
||||
onMounted(() => {
|
||||
if (props.data) {
|
||||
// formDetail.userId = props.data.id;
|
||||
// formDetail.citizenId = props.data.citizenId;
|
||||
formDetail.prefix = props.data.prefix;
|
||||
formDetail.fullName = `${props.data.firstName} ${props.data.lastName}`;
|
||||
formDetail.fullName = props.data.fullName;
|
||||
formDetail.position = props.data.position;
|
||||
formDetail.oc = props.data.oc;
|
||||
formDetail.salary = props.data.salary
|
||||
? props.data.salary.toLocaleString("th-TH")
|
||||
? formattedNumber(props.data.salary)
|
||||
: "-";
|
||||
formDetail.positionLevel = props.data.positionLevel;
|
||||
formDetail.posNo = props.data.posNo;
|
||||
|
|
@ -75,6 +73,7 @@ onMounted(() => {
|
|||
issuer: e.issuer,
|
||||
}))
|
||||
: [];
|
||||
|
||||
formDetail.salaries = props.data.salaries
|
||||
? props.data.salaries.map((e: any) => ({
|
||||
amount: e.amount,
|
||||
|
|
@ -119,6 +118,10 @@ onMounted(() => {
|
|||
formDetail.assessments = props.data.assessments;
|
||||
}
|
||||
});
|
||||
|
||||
function formattedNumber(x: number) {
|
||||
return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
|
@ -293,7 +296,7 @@ onMounted(() => {
|
|||
<q-input
|
||||
borderless
|
||||
readonly
|
||||
:model-value="education.degree"
|
||||
:model-value="education.isEducation ? 'ใช่' : 'ไม่ใช่'"
|
||||
label="วุฒิการศึกษาในตําแหน่ง"
|
||||
/>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,12 +1,38 @@
|
|||
<script setup lang="ts">
|
||||
import { ref } from "vue";
|
||||
import DialogHeader from "@/components/DialogHeader.vue";
|
||||
import ViewPDF from "@/modules/12_evaluatePersonal/components/Detail/viewstep/viewPDF.vue";
|
||||
|
||||
import { useEvaluateDetailStore } from "@/modules/12_evaluatePersonal/store/EvaluateDetail";
|
||||
|
||||
const store = useEvaluateDetailStore();
|
||||
|
||||
const modalPerview = ref<boolean>(false);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="col-12 row">
|
||||
<q-space />
|
||||
<q-btn
|
||||
flat
|
||||
round
|
||||
color="primary"
|
||||
icon="download"
|
||||
target="_blank"
|
||||
:href="store.urlDownloadFile"
|
||||
>
|
||||
<q-tooltip>ดาวน์โหลด</q-tooltip>
|
||||
</q-btn>
|
||||
<q-btn
|
||||
flat
|
||||
round
|
||||
color="primary"
|
||||
icon="mdi-fullscreen"
|
||||
@click="modalPerview = true"
|
||||
><q-tooltip>ดูเต็มจอ</q-tooltip></q-btn
|
||||
>
|
||||
</div>
|
||||
|
||||
<q-tab-panels v-model="store.tabPanels" animated swipeable vertical>
|
||||
<q-tab-panel name="1">
|
||||
<ViewPDF />
|
||||
|
|
@ -29,6 +55,22 @@ const store = useEvaluateDetailStore();
|
|||
<ViewPDF />
|
||||
</q-tab-panel>
|
||||
</q-tab-panels>
|
||||
|
||||
<q-dialog v-model="modalPerview" full-width fullHeight>
|
||||
<q-card>
|
||||
<q-card-section>
|
||||
<DialogHeader :close="() => (modalPerview = false)" />
|
||||
</q-card-section>
|
||||
|
||||
<q-card-section class="q-pt-none">
|
||||
<ViewPDF :type="'popup'" />
|
||||
</q-card-section>
|
||||
</q-card>
|
||||
</q-dialog>
|
||||
</template>
|
||||
|
||||
<style scoped></style>
|
||||
<style>
|
||||
.q-tab-panel {
|
||||
padding: 0px;
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -1,17 +1,54 @@
|
|||
<script setup lang="ts">
|
||||
import { ref } from "vue";
|
||||
import DialogHeader from "@/components/DialogHeader.vue";
|
||||
import ViewPDF from "@/modules/12_evaluatePersonal/components/Detail/viewstep/viewPDF.vue";
|
||||
|
||||
import { useEvaluateDetailStore } from "@/modules/12_evaluatePersonal/store/EvaluateDetail";
|
||||
|
||||
const store = useEvaluateDetailStore();
|
||||
|
||||
const modalPerview = ref<boolean>(false);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<q-tab-panels v-model="store.tabPanels" animated swipeable vertical>
|
||||
<q-tab-panel name="1">
|
||||
<ViewPDF />
|
||||
</q-tab-panel>
|
||||
</q-tab-panels>
|
||||
<div class="col-12 row">
|
||||
<q-space />
|
||||
<q-btn
|
||||
flat
|
||||
round
|
||||
color="primary"
|
||||
icon="download"
|
||||
target="_blank"
|
||||
:href="store.urlDownloadFile"
|
||||
>
|
||||
<q-tooltip>ดาวน์โหลด</q-tooltip>
|
||||
</q-btn>
|
||||
<q-btn
|
||||
flat
|
||||
round
|
||||
color="primary"
|
||||
icon="mdi-fullscreen"
|
||||
@click="modalPerview = true"
|
||||
><q-tooltip>ดูเต็มจอ</q-tooltip></q-btn
|
||||
>
|
||||
</div>
|
||||
<!-- <q-tab-panels v-model="store.tabPanels" animated swipeable vertical>
|
||||
<q-tab-panel name="1"> -->
|
||||
<ViewPDF />
|
||||
<!-- </q-tab-panel>
|
||||
</q-tab-panels> -->
|
||||
|
||||
<q-dialog v-model="modalPerview" full-width fullHeight>
|
||||
<q-card>
|
||||
<q-card-section>
|
||||
<DialogHeader :close="() => (modalPerview = false)" />
|
||||
</q-card-section>
|
||||
|
||||
<q-card-section class="q-pt-none">
|
||||
<ViewPDF :type="'popup'" />
|
||||
</q-card-section>
|
||||
</q-card>
|
||||
</q-dialog>
|
||||
</template>
|
||||
|
||||
<style scoped></style>
|
||||
|
|
|
|||
|
|
@ -14,6 +14,17 @@ interface FormCommandRef {
|
|||
[key: string]: any;
|
||||
}
|
||||
|
||||
interface FileEvaluationRefRef {
|
||||
fileEvaluation81: object | null;
|
||||
fileEvaluation82: object | null;
|
||||
fileEvaluation83: object | null;
|
||||
fileEvaluation84: object | null;
|
||||
fileEvaluation85: object | null;
|
||||
fileEvaluation86: object | null;
|
||||
|
||||
[key: string]: any;
|
||||
}
|
||||
|
||||
interface EducationForm {
|
||||
country: string;
|
||||
degree: string;
|
||||
|
|
@ -40,4 +51,10 @@ interface CertificatesForm {
|
|||
issuer: string;
|
||||
}
|
||||
|
||||
export type { FormCommand, FormCommandRef, EducationForm, CertificatesForm };
|
||||
export type {
|
||||
FormCommand,
|
||||
FormCommandRef,
|
||||
EducationForm,
|
||||
CertificatesForm,
|
||||
FileEvaluationRefRef,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -23,9 +23,9 @@ export const useEvalutuonStore = defineStore("EvalutuonStore", () => {
|
|||
case "PREPARE_DOC_V2":
|
||||
return "จัดเตรียมเอกสารเล่ม 2";
|
||||
case "WAIT_CHECK_DOC_V2":
|
||||
return "ตรวจสอบความถูกต้องของเอกสารเล่ม 2";
|
||||
return "รอพิจารณาผลการประเมิน 2";
|
||||
case "CHECK_DOC_V2":
|
||||
return "รอพิจารณาผลการประเมิน";
|
||||
return "ตรวจสอบความถูกต้องของเอกสารเล่ม 2";
|
||||
case "DONE":
|
||||
return "เสร็จสิ้น";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,16 +14,17 @@ export const useEvaluateDetailStore = defineStore("evaluateDetailStore", () => {
|
|||
"รอตรวจสอบคุณสมบัติ",
|
||||
"ประกาศบนเว็บไซต์",
|
||||
"จัดเตรียมเอกสารเล่ม 2",
|
||||
"ตรวจสอบเอกสารเล่ม 2",
|
||||
"รอพิจารณาผล",
|
||||
"รอพิจารณาผลการประเมิน 2",
|
||||
"ตรวจสอบความถูกต้องของเอกสารเล่ม 2",
|
||||
"เสร็จสิ้น",
|
||||
]);
|
||||
|
||||
const tabPanels = ref<string>("1");
|
||||
|
||||
const log = ref<any>(0)
|
||||
const pdfSrcStore = ref<any>()
|
||||
const numOfPagesStore = ref<any>()
|
||||
const log = ref<any>(0);
|
||||
const urlDownloadFile = ref<string>("");
|
||||
const pdfSrcStore = ref<any>();
|
||||
const numOfPagesStore = ref<any>();
|
||||
|
||||
const columnsCertificates = ref<QTableProps["columns"]>([
|
||||
{
|
||||
|
|
@ -291,8 +292,9 @@ export const useEvaluateDetailStore = defineStore("evaluateDetailStore", () => {
|
|||
columnTraining,
|
||||
columnProjectsProposed,
|
||||
pdfSrcStore,
|
||||
urlDownloadFile,
|
||||
numOfPagesStore,
|
||||
log,
|
||||
currentStep
|
||||
currentStep,
|
||||
};
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue