Merge branch 'NiceDev' into develop
This commit is contained in:
parent
37bef4e836
commit
0b8b5d497c
13 changed files with 168 additions and 357 deletions
|
|
@ -1,11 +1,15 @@
|
|||
<script setup lang="ts">
|
||||
import DialogHeader from "@/components/DialogHeader.vue";
|
||||
import { useEvaluateStore } from "@/modules/06_evaluate/store";
|
||||
import Table from "@/components/Table.vue";
|
||||
|
||||
import { ref, watch } from "vue";
|
||||
import type { QTableProps } from "quasar";
|
||||
|
||||
/***importComponents*/
|
||||
import Table from "@/components/Table.vue";
|
||||
import DialogHeader from "@/components/DialogHeader.vue";
|
||||
|
||||
/** importStore*/
|
||||
import { useEvaluateStore } from "@/modules/06_evaluate/store";
|
||||
|
||||
/**use*/
|
||||
const store = useEvaluateStore();
|
||||
|
||||
const props = defineProps({
|
||||
|
|
@ -29,7 +33,6 @@ const props = defineProps({
|
|||
});
|
||||
|
||||
const filter = ref<string>("");
|
||||
|
||||
const rows = ref<any[]>([
|
||||
{
|
||||
degree: "ปริญญาตรี หรือเทียบเท่า",
|
||||
|
|
|
|||
|
|
@ -1,8 +1,7 @@
|
|||
<script setup lang="ts">
|
||||
import { ref } from "vue";
|
||||
|
||||
/** importStore*/
|
||||
import { useEvaluateStore } from "@/modules/06_evaluate/store";
|
||||
|
||||
/**use*/
|
||||
const store = useEvaluateStore();
|
||||
</script>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,161 +0,0 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, onMounted } from "vue";
|
||||
import { useQuasar } from "quasar";
|
||||
import evaluationFunctions from "@/modules/06_evaluate/stores/evaluationFunction";
|
||||
|
||||
import Stepper from "@/modules/06_evaluate/components/Stepper.vue";
|
||||
import Step1 from "@/modules/06_evaluate/components/step/step1.vue";
|
||||
import Step2 from "@/modules/06_evaluate/components/step/step2.vue";
|
||||
import Step3 from "@/modules/06_evaluate/components/step/step3.vue";
|
||||
import Step4 from "@/modules/06_evaluate/components/step/step4.vue";
|
||||
import Step5 from "@/modules/06_evaluate/components/step/step5.vue";
|
||||
import Step6 from "@/modules/06_evaluate/components/step/step6.vue";
|
||||
import Step7 from "@/modules/06_evaluate/components/step/step7.vue";
|
||||
import Step8 from "@/modules/06_evaluate/components/step/step8.vue";
|
||||
import Step9 from "@/modules/06_evaluate/components/step/step9.vue";
|
||||
|
||||
import ViewStep1 from "@/modules/06_evaluate/components/viewstep/viewStep1.vue";
|
||||
import ViewStep3 from "@/modules/06_evaluate/components/viewstep/viewStep3.vue";
|
||||
import ViewStep7 from "@/modules/06_evaluate/components/viewstep/viewStep7.vue";
|
||||
|
||||
import DialogMain from "@/modules/06_evaluate/components/directorandmeet/DialogMain.vue";
|
||||
|
||||
import { useEvaluateStore } from "@/modules/06_evaluate/store";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
|
||||
const store = useEvaluateStore();
|
||||
const mixin = useCounterMixin();
|
||||
const $q = useQuasar();
|
||||
|
||||
const { dialogConfirm } = mixin;
|
||||
const { fetchCheckStatus, saveEvaluation } = evaluationFunctions;
|
||||
|
||||
function onCilckNextStep() {
|
||||
store.step < 9 &&
|
||||
dialogConfirm($q, () => {
|
||||
store.step++;
|
||||
});
|
||||
}
|
||||
|
||||
function onCilckprPeviousStep() {
|
||||
store.step > 1 &&
|
||||
dialogConfirm($q, () => {
|
||||
store.step--;
|
||||
});
|
||||
}
|
||||
|
||||
const modalMeeting = ref<boolean>(false);
|
||||
|
||||
function onClickDialogMeeting() {
|
||||
modalMeeting.value = true;
|
||||
}
|
||||
|
||||
function closeDialogMeeting() {
|
||||
modalMeeting.value = false;
|
||||
}
|
||||
|
||||
function fetchDirector() {
|
||||
console.log("ประเมินชำนาญการพิเศษ:director");
|
||||
}
|
||||
|
||||
function fetchMeeting() {
|
||||
console.log("ประเมินชำนาญการพิเศษ:meeting");
|
||||
}
|
||||
|
||||
onMounted(async () => {
|
||||
store.step = 1;
|
||||
await fetchCheckStatus();
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="row q-col-gutter-md">
|
||||
<div class="col-xs-12 col-sm-3">
|
||||
<div class="toptitle">ประเมินชำนาญการพิเศษ</div>
|
||||
<Stepper />
|
||||
<div class="text-center">
|
||||
<q-btn
|
||||
unelevated
|
||||
outline
|
||||
label="รายชื่อกรรมการและการประชุม"
|
||||
color="public"
|
||||
@click="onClickDialogMeeting"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-xs-12 col-sm-9">
|
||||
<div class="toptitle">
|
||||
{{ store.step }}.{{ store.title[store.step - 1] }}
|
||||
</div>
|
||||
<div class="row q-col-gutter-md col-12">
|
||||
<div
|
||||
:class="
|
||||
store.step === 2 ||
|
||||
store.step === 4 ||
|
||||
store.step === 5 ||
|
||||
store.step === 6 ||
|
||||
store.step === 8 ||
|
||||
store.step === 9
|
||||
? 'col-xs-12 col-sm-12 row'
|
||||
: 'col-xs-12 col-sm-5 row'
|
||||
"
|
||||
>
|
||||
<q-card flat bordered class="col-12 q-pa-md">
|
||||
<q-card-section>
|
||||
<Step1 v-if="store.step === 1" />
|
||||
<Step2 v-if="store.step === 2" />
|
||||
<Step3 v-if="store.step === 3" />
|
||||
<Step4 v-if="store.step === 4" />
|
||||
<Step5 v-if="store.step === 5" />
|
||||
<Step6 v-if="store.step === 6" />
|
||||
<Step7 v-if="store.step === 7" />
|
||||
<Step8 v-if="store.step === 8" />
|
||||
<Step9 v-if="store.step === 9" />
|
||||
</q-card-section>
|
||||
</q-card>
|
||||
</div>
|
||||
<div
|
||||
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" />
|
||||
<ViewStep3 v-if="store.step === 3" />
|
||||
<ViewStep7 v-if="store.step === 7" /> </q-card-section
|
||||
></q-card>
|
||||
</div>
|
||||
</div>
|
||||
<div class="q-mt-md q-gutter-md" align="right">
|
||||
<q-btn
|
||||
v-if="store.step !== 1"
|
||||
unelevated
|
||||
outline
|
||||
label="ย้อนกลับ"
|
||||
color="public"
|
||||
@click="onCilckprPeviousStep"
|
||||
/>
|
||||
<q-btn
|
||||
unelevated
|
||||
label="ดำเนินการต่อ"
|
||||
color="public"
|
||||
@click="onCilckNextStep"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<DialogMain
|
||||
:modal="modalMeeting"
|
||||
:close="closeDialogMeeting"
|
||||
:fetchDirector="fetchDirector"
|
||||
:fetchMeeting="fetchMeeting"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<style>
|
||||
.q-stepper--vertical .q-stepper__step-inner {
|
||||
padding: 0;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -1,28 +1,25 @@
|
|||
<script setup lang="ts">
|
||||
import { reactive, onMounted, ref, watch } from "vue";
|
||||
import { useQuasar } from "quasar";
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
import { reactive, onMounted, ref } from "vue";
|
||||
|
||||
/**importTyep*/
|
||||
import type {
|
||||
PersonInformation,
|
||||
FormSpec,
|
||||
} from "@/modules/06_evaluate/interface/evalute";
|
||||
|
||||
/** importComponents*/
|
||||
import PopupCheckFeatures from "@/modules/06_evaluate/components/PopupCheckFeatures.vue";
|
||||
|
||||
/** importStores*/
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { useEvaluateStore } from "@/modules/06_evaluate/store";
|
||||
|
||||
/** use*/
|
||||
const mixin = useCounterMixin();
|
||||
const $q = useQuasar();
|
||||
const store = useEvaluateStore();
|
||||
|
||||
const { showLoader, hideLoader, messageError } = mixin;
|
||||
|
||||
/** props จาก Tab1.vue*/
|
||||
const props = defineProps({
|
||||
educations: Array,
|
||||
data: {
|
||||
type: Array,
|
||||
type: Object as () => PersonInformation,
|
||||
},
|
||||
});
|
||||
|
||||
|
|
@ -31,7 +28,7 @@ const emit = defineEmits(["update:spec"]);
|
|||
const modal = ref<boolean>(false);
|
||||
const show = ref<boolean>(false);
|
||||
|
||||
const formData = reactive<any>({
|
||||
const formData = reactive<FormSpec>({
|
||||
isEducationalQft: false, // คุณวุฒิการศึกษา
|
||||
isGovermantServiceHtr: false, // ประวัติการรับราชการ
|
||||
isOperatingExp: false, // ประสบการณ์ในการปฏิบัติงาน
|
||||
|
|
@ -48,14 +45,9 @@ async function updateValue() {
|
|||
|
||||
/**
|
||||
* function fetchData ตรวจสอบคุณสมบัติ
|
||||
* @param id ประเมิน
|
||||
* @param data ตรวจสอบคุณสมบัติ
|
||||
*/
|
||||
async function fetchCheckSpec(data: any) {
|
||||
// showLoader();
|
||||
// await http
|
||||
// .get(config.API.evaluationCheckspecByid(id))
|
||||
// .then((res) => {
|
||||
// const data = res.data.result;
|
||||
async function fetchCheckSpec(data: PersonInformation) {
|
||||
formData.isEducationalQft = data.isEducationalQft;
|
||||
formData.isGovermantServiceHtr = data.isGovermantServiceHtr;
|
||||
formData.isOperatingExp = data.isOperatingExp;
|
||||
|
|
@ -63,13 +55,6 @@ async function fetchCheckSpec(data: any) {
|
|||
formData.isHaveSpecificQft = data.isHaveSpecificQft;
|
||||
formData.isHaveProLicense = data.isHaveProLicense;
|
||||
formData.isHaveMinPeriodOrHoldPos = data.isHaveMinPeriodOrHoldPos;
|
||||
// })
|
||||
// .catch((err) => {
|
||||
// messageError($q, err);
|
||||
// })
|
||||
// .finally(() => {
|
||||
// hideLoader();
|
||||
// });
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -88,8 +73,6 @@ function closeModal() {
|
|||
|
||||
/**hook lifecycle*/
|
||||
onMounted(() => {
|
||||
// setTimeout(() => {
|
||||
// }, 1000);
|
||||
props.data && fetchCheckSpec(props.data);
|
||||
});
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -25,7 +25,6 @@ const route = useRoute();
|
|||
const { showLoader, hideLoader, date2Thai, messageError, success } = mixin;
|
||||
|
||||
const evaluateId = ref<string>(route.params.id.toString());
|
||||
const statusUpload = ref<boolean>(false);
|
||||
|
||||
/** emit */
|
||||
const emit = defineEmits(["update:form"]);
|
||||
|
|
@ -103,11 +102,6 @@ const page = ref<number>(1);
|
|||
const pdfSrc = ref<any>();
|
||||
const profile = ref<any>();
|
||||
|
||||
function onClickViewPDF(file: any) {
|
||||
// pdfSrc.value = file.webkitRelativePath;
|
||||
modalView.value = true;
|
||||
}
|
||||
|
||||
/** function ไปหน้าต่อไปของรายงาน */
|
||||
function nextPage() {
|
||||
if (page.value < numOfPages.value) {
|
||||
|
|
|
|||
|
|
@ -1,27 +1,26 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, onMounted } from "vue";
|
||||
import { useRoute } from "vue-router";
|
||||
import { useQuasar } from "quasar";
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
import { useQuasar } from "quasar";
|
||||
import axios from "axios";
|
||||
|
||||
/** importStroe*/
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { useEvaluateStore } from "@/modules/06_evaluate/store";
|
||||
|
||||
/** use*/
|
||||
const $q = useQuasar();
|
||||
const store = useEvaluateStore();
|
||||
const mixin = useCounterMixin();
|
||||
const route = useRoute();
|
||||
const { showLoader, hideLoader, messageError } = mixin;
|
||||
|
||||
/** id ประเมิน*/
|
||||
const evaluateId = ref<string>(route.params.id.toString());
|
||||
|
||||
// const props = defineProps({
|
||||
// evaluateId: {
|
||||
// type: String,
|
||||
// },
|
||||
// });
|
||||
/** emit*/
|
||||
const emit = defineEmits(["update:file"]);
|
||||
|
||||
const selectedItem = ref(1);
|
||||
|
|
@ -34,13 +33,22 @@ const fileName = ref([
|
|||
"6-ผลงานที่จะส่งประเมิน (เอกสารหมายเลข 11)",
|
||||
]);
|
||||
|
||||
/**
|
||||
* function กดเลือกแสดงเอกสาน
|
||||
* @param itemNumber เอกสาร
|
||||
*/
|
||||
function handleItemClick(itemNumber: number) {
|
||||
store.tabPanels = itemNumber.toString();
|
||||
selectedItem.value = itemNumber;
|
||||
fetchDocument(fileName.value[itemNumber - 1]);
|
||||
}
|
||||
|
||||
/**
|
||||
* function เรีกยเอกสาร
|
||||
* @param fileName ชื่อเอกสาร
|
||||
*/
|
||||
async function fetchDocument(fileName: string) {
|
||||
// showLoader();
|
||||
showLoader();
|
||||
evaluateId.value &&
|
||||
(await http
|
||||
.get(config.API.loadFileDocument("เล่ม 1", evaluateId.value, fileName))
|
||||
|
|
@ -52,6 +60,10 @@ async function fetchDocument(fileName: string) {
|
|||
}));
|
||||
}
|
||||
|
||||
/**
|
||||
* function ดาวน์โหลดไฟล์
|
||||
* @param url ลิงก์ดาวน์โหลดไฟล์
|
||||
*/
|
||||
async function downloadFile(url: string) {
|
||||
await axios
|
||||
.get(url, {
|
||||
|
|
@ -77,6 +89,7 @@ async function downloadFile(url: string) {
|
|||
});
|
||||
}
|
||||
|
||||
/** HooK lifecycle*/
|
||||
onMounted(async () => {
|
||||
await fetchDocument(fileName.value[selectedItem.value - 1]);
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,22 +1,27 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, onMounted } from "vue";
|
||||
import { useRoute } from "vue-router";
|
||||
import { useQuasar } from "quasar";
|
||||
import config from "@/app.config";
|
||||
import http from "@/plugins/http";
|
||||
import { useQuasar } from "quasar";
|
||||
|
||||
/** importStore*/
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
|
||||
/** use*/
|
||||
const mixins = useCounterMixin();
|
||||
const $q = useQuasar();
|
||||
const route = useRoute();
|
||||
const { date2Thai, success } = mixins;
|
||||
|
||||
/** id ประเมิน*/
|
||||
const evaluateId = ref<string>(route.params.id.toString());
|
||||
|
||||
const dateStartAnnounce = ref<string | null>(date2Thai(new Date()));
|
||||
const dateEndAnnounce = ref<string | null>(date2Thai(new Date()));
|
||||
const statusFile = ref<boolean>(false);
|
||||
|
||||
/** เอกสารประกาศผลการคัดเลือกบุคคล*/
|
||||
const items = ref<any>([
|
||||
{
|
||||
label: "แบบสรุปข้อมูลของผู้ขอรับการคัดเลือก (เอกสารหมายเลข 9)",
|
||||
|
|
@ -32,8 +37,7 @@ const items = ref<any>([
|
|||
},
|
||||
]);
|
||||
|
||||
const statusFile = ref<boolean>(false);
|
||||
|
||||
/** fuinction เรียกข้อมูลลิงก์ดาวนฺโหลด*/
|
||||
async function onClickfetchDocument(fileName: string, type: string) {
|
||||
evaluateId.value &&
|
||||
(await http
|
||||
|
|
@ -43,22 +47,17 @@ async function onClickfetchDocument(fileName: string, type: string) {
|
|||
type === "COPPY" && coppyLink(downloadUrl);
|
||||
type === "CHECK" && (statusFile.value = true);
|
||||
})
|
||||
.catch((err) => {}));
|
||||
.catch(() => {}));
|
||||
}
|
||||
|
||||
/** function คัดลอหลิงก์ดาวน์โหลด */
|
||||
async function coppyLink(link: string) {
|
||||
const linkById = link;
|
||||
navigator.clipboard.writeText(linkById);
|
||||
success($q, "คัดลอกสำเร็จ");
|
||||
|
||||
// const textarea = document.createElement("textarea");
|
||||
// textarea.value = link;
|
||||
// document.body.appendChild(textarea);
|
||||
// textarea.select();
|
||||
// document.execCommand("copy");
|
||||
// success($q, "คัดลอกลิงค์สำเร็จ");
|
||||
}
|
||||
|
||||
/** function เรียกข้อมูลวันที่ประกาศ*/
|
||||
async function fetchCheckDate() {
|
||||
evaluateId.value &&
|
||||
(await http
|
||||
|
|
@ -70,9 +69,10 @@ async function fetchCheckDate() {
|
|||
endDate.setDate(endDate.getDate() + 30);
|
||||
dateEndAnnounce.value = date2Thai(endDate);
|
||||
})
|
||||
.catch((err) => {}));
|
||||
.catch(() => {}));
|
||||
}
|
||||
|
||||
/** Hook lifecycle*/
|
||||
onMounted(async () => {
|
||||
fetchCheckDate();
|
||||
await onClickfetchDocument("บันทึกแจ้งผลการประกาศคัดเลือก", "CHECK");
|
||||
|
|
@ -88,19 +88,9 @@ onMounted(async () => {
|
|||
ประกาศเมื่อวันที่ {{ dateStartAnnounce }} ถึง {{ dateEndAnnounce }}
|
||||
</div>
|
||||
</q-banner>
|
||||
<!-- <q-badge
|
||||
v-if="status == 'ANNOUNCE_WEB'"
|
||||
outline
|
||||
color="primary"
|
||||
label="ประกาศบนเว็บไซต์"
|
||||
class="q-pa-sm"
|
||||
style="font-size: 16px"
|
||||
/>
|
||||
<div> -->
|
||||
<!-- <a :href="website" target="_blank">{{ website }}</a> -->
|
||||
<!-- </div> -->
|
||||
</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">
|
||||
|
|
@ -133,6 +123,7 @@ onMounted(async () => {
|
|||
</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">
|
||||
|
|
|
|||
|
|
@ -1,18 +1,23 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, reactive, watch, onMounted } from "vue";
|
||||
import keycloak from "@/plugins/keycloak";
|
||||
import { useRoute } from "vue-router";
|
||||
import { useQuasar } from "quasar";
|
||||
import keycloak from "@/plugins/keycloak";
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
import axios from "axios";
|
||||
import { useQuasar } from "quasar";
|
||||
import ViewPDF from "@/modules/06_evaluate/components/viewstep/viewPDF.vue";
|
||||
|
||||
/** importType*/
|
||||
import type { FormCommand } from "@/modules/06_evaluate/interface/evalute";
|
||||
|
||||
/** importComponents*/
|
||||
import ViewPDF from "@/modules/06_evaluate/components/viewstep/viewPDF.vue";
|
||||
|
||||
/** importStore*/
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { useEvaluateStore } from "@/modules/06_evaluate/store";
|
||||
|
||||
/** use*/
|
||||
const $q = useQuasar();
|
||||
const store = useEvaluateStore();
|
||||
const mixins = useCounterMixin();
|
||||
|
|
@ -20,17 +25,19 @@ const route = useRoute();
|
|||
|
||||
const { date2Thai, showLoader, hideLoader, messageError, success } = mixins;
|
||||
|
||||
/** id ประเมิน*/
|
||||
const evaluateId = ref<string>(route.params.id.toString());
|
||||
|
||||
/** emit*/
|
||||
const emit = defineEmits(["update:form"]);
|
||||
|
||||
const fileEvaluation1 = ref<any>();
|
||||
const pdfSrc = ref<any>();
|
||||
|
||||
const performance = ref<string>("");
|
||||
const performanceOwner = ref<string>("");
|
||||
const position = ref<string>("");
|
||||
|
||||
/** form จัดเตรียมเอกสารเล่ม 2*/
|
||||
const formCommand = reactive<FormCommand>({
|
||||
commanderFullname: "",
|
||||
commanderPosition: "",
|
||||
|
|
@ -40,7 +47,7 @@ const formCommand = reactive<FormCommand>({
|
|||
subject: "",
|
||||
assignedPosition: "",
|
||||
});
|
||||
|
||||
/** ref input*/
|
||||
const commanderFullnameRef = ref<object | null>(null);
|
||||
const commanderPositionRef = ref<object | null>(null);
|
||||
const commanderAboveFullnameRef = ref<object | null>(null);
|
||||
|
|
@ -51,12 +58,9 @@ const performanceOwnerRef = ref<object | null>(null);
|
|||
const assignedPositionRef = ref<object | null>(null);
|
||||
|
||||
const modalView = ref<boolean>(false);
|
||||
function onClickViewPDF(file: any) {
|
||||
pdfSrc.value = file.webkitRelativePath;
|
||||
modalView.value = true;
|
||||
}
|
||||
|
||||
const updateInput = (value: any) => {
|
||||
/** function อัปเดท ผลงาน,ผู้เซ็นเอกสาร*/
|
||||
function updateInput(value: any) {
|
||||
const ref = {
|
||||
commanderFullnameRef: commanderFullnameRef.value,
|
||||
commanderPositionRef: commanderPositionRef.value,
|
||||
|
|
@ -69,8 +73,15 @@ const updateInput = (value: any) => {
|
|||
assignedPosition: assignedPositionRef.value,
|
||||
};
|
||||
emit("update:form", value, ref);
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* function เรียก Path อัปโหลดไฟล์
|
||||
* @param volume เล่ม
|
||||
* @param id ประเมิน
|
||||
* @param type ชือไฟล์
|
||||
* @param file ไฟล์
|
||||
*/
|
||||
async function fetchPathUpload(
|
||||
volume: string,
|
||||
id: string | undefined,
|
||||
|
|
@ -108,6 +119,11 @@ async function fetchPathUpload(
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param uploadUrl ลิงก์อัปโหลด
|
||||
* @param file ไฟล์
|
||||
*/
|
||||
async function uploadfile(uploadUrl: string, file: any) {
|
||||
await axios
|
||||
.put(uploadUrl, file, {
|
||||
|
|
@ -124,6 +140,10 @@ async function uploadfile(uploadUrl: string, file: any) {
|
|||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* function เรียกข้อมูล ผลงาน,ผู้เช็นเอกสาร
|
||||
* @param id ประเมิน
|
||||
*/
|
||||
async function fetcheSigner(id: string) {
|
||||
showLoader();
|
||||
await http
|
||||
|
|
@ -148,27 +168,24 @@ async function fetcheSigner(id: string) {
|
|||
});
|
||||
}
|
||||
|
||||
// const dateStartPrepareDoc2 = ref<string | null>(date2Thai(new Date()));
|
||||
const dateEndPrepareDoc2 = ref<string | null>(date2Thai(new Date()));
|
||||
|
||||
/** functoin เรียกข้อมูลวันสุดท้ายของการส่งผลงาน*/
|
||||
async function fetchCheckDate() {
|
||||
evaluateId.value &&
|
||||
(await http
|
||||
.get(config.API.evaluationCheckDate(evaluateId.value))
|
||||
.then((res) => {
|
||||
const data = res.data.result;
|
||||
// dateStartPrepareDoc2.value = date2Thai(data.dateStartPrepareDoc2);
|
||||
|
||||
const endDate = new Date(data.dateEndAnnounce);
|
||||
endDate.setDate(endDate.getDate() + 180);
|
||||
dateEndPrepareDoc2.value = date2Thai(endDate);
|
||||
// dateEndPrepareDoc2.value = data.dateEndPrepareDoc2
|
||||
// ? date2Thai(data.dateEndPrepareDoc2)
|
||||
// : dateEndPrepareDoc2.value;
|
||||
})
|
||||
.catch((err) => {}));
|
||||
}
|
||||
|
||||
const downloadUrl = ref<string>("");
|
||||
/** function เช็คไฟล์อัปโหลด*/
|
||||
function checkDoc() {
|
||||
showLoader();
|
||||
http
|
||||
|
|
@ -178,9 +195,7 @@ function checkDoc() {
|
|||
.then((res: any) => {
|
||||
downloadUrl.value = res.data.downloadUrl;
|
||||
})
|
||||
// .catch((e) => {
|
||||
// messageError($q, e);
|
||||
// })
|
||||
.catch(() => {})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
const ref = {
|
||||
|
|
@ -199,6 +214,7 @@ function checkDoc() {
|
|||
});
|
||||
}
|
||||
|
||||
/** hook lifecycle*/
|
||||
onMounted(async () => {
|
||||
if (keycloak.tokenParsed != null) {
|
||||
formCommand.author = keycloak.tokenParsed.name;
|
||||
|
|
@ -208,8 +224,6 @@ onMounted(async () => {
|
|||
fetcheSigner(evaluateId.value);
|
||||
}
|
||||
await fetchCheckDate();
|
||||
|
||||
// props.evaluateId && (await fetchPathUpload("เล่ม 2", props.evaluateId));
|
||||
});
|
||||
|
||||
watch(
|
||||
|
|
@ -240,6 +254,7 @@ watch(
|
|||
</div>
|
||||
</q-banner>
|
||||
</div>
|
||||
|
||||
<!-- ผลงาน -->
|
||||
<div class="col-12">
|
||||
<q-card bordered style="border: 1px solid #d6dee1">
|
||||
|
|
@ -249,9 +264,6 @@ watch(
|
|||
<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="text-weight-medium q-py-sm">
|
||||
ผู้บังคับบัญชาชั้นต้น
|
||||
</div> -->
|
||||
<div class="row col-12 q-col-gutter-md q-pa-sm">
|
||||
<q-input
|
||||
:readonly="store.currentStep != 6"
|
||||
|
|
@ -299,6 +311,7 @@ watch(
|
|||
</q-card>
|
||||
</div>
|
||||
|
||||
<!-- อัปไฟล์ -->
|
||||
<div class="col-6" v-if="store.statusUpload && store.currentStep === 6">
|
||||
<q-card bordered style="border: 1px solid #d6dee1">
|
||||
<div class="text-weight-medium bg-grey-1 q-py-sm q-px-md">
|
||||
|
|
@ -308,17 +321,6 @@ watch(
|
|||
<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"
|
||||
>
|
||||
<q-tooltip> ดาวน์โหลดต้นแบบ </q-tooltip></q-btn
|
||||
>
|
||||
</div> -->
|
||||
<div class="col-xs-12 col-sm-6 row">
|
||||
<q-btn
|
||||
v-if="downloadUrl"
|
||||
|
|
@ -380,6 +382,7 @@ watch(
|
|||
</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">
|
||||
|
|
|
|||
|
|
@ -1,33 +1,30 @@
|
|||
<script setup lang="ts">
|
||||
import { onMounted, ref } from "vue";
|
||||
import { useRoute } from "vue-router";
|
||||
import { useQuasar } from "quasar";
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
import { useQuasar } from "quasar";
|
||||
import axios from "axios";
|
||||
|
||||
/** importStroe*/
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { useEvaluateStore } from "@/modules/06_evaluate/store";
|
||||
|
||||
const store = useEvaluateStore();
|
||||
/** use*/
|
||||
const mixin = useCounterMixin();
|
||||
const $q = useQuasar();
|
||||
const route = useRoute();
|
||||
|
||||
const evaluateId = ref<string>(route.params.id.toString());
|
||||
|
||||
const { showLoader, hideLoader, messageError } = mixin;
|
||||
|
||||
const props = defineProps({
|
||||
evaluateId: {
|
||||
type: String,
|
||||
},
|
||||
});
|
||||
|
||||
/** emit*/
|
||||
const emit = defineEmits(["update:file"]);
|
||||
|
||||
/** id ประเมิน*/
|
||||
const evaluateId = ref<string>(route.params.id.toString());
|
||||
|
||||
const selectedItem = ref(1);
|
||||
|
||||
/** function เรีกยเอกสาร*/
|
||||
async function fetchDocument() {
|
||||
showLoader();
|
||||
evaluateId.value &&
|
||||
|
|
@ -47,6 +44,10 @@ async function fetchDocument() {
|
|||
}));
|
||||
}
|
||||
|
||||
/**
|
||||
* function ดาวน์โหลดไฟล์
|
||||
* @param url ลิงก์ดาวน์โหลดไฟล์
|
||||
*/
|
||||
async function downloadFile(url: string) {
|
||||
await axios
|
||||
.get(url, {
|
||||
|
|
@ -69,6 +70,7 @@ async function downloadFile(url: string) {
|
|||
});
|
||||
}
|
||||
|
||||
/** HooK lifecycle*/
|
||||
onMounted(async () => {
|
||||
await fetchDocument();
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,28 +1,27 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, onMounted } from "vue";
|
||||
import { useRoute } from "vue-router";
|
||||
import { useQuasar } from "quasar";
|
||||
import axios from "axios";
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
import { useQuasar } from "quasar";
|
||||
import genReport from "@/plugins/genreport";
|
||||
|
||||
import TableDirector from "@/modules/06_evaluate/components/directorandmeet/Table.vue";
|
||||
/** importStore*/
|
||||
import { useEvaluateStore } from "@/modules/06_evaluate/store";
|
||||
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
|
||||
/**use*/
|
||||
const store = useEvaluateStore();
|
||||
const $q = useQuasar();
|
||||
const mixin = useCounterMixin();
|
||||
const route = useRoute();
|
||||
|
||||
const { showLoader, hideLoader, messageError, success, date2Thai } = mixin;
|
||||
const { showLoader, hideLoader, messageError, success } = mixin;
|
||||
|
||||
const evaluateId = ref<string>(route.params.id.toString());
|
||||
|
||||
const status = ref<string>("WAIT_CHECK_DOC_V2");
|
||||
const tabMenu = ref<string>("director");
|
||||
|
||||
const fileEvaluationEdit = ref<any>();
|
||||
|
||||
|
|
@ -31,11 +30,6 @@ const numOfPages = ref<number>(0);
|
|||
const page = ref<number>(1);
|
||||
const pdfSrc = ref<any>();
|
||||
|
||||
function onClickViewPDF(file: any) {
|
||||
pdfSrc.value = file.webkitRelativePath;
|
||||
modalView.value = true;
|
||||
}
|
||||
|
||||
/** ไปหน้าต่อไปของรายงาน */
|
||||
function nextPage() {
|
||||
if (page.value < numOfPages.value) {
|
||||
|
|
@ -50,49 +44,13 @@ function backPage() {
|
|||
}
|
||||
}
|
||||
|
||||
async function onClickDowloadFile(
|
||||
tp: string,
|
||||
templateName: string,
|
||||
fileName: string
|
||||
) {
|
||||
const body = {
|
||||
template: tp,
|
||||
reportName: templateName,
|
||||
data: {},
|
||||
};
|
||||
await genReport(body, fileName);
|
||||
}
|
||||
|
||||
// const directorList = ref<any>();
|
||||
// const meetingList = ref<any>();
|
||||
|
||||
// async function fetchDirector() {
|
||||
// showLoader();
|
||||
// evaluateId.value &&
|
||||
// (await http
|
||||
// .get(config.API.evaluationDirectorMeetring(evaluateId.value))
|
||||
// .then((res) => {
|
||||
// const directors = res.data.result.directors;
|
||||
// const meetings = res.data.result.meetings;
|
||||
// directorList.value = directors.map((e: any) => ({
|
||||
// fullName: `${e.prefix}${e.firstName} ${e.lastName}`,
|
||||
// position: e.position ?? "-",
|
||||
// email: e.email ?? "-",
|
||||
// phone: e.phone ?? "-",
|
||||
// }));
|
||||
// meetingList.value = meetings.map((e: any) => ({
|
||||
// fullName: `${e.Prefix}${e.FirstName} ${e.LastName}`,
|
||||
// dateMeeting: `${date2Thai(e.dateStart)} - ${date2Thai(e.dateEnd)}`,
|
||||
// result: e.result ?? "-",
|
||||
// duration: e.duration ?? "-",
|
||||
// }));
|
||||
// })
|
||||
// .catch((err) => {})
|
||||
// .finally(() => {
|
||||
// hideLoader();
|
||||
// }));
|
||||
// }
|
||||
|
||||
/**
|
||||
* function เรียก Path อัปโหลดไฟล์
|
||||
* @param volume เล่ม
|
||||
* @param id ประเมิน
|
||||
* @param type ชือไฟล์
|
||||
* @param file ไฟล์
|
||||
*/
|
||||
async function fetchPathUpload(
|
||||
volume: string,
|
||||
id: string | undefined,
|
||||
|
|
@ -123,6 +81,11 @@ async function fetchPathUpload(
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param uploadUrl ลิงก์อัปโหลด
|
||||
* @param file ไฟล์
|
||||
*/
|
||||
async function uploadfile(uploadUrl: string, file: any) {
|
||||
await axios
|
||||
.put(uploadUrl, file, {
|
||||
|
|
@ -139,6 +102,7 @@ async function uploadfile(uploadUrl: string, file: any) {
|
|||
}
|
||||
|
||||
const downloadUrl = ref<string>("");
|
||||
/** function เช็คไฟล์อัปโหลด*/
|
||||
function checkDoc() {
|
||||
showLoader();
|
||||
http
|
||||
|
|
@ -152,17 +116,16 @@ function checkDoc() {
|
|||
.then((res: any) => {
|
||||
downloadUrl.value = res.data.downloadUrl;
|
||||
})
|
||||
// .catch((e) => {
|
||||
// messageError($q, e);
|
||||
// })
|
||||
.catch((e) => {
|
||||
// messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
}
|
||||
|
||||
onMounted(async () => {
|
||||
// await fetchDirector();
|
||||
checkDoc();
|
||||
await checkDoc();
|
||||
});
|
||||
</script>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,41 +1,33 @@
|
|||
<script setup lang="ts">
|
||||
import { ref } from "vue";
|
||||
import { useQuasar } from "quasar";
|
||||
|
||||
import { useEvaluateStore } from "@/modules/06_evaluate/store";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import env from "@/api";
|
||||
|
||||
/** importStore*/
|
||||
import { useEvaluateStore } from "@/modules/06_evaluate/store";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
|
||||
/** use*/
|
||||
const mixin = useCounterMixin();
|
||||
const stroe = useEvaluateStore();
|
||||
const $q = useQuasar();
|
||||
|
||||
const { success } = mixin;
|
||||
|
||||
const link = ref<string>(env.LINK_EVALUATE_PUBLISH);
|
||||
|
||||
/** function คัดลอกชื้่อลิงก์*/
|
||||
function copyLink() {
|
||||
const linkById = `${link.value}/${stroe.evaluateId}`;
|
||||
navigator.clipboard.writeText(linkById);
|
||||
success($q, "คัดลอกสำเร็จ");
|
||||
}
|
||||
|
||||
// async function onClickCopyLink() {
|
||||
// const textarea = document.createElement("textarea");
|
||||
// textarea.value = link.value;
|
||||
// document.body.appendChild(textarea);
|
||||
// textarea.select();
|
||||
// document.execCommand("copy");
|
||||
// success($q, "คัดลอกลิงค์สำเร็จ");
|
||||
// }
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="row">
|
||||
<div class="col-12 text-center">
|
||||
<!-- <div> -->
|
||||
<p class="text-weight-bold q-mb-none">Public URL</p>
|
||||
<!-- <a :href="link + '/' + id" target="_blank">{{ `${link}/${id}` }}</a> -->
|
||||
<!-- </div> -->
|
||||
|
||||
<q-btn
|
||||
class="q-mt-md"
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, reactive, onMounted } from "vue";
|
||||
import { reactive, onMounted } from "vue";
|
||||
import { useRoute } from "vue-router";
|
||||
import { useQuasar } from "quasar";
|
||||
import { useRouter, useRoute } from "vue-router";
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
|
||||
|
|
@ -30,7 +30,7 @@ const {
|
|||
|
||||
const props = defineProps({
|
||||
data: {
|
||||
type: Array,
|
||||
type: Object,
|
||||
},
|
||||
});
|
||||
|
||||
|
|
@ -490,7 +490,9 @@ onMounted(async () => {
|
|||
|
||||
<q-card bordered style="border: 1px solid #d6dee1">
|
||||
<div class="text-weight-bold row items-center bg-grey-2">
|
||||
<span class="q-ml-lg q-my-sm">ผลงานที่เคยเสนอขอประเมิน (ถ้ามี)</span>
|
||||
<span class="q-ml-lg q-my-sm"
|
||||
>ผลงานที่เคยเสนอขอประเมิน (ถ้ามี)</span
|
||||
>
|
||||
</div>
|
||||
<q-separator />
|
||||
<div class="row q-pa-sm">
|
||||
|
|
|
|||
|
|
@ -1,3 +1,29 @@
|
|||
interface PersonInformation {
|
||||
assessments: any[];
|
||||
birthDate: string;
|
||||
certificates: any[];
|
||||
educations: EducationForm[];
|
||||
experience: null | any;
|
||||
fullName: string;
|
||||
govAge: string;
|
||||
isEducationalQft: boolean;
|
||||
isGovermantServiceHtr: boolean;
|
||||
isHaveMinPeriodOrHoldPos: boolean;
|
||||
isHaveProLicense: boolean;
|
||||
isHaveSpecificQft: boolean;
|
||||
isMinPeriodOfTenure: boolean;
|
||||
isOperatingExp: boolean;
|
||||
oc: string;
|
||||
posNo: string;
|
||||
position: string;
|
||||
positionLevel: string;
|
||||
prefix: string;
|
||||
salaries: any[];
|
||||
salary: string;
|
||||
trainings: any[];
|
||||
type: string;
|
||||
}
|
||||
|
||||
interface FormSpec {
|
||||
isEducationalQft: boolean;
|
||||
isGovermantServiceHtr: boolean;
|
||||
|
|
@ -67,6 +93,7 @@ interface ListMenu {
|
|||
}
|
||||
|
||||
export type {
|
||||
PersonInformation,
|
||||
FormCommand,
|
||||
FormCommandRef,
|
||||
FormSpec,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue