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">
|
<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 { ref, watch } from "vue";
|
||||||
import type { QTableProps } from "quasar";
|
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 store = useEvaluateStore();
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
|
|
@ -29,7 +33,6 @@ const props = defineProps({
|
||||||
});
|
});
|
||||||
|
|
||||||
const filter = ref<string>("");
|
const filter = ref<string>("");
|
||||||
|
|
||||||
const rows = ref<any[]>([
|
const rows = ref<any[]>([
|
||||||
{
|
{
|
||||||
degree: "ปริญญาตรี หรือเทียบเท่า",
|
degree: "ปริญญาตรี หรือเทียบเท่า",
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,7 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref } from "vue";
|
/** importStore*/
|
||||||
|
|
||||||
import { useEvaluateStore } from "@/modules/06_evaluate/store";
|
import { useEvaluateStore } from "@/modules/06_evaluate/store";
|
||||||
|
/**use*/
|
||||||
const store = useEvaluateStore();
|
const store = useEvaluateStore();
|
||||||
</script>
|
</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">
|
<script setup lang="ts">
|
||||||
import { reactive, onMounted, ref, watch } from "vue";
|
import { reactive, onMounted, ref } from "vue";
|
||||||
import { useQuasar } from "quasar";
|
|
||||||
import http from "@/plugins/http";
|
/**importTyep*/
|
||||||
import config from "@/app.config";
|
import type {
|
||||||
|
PersonInformation,
|
||||||
|
FormSpec,
|
||||||
|
} from "@/modules/06_evaluate/interface/evalute";
|
||||||
|
|
||||||
/** importComponents*/
|
/** importComponents*/
|
||||||
import PopupCheckFeatures from "@/modules/06_evaluate/components/PopupCheckFeatures.vue";
|
import PopupCheckFeatures from "@/modules/06_evaluate/components/PopupCheckFeatures.vue";
|
||||||
|
|
||||||
/** importStores*/
|
/** importStores*/
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
|
||||||
import { useEvaluateStore } from "@/modules/06_evaluate/store";
|
import { useEvaluateStore } from "@/modules/06_evaluate/store";
|
||||||
|
|
||||||
/** use*/
|
/** use*/
|
||||||
const mixin = useCounterMixin();
|
|
||||||
const $q = useQuasar();
|
|
||||||
const store = useEvaluateStore();
|
const store = useEvaluateStore();
|
||||||
|
|
||||||
const { showLoader, hideLoader, messageError } = mixin;
|
|
||||||
|
|
||||||
/** props จาก Tab1.vue*/
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
educations: Array,
|
educations: Array,
|
||||||
data: {
|
data: {
|
||||||
type: Array,
|
type: Object as () => PersonInformation,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -31,7 +28,7 @@ const emit = defineEmits(["update:spec"]);
|
||||||
const modal = ref<boolean>(false);
|
const modal = ref<boolean>(false);
|
||||||
const show = ref<boolean>(false);
|
const show = ref<boolean>(false);
|
||||||
|
|
||||||
const formData = reactive<any>({
|
const formData = reactive<FormSpec>({
|
||||||
isEducationalQft: false, // คุณวุฒิการศึกษา
|
isEducationalQft: false, // คุณวุฒิการศึกษา
|
||||||
isGovermantServiceHtr: false, // ประวัติการรับราชการ
|
isGovermantServiceHtr: false, // ประวัติการรับราชการ
|
||||||
isOperatingExp: false, // ประสบการณ์ในการปฏิบัติงาน
|
isOperatingExp: false, // ประสบการณ์ในการปฏิบัติงาน
|
||||||
|
|
@ -48,14 +45,9 @@ async function updateValue() {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* function fetchData ตรวจสอบคุณสมบัติ
|
* function fetchData ตรวจสอบคุณสมบัติ
|
||||||
* @param id ประเมิน
|
* @param data ตรวจสอบคุณสมบัติ
|
||||||
*/
|
*/
|
||||||
async function fetchCheckSpec(data: any) {
|
async function fetchCheckSpec(data: PersonInformation) {
|
||||||
// showLoader();
|
|
||||||
// await http
|
|
||||||
// .get(config.API.evaluationCheckspecByid(id))
|
|
||||||
// .then((res) => {
|
|
||||||
// const data = res.data.result;
|
|
||||||
formData.isEducationalQft = data.isEducationalQft;
|
formData.isEducationalQft = data.isEducationalQft;
|
||||||
formData.isGovermantServiceHtr = data.isGovermantServiceHtr;
|
formData.isGovermantServiceHtr = data.isGovermantServiceHtr;
|
||||||
formData.isOperatingExp = data.isOperatingExp;
|
formData.isOperatingExp = data.isOperatingExp;
|
||||||
|
|
@ -63,13 +55,6 @@ async function fetchCheckSpec(data: any) {
|
||||||
formData.isHaveSpecificQft = data.isHaveSpecificQft;
|
formData.isHaveSpecificQft = data.isHaveSpecificQft;
|
||||||
formData.isHaveProLicense = data.isHaveProLicense;
|
formData.isHaveProLicense = data.isHaveProLicense;
|
||||||
formData.isHaveMinPeriodOrHoldPos = data.isHaveMinPeriodOrHoldPos;
|
formData.isHaveMinPeriodOrHoldPos = data.isHaveMinPeriodOrHoldPos;
|
||||||
// })
|
|
||||||
// .catch((err) => {
|
|
||||||
// messageError($q, err);
|
|
||||||
// })
|
|
||||||
// .finally(() => {
|
|
||||||
// hideLoader();
|
|
||||||
// });
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -88,8 +73,6 @@ function closeModal() {
|
||||||
|
|
||||||
/**hook lifecycle*/
|
/**hook lifecycle*/
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
// setTimeout(() => {
|
|
||||||
// }, 1000);
|
|
||||||
props.data && fetchCheckSpec(props.data);
|
props.data && fetchCheckSpec(props.data);
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,6 @@ const route = useRoute();
|
||||||
const { showLoader, hideLoader, date2Thai, messageError, success } = mixin;
|
const { showLoader, hideLoader, date2Thai, messageError, success } = mixin;
|
||||||
|
|
||||||
const evaluateId = ref<string>(route.params.id.toString());
|
const evaluateId = ref<string>(route.params.id.toString());
|
||||||
const statusUpload = ref<boolean>(false);
|
|
||||||
|
|
||||||
/** emit */
|
/** emit */
|
||||||
const emit = defineEmits(["update:form"]);
|
const emit = defineEmits(["update:form"]);
|
||||||
|
|
@ -103,11 +102,6 @@ const page = ref<number>(1);
|
||||||
const pdfSrc = ref<any>();
|
const pdfSrc = ref<any>();
|
||||||
const profile = ref<any>();
|
const profile = ref<any>();
|
||||||
|
|
||||||
function onClickViewPDF(file: any) {
|
|
||||||
// pdfSrc.value = file.webkitRelativePath;
|
|
||||||
modalView.value = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** function ไปหน้าต่อไปของรายงาน */
|
/** function ไปหน้าต่อไปของรายงาน */
|
||||||
function nextPage() {
|
function nextPage() {
|
||||||
if (page.value < numOfPages.value) {
|
if (page.value < numOfPages.value) {
|
||||||
|
|
|
||||||
|
|
@ -1,27 +1,26 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted } from "vue";
|
import { ref, onMounted } from "vue";
|
||||||
import { useRoute } from "vue-router";
|
import { useRoute } from "vue-router";
|
||||||
|
import { useQuasar } from "quasar";
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
import { useQuasar } from "quasar";
|
|
||||||
import axios from "axios";
|
import axios from "axios";
|
||||||
|
|
||||||
|
/** importStroe*/
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useEvaluateStore } from "@/modules/06_evaluate/store";
|
import { useEvaluateStore } from "@/modules/06_evaluate/store";
|
||||||
|
|
||||||
|
/** use*/
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const store = useEvaluateStore();
|
const store = useEvaluateStore();
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const { showLoader, hideLoader, messageError } = mixin;
|
const { showLoader, hideLoader, messageError } = mixin;
|
||||||
|
|
||||||
|
/** id ประเมิน*/
|
||||||
const evaluateId = ref<string>(route.params.id.toString());
|
const evaluateId = ref<string>(route.params.id.toString());
|
||||||
|
|
||||||
// const props = defineProps({
|
/** emit*/
|
||||||
// evaluateId: {
|
|
||||||
// type: String,
|
|
||||||
// },
|
|
||||||
// });
|
|
||||||
const emit = defineEmits(["update:file"]);
|
const emit = defineEmits(["update:file"]);
|
||||||
|
|
||||||
const selectedItem = ref(1);
|
const selectedItem = ref(1);
|
||||||
|
|
@ -34,13 +33,22 @@ const fileName = ref([
|
||||||
"6-ผลงานที่จะส่งประเมิน (เอกสารหมายเลข 11)",
|
"6-ผลงานที่จะส่งประเมิน (เอกสารหมายเลข 11)",
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* function กดเลือกแสดงเอกสาน
|
||||||
|
* @param itemNumber เอกสาร
|
||||||
|
*/
|
||||||
function handleItemClick(itemNumber: number) {
|
function handleItemClick(itemNumber: number) {
|
||||||
store.tabPanels = itemNumber.toString();
|
store.tabPanels = itemNumber.toString();
|
||||||
selectedItem.value = itemNumber;
|
selectedItem.value = itemNumber;
|
||||||
fetchDocument(fileName.value[itemNumber - 1]);
|
fetchDocument(fileName.value[itemNumber - 1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* function เรีกยเอกสาร
|
||||||
|
* @param fileName ชื่อเอกสาร
|
||||||
|
*/
|
||||||
async function fetchDocument(fileName: string) {
|
async function fetchDocument(fileName: string) {
|
||||||
// showLoader();
|
showLoader();
|
||||||
evaluateId.value &&
|
evaluateId.value &&
|
||||||
(await http
|
(await http
|
||||||
.get(config.API.loadFileDocument("เล่ม 1", evaluateId.value, fileName))
|
.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) {
|
async function downloadFile(url: string) {
|
||||||
await axios
|
await axios
|
||||||
.get(url, {
|
.get(url, {
|
||||||
|
|
@ -77,6 +89,7 @@ async function downloadFile(url: string) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** HooK lifecycle*/
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
await fetchDocument(fileName.value[selectedItem.value - 1]);
|
await fetchDocument(fileName.value[selectedItem.value - 1]);
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -1,22 +1,27 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted } from "vue";
|
import { ref, onMounted } from "vue";
|
||||||
import { useRoute } from "vue-router";
|
import { useRoute } from "vue-router";
|
||||||
|
import { useQuasar } from "quasar";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import { useQuasar } from "quasar";
|
|
||||||
|
|
||||||
|
/** importStore*/
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
|
|
||||||
|
/** use*/
|
||||||
const mixins = useCounterMixin();
|
const mixins = useCounterMixin();
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const { date2Thai, success } = mixins;
|
const { date2Thai, success } = mixins;
|
||||||
|
|
||||||
|
/** id ประเมิน*/
|
||||||
const evaluateId = ref<string>(route.params.id.toString());
|
const evaluateId = ref<string>(route.params.id.toString());
|
||||||
|
|
||||||
const dateStartAnnounce = ref<string | null>(date2Thai(new Date()));
|
const dateStartAnnounce = ref<string | null>(date2Thai(new Date()));
|
||||||
const dateEndAnnounce = ref<string | null>(date2Thai(new Date()));
|
const dateEndAnnounce = ref<string | null>(date2Thai(new Date()));
|
||||||
|
const statusFile = ref<boolean>(false);
|
||||||
|
|
||||||
|
/** เอกสารประกาศผลการคัดเลือกบุคคล*/
|
||||||
const items = ref<any>([
|
const items = ref<any>([
|
||||||
{
|
{
|
||||||
label: "แบบสรุปข้อมูลของผู้ขอรับการคัดเลือก (เอกสารหมายเลข 9)",
|
label: "แบบสรุปข้อมูลของผู้ขอรับการคัดเลือก (เอกสารหมายเลข 9)",
|
||||||
|
|
@ -32,8 +37,7 @@ const items = ref<any>([
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
|
||||||
const statusFile = ref<boolean>(false);
|
/** fuinction เรียกข้อมูลลิงก์ดาวนฺโหลด*/
|
||||||
|
|
||||||
async function onClickfetchDocument(fileName: string, type: string) {
|
async function onClickfetchDocument(fileName: string, type: string) {
|
||||||
evaluateId.value &&
|
evaluateId.value &&
|
||||||
(await http
|
(await http
|
||||||
|
|
@ -43,22 +47,17 @@ async function onClickfetchDocument(fileName: string, type: string) {
|
||||||
type === "COPPY" && coppyLink(downloadUrl);
|
type === "COPPY" && coppyLink(downloadUrl);
|
||||||
type === "CHECK" && (statusFile.value = true);
|
type === "CHECK" && (statusFile.value = true);
|
||||||
})
|
})
|
||||||
.catch((err) => {}));
|
.catch(() => {}));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** function คัดลอหลิงก์ดาวน์โหลด */
|
||||||
async function coppyLink(link: string) {
|
async function coppyLink(link: string) {
|
||||||
const linkById = link;
|
const linkById = link;
|
||||||
navigator.clipboard.writeText(linkById);
|
navigator.clipboard.writeText(linkById);
|
||||||
success($q, "คัดลอกสำเร็จ");
|
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() {
|
async function fetchCheckDate() {
|
||||||
evaluateId.value &&
|
evaluateId.value &&
|
||||||
(await http
|
(await http
|
||||||
|
|
@ -70,9 +69,10 @@ async function fetchCheckDate() {
|
||||||
endDate.setDate(endDate.getDate() + 30);
|
endDate.setDate(endDate.getDate() + 30);
|
||||||
dateEndAnnounce.value = date2Thai(endDate);
|
dateEndAnnounce.value = date2Thai(endDate);
|
||||||
})
|
})
|
||||||
.catch((err) => {}));
|
.catch(() => {}));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Hook lifecycle*/
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
fetchCheckDate();
|
fetchCheckDate();
|
||||||
await onClickfetchDocument("บันทึกแจ้งผลการประกาศคัดเลือก", "CHECK");
|
await onClickfetchDocument("บันทึกแจ้งผลการประกาศคัดเลือก", "CHECK");
|
||||||
|
|
@ -88,19 +88,9 @@ onMounted(async () => {
|
||||||
ประกาศเมื่อวันที่ {{ dateStartAnnounce }} ถึง {{ dateEndAnnounce }}
|
ประกาศเมื่อวันที่ {{ dateStartAnnounce }} ถึง {{ dateEndAnnounce }}
|
||||||
</div>
|
</div>
|
||||||
</q-banner>
|
</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>
|
||||||
|
|
||||||
|
<!-- เอกสารประกาศผลการคัดเลือกบุคคล -->
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<q-card bordered style="border: 1px solid #d6dee1">
|
<q-card bordered style="border: 1px solid #d6dee1">
|
||||||
<div class="text-weight-medium bg-grey-1 q-py-sm q-px-md">
|
<div class="text-weight-medium bg-grey-1 q-py-sm q-px-md">
|
||||||
|
|
@ -133,6 +123,7 @@ onMounted(async () => {
|
||||||
</q-card>
|
</q-card>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- บันทึกแจ้งผลการประกาศคัดเลือก -->
|
||||||
<div class="col-12" v-if="statusFile">
|
<div class="col-12" v-if="statusFile">
|
||||||
<q-card bordered style="border: 1px solid #d6dee1">
|
<q-card bordered style="border: 1px solid #d6dee1">
|
||||||
<div class="text-weight-medium bg-grey-1 q-py-sm q-px-md">
|
<div class="text-weight-medium bg-grey-1 q-py-sm q-px-md">
|
||||||
|
|
|
||||||
|
|
@ -1,18 +1,23 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, reactive, watch, onMounted } from "vue";
|
import { ref, reactive, watch, onMounted } from "vue";
|
||||||
import keycloak from "@/plugins/keycloak";
|
|
||||||
import { useRoute } from "vue-router";
|
import { useRoute } from "vue-router";
|
||||||
|
import { useQuasar } from "quasar";
|
||||||
|
import keycloak from "@/plugins/keycloak";
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
import axios from "axios";
|
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";
|
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 { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useEvaluateStore } from "@/modules/06_evaluate/store";
|
import { useEvaluateStore } from "@/modules/06_evaluate/store";
|
||||||
|
|
||||||
|
/** use*/
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const store = useEvaluateStore();
|
const store = useEvaluateStore();
|
||||||
const mixins = useCounterMixin();
|
const mixins = useCounterMixin();
|
||||||
|
|
@ -20,17 +25,19 @@ const route = useRoute();
|
||||||
|
|
||||||
const { date2Thai, showLoader, hideLoader, messageError, success } = mixins;
|
const { date2Thai, showLoader, hideLoader, messageError, success } = mixins;
|
||||||
|
|
||||||
|
/** id ประเมิน*/
|
||||||
const evaluateId = ref<string>(route.params.id.toString());
|
const evaluateId = ref<string>(route.params.id.toString());
|
||||||
|
|
||||||
|
/** emit*/
|
||||||
const emit = defineEmits(["update:form"]);
|
const emit = defineEmits(["update:form"]);
|
||||||
|
|
||||||
const fileEvaluation1 = ref<any>();
|
const fileEvaluation1 = ref<any>();
|
||||||
const pdfSrc = ref<any>();
|
|
||||||
|
|
||||||
const performance = ref<string>("");
|
const performance = ref<string>("");
|
||||||
const performanceOwner = ref<string>("");
|
const performanceOwner = ref<string>("");
|
||||||
const position = ref<string>("");
|
const position = ref<string>("");
|
||||||
|
|
||||||
|
/** form จัดเตรียมเอกสารเล่ม 2*/
|
||||||
const formCommand = reactive<FormCommand>({
|
const formCommand = reactive<FormCommand>({
|
||||||
commanderFullname: "",
|
commanderFullname: "",
|
||||||
commanderPosition: "",
|
commanderPosition: "",
|
||||||
|
|
@ -40,7 +47,7 @@ const formCommand = reactive<FormCommand>({
|
||||||
subject: "",
|
subject: "",
|
||||||
assignedPosition: "",
|
assignedPosition: "",
|
||||||
});
|
});
|
||||||
|
/** ref input*/
|
||||||
const commanderFullnameRef = ref<object | null>(null);
|
const commanderFullnameRef = ref<object | null>(null);
|
||||||
const commanderPositionRef = ref<object | null>(null);
|
const commanderPositionRef = ref<object | null>(null);
|
||||||
const commanderAboveFullnameRef = 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 assignedPositionRef = ref<object | null>(null);
|
||||||
|
|
||||||
const modalView = ref<boolean>(false);
|
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 = {
|
const ref = {
|
||||||
commanderFullnameRef: commanderFullnameRef.value,
|
commanderFullnameRef: commanderFullnameRef.value,
|
||||||
commanderPositionRef: commanderPositionRef.value,
|
commanderPositionRef: commanderPositionRef.value,
|
||||||
|
|
@ -69,8 +73,15 @@ const updateInput = (value: any) => {
|
||||||
assignedPosition: assignedPositionRef.value,
|
assignedPosition: assignedPositionRef.value,
|
||||||
};
|
};
|
||||||
emit("update:form", value, ref);
|
emit("update:form", value, ref);
|
||||||
};
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* function เรียก Path อัปโหลดไฟล์
|
||||||
|
* @param volume เล่ม
|
||||||
|
* @param id ประเมิน
|
||||||
|
* @param type ชือไฟล์
|
||||||
|
* @param file ไฟล์
|
||||||
|
*/
|
||||||
async function fetchPathUpload(
|
async function fetchPathUpload(
|
||||||
volume: string,
|
volume: string,
|
||||||
id: string | undefined,
|
id: string | undefined,
|
||||||
|
|
@ -108,6 +119,11 @@ async function fetchPathUpload(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param uploadUrl ลิงก์อัปโหลด
|
||||||
|
* @param file ไฟล์
|
||||||
|
*/
|
||||||
async function uploadfile(uploadUrl: string, file: any) {
|
async function uploadfile(uploadUrl: string, file: any) {
|
||||||
await axios
|
await axios
|
||||||
.put(uploadUrl, file, {
|
.put(uploadUrl, file, {
|
||||||
|
|
@ -124,6 +140,10 @@ async function uploadfile(uploadUrl: string, file: any) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* function เรียกข้อมูล ผลงาน,ผู้เช็นเอกสาร
|
||||||
|
* @param id ประเมิน
|
||||||
|
*/
|
||||||
async function fetcheSigner(id: string) {
|
async function fetcheSigner(id: string) {
|
||||||
showLoader();
|
showLoader();
|
||||||
await http
|
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()));
|
const dateEndPrepareDoc2 = ref<string | null>(date2Thai(new Date()));
|
||||||
|
/** functoin เรียกข้อมูลวันสุดท้ายของการส่งผลงาน*/
|
||||||
async function fetchCheckDate() {
|
async function fetchCheckDate() {
|
||||||
evaluateId.value &&
|
evaluateId.value &&
|
||||||
(await http
|
(await http
|
||||||
.get(config.API.evaluationCheckDate(evaluateId.value))
|
.get(config.API.evaluationCheckDate(evaluateId.value))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
// dateStartPrepareDoc2.value = date2Thai(data.dateStartPrepareDoc2);
|
|
||||||
const endDate = new Date(data.dateEndAnnounce);
|
const endDate = new Date(data.dateEndAnnounce);
|
||||||
endDate.setDate(endDate.getDate() + 180);
|
endDate.setDate(endDate.getDate() + 180);
|
||||||
dateEndPrepareDoc2.value = date2Thai(endDate);
|
dateEndPrepareDoc2.value = date2Thai(endDate);
|
||||||
// dateEndPrepareDoc2.value = data.dateEndPrepareDoc2
|
|
||||||
// ? date2Thai(data.dateEndPrepareDoc2)
|
|
||||||
// : dateEndPrepareDoc2.value;
|
|
||||||
})
|
})
|
||||||
.catch((err) => {}));
|
.catch((err) => {}));
|
||||||
}
|
}
|
||||||
|
|
||||||
const downloadUrl = ref<string>("");
|
const downloadUrl = ref<string>("");
|
||||||
|
/** function เช็คไฟล์อัปโหลด*/
|
||||||
function checkDoc() {
|
function checkDoc() {
|
||||||
showLoader();
|
showLoader();
|
||||||
http
|
http
|
||||||
|
|
@ -178,9 +195,7 @@ function checkDoc() {
|
||||||
.then((res: any) => {
|
.then((res: any) => {
|
||||||
downloadUrl.value = res.data.downloadUrl;
|
downloadUrl.value = res.data.downloadUrl;
|
||||||
})
|
})
|
||||||
// .catch((e) => {
|
.catch(() => {})
|
||||||
// messageError($q, e);
|
|
||||||
// })
|
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
hideLoader();
|
hideLoader();
|
||||||
const ref = {
|
const ref = {
|
||||||
|
|
@ -199,6 +214,7 @@ function checkDoc() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** hook lifecycle*/
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
if (keycloak.tokenParsed != null) {
|
if (keycloak.tokenParsed != null) {
|
||||||
formCommand.author = keycloak.tokenParsed.name;
|
formCommand.author = keycloak.tokenParsed.name;
|
||||||
|
|
@ -208,8 +224,6 @@ onMounted(async () => {
|
||||||
fetcheSigner(evaluateId.value);
|
fetcheSigner(evaluateId.value);
|
||||||
}
|
}
|
||||||
await fetchCheckDate();
|
await fetchCheckDate();
|
||||||
|
|
||||||
// props.evaluateId && (await fetchPathUpload("เล่ม 2", props.evaluateId));
|
|
||||||
});
|
});
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
|
|
@ -240,6 +254,7 @@ watch(
|
||||||
</div>
|
</div>
|
||||||
</q-banner>
|
</q-banner>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- ผลงาน -->
|
<!-- ผลงาน -->
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<q-card bordered style="border: 1px solid #d6dee1">
|
<q-card bordered style="border: 1px solid #d6dee1">
|
||||||
|
|
@ -249,9 +264,6 @@ watch(
|
||||||
<div class="col-12 q-pa-sm">
|
<div class="col-12 q-pa-sm">
|
||||||
<div class="row q-col-gutter-md col-12">
|
<div class="row q-col-gutter-md col-12">
|
||||||
<div class="col-xs-12 col-sm-12 row">
|
<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">
|
<div class="row col-12 q-col-gutter-md q-pa-sm">
|
||||||
<q-input
|
<q-input
|
||||||
:readonly="store.currentStep != 6"
|
:readonly="store.currentStep != 6"
|
||||||
|
|
@ -299,6 +311,7 @@ watch(
|
||||||
</q-card>
|
</q-card>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- อัปไฟล์ -->
|
||||||
<div class="col-6" v-if="store.statusUpload && store.currentStep === 6">
|
<div class="col-6" v-if="store.statusUpload && store.currentStep === 6">
|
||||||
<q-card bordered style="border: 1px solid #d6dee1">
|
<q-card bordered style="border: 1px solid #d6dee1">
|
||||||
<div class="text-weight-medium bg-grey-1 q-py-sm q-px-md">
|
<div class="text-weight-medium bg-grey-1 q-py-sm q-px-md">
|
||||||
|
|
@ -308,17 +321,6 @@ watch(
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12 q-pa-sm">
|
<div class="col-12 q-pa-sm">
|
||||||
<div class="row q-col-gutter-md col-12">
|
<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">
|
<div class="col-xs-12 col-sm-6 row">
|
||||||
<q-btn
|
<q-btn
|
||||||
v-if="downloadUrl"
|
v-if="downloadUrl"
|
||||||
|
|
@ -380,6 +382,7 @@ watch(
|
||||||
</q-card>
|
</q-card>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- เลือกผู้เซ็นเอกสาร -->
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<q-card bordered style="border: 1px solid #d6dee1">
|
<q-card bordered style="border: 1px solid #d6dee1">
|
||||||
<div class="text-weight-medium bg-grey-1 q-py-sm q-px-md">
|
<div class="text-weight-medium bg-grey-1 q-py-sm q-px-md">
|
||||||
|
|
|
||||||
|
|
@ -1,33 +1,30 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { onMounted, ref } from "vue";
|
import { onMounted, ref } from "vue";
|
||||||
import { useRoute } from "vue-router";
|
import { useRoute } from "vue-router";
|
||||||
|
import { useQuasar } from "quasar";
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
import { useQuasar } from "quasar";
|
|
||||||
import axios from "axios";
|
import axios from "axios";
|
||||||
|
|
||||||
|
/** importStroe*/
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useEvaluateStore } from "@/modules/06_evaluate/store";
|
|
||||||
|
|
||||||
const store = useEvaluateStore();
|
/** use*/
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
|
|
||||||
const evaluateId = ref<string>(route.params.id.toString());
|
|
||||||
|
|
||||||
const { showLoader, hideLoader, messageError } = mixin;
|
const { showLoader, hideLoader, messageError } = mixin;
|
||||||
|
|
||||||
const props = defineProps({
|
/** emit*/
|
||||||
evaluateId: {
|
|
||||||
type: String,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
const emit = defineEmits(["update:file"]);
|
const emit = defineEmits(["update:file"]);
|
||||||
|
|
||||||
|
/** id ประเมิน*/
|
||||||
|
const evaluateId = ref<string>(route.params.id.toString());
|
||||||
|
|
||||||
const selectedItem = ref(1);
|
const selectedItem = ref(1);
|
||||||
|
|
||||||
|
/** function เรีกยเอกสาร*/
|
||||||
async function fetchDocument() {
|
async function fetchDocument() {
|
||||||
showLoader();
|
showLoader();
|
||||||
evaluateId.value &&
|
evaluateId.value &&
|
||||||
|
|
@ -47,6 +44,10 @@ async function fetchDocument() {
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* function ดาวน์โหลดไฟล์
|
||||||
|
* @param url ลิงก์ดาวน์โหลดไฟล์
|
||||||
|
*/
|
||||||
async function downloadFile(url: string) {
|
async function downloadFile(url: string) {
|
||||||
await axios
|
await axios
|
||||||
.get(url, {
|
.get(url, {
|
||||||
|
|
@ -69,6 +70,7 @@ async function downloadFile(url: string) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** HooK lifecycle*/
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
await fetchDocument();
|
await fetchDocument();
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -1,28 +1,27 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted } from "vue";
|
import { ref, onMounted } from "vue";
|
||||||
import { useRoute } from "vue-router";
|
import { useRoute } from "vue-router";
|
||||||
|
import { useQuasar } from "quasar";
|
||||||
import axios from "axios";
|
import axios from "axios";
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
import { useQuasar } from "quasar";
|
|
||||||
import genReport from "@/plugins/genreport";
|
import genReport from "@/plugins/genreport";
|
||||||
|
|
||||||
import TableDirector from "@/modules/06_evaluate/components/directorandmeet/Table.vue";
|
/** importStore*/
|
||||||
import { useEvaluateStore } from "@/modules/06_evaluate/store";
|
import { useEvaluateStore } from "@/modules/06_evaluate/store";
|
||||||
|
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
|
|
||||||
|
/**use*/
|
||||||
const store = useEvaluateStore();
|
const store = useEvaluateStore();
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const route = useRoute();
|
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 evaluateId = ref<string>(route.params.id.toString());
|
||||||
|
|
||||||
const status = ref<string>("WAIT_CHECK_DOC_V2");
|
const status = ref<string>("WAIT_CHECK_DOC_V2");
|
||||||
const tabMenu = ref<string>("director");
|
|
||||||
|
|
||||||
const fileEvaluationEdit = ref<any>();
|
const fileEvaluationEdit = ref<any>();
|
||||||
|
|
||||||
|
|
@ -31,11 +30,6 @@ const numOfPages = ref<number>(0);
|
||||||
const page = ref<number>(1);
|
const page = ref<number>(1);
|
||||||
const pdfSrc = ref<any>();
|
const pdfSrc = ref<any>();
|
||||||
|
|
||||||
function onClickViewPDF(file: any) {
|
|
||||||
pdfSrc.value = file.webkitRelativePath;
|
|
||||||
modalView.value = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** ไปหน้าต่อไปของรายงาน */
|
/** ไปหน้าต่อไปของรายงาน */
|
||||||
function nextPage() {
|
function nextPage() {
|
||||||
if (page.value < numOfPages.value) {
|
if (page.value < numOfPages.value) {
|
||||||
|
|
@ -50,49 +44,13 @@ function backPage() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async function onClickDowloadFile(
|
/**
|
||||||
tp: string,
|
* function เรียก Path อัปโหลดไฟล์
|
||||||
templateName: string,
|
* @param volume เล่ม
|
||||||
fileName: string
|
* @param id ประเมิน
|
||||||
) {
|
* @param type ชือไฟล์
|
||||||
const body = {
|
* @param file ไฟล์
|
||||||
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();
|
|
||||||
// }));
|
|
||||||
// }
|
|
||||||
|
|
||||||
async function fetchPathUpload(
|
async function fetchPathUpload(
|
||||||
volume: string,
|
volume: string,
|
||||||
id: string | undefined,
|
id: string | undefined,
|
||||||
|
|
@ -123,6 +81,11 @@ async function fetchPathUpload(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param uploadUrl ลิงก์อัปโหลด
|
||||||
|
* @param file ไฟล์
|
||||||
|
*/
|
||||||
async function uploadfile(uploadUrl: string, file: any) {
|
async function uploadfile(uploadUrl: string, file: any) {
|
||||||
await axios
|
await axios
|
||||||
.put(uploadUrl, file, {
|
.put(uploadUrl, file, {
|
||||||
|
|
@ -139,6 +102,7 @@ async function uploadfile(uploadUrl: string, file: any) {
|
||||||
}
|
}
|
||||||
|
|
||||||
const downloadUrl = ref<string>("");
|
const downloadUrl = ref<string>("");
|
||||||
|
/** function เช็คไฟล์อัปโหลด*/
|
||||||
function checkDoc() {
|
function checkDoc() {
|
||||||
showLoader();
|
showLoader();
|
||||||
http
|
http
|
||||||
|
|
@ -152,17 +116,16 @@ function checkDoc() {
|
||||||
.then((res: any) => {
|
.then((res: any) => {
|
||||||
downloadUrl.value = res.data.downloadUrl;
|
downloadUrl.value = res.data.downloadUrl;
|
||||||
})
|
})
|
||||||
// .catch((e) => {
|
.catch((e) => {
|
||||||
// messageError($q, e);
|
// messageError($q, e);
|
||||||
// })
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
hideLoader();
|
hideLoader();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
// await fetchDirector();
|
await checkDoc();
|
||||||
checkDoc();
|
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,41 +1,33 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref } from "vue";
|
import { ref } from "vue";
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
|
|
||||||
import { useEvaluateStore } from "@/modules/06_evaluate/store";
|
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
|
||||||
import env from "@/api";
|
import env from "@/api";
|
||||||
|
|
||||||
|
/** importStore*/
|
||||||
|
import { useEvaluateStore } from "@/modules/06_evaluate/store";
|
||||||
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
|
|
||||||
|
/** use*/
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const stroe = useEvaluateStore();
|
const stroe = useEvaluateStore();
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
|
|
||||||
const { success } = mixin;
|
const { success } = mixin;
|
||||||
|
|
||||||
const link = ref<string>(env.LINK_EVALUATE_PUBLISH);
|
const link = ref<string>(env.LINK_EVALUATE_PUBLISH);
|
||||||
|
|
||||||
|
/** function คัดลอกชื้่อลิงก์*/
|
||||||
function copyLink() {
|
function copyLink() {
|
||||||
const linkById = `${link.value}/${stroe.evaluateId}`;
|
const linkById = `${link.value}/${stroe.evaluateId}`;
|
||||||
navigator.clipboard.writeText(linkById);
|
navigator.clipboard.writeText(linkById);
|
||||||
success($q, "คัดลอกสำเร็จ");
|
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>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12 text-center">
|
<div class="col-12 text-center">
|
||||||
<!-- <div> -->
|
|
||||||
<p class="text-weight-bold q-mb-none">Public URL</p>
|
<p class="text-weight-bold q-mb-none">Public URL</p>
|
||||||
<!-- <a :href="link + '/' + id" target="_blank">{{ `${link}/${id}` }}</a> -->
|
|
||||||
<!-- </div> -->
|
|
||||||
|
|
||||||
<q-btn
|
<q-btn
|
||||||
class="q-mt-md"
|
class="q-mt-md"
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<script setup lang="ts">
|
<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 { useQuasar } from "quasar";
|
||||||
import { useRouter, useRoute } from "vue-router";
|
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
|
|
||||||
|
|
@ -30,7 +30,7 @@ const {
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
data: {
|
data: {
|
||||||
type: Array,
|
type: Object,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -490,7 +490,9 @@ onMounted(async () => {
|
||||||
|
|
||||||
<q-card bordered style="border: 1px solid #d6dee1">
|
<q-card bordered style="border: 1px solid #d6dee1">
|
||||||
<div class="text-weight-bold row items-center bg-grey-2">
|
<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>
|
</div>
|
||||||
<q-separator />
|
<q-separator />
|
||||||
<div class="row q-pa-sm">
|
<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 {
|
interface FormSpec {
|
||||||
isEducationalQft: boolean;
|
isEducationalQft: boolean;
|
||||||
isGovermantServiceHtr: boolean;
|
isGovermantServiceHtr: boolean;
|
||||||
|
|
@ -67,6 +93,7 @@ interface ListMenu {
|
||||||
}
|
}
|
||||||
|
|
||||||
export type {
|
export type {
|
||||||
|
PersonInformation,
|
||||||
FormCommand,
|
FormCommand,
|
||||||
FormCommandRef,
|
FormCommandRef,
|
||||||
FormSpec,
|
FormSpec,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue