ปรับ Code ประเมืน
This commit is contained in:
parent
f9c4bb3b80
commit
5b2be2af2b
24 changed files with 603 additions and 1398 deletions
|
|
@ -1,6 +1,4 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref } from "vue";
|
|
||||||
|
|
||||||
import { useEvaluateDetailStore } from "@/modules/12_evaluatePersonal/store/EvaluateDetail";
|
import { useEvaluateDetailStore } from "@/modules/12_evaluatePersonal/store/EvaluateDetail";
|
||||||
|
|
||||||
const store = useEvaluateDetailStore();
|
const store = useEvaluateDetailStore();
|
||||||
|
|
|
||||||
|
|
@ -5,11 +5,13 @@ 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";
|
||||||
|
|
||||||
|
/** importType*/
|
||||||
import type {
|
import type {
|
||||||
FormCommand,
|
FormCommand,
|
||||||
FormCommandRef,
|
FormCommandRef,
|
||||||
} from "@/modules/12_evaluatePersonal/interface/index/evalute";
|
} from "@/modules/12_evaluatePersonal/interface/index/evalute";
|
||||||
|
|
||||||
|
/** importComponents*/
|
||||||
import Stepper from "@/modules/12_evaluatePersonal/components/Detail/Stepper.vue";
|
import Stepper from "@/modules/12_evaluatePersonal/components/Detail/Stepper.vue";
|
||||||
import Step1 from "@/modules/12_evaluatePersonal/components/Detail/step/step1.vue";
|
import Step1 from "@/modules/12_evaluatePersonal/components/Detail/step/step1.vue";
|
||||||
import Step2 from "@/modules/12_evaluatePersonal/components/Detail/step/step2.vue";
|
import Step2 from "@/modules/12_evaluatePersonal/components/Detail/step/step2.vue";
|
||||||
|
|
@ -20,24 +22,23 @@ import Step6 from "@/modules/12_evaluatePersonal/components/Detail/step/step6.vu
|
||||||
import Step7 from "@/modules/12_evaluatePersonal/components/Detail/step/step7.vue";
|
import Step7 from "@/modules/12_evaluatePersonal/components/Detail/step/step7.vue";
|
||||||
import Step8 from "@/modules/12_evaluatePersonal/components/Detail/step/step8.vue";
|
import Step8 from "@/modules/12_evaluatePersonal/components/Detail/step/step8.vue";
|
||||||
import Step9 from "@/modules/12_evaluatePersonal/components/Detail/step/step9.vue";
|
import Step9 from "@/modules/12_evaluatePersonal/components/Detail/step/step9.vue";
|
||||||
|
|
||||||
import ViewStep1 from "@/modules/12_evaluatePersonal/components/Detail/viewstep/viewStep1.vue";
|
import ViewStep1 from "@/modules/12_evaluatePersonal/components/Detail/viewstep/viewStep1.vue";
|
||||||
import ViewStep3 from "@/modules/12_evaluatePersonal/components/Detail/viewstep/viewStep3.vue";
|
import ViewStep3 from "@/modules/12_evaluatePersonal/components/Detail/viewstep/viewStep3.vue";
|
||||||
import ViewStep7 from "@/modules/12_evaluatePersonal/components/Detail/viewstep/viewStep7.vue";
|
import ViewStep7 from "@/modules/12_evaluatePersonal/components/Detail/viewstep/viewStep7.vue";
|
||||||
|
import PopupHistory from "@/modules/12_evaluatePersonal/components/Detail/popupHistory.vue";
|
||||||
|
|
||||||
|
/** importStor*/
|
||||||
import { useEvaluateDetailStore } from "@/modules/12_evaluatePersonal/store/EvaluateDetail";
|
import { useEvaluateDetailStore } from "@/modules/12_evaluatePersonal/store/EvaluateDetail";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
|
|
||||||
import PopupHistory from "@/modules/12_evaluatePersonal/components/Detail/popupHistory.vue";
|
/** use*/
|
||||||
|
|
||||||
const router = useRouter();
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const store = useEvaluateDetailStore();
|
const store = useEvaluateDetailStore();
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { dialogConfirm, showLoader, hideLoader, messageError } = mixin;
|
|
||||||
|
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
|
|
||||||
|
const { showLoader, hideLoader, messageError } = mixin;
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
data: {
|
data: {
|
||||||
type: Object,
|
type: Object,
|
||||||
|
|
@ -45,10 +46,9 @@ const props = defineProps({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const id = ref<string>(route.params.id as string); // id รายการประเมิน
|
||||||
|
|
||||||
const modalHistory = ref<boolean>(false);
|
const modalHistory = ref<boolean>(false);
|
||||||
const externalLink =
|
|
||||||
"https://accreditation.ocsc.go.th/accreditation/search/curriculum";
|
|
||||||
const id = ref<string>(route.params.id as string);
|
|
||||||
const formCommand = reactive<FormCommand>({
|
const formCommand = reactive<FormCommand>({
|
||||||
elementaryFullName: "",
|
elementaryFullName: "",
|
||||||
elementaryPosition: "",
|
elementaryPosition: "",
|
||||||
|
|
@ -61,63 +61,6 @@ const elementaryPositonRef = ref<object | null>(null);
|
||||||
const abovelevelFullnameRef = ref<object | null>(null);
|
const abovelevelFullnameRef = ref<object | null>(null);
|
||||||
const abovelevelPositionRef = ref<object | null>(null);
|
const abovelevelPositionRef = ref<object | null>(null);
|
||||||
|
|
||||||
const formCommandRef: FormCommandRef = {
|
|
||||||
elementaryFullName: elementaryFullNameRef,
|
|
||||||
elementaryPosition: elementaryPositonRef,
|
|
||||||
abovelevelFullname: abovelevelFullnameRef,
|
|
||||||
abovelevelPosition: abovelevelPositionRef,
|
|
||||||
};
|
|
||||||
|
|
||||||
async function onCilckNextStep() {
|
|
||||||
const functionCreateDoc: (() => Promise<void>) | null =
|
|
||||||
store.step === 1
|
|
||||||
? await saveStep1
|
|
||||||
: store.step === 3
|
|
||||||
? await saveStep3
|
|
||||||
: store.step === 4
|
|
||||||
? await saveStep4
|
|
||||||
: store.step === 5
|
|
||||||
? await saveStep5
|
|
||||||
: store.step === 5
|
|
||||||
? await saveStep5
|
|
||||||
: store.step === 6
|
|
||||||
? await saveStep6
|
|
||||||
: store.step === 7
|
|
||||||
? await saveStep7
|
|
||||||
: store.step === 8
|
|
||||||
? await saveStep8
|
|
||||||
: store.step === 9
|
|
||||||
? await saveStep9
|
|
||||||
: null;
|
|
||||||
store.step === 2
|
|
||||||
? validateStep2()
|
|
||||||
: store.step < 9 &&
|
|
||||||
dialogConfirm(
|
|
||||||
$q,
|
|
||||||
() => {
|
|
||||||
functionCreateDoc?.();
|
|
||||||
store.step++;
|
|
||||||
},
|
|
||||||
"ยืนยันการดำเนินการ",
|
|
||||||
"ต้องการยืนยันการดำเนินการต่อใช่หรือไม่?"
|
|
||||||
);
|
|
||||||
|
|
||||||
// functionCreateDoc?.();
|
|
||||||
// store.step < 9 &&
|
|
||||||
}
|
|
||||||
|
|
||||||
function onCilckprPeviousStep() {
|
|
||||||
store.step > 1 &&
|
|
||||||
dialogConfirm(
|
|
||||||
$q,
|
|
||||||
() => {
|
|
||||||
store.step--;
|
|
||||||
},
|
|
||||||
"ยืนยันการย้อนกลับ",
|
|
||||||
"ต้องการย้อนกลับใช่หรือไม่?"
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
function updateformCommand(val: any, ref: any) {
|
function updateformCommand(val: any, ref: any) {
|
||||||
formCommand.elementaryFullName = val.elementaryFullName;
|
formCommand.elementaryFullName = val.elementaryFullName;
|
||||||
formCommand.elementaryPosition = val.elementaryPosition;
|
formCommand.elementaryPosition = val.elementaryPosition;
|
||||||
|
|
@ -130,70 +73,13 @@ function updateformCommand(val: any, ref: any) {
|
||||||
abovelevelPositionRef.value = ref.abovelevelPositionRef;
|
abovelevelPositionRef.value = ref.abovelevelPositionRef;
|
||||||
}
|
}
|
||||||
|
|
||||||
async function validateStep2() {
|
/** function เช็คขั้นตอน*/
|
||||||
const hasError = [];
|
async function fetchCheckStep() {
|
||||||
for (const key in formCommandRef) {
|
|
||||||
if (Object.prototype.hasOwnProperty.call(formCommandRef, key)) {
|
|
||||||
const property = formCommandRef[key];
|
|
||||||
if (property.value && typeof property.value.validate === "function") {
|
|
||||||
const isValid = property.value.validate();
|
|
||||||
hasError.push(isValid);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (hasError.every((result) => result === true)) {
|
|
||||||
saveStep2();
|
|
||||||
} else {
|
|
||||||
console.log("ไม่ผ่าน");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
async function saveStep1() {
|
|
||||||
console.log("Save 1");
|
|
||||||
}
|
|
||||||
async function saveStep2() {
|
|
||||||
dialogConfirm(
|
|
||||||
$q,
|
|
||||||
() => {
|
|
||||||
store.step++;
|
|
||||||
},
|
|
||||||
"ยืนยันการดำเนินการ",
|
|
||||||
"ต้องการยืนยันการดำเนินการต่อใช่หรือไม่?"
|
|
||||||
);
|
|
||||||
}
|
|
||||||
async function saveStep3() {
|
|
||||||
console.log("Save 3");
|
|
||||||
}
|
|
||||||
async function saveStep4() {
|
|
||||||
console.log("Save 4");
|
|
||||||
}
|
|
||||||
async function saveStep5() {
|
|
||||||
console.log("Save 5");
|
|
||||||
}
|
|
||||||
async function saveStep6() {
|
|
||||||
console.log("Save 6");
|
|
||||||
}
|
|
||||||
async function saveStep7() {
|
|
||||||
console.log("Save 7");
|
|
||||||
}
|
|
||||||
async function saveStep8() {
|
|
||||||
console.log("Save 8");
|
|
||||||
}
|
|
||||||
async function saveStep9() {
|
|
||||||
console.log("Save 9");
|
|
||||||
}
|
|
||||||
|
|
||||||
function onClickPopupHistory() {
|
|
||||||
modalHistory.value = !modalHistory.value;
|
|
||||||
}
|
|
||||||
|
|
||||||
function getStep() {
|
|
||||||
showLoader();
|
showLoader();
|
||||||
http
|
await http
|
||||||
.get(config.API.evaluateGetStep(id.value))
|
.get(config.API.evaluateGetStep(id.value))
|
||||||
.then((res: any) => {
|
.then((res) => {
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
|
|
||||||
let step =
|
let step =
|
||||||
data.step === "CHECK_SPEC"
|
data.step === "CHECK_SPEC"
|
||||||
? 1
|
? 1
|
||||||
|
|
@ -226,9 +112,13 @@ function getStep() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
/** function เปิด,ปิด ประวัติการประเมิน*/
|
||||||
getStep();
|
function onClickPopupHistory() {
|
||||||
store.step = 1;
|
modalHistory.value = !modalHistory.value;
|
||||||
|
}
|
||||||
|
|
||||||
|
onMounted(async () => {
|
||||||
|
await fetchCheckStep();
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,37 +1,32 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted } from "vue";
|
import { ref, onMounted } from "vue";
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
|
import { useRoute } from "vue-router";
|
||||||
|
import http from "@/plugins/http";
|
||||||
|
import config from "@/app.config";
|
||||||
|
|
||||||
|
/** importComponents*/
|
||||||
import CardDirector from "@/modules/12_evaluatePersonal/components/Detail/viewTab2/CardDirector.vue";
|
import CardDirector from "@/modules/12_evaluatePersonal/components/Detail/viewTab2/CardDirector.vue";
|
||||||
import CardMeet from "@/modules/12_evaluatePersonal/components/Detail/viewTab2/CardMeet.vue";
|
import CardMeet from "@/modules/12_evaluatePersonal/components/Detail/viewTab2/CardMeet.vue";
|
||||||
|
|
||||||
import { useEvaluateDetailStore } from "@/modules/12_evaluatePersonal/store/EvaluateDetail";
|
/** importStore*/
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import http from "@/plugins/http";
|
|
||||||
import config from "@/app.config";
|
|
||||||
import { useRouter, useRoute } from "vue-router";
|
|
||||||
|
|
||||||
const router = useRouter();
|
/** use*/
|
||||||
|
const $q = useQuasar();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const id = ref<string>(route.params.id as string);
|
|
||||||
const store = useEvaluateDetailStore();
|
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { dialogConfirm, showLoader, hideLoader, messageError } = mixin;
|
|
||||||
|
const { showLoader, hideLoader, messageError } = mixin;
|
||||||
|
const id = ref<string>(route.params.id as string);
|
||||||
|
|
||||||
const director = ref<any[]>();
|
const director = ref<any[]>();
|
||||||
const meeting = ref<any[]>();
|
const meeting = ref<any[]>();
|
||||||
const $q = useQuasar();
|
|
||||||
|
|
||||||
const props = defineProps({
|
/** function เรียกข้อมูลกรรมการ */
|
||||||
data: {
|
async function getList() {
|
||||||
type: Object,
|
|
||||||
default: {},
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
function getList() {
|
|
||||||
showLoader();
|
showLoader();
|
||||||
http
|
await http
|
||||||
.get(config.API.evaluationListData(id.value))
|
.get(config.API.evaluationListData(id.value))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
|
|
@ -46,8 +41,8 @@ function getList() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(async () => {
|
||||||
getList();
|
await getList();
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -67,13 +67,17 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
]);
|
]);
|
||||||
const row = ref<any>();
|
const row = ref<any>();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* functio เรียกข่้อมูลประวัติการประเมิน
|
||||||
|
* @param id ประเมิน
|
||||||
|
*/
|
||||||
async function fetchListHistory(id: string) {
|
async function fetchListHistory(id: string) {
|
||||||
|
showLoader();
|
||||||
const thaiOptions: Intl.DateTimeFormatOptions = {
|
const thaiOptions: Intl.DateTimeFormatOptions = {
|
||||||
hour: "2-digit",
|
hour: "2-digit",
|
||||||
minute: "2-digit",
|
minute: "2-digit",
|
||||||
second: "2-digit",
|
second: "2-digit",
|
||||||
};
|
};
|
||||||
showLoader();
|
|
||||||
await http
|
await http
|
||||||
.get(config.API.evaluationHistory(id))
|
.get(config.API.evaluationHistory(id))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,8 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { onMounted, reactive, watch } from "vue";
|
import { reactive } from "vue";
|
||||||
|
|
||||||
|
/**importType*/
|
||||||
|
import type { FormFeature } from "@/modules/12_evaluatePersonal/interface/index/evalute";
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
data: {
|
data: {
|
||||||
|
|
@ -8,7 +11,7 @@ const props = defineProps({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const formData = reactive<any>({
|
const formData = reactive<FormFeature>({
|
||||||
isEducationalQft: props.data.isEducationalQft, // คุณวุฒิการศึกษา
|
isEducationalQft: props.data.isEducationalQft, // คุณวุฒิการศึกษา
|
||||||
isGovermantServiceHtr: props.data.isGovermantServiceHtr, // ประวัติการรับราชการ
|
isGovermantServiceHtr: props.data.isGovermantServiceHtr, // ประวัติการรับราชการ
|
||||||
isOperatingExp: props.data.isOperatingExp, // ประสบการณ์ในการปฏิบัติงาน
|
isOperatingExp: props.data.isOperatingExp, // ประสบการณ์ในการปฏิบัติงาน
|
||||||
|
|
@ -17,16 +20,6 @@ const formData = reactive<any>({
|
||||||
isHaveProLicense: props.data.isHaveProLicense, // มีใบอนุญาตประกอบวิชาชีพของสายงานต่างๆ
|
isHaveProLicense: props.data.isHaveProLicense, // มีใบอนุญาตประกอบวิชาชีพของสายงานต่างๆ
|
||||||
isHaveMinPeriodOrHoldPos: props.data.isHaveMinPeriodOrHoldPos, // มีระยะเวลาขั้นต่ำในการดำรงตำแหน่งหรือเคยดำรงตำแหน่งในสายงานที่จะคัดเลือกตามคุณวุฒิของบุคคลและระดับตำแหน่งที่จะคัดเลือก]
|
isHaveMinPeriodOrHoldPos: props.data.isHaveMinPeriodOrHoldPos, // มีระยะเวลาขั้นต่ำในการดำรงตำแหน่งหรือเคยดำรงตำแหน่งในสายงานที่จะคัดเลือกตามคุณวุฒิของบุคคลและระดับตำแหน่งที่จะคัดเลือก]
|
||||||
});
|
});
|
||||||
|
|
||||||
// watch(props, () => {
|
|
||||||
// formData.isEducationalQft = props.data.isEducationalQft;
|
|
||||||
// formData.isGovermantServiceHtr = props.data.isGovermantServiceHtr;
|
|
||||||
// formData.isOperatingExp = props.data.isOperatingExp;
|
|
||||||
// formData.isMinPeriodOfTenure = props.data.isMinPeriodOfTenure;
|
|
||||||
// formData.isHaveSpecificQft = props.data.isHaveSpecificQft;
|
|
||||||
// formData.isHaveProLicense = props.data.isHaveProLicense;
|
|
||||||
// formData.isHaveMinPeriodOrHoldPos = props.data.isHaveMinPeriodOrHoldPos;
|
|
||||||
// });
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|
|
||||||
|
|
@ -1,16 +1,13 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, reactive, onMounted } from "vue";
|
import { ref, reactive, onMounted } from "vue";
|
||||||
import keycloak from "@/plugins/keycloak";
|
import { useQuasar } from "quasar";
|
||||||
|
import { useRoute } from "vue-router";
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
import { useRouter, useRoute } from "vue-router";
|
|
||||||
import genReport from "@/plugins/genreport";
|
|
||||||
import { useQuasar } from "quasar";
|
|
||||||
|
|
||||||
import type { FormCommand } from "@/modules/12_evaluatePersonal/interface/index/evalute";
|
import type { FormCommand } from "@/modules/12_evaluatePersonal/interface/index/evalute";
|
||||||
|
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
const router = useRouter();
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const id = ref<string>(route.params.id as string);
|
const id = ref<string>(route.params.id as string);
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
|
|
@ -18,92 +15,20 @@ const $q = useQuasar();
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { showLoader, hideLoader, messageError } = mixin;
|
const { showLoader, hideLoader, messageError } = mixin;
|
||||||
|
|
||||||
const fullName = ref<string>(
|
/** ฟรอมจัดเตรียมเอกสารเล่ม 1*/
|
||||||
keycloak.tokenParsed ? keycloak.tokenParsed.name!.toString() : ""
|
const author = ref<string>("");
|
||||||
);
|
const subject = ref<string>("");
|
||||||
|
|
||||||
const emit = defineEmits(["update:form"]);
|
|
||||||
|
|
||||||
const formCommand = reactive<FormCommand>({
|
const formCommand = reactive<FormCommand>({
|
||||||
elementaryFullName: "",
|
elementaryFullName: "",
|
||||||
elementaryPosition: "",
|
elementaryPosition: "",
|
||||||
abovelevelFullname: "",
|
abovelevelFullname: "",
|
||||||
abovelevelPosition: "",
|
abovelevelPosition: "",
|
||||||
});
|
});
|
||||||
const author = ref<string>("");
|
|
||||||
const subject = ref<string>("");
|
|
||||||
|
|
||||||
const elementaryFullNameRef = ref<object | null>(null);
|
/** function เรียกข้อมลผลงาน*/
|
||||||
const elementaryPositonRef = ref<object | null>(null);
|
async function fetchSigner() {
|
||||||
const abovelevelFullnameRef = ref<object | null>(null);
|
|
||||||
const abovelevelPositionRef = ref<object | null>(null);
|
|
||||||
|
|
||||||
const updateInput = (value: any) => {
|
|
||||||
const ref = {
|
|
||||||
elementaryFullNameRef: elementaryFullNameRef.value,
|
|
||||||
elementaryPositonRef: elementaryPositonRef.value,
|
|
||||||
abovelevelFullnameRef: abovelevelFullnameRef.value,
|
|
||||||
abovelevelPositionRef: abovelevelPositionRef.value,
|
|
||||||
};
|
|
||||||
emit("update:form", value, ref);
|
|
||||||
};
|
|
||||||
|
|
||||||
const fileEvaluation1 = ref<any>();
|
|
||||||
const fileEvaluation2 = ref<any>();
|
|
||||||
const fileEvaluation3 = ref<any>();
|
|
||||||
const fileEvaluation4 = ref<any>();
|
|
||||||
const fileEvaluation5 = ref<any>();
|
|
||||||
const fileEvaluation6 = ref<any>();
|
|
||||||
|
|
||||||
const modalView = ref<boolean>(false);
|
|
||||||
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) {
|
|
||||||
page.value++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/** กลับหน้าก่อนหน้าของรายงาน */
|
|
||||||
function backPage() {
|
|
||||||
if (page.value !== 1) {
|
|
||||||
page.value--;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
async function onClickDowloadFile(
|
|
||||||
tp: string,
|
|
||||||
templateName: string,
|
|
||||||
fileName: string
|
|
||||||
) {
|
|
||||||
showLoader();
|
showLoader();
|
||||||
const data = Object.assign(
|
await http
|
||||||
{ fullName: fullName.value },
|
|
||||||
tp === "EV1_005" || tp === "EV1_007"
|
|
||||||
? { organizationName: "หน่วยงาน" }
|
|
||||||
: null,
|
|
||||||
tp === "EV1_007" ? { positionName: "ตำแหน่ง" } : null,
|
|
||||||
tp === "EV1_007" ? { positionLeaveName: "ระดับ" } : null
|
|
||||||
);
|
|
||||||
const body = {
|
|
||||||
template: tp,
|
|
||||||
reportName: templateName,
|
|
||||||
data: data,
|
|
||||||
};
|
|
||||||
await genReport(body, fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
function getSigner() {
|
|
||||||
showLoader();
|
|
||||||
http
|
|
||||||
.get(config.API.evaluationSigner(id.value, 1))
|
.get(config.API.evaluationSigner(id.value, 1))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
|
|
@ -126,416 +51,14 @@ function getSigner() {
|
||||||
hideLoader();
|
hideLoader();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
onMounted(() => {
|
onMounted(async () => {
|
||||||
getSigner();
|
await fetchSigner();
|
||||||
const ref = {
|
|
||||||
elementaryFullNameRef: elementaryFullNameRef.value,
|
|
||||||
elementaryPositonRef: elementaryPositonRef.value,
|
|
||||||
abovelevelFullnameRef: abovelevelFullnameRef.value,
|
|
||||||
abovelevelPositionRef: abovelevelPositionRef.value,
|
|
||||||
};
|
|
||||||
emit("update:form", formCommand, ref);
|
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="row q-col-gutter-md">
|
<div class="row q-col-gutter-md">
|
||||||
<!-- แบบพิจารณาคุณสมบัติบุคคล -->
|
<!-- ผลงาน -->
|
||||||
<!-- <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">
|
|
||||||
แบบพิจารณาคุณสมบัติบุคคล
|
|
||||||
</div>
|
|
||||||
<div class="col-12"><q-separator /></div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-12 q-pa-sm">
|
|
||||||
<div class="row q-col-gutter-md col-12">
|
|
||||||
<div class="col-xs-12 col-sm-6 row">
|
|
||||||
<q-btn
|
|
||||||
class="col-12"
|
|
||||||
outline
|
|
||||||
icon="download"
|
|
||||||
label="ดาวน์โหลดต้นแบบ"
|
|
||||||
color="primary"
|
|
||||||
@click="
|
|
||||||
onClickDowloadFile(
|
|
||||||
'EV1_005',
|
|
||||||
'template-1',
|
|
||||||
'แบบพิจารณาคุณสมบัติบุคคล'
|
|
||||||
)
|
|
||||||
"
|
|
||||||
>
|
|
||||||
<q-tooltip> ดาวน์โหลดต้นแบบ </q-tooltip></q-btn
|
|
||||||
>
|
|
||||||
</div>
|
|
||||||
<div class="col-xs-12 col-sm-6 row">
|
|
||||||
<q-btn
|
|
||||||
v-if="fileEvaluation1"
|
|
||||||
class="col-12"
|
|
||||||
outline
|
|
||||||
icon="visibility"
|
|
||||||
label="ดูไฟล์เอกสาร"
|
|
||||||
color="primary"
|
|
||||||
@click="onClickViewPDF(fileEvaluation1)"
|
|
||||||
>
|
|
||||||
<q-tooltip> ดูไฟล์เอกสาร </q-tooltip></q-btn
|
|
||||||
>
|
|
||||||
</div>
|
|
||||||
<div class="col-xs-12 col-sm-10 row">
|
|
||||||
<q-file
|
|
||||||
v-model="fileEvaluation1"
|
|
||||||
class="col-12"
|
|
||||||
outlined
|
|
||||||
dense
|
|
||||||
hide-bottom-space
|
|
||||||
lazy-rules
|
|
||||||
accept=".pdf"
|
|
||||||
>
|
|
||||||
<template v-slot:prepend>
|
|
||||||
<q-icon name="attach_file" />
|
|
||||||
</template>
|
|
||||||
</q-file>
|
|
||||||
</div>
|
|
||||||
<div class="col-2 self-center text-center q-pl-none">
|
|
||||||
<q-btn flat round dense color="primary" icon="mdi-upload"
|
|
||||||
><q-tooltip>อัปโหลดไฟล์</q-tooltip></q-btn
|
|
||||||
>
|
|
||||||
</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">
|
|
||||||
แบบแสดงรายละเอียดการเสนอผลงาน
|
|
||||||
</div>
|
|
||||||
<div class="col-12"><q-separator /></div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-12 q-pa-sm">
|
|
||||||
<div class="row q-col-gutter-md col-12">
|
|
||||||
<div class="col-xs-12 col-sm-6 row">
|
|
||||||
<q-btn
|
|
||||||
class="col-12"
|
|
||||||
outline
|
|
||||||
icon="download"
|
|
||||||
label="ดาวน์โหลดต้นแบบ"
|
|
||||||
color="primary"
|
|
||||||
@click="
|
|
||||||
onClickDowloadFile(
|
|
||||||
'EV1_006',
|
|
||||||
'template-2',
|
|
||||||
'แบบแสดงรายละเอียดการเสนอผลงาน'
|
|
||||||
)
|
|
||||||
"
|
|
||||||
>
|
|
||||||
<q-tooltip> ดาวน์โหลดต้นแบบ </q-tooltip></q-btn
|
|
||||||
>
|
|
||||||
</div>
|
|
||||||
<div class="col-xs-12 col-sm-6 row">
|
|
||||||
<q-btn
|
|
||||||
v-if="fileEvaluation2"
|
|
||||||
class="col-12"
|
|
||||||
outline
|
|
||||||
icon="visibility"
|
|
||||||
label="ดูไฟล์เอกสาร"
|
|
||||||
color="primary"
|
|
||||||
>
|
|
||||||
<q-tooltip> ดูไฟล์เอกสาร </q-tooltip></q-btn
|
|
||||||
>
|
|
||||||
</div>
|
|
||||||
<div class="col-xs-12 col-sm-10 row">
|
|
||||||
<q-file
|
|
||||||
v-model="fileEvaluation2"
|
|
||||||
class="col-12"
|
|
||||||
outlined
|
|
||||||
dense
|
|
||||||
hide-bottom-space
|
|
||||||
lazy-rules
|
|
||||||
accept=".pdf"
|
|
||||||
>
|
|
||||||
<template v-slot:prepend>
|
|
||||||
<q-icon name="attach_file" />
|
|
||||||
</template>
|
|
||||||
</q-file>
|
|
||||||
</div>
|
|
||||||
<div class="col-2 self-center text-center q-pl-none">
|
|
||||||
<q-btn flat round dense color="primary" icon="mdi-upload"
|
|
||||||
><q-tooltip>อัปโหลดไฟล์</q-tooltip></q-btn
|
|
||||||
>
|
|
||||||
</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">
|
|
||||||
แบบตรวจสอบความถูกต้องครบถ้วนของข้อมูลเพื่อประกอบการคัดเลือกบุคคล
|
|
||||||
</div>
|
|
||||||
<div class="col-12"><q-separator /></div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-12 q-pa-sm">
|
|
||||||
<div class="row q-col-gutter-md col-12">
|
|
||||||
<div class="col-xs-12 col-sm-6 row">
|
|
||||||
<q-btn
|
|
||||||
class="col-12"
|
|
||||||
outline
|
|
||||||
icon="download"
|
|
||||||
label="ดาวน์โหลดต้นแบบ"
|
|
||||||
color="primary"
|
|
||||||
@click="
|
|
||||||
onClickDowloadFile(
|
|
||||||
'EV1_007',
|
|
||||||
'template-3',
|
|
||||||
'แบบตรวจสอบความถูกต้องครบถ้วนของข้อมูลเพื่อประกอบการคัดเลือกบุคคล'
|
|
||||||
)
|
|
||||||
"
|
|
||||||
>
|
|
||||||
<q-tooltip> ดาวน์โหลดต้นแบบ </q-tooltip></q-btn
|
|
||||||
>
|
|
||||||
</div>
|
|
||||||
<div class="col-xs-12 col-sm-6 row">
|
|
||||||
<q-btn
|
|
||||||
v-if="fileEvaluation3"
|
|
||||||
class="col-12"
|
|
||||||
outline
|
|
||||||
icon="visibility"
|
|
||||||
label="ดูไฟล์เอกสาร"
|
|
||||||
color="primary"
|
|
||||||
>
|
|
||||||
<q-tooltip> ดูไฟล์เอกสาร </q-tooltip></q-btn
|
|
||||||
>
|
|
||||||
</div>
|
|
||||||
<div class="col-xs-12 col-sm-10 row">
|
|
||||||
<q-file
|
|
||||||
v-model="fileEvaluation3"
|
|
||||||
class="col-12"
|
|
||||||
outlined
|
|
||||||
dense
|
|
||||||
hide-bottom-space
|
|
||||||
lazy-rules
|
|
||||||
accept=".pdf"
|
|
||||||
>
|
|
||||||
<template v-slot:prepend>
|
|
||||||
<q-icon name="attach_file" />
|
|
||||||
</template>
|
|
||||||
</q-file>
|
|
||||||
</div>
|
|
||||||
<div class="col-2 self-center text-center q-pl-none">
|
|
||||||
<q-btn flat round dense color="primary" icon="mdi-upload"
|
|
||||||
><q-tooltip>อัปโหลดไฟล์</q-tooltip></q-btn
|
|
||||||
>
|
|
||||||
</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">
|
|
||||||
แบบประเมินคุณลักษณะบุคคล
|
|
||||||
</div>
|
|
||||||
<div class="col-12"><q-separator /></div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-12 q-pa-sm">
|
|
||||||
<div class="row q-col-gutter-md col-12">
|
|
||||||
<div class="col-xs-12 col-sm-6 row">
|
|
||||||
<q-btn
|
|
||||||
class="col-12"
|
|
||||||
outline
|
|
||||||
icon="download"
|
|
||||||
label="ดาวน์โหลดต้นแบบ"
|
|
||||||
color="primary"
|
|
||||||
@click="
|
|
||||||
onClickDowloadFile(
|
|
||||||
'EV1_008',
|
|
||||||
'template-4',
|
|
||||||
'แบบประเมินคุณลักษณะบุคคล'
|
|
||||||
)
|
|
||||||
"
|
|
||||||
>
|
|
||||||
<q-tooltip> ดาวน์โหลดต้นแบบ </q-tooltip></q-btn
|
|
||||||
>
|
|
||||||
</div>
|
|
||||||
<div class="col-xs-12 col-sm-6 row">
|
|
||||||
<q-btn
|
|
||||||
v-if="fileEvaluation4"
|
|
||||||
class="col-12"
|
|
||||||
outline
|
|
||||||
icon="visibility"
|
|
||||||
label="ดูไฟล์เอกสาร"
|
|
||||||
color="primary"
|
|
||||||
>
|
|
||||||
<q-tooltip> ดูไฟล์เอกสาร </q-tooltip></q-btn
|
|
||||||
>
|
|
||||||
</div>
|
|
||||||
<div class="col-xs-12 col-sm-10 row">
|
|
||||||
<q-file
|
|
||||||
v-model="fileEvaluation4"
|
|
||||||
class="col-12"
|
|
||||||
outlined
|
|
||||||
dense
|
|
||||||
hide-bottom-space
|
|
||||||
lazy-rules
|
|
||||||
accept=".pdf"
|
|
||||||
>
|
|
||||||
<template v-slot:prepend>
|
|
||||||
<q-icon name="attach_file" />
|
|
||||||
</template>
|
|
||||||
</q-file>
|
|
||||||
</div>
|
|
||||||
<div class="col-2 self-center text-center q-pl-none">
|
|
||||||
<q-btn flat round dense color="primary" icon="mdi-upload"
|
|
||||||
><q-tooltip>อัปโหลดไฟล์</q-tooltip></q-btn
|
|
||||||
>
|
|
||||||
</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">
|
|
||||||
แบบสรุปข้อมูลของผู้ขอรับการคัดเลือก
|
|
||||||
</div>
|
|
||||||
<div class="col-12"><q-separator /></div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-12 q-pa-sm">
|
|
||||||
<div class="row q-col-gutter-md col-12">
|
|
||||||
<div class="col-xs-12 col-sm-6 row">
|
|
||||||
<q-btn
|
|
||||||
class="col-12"
|
|
||||||
outline
|
|
||||||
icon="download"
|
|
||||||
label="ดาวน์โหลดต้นแบบ"
|
|
||||||
color="primary"
|
|
||||||
@click="
|
|
||||||
onClickDowloadFile(
|
|
||||||
'EV1_009',
|
|
||||||
'template-5',
|
|
||||||
'แบบสรุปข้อมูลของผู้ขอรับการคัดเลือก'
|
|
||||||
)
|
|
||||||
"
|
|
||||||
>
|
|
||||||
<q-tooltip> ดาวน์โหลดต้นแบบ </q-tooltip></q-btn
|
|
||||||
>
|
|
||||||
</div>
|
|
||||||
<div class="col-xs-12 col-sm-6 row">
|
|
||||||
<q-btn
|
|
||||||
v-if="fileEvaluation5"
|
|
||||||
class="col-12"
|
|
||||||
outline
|
|
||||||
icon="visibility"
|
|
||||||
label="ดูไฟล์เอกสาร"
|
|
||||||
color="primary"
|
|
||||||
>
|
|
||||||
<q-tooltip> ดูไฟล์เอกสาร </q-tooltip></q-btn
|
|
||||||
>
|
|
||||||
</div>
|
|
||||||
<div class="col-xs-12 col-sm-10 row">
|
|
||||||
<q-file
|
|
||||||
v-model="fileEvaluation5"
|
|
||||||
class="col-12"
|
|
||||||
outlined
|
|
||||||
dense
|
|
||||||
hide-bottom-space
|
|
||||||
lazy-rules
|
|
||||||
accept=".pdf"
|
|
||||||
>
|
|
||||||
<template v-slot:prepend>
|
|
||||||
<q-icon name="attach_file" />
|
|
||||||
</template>
|
|
||||||
</q-file>
|
|
||||||
</div>
|
|
||||||
<div class="col-2 self-center text-center q-pl-none">
|
|
||||||
<q-btn flat round dense color="primary" icon="mdi-upload"
|
|
||||||
><q-tooltip>อัปโหลดไฟล์</q-tooltip></q-btn
|
|
||||||
>
|
|
||||||
</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">
|
|
||||||
ผลงานที่จะส่งประเมิน
|
|
||||||
</div>
|
|
||||||
<div class="col-12"><q-separator /></div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-12 q-pa-sm">
|
|
||||||
<div class="row q-col-gutter-md col-12">
|
|
||||||
<div class="col-xs-12 col-sm-6 row">
|
|
||||||
<q-btn
|
|
||||||
class="col-12"
|
|
||||||
outline
|
|
||||||
icon="download"
|
|
||||||
label="ดาวน์โหลดต้นแบบ"
|
|
||||||
color="primary"
|
|
||||||
@click="
|
|
||||||
onClickDowloadFile(
|
|
||||||
'EV1_010',
|
|
||||||
'template-6',
|
|
||||||
'ผลงานที่จะส่งประเมิน'
|
|
||||||
)
|
|
||||||
"
|
|
||||||
>
|
|
||||||
<q-tooltip> ดาวน์โหลดต้นแบบ </q-tooltip></q-btn
|
|
||||||
>
|
|
||||||
</div>
|
|
||||||
<div class="col-xs-12 col-sm-6 row">
|
|
||||||
<q-btn
|
|
||||||
v-if="fileEvaluation6"
|
|
||||||
class="col-12"
|
|
||||||
outline
|
|
||||||
icon="visibility"
|
|
||||||
label="ดูไฟล์เอกสาร"
|
|
||||||
color="primary"
|
|
||||||
>
|
|
||||||
<q-tooltip> ดูไฟล์เอกสาร </q-tooltip></q-btn
|
|
||||||
>
|
|
||||||
</div>
|
|
||||||
<div class="col-xs-12 col-sm-10 row">
|
|
||||||
<q-file
|
|
||||||
v-model="fileEvaluation6"
|
|
||||||
class="col-12"
|
|
||||||
outlined
|
|
||||||
dense
|
|
||||||
hide-bottom-space
|
|
||||||
lazy-rules
|
|
||||||
accept=".pdf"
|
|
||||||
>
|
|
||||||
<template v-slot:prepend>
|
|
||||||
<q-icon name="attach_file" />
|
|
||||||
</template>
|
|
||||||
</q-file>
|
|
||||||
</div>
|
|
||||||
<div class="col-2 self-center text-center q-pl-none">
|
|
||||||
<q-btn flat round dense color="primary" icon="mdi-upload"
|
|
||||||
><q-tooltip>อัปโหลดไฟล์</q-tooltip></q-btn
|
|
||||||
>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</q-card>
|
|
||||||
</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>
|
<div class="text-weight-medium bg-grey-1 q-py-sm q-px-md">ผลงาน</div>
|
||||||
|
|
@ -551,7 +74,6 @@ onMounted(() => {
|
||||||
outlined
|
outlined
|
||||||
label="ชื่อผลงาน"
|
label="ชื่อผลงาน"
|
||||||
v-model="subject"
|
v-model="subject"
|
||||||
@update:model-value="updateInput(formCommand)"
|
|
||||||
:rules="[(val) => !!val || `${'กรุณากรอกชื่อผลงาน'}`]"
|
:rules="[(val) => !!val || `${'กรุณากรอกชื่อผลงาน'}`]"
|
||||||
lazy-rules
|
lazy-rules
|
||||||
/>
|
/>
|
||||||
|
|
@ -561,7 +83,6 @@ onMounted(() => {
|
||||||
dense
|
dense
|
||||||
outlined
|
outlined
|
||||||
v-model="author"
|
v-model="author"
|
||||||
@update:model-value="updateInput(formCommand)"
|
|
||||||
label="เจ้าของผลงาน"
|
label="เจ้าของผลงาน"
|
||||||
:rules="[(val) => !!val || `${'กรุณากรอกเจ้าของผลงาน'}`]"
|
:rules="[(val) => !!val || `${'กรุณากรอกเจ้าของผลงาน'}`]"
|
||||||
lazy-rules
|
lazy-rules
|
||||||
|
|
@ -597,7 +118,6 @@ onMounted(() => {
|
||||||
outlined
|
outlined
|
||||||
label="ชื่อ-นามสกุล"
|
label="ชื่อ-นามสกุล"
|
||||||
v-model="formCommand.elementaryFullName"
|
v-model="formCommand.elementaryFullName"
|
||||||
@update:model-value="updateInput(formCommand)"
|
|
||||||
:rules="[(val) => !!val || `${'กรุณากรอกชื่อ-นามสกุล'}`]"
|
:rules="[(val) => !!val || `${'กรุณากรอกชื่อ-นามสกุล'}`]"
|
||||||
lazy-rules
|
lazy-rules
|
||||||
/>
|
/>
|
||||||
|
|
@ -608,7 +128,6 @@ onMounted(() => {
|
||||||
dense
|
dense
|
||||||
outlined
|
outlined
|
||||||
v-model="formCommand.elementaryPosition"
|
v-model="formCommand.elementaryPosition"
|
||||||
@update:model-value="updateInput(formCommand)"
|
|
||||||
label="ตำแหน่ง"
|
label="ตำแหน่ง"
|
||||||
:rules="[(val) => !!val || `${'กรุณากรอกตำแหน่ง'}`]"
|
:rules="[(val) => !!val || `${'กรุณากรอกตำแหน่ง'}`]"
|
||||||
lazy-rules
|
lazy-rules
|
||||||
|
|
@ -633,7 +152,6 @@ onMounted(() => {
|
||||||
label="ชื่อ-นามสกุล"
|
label="ชื่อ-นามสกุล"
|
||||||
:rules="[(val) => !!val || `${'กรุณากรอกชื่อ-นามสกุล'}`]"
|
:rules="[(val) => !!val || `${'กรุณากรอกชื่อ-นามสกุล'}`]"
|
||||||
lazy-rules
|
lazy-rules
|
||||||
@update:model-value="updateInput(formCommand)"
|
|
||||||
/>
|
/>
|
||||||
<q-input
|
<q-input
|
||||||
ref="abovelevelPositionRef"
|
ref="abovelevelPositionRef"
|
||||||
|
|
@ -645,7 +163,6 @@ onMounted(() => {
|
||||||
label="ตำแหน่ง"
|
label="ตำแหน่ง"
|
||||||
:rules="[(val) => !!val || `${'กรุณากรอกตำแหน่ง'}`]"
|
:rules="[(val) => !!val || `${'กรุณากรอกตำแหน่ง'}`]"
|
||||||
lazy-rules
|
lazy-rules
|
||||||
@update:model-value="updateInput(formCommand)"
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -655,94 +172,6 @@ onMounted(() => {
|
||||||
</q-card>
|
</q-card>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Dialog Full Screen -->
|
|
||||||
<q-dialog
|
|
||||||
v-model="modalView"
|
|
||||||
persistent
|
|
||||||
:maximized="true"
|
|
||||||
transition-show="slide-up"
|
|
||||||
transition-hide="slide-down"
|
|
||||||
>
|
|
||||||
<q-card class="bg-white">
|
|
||||||
<div class="flex justify-end items-center align-center q-mr-md q-mt-sm">
|
|
||||||
<q-btn
|
|
||||||
icon="close"
|
|
||||||
unelevated
|
|
||||||
round
|
|
||||||
dense
|
|
||||||
style="color: #ff8080; background-color: #ffdede"
|
|
||||||
size="12px"
|
|
||||||
v-close-popup
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<div class="q-pa-md">
|
|
||||||
<div class="row items-start items-center">
|
|
||||||
<div class="col">
|
|
||||||
<q-btn
|
|
||||||
padding="xs"
|
|
||||||
icon="mdi-chevron-left"
|
|
||||||
color="grey-2"
|
|
||||||
text-color="grey-5"
|
|
||||||
size="md"
|
|
||||||
class="my-auto"
|
|
||||||
@click="backPage"
|
|
||||||
:disable="page == 1"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<div class="col-12 col-md-auto">
|
|
||||||
<div class="q-pa-md flex">
|
|
||||||
หน้าที่ {{ page }} จาก {{ numOfPages }}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col text-right">
|
|
||||||
<q-btn
|
|
||||||
padding="xs"
|
|
||||||
icon="mdi-chevron-right"
|
|
||||||
color="grey-2"
|
|
||||||
text-color="grey-5"
|
|
||||||
size="md"
|
|
||||||
@click="nextPage"
|
|
||||||
:disable="page === numOfPages"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="row items- items-center">
|
|
||||||
<VuePDF ref="vuePDFRef" :pdf="pdfSrc" :page="page" fit-parent />
|
|
||||||
</div>
|
|
||||||
<div class="row items- items-end">
|
|
||||||
<div class="col">
|
|
||||||
<q-btn
|
|
||||||
padding="xs"
|
|
||||||
icon="mdi-chevron-left"
|
|
||||||
color="grey-2"
|
|
||||||
text-color="grey-5"
|
|
||||||
size="md"
|
|
||||||
class="my-auto"
|
|
||||||
@click="backPage"
|
|
||||||
:disable="page == 1"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<div class="col-12 col-md-auto">
|
|
||||||
<div class="q-pa-md flex">
|
|
||||||
หน้าที่ {{ page }} จาก {{ numOfPages }}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col text-right">
|
|
||||||
<q-btn
|
|
||||||
padding="xs"
|
|
||||||
icon="mdi-chevron-right"
|
|
||||||
color="grey-2"
|
|
||||||
text-color="grey-5"
|
|
||||||
size="md"
|
|
||||||
@click="nextPage"
|
|
||||||
:disable="page === numOfPages"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</q-card>
|
|
||||||
</q-dialog>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped></style>
|
<style scoped></style>
|
||||||
|
|
|
||||||
|
|
@ -1,31 +1,41 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { reactive, ref, watch, onMounted } from "vue";
|
import { ref, onMounted } from "vue";
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
import { VuePDF, usePDF } from "@tato30/vue-pdf";
|
import { usePDF } from "@tato30/vue-pdf";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useRoute } from "vue-router";
|
||||||
import { useEvaluateDetailStore } from "@/modules/12_evaluatePersonal/store/EvaluateDetail";
|
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
import { useRouter, useRoute } from "vue-router";
|
|
||||||
import axios from "axios";
|
import axios from "axios";
|
||||||
|
|
||||||
const router = useRouter();
|
/** importStore*/
|
||||||
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
|
import { useEvaluateDetailStore } from "@/modules/12_evaluatePersonal/store/EvaluateDetail";
|
||||||
|
|
||||||
|
/** use*/
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const id = ref<string>(route.params.id as string);
|
|
||||||
const store = useEvaluateDetailStore();
|
const store = useEvaluateDetailStore();
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { date2Thai, showLoader, hideLoader, messageError } = mixin;
|
|
||||||
|
|
||||||
const selectedItem = ref(1);
|
const { showLoader, hideLoader, messageError } = mixin;
|
||||||
|
|
||||||
|
const id = ref<string>(route.params.id as string);
|
||||||
|
const selectedItem = ref<number>(1);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* funtion เลือกไฟล์
|
||||||
|
* @param itemNumber indexItems
|
||||||
|
*/
|
||||||
function handleItemClick(itemNumber: number) {
|
function handleItemClick(itemNumber: number) {
|
||||||
store.tabPanels = itemNumber.toString();
|
store.tabPanels = itemNumber.toString();
|
||||||
selectedItem.value = itemNumber;
|
selectedItem.value = itemNumber;
|
||||||
|
|
||||||
getFile(itemNumber);
|
getFile(itemNumber);
|
||||||
}
|
}
|
||||||
// evaluationFilebyId
|
|
||||||
|
/**
|
||||||
|
* function เรียกไฟล์
|
||||||
|
* @param volume index item
|
||||||
|
*/
|
||||||
function getFile(volume: number) {
|
function getFile(volume: number) {
|
||||||
const fileText = numToThai(volume);
|
const fileText = numToThai(volume);
|
||||||
showLoader();
|
showLoader();
|
||||||
|
|
@ -45,6 +55,11 @@ function getFile(volume: number) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* function loafFile PDF
|
||||||
|
* @param url linkLoadFile
|
||||||
|
* @param type ประเภทไฟล์
|
||||||
|
*/
|
||||||
function getPDF(url: string, type: string) {
|
function getPDF(url: string, type: string) {
|
||||||
axios
|
axios
|
||||||
.get(url, {
|
.get(url, {
|
||||||
|
|
@ -78,6 +93,10 @@ function getPDF(url: string, type: string) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* function Convert ชื่อไฟล์
|
||||||
|
* @param val indexItems
|
||||||
|
*/
|
||||||
function numToThai(val: number) {
|
function numToThai(val: number) {
|
||||||
switch (val) {
|
switch (val) {
|
||||||
case 1:
|
case 1:
|
||||||
|
|
@ -85,7 +104,7 @@ function numToThai(val: number) {
|
||||||
case 2:
|
case 2:
|
||||||
return "2-แบบแสดงรายละเอียดการเสนอผลงาน";
|
return "2-แบบแสดงรายละเอียดการเสนอผลงาน";
|
||||||
case 3:
|
case 3:
|
||||||
return "3-แบบตรวจสอบความถูกต้องครบถ้วนของข้อมูลเพื่อประกอบการคัดเลือกบุคคล (เอกสารแบบ ก.)";
|
return "3-แบบตรวจสอบความถูกต้องครบถ้วนของข้อมูลเพื่อประกอบการคัดเลือกบุคคล (เอกสารแบบ ก)";
|
||||||
case 4:
|
case 4:
|
||||||
return "4-แบบประเมินคุณลักษณะบุคคล";
|
return "4-แบบประเมินคุณลักษณะบุคคล";
|
||||||
case 5:
|
case 5:
|
||||||
|
|
@ -98,7 +117,7 @@ function numToThai(val: number) {
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getFile(1);
|
getFile(selectedItem.value);
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,18 +1,25 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted } from "vue";
|
import { ref, onMounted } from "vue";
|
||||||
import { useRouter, 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 keycloak from "@/plugins/keycloak";
|
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
|
||||||
import genReport from "@/plugins/genreport";
|
import genReport from "@/plugins/genreport";
|
||||||
import { useQuasar } from "quasar";
|
|
||||||
import PopupReason from "@/components/Dialogs/PopupReason.vue";
|
/** importType*/
|
||||||
|
import type { PersonInformation } from "@/modules/12_evaluatePersonal/interface/response/evalute";
|
||||||
|
|
||||||
|
/** importStore*/
|
||||||
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useEvaluateDetailStore } from "@/modules/12_evaluatePersonal/store/EvaluateDetail";
|
import { useEvaluateDetailStore } from "@/modules/12_evaluatePersonal/store/EvaluateDetail";
|
||||||
|
|
||||||
|
/** use*/
|
||||||
|
const route = useRoute();
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
|
const store = useEvaluateDetailStore();
|
||||||
|
|
||||||
const {
|
const {
|
||||||
date2Thai,
|
date2Thai,
|
||||||
showLoader,
|
showLoader,
|
||||||
|
|
@ -21,21 +28,15 @@ const {
|
||||||
success,
|
success,
|
||||||
dialogConfirm,
|
dialogConfirm,
|
||||||
} = mixin;
|
} = mixin;
|
||||||
const store = useEvaluateDetailStore();
|
|
||||||
|
|
||||||
const router = useRouter();
|
|
||||||
const route = useRoute();
|
|
||||||
const id = ref<string>(route.params.id as string);
|
const id = ref<string>(route.params.id as string);
|
||||||
const fullName = ref<string>(
|
|
||||||
keycloak.tokenParsed ? keycloak.tokenParsed.name!.toString() : ""
|
|
||||||
);
|
|
||||||
const profile = ref<any>();
|
const profile = ref<any>();
|
||||||
const messenger = ref<string>("");
|
const messenger = ref<string>("");
|
||||||
const title = ref<string>("");
|
const title = ref<string>("");
|
||||||
const modalEvaluation = ref<boolean>(false);
|
const modalEvaluation = ref<boolean>(false);
|
||||||
const fileEvaluationUpload = ref<any>();
|
const fileEvaluationUpload = ref<any>();
|
||||||
const fileEvaluationUploadRef = ref<any>();
|
const fileEvaluationUploadRef = ref<any>();
|
||||||
const status = ref<string>("WAIT_CHECK_DOC_V1");
|
|
||||||
const files = [
|
const files = [
|
||||||
{
|
{
|
||||||
id: "file1",
|
id: "file1",
|
||||||
|
|
@ -71,6 +72,7 @@ const files = [
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
/** function ดาวน์โหลดไฟล์ต้นแบบ*/
|
||||||
async function onClickDowloadFile(
|
async function onClickDowloadFile(
|
||||||
tp: string,
|
tp: string,
|
||||||
templateName: string,
|
templateName: string,
|
||||||
|
|
@ -110,20 +112,23 @@ async function onClickDowloadFile(
|
||||||
await genReport(body, fileName);
|
await genReport(body, fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** ติดต่อผู้ขอประเมิน */
|
/** function เปิด popup ติดต่อผู้ขอประเมิน */
|
||||||
function openPopUp() {
|
function openPopUp() {
|
||||||
modalEvaluation.value = true;
|
modalEvaluation.value = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
function downloadFile(name: string) {
|
/**
|
||||||
|
* function ดาวน์โหลดไฟล์
|
||||||
|
* @param name ชื้อไฟล์
|
||||||
|
*/
|
||||||
|
async function downloadFile(name: string) {
|
||||||
showLoader();
|
showLoader();
|
||||||
http
|
await http
|
||||||
.get(config.API.evaluationFilebyId("เล่ม 1", id.value, name))
|
.get(config.API.evaluationFilebyId("เล่ม 1", id.value, name))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
const link = res.data.downloadUrl;
|
const link = res.data.downloadUrl;
|
||||||
const type = res.data.fileType;
|
const type = res.data.fileType;
|
||||||
const fileName = res.data.fileName;
|
const fileName = res.data.fileName;
|
||||||
|
|
||||||
getPDF(link, type, fileName);
|
getPDF(link, type, fileName);
|
||||||
})
|
})
|
||||||
.catch((e) => {})
|
.catch((e) => {})
|
||||||
|
|
@ -132,8 +137,14 @@ function downloadFile(name: string) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function getPDF(url: string, type: string, fileName: string) {
|
/**
|
||||||
axios
|
* function เรียกไฟล์ PDF
|
||||||
|
* @param url link PDF
|
||||||
|
* @param type ประเภทไฟล์
|
||||||
|
* @param fileName ชือไฟล์
|
||||||
|
*/
|
||||||
|
async function getPDF(url: string, type: string, fileName: string) {
|
||||||
|
await axios
|
||||||
.get(url, {
|
.get(url, {
|
||||||
method: "GET",
|
method: "GET",
|
||||||
responseType: "blob",
|
responseType: "blob",
|
||||||
|
|
@ -152,7 +163,7 @@ function getPDF(url: string, type: string, fileName: string) {
|
||||||
.finally(() => {});
|
.finally(() => {});
|
||||||
}
|
}
|
||||||
|
|
||||||
/** ส่งไปประกาศบนเว็บไซต์ */
|
/** function ส่งไปประกาศบนเว็บไซต์ */
|
||||||
function onWebSite() {
|
function onWebSite() {
|
||||||
download10Url.value === ""
|
download10Url.value === ""
|
||||||
? (fileEvaluationUpload.value = "")
|
? (fileEvaluationUpload.value = "")
|
||||||
|
|
@ -168,10 +179,11 @@ function onWebSite() {
|
||||||
showLoader();
|
showLoader();
|
||||||
http
|
http
|
||||||
.put(config.API.evaluationApproveDoc1(id.value))
|
.put(config.API.evaluationApproveDoc1(id.value))
|
||||||
.then(() => {})
|
.then(() => {
|
||||||
|
success($q, "ส่งไปประกาศบนเว็บไซต์สำเร็จ");
|
||||||
|
})
|
||||||
.catch(() => {})
|
.catch(() => {})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
success($q, "ส่งไปประกาศบนเว็บไซต์สำเร็จ");
|
|
||||||
getStep();
|
getStep();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
@ -181,9 +193,10 @@ function onWebSite() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function getStep() {
|
/** function เช็คขั้นตอน*/
|
||||||
|
async function getStep() {
|
||||||
showLoader();
|
showLoader();
|
||||||
http
|
await http
|
||||||
.get(config.API.evaluateGetStep(id.value))
|
.get(config.API.evaluateGetStep(id.value))
|
||||||
.then((res: any) => {
|
.then((res: any) => {
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
|
|
@ -220,10 +233,14 @@ function getStep() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function upLoadFile(file: any) {
|
/**
|
||||||
|
* function เรียก link อัปโหลด
|
||||||
|
* @param file ไฟล์
|
||||||
|
*/
|
||||||
|
async function upLoadFile(file: any) {
|
||||||
if (file) {
|
if (file) {
|
||||||
showLoader();
|
showLoader();
|
||||||
http
|
await http
|
||||||
.post(config.API.evaluationFileListbyId("เล่ม 1", id.value), {
|
.post(config.API.evaluationFileListbyId("เล่ม 1", id.value), {
|
||||||
fileList: {
|
fileList: {
|
||||||
fileName: "10-ประกาศผลการคัดเลือกบุคคล (เอกสารหมายเลข 10)",
|
fileName: "10-ประกาศผลการคัดเลือกบุคคล (เอกสารหมายเลข 10)",
|
||||||
|
|
@ -252,6 +269,10 @@ function upLoadFile(file: any) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* function อัปโหลดไฟล์
|
||||||
|
* @param url link อัปโหลด
|
||||||
|
*/
|
||||||
function fileUpLoad(url: string) {
|
function fileUpLoad(url: string) {
|
||||||
axios
|
axios
|
||||||
.put(url, fileEvaluationUpload.value, {
|
.put(url, fileEvaluationUpload.value, {
|
||||||
|
|
@ -268,16 +289,18 @@ function fileUpLoad(url: string) {
|
||||||
}
|
}
|
||||||
|
|
||||||
const myForm = ref<any>();
|
const myForm = ref<any>();
|
||||||
function sentMessenger() {
|
|
||||||
|
/** fiunction ส่งข้อความ*/
|
||||||
|
async function sentMessenger() {
|
||||||
myForm.value.validate().then(async (result: boolean) => {
|
myForm.value.validate().then(async (result: boolean) => {
|
||||||
if (result) {
|
if (result) {
|
||||||
showLoader();
|
showLoader();
|
||||||
http
|
await http
|
||||||
.put(config.API.evaluationSentToContact(id.value), {
|
.put(config.API.evaluationSentToContact(id.value), {
|
||||||
subject: title.value,
|
subject: title.value,
|
||||||
body: messenger.value,
|
body: messenger.value,
|
||||||
})
|
})
|
||||||
.then((res) => {
|
.then(() => {
|
||||||
success($q, "ส่งข้อความสำเร็จ");
|
success($q, "ส่งข้อความสำเร็จ");
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
|
|
@ -294,9 +317,10 @@ function sentMessenger() {
|
||||||
}
|
}
|
||||||
|
|
||||||
const download10Url = ref<string>("");
|
const download10Url = ref<string>("");
|
||||||
function checkDoc10() {
|
/** function เช็คไฟล์อัปโหลด*/
|
||||||
|
async function checkDoc10() {
|
||||||
showLoader();
|
showLoader();
|
||||||
http
|
await http
|
||||||
.get(
|
.get(
|
||||||
config.API.evaluationPatchData(
|
config.API.evaluationPatchData(
|
||||||
"เล่ม 1",
|
"เล่ม 1",
|
||||||
|
|
@ -307,15 +331,16 @@ function checkDoc10() {
|
||||||
.then((res: any) => {
|
.then((res: any) => {
|
||||||
download10Url.value = res.data.downloadUrl;
|
download10Url.value = res.data.downloadUrl;
|
||||||
})
|
})
|
||||||
// .catch((e) => {
|
.catch(() => {
|
||||||
// messageError($q, e);
|
// messageError($q, e);
|
||||||
// })
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
hideLoader();
|
hideLoader();
|
||||||
});
|
});
|
||||||
fetchProfile();
|
fetchProfile();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** function เรียกข้แมูลคุณสมบัติ*/
|
||||||
async function fetchProfile() {
|
async function fetchProfile() {
|
||||||
showLoader();
|
showLoader();
|
||||||
await http
|
await http
|
||||||
|
|
@ -335,9 +360,10 @@ async function fetchProfile() {
|
||||||
const author = ref<string>("");
|
const author = ref<string>("");
|
||||||
const subject = ref<string>("");
|
const subject = ref<string>("");
|
||||||
|
|
||||||
function fetchDataSigner() {
|
/** function เรียกข้อมูลผลงาน*/
|
||||||
|
async function fetchDataSigner() {
|
||||||
showLoader();
|
showLoader();
|
||||||
http
|
await http
|
||||||
.get(config.API.evaluationSigner(id.value, 1))
|
.get(config.API.evaluationSigner(id.value, 1))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
|
|
@ -352,14 +378,15 @@ function fetchDataSigner() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(async () => {
|
||||||
checkDoc10();
|
await checkDoc10();
|
||||||
fetchDataSigner();
|
await fetchDataSigner();
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="row q-col-gutter-md">
|
<div class="row q-col-gutter-md">
|
||||||
|
<!-- เอกสารเล่มที่ 1 -->
|
||||||
<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">
|
||||||
|
|
@ -397,6 +424,8 @@ onMounted(() => {
|
||||||
</q-list>
|
</q-list>
|
||||||
</q-card>
|
</q-card>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- ประกาศผลการคัดเลือกบุคคล (เอกสารหมายเลข 10) -->
|
||||||
<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">
|
||||||
|
|
@ -478,6 +507,8 @@ onMounted(() => {
|
||||||
</div>
|
</div>
|
||||||
</q-card>
|
</q-card>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- ติดต่อผู้ขอประเมิน -->
|
||||||
<div class="col-12" v-if="store.currentStep == 4">
|
<div class="col-12" v-if="store.currentStep == 4">
|
||||||
<div class="q-mt-xs q-gutter-md" align="right">
|
<div class="q-mt-xs q-gutter-md" align="right">
|
||||||
<q-btn label="ติดต่อผู้ขอประเมิน" color="info" @click="openPopUp" />
|
<q-btn label="ติดต่อผู้ขอประเมิน" color="info" @click="openPopUp" />
|
||||||
|
|
@ -491,6 +522,7 @@ onMounted(() => {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- popup ติดต่อผู้ขอประเมิน -->
|
||||||
<q-dialog v-model="modalEvaluation" persistent>
|
<q-dialog v-model="modalEvaluation" persistent>
|
||||||
<q-card style="min-width: 60vw">
|
<q-card style="min-width: 60vw">
|
||||||
<q-toolbar>
|
<q-toolbar>
|
||||||
|
|
|
||||||
|
|
@ -2,27 +2,18 @@
|
||||||
import { ref, onMounted } from "vue";
|
import { ref, onMounted } from "vue";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
import keycloak from "@/plugins/keycloak";
|
import { useRoute } from "vue-router";
|
||||||
|
|
||||||
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 { useRouter, useRoute } from "vue-router";
|
|
||||||
import genReport from "@/plugins/genreport";
|
/** importStore*/
|
||||||
import { useEvaluateDetailStore } from "@/modules/12_evaluatePersonal/store/EvaluateDetail";
|
import { useEvaluateDetailStore } from "@/modules/12_evaluatePersonal/store/EvaluateDetail";
|
||||||
|
|
||||||
const store = useEvaluateDetailStore();
|
/** use*/
|
||||||
|
|
||||||
const modalView = ref<boolean>(false);
|
|
||||||
const fullName = ref<string>(
|
|
||||||
keycloak.tokenParsed ? keycloak.tokenParsed.name!.toString() : ""
|
|
||||||
);
|
|
||||||
|
|
||||||
const router = useRouter();
|
|
||||||
const route = useRoute();
|
|
||||||
const numOfPages = ref<number>(0);
|
|
||||||
const page = ref<number>(1);
|
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
|
const route = useRoute();
|
||||||
|
const store = useEvaluateDetailStore();
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const {
|
const {
|
||||||
dialogConfirm,
|
dialogConfirm,
|
||||||
|
|
@ -32,15 +23,16 @@ const {
|
||||||
messageError,
|
messageError,
|
||||||
success,
|
success,
|
||||||
} = mixin;
|
} = mixin;
|
||||||
|
|
||||||
|
const page = ref<number>(1);
|
||||||
|
const numOfPages = ref<number>(0);
|
||||||
|
const modalView = ref<boolean>(false);
|
||||||
const AnnouncementStartDate = ref<string | null>();
|
const AnnouncementStartDate = ref<string | null>();
|
||||||
const AnnouncementEndDate = ref<string | null>();
|
const AnnouncementEndDate = ref<string | null>();
|
||||||
const id = ref<string>(route.params.id as string);
|
const id = ref<string>(route.params.id as string);
|
||||||
const pdfSrc = ref<any>();
|
const pdfSrc = ref<any>();
|
||||||
const fileEvaluation5 = ref<any>();
|
const fileEvaluation5 = ref<any>();
|
||||||
const fileEvaluation5Ref = ref<any>();
|
const fileEvaluation5Ref = ref<any>();
|
||||||
const status = ref<string>("ANNOUNCE_WEB");
|
|
||||||
const website = ref<string>("https://bma-ehr.frappet.com/");
|
|
||||||
|
|
||||||
const files = [
|
const files = [
|
||||||
{
|
{
|
||||||
id: "file1",
|
id: "file1",
|
||||||
|
|
@ -59,28 +51,8 @@ const files = [
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
const listFile = [
|
/** function บันทึกแจ้งผลการประกาศคัดเลือก*/
|
||||||
{
|
async function save() {
|
||||||
id: "x1",
|
|
||||||
fileName: "เอกสาร 1",
|
|
||||||
pathName: "12",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: "x2",
|
|
||||||
fileName: "เอกสาร 2",
|
|
||||||
pathName: "12",
|
|
||||||
},
|
|
||||||
];
|
|
||||||
|
|
||||||
function downloadFile(name: string) {
|
|
||||||
console.log("download");
|
|
||||||
}
|
|
||||||
|
|
||||||
function deleteFile(name: string) {
|
|
||||||
console.log("delete");
|
|
||||||
}
|
|
||||||
|
|
||||||
function save() {
|
|
||||||
download10Url.value === ""
|
download10Url.value === ""
|
||||||
? (fileEvaluation5.value = "")
|
? (fileEvaluation5.value = "")
|
||||||
: fileEvaluation5.value;
|
: fileEvaluation5.value;
|
||||||
|
|
@ -89,16 +61,17 @@ function save() {
|
||||||
fileEvaluation5Ref.value.hasError === false &&
|
fileEvaluation5Ref.value.hasError === false &&
|
||||||
download10Url.value !== ""
|
download10Url.value !== ""
|
||||||
) {
|
) {
|
||||||
dialogConfirm($q, () => {
|
dialogConfirm($q, async () => {
|
||||||
showLoader();
|
await showLoader();
|
||||||
http
|
http
|
||||||
.put(config.API.evaluationNext5To6(id.value))
|
.put(config.API.evaluationNext5To6(id.value))
|
||||||
// .then((res) => {})
|
.then(() => {
|
||||||
|
success($q, "บันทึกแจ้งผลการประกาศคัดเลือกสำเร็จ");
|
||||||
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
success($q, "บันทึกแจ้งผลการประกาศคัดเลือกสำเร็จ");
|
|
||||||
store.step = 6;
|
store.step = 6;
|
||||||
store.currentStep = 6;
|
store.currentStep = 6;
|
||||||
hideLoader();
|
hideLoader();
|
||||||
|
|
@ -107,6 +80,10 @@ function save() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* function เรียก link อัปโหลด
|
||||||
|
* @param file ไฟล์
|
||||||
|
*/
|
||||||
function upLoadFile(file: any) {
|
function upLoadFile(file: any) {
|
||||||
if (file) {
|
if (file) {
|
||||||
showLoader();
|
showLoader();
|
||||||
|
|
@ -139,36 +116,27 @@ function upLoadFile(file: any) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* function อัปโหลดไฟล์
|
||||||
|
* @param url link อัปโหลด
|
||||||
|
*/
|
||||||
function fileUpLoad(url: string) {
|
function fileUpLoad(url: string) {
|
||||||
axios
|
axios
|
||||||
.put(url, fileEvaluation5.value, {
|
.put(url, fileEvaluation5.value, {
|
||||||
headers: { "Content-Type": fileEvaluation5.value?.type },
|
headers: { "Content-Type": fileEvaluation5.value?.type },
|
||||||
onUploadProgress: (e) => console.log(e),
|
onUploadProgress: (e) => console.log(e),
|
||||||
})
|
})
|
||||||
|
.then(() => {
|
||||||
|
success($q, "อัปโหลดไฟล์สำเร็จ");
|
||||||
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
checkDocResult();
|
checkDocResult();
|
||||||
success($q, "อัปโหลดไฟล์สำเร็จ");
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function getFileName(fileName: string) {
|
|
||||||
if (fileName && fileName.lastIndexOf(".") !== -1) {
|
|
||||||
const index = fileName.indexOf("(");
|
|
||||||
if (index !== -1) {
|
|
||||||
return fileName.substring(0, index).trim();
|
|
||||||
} else {
|
|
||||||
// กรณีไม่มีวงเล็บ
|
|
||||||
return fileName.split(".").slice(0, -1).join(".");
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
// ในกรณีที่ไม่มีนามสกุล
|
|
||||||
return fileName;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/** ไปหน้าต่อไปของรายงาน */
|
/** ไปหน้าต่อไปของรายงาน */
|
||||||
function nextPage() {
|
function nextPage() {
|
||||||
if (page.value < numOfPages.value) {
|
if (page.value < numOfPages.value) {
|
||||||
|
|
@ -183,31 +151,31 @@ function backPage() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function copyLink(name: string) {
|
/**
|
||||||
showLoader();
|
* function คัดลอก URL
|
||||||
http
|
* @param name ชื่อไฟล์
|
||||||
|
*/
|
||||||
|
async function copyLink(name: string) {
|
||||||
|
await http
|
||||||
.get(config.API.evaluationFilebyId("เล่ม 1", id.value, name))
|
.get(config.API.evaluationFilebyId("เล่ม 1", id.value, name))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
console.log(res.data);
|
|
||||||
const link = res.data.downloadUrl;
|
const link = res.data.downloadUrl;
|
||||||
navigator.clipboard.writeText(link);
|
navigator.clipboard.writeText(link);
|
||||||
})
|
|
||||||
.catch((e) => {})
|
|
||||||
.finally(() => {
|
|
||||||
success($q, "คัดลอก URL สำเร็จ");
|
success($q, "คัดลอก URL สำเร็จ");
|
||||||
hideLoader();
|
})
|
||||||
|
.catch((e) => {
|
||||||
|
messageError($q, e);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function getDate() {
|
/** function เรียกข้อมูลวันที่ประกาศ*/
|
||||||
|
async function getDate() {
|
||||||
showLoader();
|
showLoader();
|
||||||
http
|
await http
|
||||||
.get(config.API.evaluationDateAnnounce(id.value))
|
.get(config.API.evaluationDateAnnounce(id.value))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
AnnouncementStartDate.value = date2Thai(data.dateStartAnnounce);
|
AnnouncementStartDate.value = date2Thai(data.dateStartAnnounce);
|
||||||
// const endDate = new Date(data.dateStartAnnounce);
|
|
||||||
// endDate.setDate(endDate.getDate() + 30);
|
|
||||||
AnnouncementEndDate.value = date2Thai(data.dateEndAnnounce);
|
AnnouncementEndDate.value = date2Thai(data.dateEndAnnounce);
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
|
|
@ -217,50 +185,12 @@ function getDate() {
|
||||||
hideLoader();
|
hideLoader();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
// function linkCopy(link: string) {
|
|
||||||
// navigator.clipboard
|
|
||||||
// .writeText(link)
|
|
||||||
// .then(() => {
|
|
||||||
// console.log(`Copied link for file: ${link}`);
|
|
||||||
// })
|
|
||||||
// .catch((e) => {
|
|
||||||
// messageError($q, e);
|
|
||||||
// })
|
|
||||||
// .finally(() => {
|
|
||||||
// success($q, "คัดลอกสำเร็จ");
|
|
||||||
// });
|
|
||||||
// }
|
|
||||||
|
|
||||||
// async function onClickDowloadFile(
|
|
||||||
// tp: string,
|
|
||||||
// templateName: string,
|
|
||||||
// fileName: string
|
|
||||||
// ) {
|
|
||||||
// showLoader();
|
|
||||||
// const data = Object.assign(
|
|
||||||
// { fullName: fullName.value },
|
|
||||||
// tp === "EV1_005" || tp === "EV1_007" ? { organizationName: "-" } : null,
|
|
||||||
// tp === "EV1_007" ? { positionName: "-" } : null,
|
|
||||||
// tp === "EV1_007" ? { positionLeaveName: "-" } : null
|
|
||||||
// );
|
|
||||||
// const body = {
|
|
||||||
// template: tp,
|
|
||||||
// reportName: templateName,
|
|
||||||
// data: data,
|
|
||||||
// };
|
|
||||||
// console.log(body);
|
|
||||||
// await genReport(body, fileName);
|
|
||||||
// }
|
|
||||||
|
|
||||||
// function onClickViewPDF(file: any) {
|
|
||||||
// // pdfSrc.value = file.webkitRelativePath;
|
|
||||||
// modalView.value = true;
|
|
||||||
// }
|
|
||||||
|
|
||||||
const download10Url = ref<string>("");
|
const download10Url = ref<string>("");
|
||||||
function checkDocResult() {
|
/** function เช็คไฟล์อัปโหลด*/
|
||||||
|
async function checkDocResult() {
|
||||||
showLoader();
|
showLoader();
|
||||||
http
|
await http
|
||||||
.get(
|
.get(
|
||||||
config.API.evaluationPatchData(
|
config.API.evaluationPatchData(
|
||||||
"เล่ม 1",
|
"เล่ม 1",
|
||||||
|
|
@ -271,9 +201,9 @@ function checkDocResult() {
|
||||||
.then((res: any) => {
|
.then((res: any) => {
|
||||||
download10Url.value = res.data.downloadUrl;
|
download10Url.value = res.data.downloadUrl;
|
||||||
})
|
})
|
||||||
// .catch((e) => {
|
.catch(() => {
|
||||||
// messageError($q, e);
|
// messageError($q, e);
|
||||||
// })
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
hideLoader();
|
hideLoader();
|
||||||
});
|
});
|
||||||
|
|
@ -281,10 +211,10 @@ function checkDocResult() {
|
||||||
|
|
||||||
const author = ref<string>("");
|
const author = ref<string>("");
|
||||||
const subject = ref<string>("");
|
const subject = ref<string>("");
|
||||||
|
/** function เรียกข้อมูลผลงาน*/
|
||||||
function fetchDataSigner() {
|
async function fetchDataSigner() {
|
||||||
showLoader();
|
showLoader();
|
||||||
http
|
await http
|
||||||
.get(config.API.evaluationSigner(id.value, 1))
|
.get(config.API.evaluationSigner(id.value, 1))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
|
|
@ -428,91 +358,6 @@ onMounted(async () => {
|
||||||
</q-card>
|
</q-card>
|
||||||
</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">
|
|
||||||
บันทึกแจ้งผลการประกาศคัดเลือก
|
|
||||||
</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 q-mb-xs">
|
|
||||||
<div class="col-xs-12 col-sm-11 row">
|
|
||||||
<q-file
|
|
||||||
v-model="fileEvaluation5"
|
|
||||||
class="col-12"
|
|
||||||
outlined
|
|
||||||
dense
|
|
||||||
hide-bottom-space
|
|
||||||
lazy-rules
|
|
||||||
accept=".pdf"
|
|
||||||
label="อัปโหลดไฟล์"
|
|
||||||
>
|
|
||||||
<template v-slot:prepend>
|
|
||||||
<q-icon name="attach_file" />
|
|
||||||
</template>
|
|
||||||
</q-file>
|
|
||||||
</div>
|
|
||||||
<div class="col-1 self-center text-center q-pl-none">
|
|
||||||
<q-btn
|
|
||||||
flat
|
|
||||||
round
|
|
||||||
dense
|
|
||||||
color="primary"
|
|
||||||
icon="mdi-upload"
|
|
||||||
@click="upLoadFile"
|
|
||||||
><q-tooltip>อัปโหลดไฟล์</q-tooltip></q-btn
|
|
||||||
>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div v-if="listFile.length > 0">
|
|
||||||
<q-list
|
|
||||||
v-for="file in listFile"
|
|
||||||
:key="file.id"
|
|
||||||
class="full-width"
|
|
||||||
bordered
|
|
||||||
separator
|
|
||||||
>
|
|
||||||
<q-item clickable v-ripple>
|
|
||||||
<q-item-section>{{ file.fileName }}</q-item-section>
|
|
||||||
<q-item-section avatar>
|
|
||||||
<div class="row">
|
|
||||||
<div>
|
|
||||||
<q-btn
|
|
||||||
dense
|
|
||||||
flat
|
|
||||||
round
|
|
||||||
size="12px"
|
|
||||||
color="blue"
|
|
||||||
icon="mdi-download-outline"
|
|
||||||
@click="downloadFile(file.pathName)"
|
|
||||||
>
|
|
||||||
<q-tooltip>ดาวน์โหลดไฟล์</q-tooltip>
|
|
||||||
</q-btn>
|
|
||||||
<q-btn
|
|
||||||
dense
|
|
||||||
flat
|
|
||||||
round
|
|
||||||
size="12px"
|
|
||||||
color="red"
|
|
||||||
icon="mdi-trash-can-outline"
|
|
||||||
@click="deleteFile(file.pathName)"
|
|
||||||
>
|
|
||||||
<q-tooltip>ลบไฟล์</q-tooltip>
|
|
||||||
</q-btn>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</q-item-section>
|
|
||||||
</q-item>
|
|
||||||
</q-list>
|
|
||||||
</div>
|
|
||||||
<div class="col-12" v-else>
|
|
||||||
<q-card class="q-pa-md" bordered> ไม่มีรายการเอกสาร </q-card>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</q-card>
|
|
||||||
</div> -->
|
|
||||||
<div v-if="store.currentStep == 5" class="col-12">
|
<div v-if="store.currentStep == 5" class="col-12">
|
||||||
<div class="q-mt-xs q-gutter-md" align="right">
|
<div class="q-mt-xs q-gutter-md" align="right">
|
||||||
<q-btn
|
<q-btn
|
||||||
|
|
|
||||||
|
|
@ -1,52 +1,45 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, reactive, onMounted } from "vue";
|
import { ref, reactive, onMounted } from "vue";
|
||||||
import ViewPDF from "@/modules/12_evaluatePersonal/components/Detail/viewstep/viewPDF.vue";
|
import { useRoute } from "vue-router";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
|
||||||
import { useRouter, useRoute } from "vue-router";
|
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
import type { FormCommand } from "@/modules/12_evaluatePersonal/interface/index/evalute";
|
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
|
|
||||||
const router = useRouter();
|
/** importType*/
|
||||||
const route = useRoute();
|
import type { FormCommand } from "@/modules/12_evaluatePersonal/interface/index/evalute";
|
||||||
const id = ref<string>(route.params.id as string);
|
|
||||||
const $q = useQuasar();
|
|
||||||
const dateEndPrepareDoc2 = ref<string | null>();
|
|
||||||
const mixin = useCounterMixin();
|
|
||||||
const { date2Thai, showLoader, hideLoader, messageError, success } = mixin;
|
|
||||||
const AnnouncementDate = ref<string | null>(date2Thai(new Date()));
|
|
||||||
const fileEvaluation1 = ref<any>();
|
|
||||||
|
|
||||||
const pdfSrc = ref<any>();
|
/** importStore*/
|
||||||
const modalView = ref<boolean>(false);
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
const emit = defineEmits(["update:form"]);
|
|
||||||
|
/**use*/
|
||||||
|
const $q = useQuasar();
|
||||||
|
const route = useRoute();
|
||||||
|
const mixin = useCounterMixin();
|
||||||
|
const dateEndPrepareDoc2 = ref<string | null>();
|
||||||
|
|
||||||
|
const { date2Thai, showLoader, hideLoader, messageError } = mixin;
|
||||||
|
|
||||||
|
const id = ref<string>(route.params.id as string);
|
||||||
const formCommand = reactive<FormCommand>({
|
const formCommand = reactive<FormCommand>({
|
||||||
elementaryFullName: "",
|
elementaryFullName: "",
|
||||||
elementaryPosition: "",
|
elementaryPosition: "",
|
||||||
abovelevelFullname: "",
|
abovelevelFullname: "",
|
||||||
abovelevelPosition: "",
|
abovelevelPosition: "",
|
||||||
});
|
});
|
||||||
|
const author = ref<string>("");
|
||||||
|
const subject = ref<string>("");
|
||||||
|
const assignedPosition = ref<string>("");
|
||||||
|
|
||||||
function onClickViewPDF(file: any) {
|
/** function เรียกข้อมูลวันที่ประกาศ*/
|
||||||
pdfSrc.value = file.webkitRelativePath;
|
async function getDate() {
|
||||||
modalView.value = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
const updateInput = (value: any) => {
|
|
||||||
emit("update:form", value, ref);
|
|
||||||
};
|
|
||||||
|
|
||||||
function getDate() {
|
|
||||||
showLoader();
|
showLoader();
|
||||||
http
|
await http
|
||||||
.get(config.API.evaluationDateAnnounce(id.value))
|
.get(config.API.evaluationDateAnnounce(id.value))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
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 = dateEndPrepareDoc2.value;
|
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
|
|
@ -56,13 +49,10 @@ function getDate() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
const author = ref<string>("");
|
/** function เรียกข้อมูลผลงาน*/
|
||||||
const subject = ref<string>("");
|
async function getSigner() {
|
||||||
const assignedPosition = ref<string>("");
|
|
||||||
|
|
||||||
function getSigner() {
|
|
||||||
showLoader();
|
showLoader();
|
||||||
http
|
await http
|
||||||
.get(config.API.evaluationSigner(id.value, 2))
|
.get(config.API.evaluationSigner(id.value, 2))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
|
|
@ -74,17 +64,17 @@ function getSigner() {
|
||||||
subject.value = data.subjectDoc2;
|
subject.value = data.subjectDoc2;
|
||||||
assignedPosition.value = data.assignedPosition;
|
assignedPosition.value = data.assignedPosition;
|
||||||
})
|
})
|
||||||
// .catch((e) => {
|
.catch((e) => {
|
||||||
// messageError($q, e);
|
// messageError($q, e);
|
||||||
// })
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
hideLoader();
|
hideLoader();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(async () => {
|
||||||
getSigner();
|
await getSigner();
|
||||||
getDate();
|
await getDate();
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
@ -99,6 +89,7 @@ onMounted(() => {
|
||||||
</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">
|
||||||
<div class="text-weight-medium bg-grey-1 q-py-sm q-px-md">ผลงาน</div>
|
<div class="text-weight-medium bg-grey-1 q-py-sm q-px-md">ผลงาน</div>
|
||||||
|
|
@ -115,7 +106,6 @@ onMounted(() => {
|
||||||
outlined
|
outlined
|
||||||
label="ชื่อผลงาน"
|
label="ชื่อผลงาน"
|
||||||
v-model="subject"
|
v-model="subject"
|
||||||
@update:model-value="updateInput(formCommand)"
|
|
||||||
:rules="[(val) => !!val || `${'กรุณากรอกชื่อผลงาน'}`]"
|
:rules="[(val) => !!val || `${'กรุณากรอกชื่อผลงาน'}`]"
|
||||||
lazy-rules
|
lazy-rules
|
||||||
/>
|
/>
|
||||||
|
|
@ -125,7 +115,6 @@ onMounted(() => {
|
||||||
dense
|
dense
|
||||||
outlined
|
outlined
|
||||||
v-model="author"
|
v-model="author"
|
||||||
@update:model-value="updateInput(formCommand)"
|
|
||||||
label="เจ้าของผลงาน"
|
label="เจ้าของผลงาน"
|
||||||
:rules="[(val) => !!val || `${'กรุณากรอกเจ้าของผลงาน'}`]"
|
:rules="[(val) => !!val || `${'กรุณากรอกเจ้าของผลงาน'}`]"
|
||||||
lazy-rules
|
lazy-rules
|
||||||
|
|
@ -136,7 +125,6 @@ onMounted(() => {
|
||||||
dense
|
dense
|
||||||
outlined
|
outlined
|
||||||
v-model="assignedPosition"
|
v-model="assignedPosition"
|
||||||
@update:model-value="updateInput(formCommand)"
|
|
||||||
label="ตำแหน่งที่ได้รับ"
|
label="ตำแหน่งที่ได้รับ"
|
||||||
:rules="[
|
:rules="[
|
||||||
(val) => !!val || `${'กรุณากรอกตำแหน่งที่ได้รับ'}`,
|
(val) => !!val || `${'กรุณากรอกตำแหน่งที่ได้รับ'}`,
|
||||||
|
|
@ -150,65 +138,8 @@ onMounted(() => {
|
||||||
</div>
|
</div>
|
||||||
</q-card>
|
</q-card>
|
||||||
</div>
|
</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">
|
|
||||||
เอกสารเล่ม 2
|
|
||||||
</div>
|
|
||||||
<div class="col-12"><q-separator /></div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-12 q-pa-sm">
|
|
||||||
<div class="row q-col-gutter-md col-12">
|
|
||||||
<div class="col-xs-12 col-sm-6 row">
|
|
||||||
<q-btn
|
|
||||||
class="col-12"
|
|
||||||
outline
|
|
||||||
icon="download"
|
|
||||||
label="ดาวน์โหลดต้นแบบ"
|
|
||||||
color="primary"
|
|
||||||
>
|
|
||||||
<q-tooltip> ดาวน์โหลดต้นแบบ </q-tooltip></q-btn
|
|
||||||
>
|
|
||||||
</div>
|
|
||||||
<div class="col-xs-12 col-sm-6 row">
|
|
||||||
<q-btn
|
|
||||||
v-if="fileEvaluation1"
|
|
||||||
class="col-12"
|
|
||||||
outline
|
|
||||||
icon="visibility"
|
|
||||||
label="ดูไฟล์เอกสาร"
|
|
||||||
color="primary"
|
|
||||||
@click="onClickViewPDF(fileEvaluation1)"
|
|
||||||
>
|
|
||||||
<q-tooltip> ดูไฟล์เอกสาร </q-tooltip></q-btn
|
|
||||||
>
|
|
||||||
</div>
|
|
||||||
<div class="col-xs-12 col-sm-11 row">
|
|
||||||
<q-file
|
|
||||||
v-model="fileEvaluation1"
|
|
||||||
class="col-12"
|
|
||||||
outlined
|
|
||||||
dense
|
|
||||||
hide-bottom-space
|
|
||||||
lazy-rules
|
|
||||||
accept=".pdf"
|
|
||||||
>
|
|
||||||
<template v-slot:prepend>
|
|
||||||
<q-icon name="attach_file" />
|
|
||||||
</template>
|
|
||||||
</q-file>
|
|
||||||
</div>
|
|
||||||
<div class="col-1 self-center text-center">
|
|
||||||
<q-btn flat round dense color="primary" icon="mdi-upload"
|
|
||||||
><q-tooltip>อัปโหลดไฟล์</q-tooltip></q-btn
|
|
||||||
>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</q-card>
|
|
||||||
</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">
|
||||||
|
|
@ -231,7 +162,6 @@ onMounted(() => {
|
||||||
outlined
|
outlined
|
||||||
label="ชื่อ-นามสกุล"
|
label="ชื่อ-นามสกุล"
|
||||||
v-model="formCommand.elementaryFullName"
|
v-model="formCommand.elementaryFullName"
|
||||||
@update:model-value="updateInput(formCommand)"
|
|
||||||
:rules="[(val) => !!val || `${'กรุณากรอกชื่อ-นามสกุล'}`]"
|
:rules="[(val) => !!val || `${'กรุณากรอกชื่อ-นามสกุล'}`]"
|
||||||
lazy-rules
|
lazy-rules
|
||||||
/>
|
/>
|
||||||
|
|
@ -242,7 +172,6 @@ onMounted(() => {
|
||||||
dense
|
dense
|
||||||
outlined
|
outlined
|
||||||
v-model="formCommand.elementaryPosition"
|
v-model="formCommand.elementaryPosition"
|
||||||
@update:model-value="updateInput(formCommand)"
|
|
||||||
label="ตำแหน่ง"
|
label="ตำแหน่ง"
|
||||||
:rules="[(val) => !!val || `${'กรุณากรอกตำแหน่ง'}`]"
|
:rules="[(val) => !!val || `${'กรุณากรอกตำแหน่ง'}`]"
|
||||||
lazy-rules
|
lazy-rules
|
||||||
|
|
@ -267,7 +196,6 @@ onMounted(() => {
|
||||||
label="ชื่อ-นามสกุล"
|
label="ชื่อ-นามสกุล"
|
||||||
:rules="[(val) => !!val || `${'กรุณากรอกชื่อ-นามสกุล'}`]"
|
:rules="[(val) => !!val || `${'กรุณากรอกชื่อ-นามสกุล'}`]"
|
||||||
lazy-rules
|
lazy-rules
|
||||||
@update:model-value="updateInput(formCommand)"
|
|
||||||
/>
|
/>
|
||||||
<q-input
|
<q-input
|
||||||
ref="abovelevelPositionRef"
|
ref="abovelevelPositionRef"
|
||||||
|
|
@ -279,7 +207,6 @@ onMounted(() => {
|
||||||
label="ตำแหน่ง"
|
label="ตำแหน่ง"
|
||||||
:rules="[(val) => !!val || `${'กรุณากรอกตำแหน่ง'}`]"
|
:rules="[(val) => !!val || `${'กรุณากรอกตำแหน่ง'}`]"
|
||||||
lazy-rules
|
lazy-rules
|
||||||
@update:model-value="updateInput(formCommand)"
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -289,33 +216,6 @@ onMounted(() => {
|
||||||
</q-card>
|
</q-card>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Dialog Full Screen -->
|
|
||||||
<q-dialog
|
|
||||||
v-model="modalView"
|
|
||||||
persistent
|
|
||||||
:maximized="true"
|
|
||||||
transition-show="slide-up"
|
|
||||||
transition-hide="slide-down"
|
|
||||||
>
|
|
||||||
<q-card class="bg-white">
|
|
||||||
<div class="flex justify-end items-center align-center q-mr-md q-mt-sm">
|
|
||||||
<q-btn
|
|
||||||
icon="close"
|
|
||||||
unelevated
|
|
||||||
round
|
|
||||||
dense
|
|
||||||
style="color: #ff8080; background-color: #ffdede"
|
|
||||||
size="12px"
|
|
||||||
v-close-popup
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="q-pa-md">
|
|
||||||
<ViewPDF />
|
|
||||||
</div>
|
|
||||||
</q-card>
|
|
||||||
</q-dialog>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped></style>
|
<style scoped></style>
|
||||||
|
|
|
||||||
|
|
@ -1,33 +1,41 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { reactive, ref, onMounted } from "vue";
|
import { ref, onMounted } from "vue";
|
||||||
import { VuePDF, usePDF } from "@tato30/vue-pdf";
|
import { usePDF } from "@tato30/vue-pdf";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useQuasar } from "quasar";
|
||||||
import { useEvaluateDetailStore } from "@/modules/12_evaluatePersonal/store/EvaluateDetail";
|
import { useRoute } from "vue-router";
|
||||||
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 { useRouter, useRoute } from "vue-router";
|
|
||||||
import { useQuasar } from "quasar";
|
|
||||||
|
|
||||||
|
/** importStore*/
|
||||||
|
import { useEvaluateDetailStore } from "@/modules/12_evaluatePersonal/store/EvaluateDetail";
|
||||||
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
|
|
||||||
|
/** use*/
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const router = useRouter();
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const id = ref<string>(route.params.id as string);
|
|
||||||
|
|
||||||
const store = useEvaluateDetailStore();
|
const store = useEvaluateDetailStore();
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
|
|
||||||
const { date2Thai, showLoader, hideLoader, messageError } = mixin;
|
const { showLoader, hideLoader, messageError } = mixin;
|
||||||
|
|
||||||
const selectedItem = ref(1);
|
const id = ref<string>(route.params.id as string);
|
||||||
|
const selectedItem = ref<number>(1);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* funtion เลือกไฟล์
|
||||||
|
* @param itemNumber indexItems
|
||||||
|
*/
|
||||||
function handleItemClick(itemNumber: number) {
|
function handleItemClick(itemNumber: number) {
|
||||||
store.tabPanels = itemNumber.toString();
|
store.tabPanels = itemNumber.toString();
|
||||||
selectedItem.value = itemNumber;
|
selectedItem.value = itemNumber;
|
||||||
|
|
||||||
getFile(itemNumber);
|
getFile(itemNumber);
|
||||||
}
|
}
|
||||||
// evaluationFilebyId
|
|
||||||
|
/**
|
||||||
|
* function เรียกไฟล์
|
||||||
|
* @param volume index item
|
||||||
|
*/
|
||||||
function getFile(volume: number) {
|
function getFile(volume: number) {
|
||||||
const fileText = numToThai(volume);
|
const fileText = numToThai(volume);
|
||||||
console.log(fileText);
|
console.log(fileText);
|
||||||
|
|
@ -37,10 +45,9 @@ function getFile(volume: number) {
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
const link = res.data.downloadUrl;
|
const link = res.data.downloadUrl;
|
||||||
const type = res.data.fileType;
|
const type = res.data.fileType;
|
||||||
console.log(link, type);
|
|
||||||
getPDF(link, type);
|
getPDF(link, type);
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch(() => {
|
||||||
// messageError($q, e);
|
// messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
|
|
@ -48,7 +55,13 @@ function getFile(volume: number) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* function loafFile PDF
|
||||||
|
* @param url linkLoadFile
|
||||||
|
* @param type ประเภทไฟล์
|
||||||
|
*/
|
||||||
function getPDF(url: string, type: string) {
|
function getPDF(url: string, type: string) {
|
||||||
|
showLoader();
|
||||||
axios
|
axios
|
||||||
.get(url, {
|
.get(url, {
|
||||||
method: "GET",
|
method: "GET",
|
||||||
|
|
@ -60,12 +73,11 @@ function getPDF(url: string, type: string) {
|
||||||
})
|
})
|
||||||
.then(async (res) => {
|
.then(async (res) => {
|
||||||
store.log = 0;
|
store.log = 0;
|
||||||
console.log(res);
|
|
||||||
const blob = new Blob([res.data]);
|
const blob = new Blob([res.data]);
|
||||||
const objectUrl = URL.createObjectURL(blob);
|
const objectUrl = URL.createObjectURL(blob);
|
||||||
|
|
||||||
const pdfData = await usePDF(`${objectUrl}`);
|
const pdfData = await usePDF(`${objectUrl}`);
|
||||||
showLoader();
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
store.urlDownloadFile = url;
|
store.urlDownloadFile = url;
|
||||||
store.log = 1;
|
store.log = 1;
|
||||||
|
|
@ -82,6 +94,10 @@ function getPDF(url: string, type: string) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* function Convert ชื่อไฟล์
|
||||||
|
* @param val indexItems
|
||||||
|
*/
|
||||||
function numToThai(val: number) {
|
function numToThai(val: number) {
|
||||||
switch (val) {
|
switch (val) {
|
||||||
case 1:
|
case 1:
|
||||||
|
|
@ -91,8 +107,8 @@ function numToThai(val: number) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(async () => {
|
||||||
getFile(1);
|
await getFile(selectedItem.value);
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,25 +1,25 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { onMounted, ref } from "vue";
|
import { onMounted, ref } from "vue";
|
||||||
|
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 { useRouter, useRoute } from "vue-router";
|
import genReport from "@/plugins/genreport";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
|
||||||
import { useQuasar } from "quasar";
|
|
||||||
import keycloak from "@/plugins/keycloak";
|
|
||||||
|
|
||||||
|
/** importType*/
|
||||||
import type { FileEvaluationRefRef } from "@/modules/12_evaluatePersonal/interface/index/evalute";
|
import type { FileEvaluationRefRef } from "@/modules/12_evaluatePersonal/interface/index/evalute";
|
||||||
|
|
||||||
import genReport from "@/plugins/genreport";
|
/** importStore*/
|
||||||
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useEvaluateDetailStore } from "@/modules/12_evaluatePersonal/store/EvaluateDetail";
|
import { useEvaluateDetailStore } from "@/modules/12_evaluatePersonal/store/EvaluateDetail";
|
||||||
|
|
||||||
|
/** uer*/
|
||||||
const store = useEvaluateDetailStore();
|
const store = useEvaluateDetailStore();
|
||||||
|
|
||||||
const fullName = ref<string>(
|
|
||||||
keycloak.tokenParsed ? keycloak.tokenParsed.name!.toString() : ""
|
|
||||||
);
|
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
|
const route = useRoute();
|
||||||
|
|
||||||
const {
|
const {
|
||||||
date2Thai,
|
date2Thai,
|
||||||
showLoader,
|
showLoader,
|
||||||
|
|
@ -28,13 +28,9 @@ const {
|
||||||
success,
|
success,
|
||||||
dialogConfirm,
|
dialogConfirm,
|
||||||
} = mixin;
|
} = mixin;
|
||||||
const router = useRouter();
|
|
||||||
const route = useRoute();
|
|
||||||
const id = ref<string>(route.params.id as string);
|
const id = ref<string>(route.params.id as string);
|
||||||
const modalConfirm = ref<boolean>(false);
|
const modalConfirm = ref<boolean>(false);
|
||||||
const modalView = ref<boolean>(false);
|
|
||||||
const pdfSrc = ref<any>();
|
|
||||||
|
|
||||||
const nameOfWork = ref<string>("");
|
const nameOfWork = ref<string>("");
|
||||||
const nameOfOwner = ref<string>("");
|
const nameOfOwner = ref<string>("");
|
||||||
const position = ref<string>("");
|
const position = ref<string>("");
|
||||||
|
|
@ -60,6 +56,7 @@ const fileEvaluationRef: FileEvaluationRefRef = {
|
||||||
fileEvaluation86: fileEvaluation86Ref,
|
fileEvaluation86: fileEvaluation86Ref,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/** function ดาวน์โหลดไฟล์ต้นแบบ*/
|
||||||
async function onClickDowloadFile(
|
async function onClickDowloadFile(
|
||||||
tp: string,
|
tp: string,
|
||||||
templateName: string,
|
templateName: string,
|
||||||
|
|
@ -95,15 +92,11 @@ async function onClickDowloadFile(
|
||||||
await genReport(body, fileName);
|
await genReport(body, fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
function onClickViewPDF(file: any) {
|
/**
|
||||||
pdfSrc.value = file.webkitRelativePath;
|
* function เรียก link อัปโหลด
|
||||||
modalView.value = true;
|
* @param name ชื่อไฟล์
|
||||||
}
|
* @param file ไฟล์
|
||||||
|
*/
|
||||||
function openConfirmEvalution() {
|
|
||||||
modalConfirm.value = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
function upLoadFile(name: string, file: any) {
|
function upLoadFile(name: string, file: any) {
|
||||||
if (file) {
|
if (file) {
|
||||||
showLoader();
|
showLoader();
|
||||||
|
|
@ -138,6 +131,11 @@ function upLoadFile(name: string, file: any) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* function อัปโหลดไฟล์
|
||||||
|
* @param url link อัปโหลด
|
||||||
|
* @param file ไฟล์
|
||||||
|
*/
|
||||||
function fileUpLoad(url: string, file: any) {
|
function fileUpLoad(url: string, file: any) {
|
||||||
axios
|
axios
|
||||||
.put(url, file, {
|
.put(url, file, {
|
||||||
|
|
@ -148,62 +146,11 @@ function fileUpLoad(url: string, file: any) {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
// fileEvaluation81.value = null;
|
|
||||||
// fileEvaluation82.value = null;
|
|
||||||
// fileEvaluation83.value = null;
|
|
||||||
// fileEvaluation84.value = null;
|
|
||||||
// fileEvaluation85.value = null;
|
|
||||||
// fileEvaluation86.value = null;
|
|
||||||
success($q, "อัปโหลดไฟล์สำเร็จ");
|
success($q, "อัปโหลดไฟล์สำเร็จ");
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// const fileEdit2 = ref<string>("");
|
/** function ยืนยันผลการพิจารณา*/
|
||||||
// function downloadFile() {
|
|
||||||
// showLoader();
|
|
||||||
// http
|
|
||||||
// .get(
|
|
||||||
// config.API.evaluationFilebyId(
|
|
||||||
// "เล่ม 2",
|
|
||||||
// id.value,
|
|
||||||
// "2-เอกสารเล่ม 2 (ฉบับแก้ไข)"
|
|
||||||
// )
|
|
||||||
// )
|
|
||||||
// .then((res) => {
|
|
||||||
// fileEdit2.value = res.data.downloadUrl;
|
|
||||||
// const link = res.data.downloadUrl;
|
|
||||||
// const type = res.data.fileType;
|
|
||||||
// const fileName = res.data.fileName;
|
|
||||||
// getPDF(link, type, fileName);
|
|
||||||
// })
|
|
||||||
// .catch((e) => {})
|
|
||||||
// .finally(() => {
|
|
||||||
// hideLoader();
|
|
||||||
// });
|
|
||||||
// }
|
|
||||||
|
|
||||||
// function getPDF(url: string, type: string, fileName: string) {
|
|
||||||
// axios
|
|
||||||
// .get(url, {
|
|
||||||
// method: "GET",
|
|
||||||
// responseType: "blob",
|
|
||||||
// headers: {
|
|
||||||
// "Content-Type": "application/json",
|
|
||||||
// Accept: type, // ถ้ามีการระบุเมื่ออัปโหลด
|
|
||||||
// },
|
|
||||||
// })
|
|
||||||
// .then(async (res) => {
|
|
||||||
// console.log(res);
|
|
||||||
// const a = document.createElement("a");
|
|
||||||
// a.href = window.URL.createObjectURL(res.data);
|
|
||||||
// a.download = fileName;
|
|
||||||
// // a.download = res.data.fileName + `.${mime.getExtension(res.data.fileType)}`
|
|
||||||
// a.click();
|
|
||||||
// })
|
|
||||||
// .catch((e) => {})
|
|
||||||
// .finally(() => {});
|
|
||||||
// }
|
|
||||||
|
|
||||||
async function confirmApprove() {
|
async function confirmApprove() {
|
||||||
const fileEvaluationValues = [
|
const fileEvaluationValues = [
|
||||||
fileEvaluation81,
|
fileEvaluation81,
|
||||||
|
|
@ -277,22 +224,25 @@ async function confirmApprove() {
|
||||||
}, 100);
|
}, 100);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** function ยืนยันผลการพิจารณา*/
|
||||||
function nextStep() {
|
function nextStep() {
|
||||||
showLoader();
|
showLoader();
|
||||||
http
|
http
|
||||||
.put(config.API.evaluationNextFinish(id.value))
|
.put(config.API.evaluationNextFinish(id.value))
|
||||||
// .then((res) => {})
|
.then(() => {
|
||||||
|
success($q, "ยืนยันผลการพิจารณาสำเร็จ");
|
||||||
|
store.step = 9;
|
||||||
|
store.currentStep = 9;
|
||||||
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
success($q, "ยืนยันผลการพิจารณาสำเร็จ");
|
|
||||||
store.step = 9;
|
|
||||||
store.currentStep = 9;
|
|
||||||
hideLoader();
|
hideLoader();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** function เรียกข้แมูลคุณสมบัติ*/
|
||||||
async function fetchProfile() {
|
async function fetchProfile() {
|
||||||
showLoader();
|
showLoader();
|
||||||
await http
|
await http
|
||||||
|
|
@ -310,9 +260,9 @@ async function fetchProfile() {
|
||||||
}
|
}
|
||||||
|
|
||||||
const downloadDocEditUrl = ref<string>("");
|
const downloadDocEditUrl = ref<string>("");
|
||||||
function checkDocEdit() {
|
async function checkDocEdit() {
|
||||||
showLoader();
|
showLoader();
|
||||||
http
|
await http
|
||||||
.get(
|
.get(
|
||||||
config.API.evaluationPatchData(
|
config.API.evaluationPatchData(
|
||||||
"เล่ม 2",
|
"เล่ม 2",
|
||||||
|
|
@ -323,9 +273,9 @@ function checkDocEdit() {
|
||||||
.then((res: any) => {
|
.then((res: any) => {
|
||||||
downloadDocEditUrl.value = res.data.downloadUrl;
|
downloadDocEditUrl.value = res.data.downloadUrl;
|
||||||
})
|
})
|
||||||
// .catch((e) => {
|
.catch(() => {
|
||||||
// messageError($q, e);
|
// messageError($q, e);
|
||||||
// })
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
hideLoader();
|
hideLoader();
|
||||||
});
|
});
|
||||||
|
|
@ -337,6 +287,11 @@ const downloadFile3 = ref<string>("");
|
||||||
const downloadFile4 = ref<string>("");
|
const downloadFile4 = ref<string>("");
|
||||||
const downloadFile5 = ref<string>("");
|
const downloadFile5 = ref<string>("");
|
||||||
const downloadFile6 = ref<string>("");
|
const downloadFile6 = ref<string>("");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* function ดาวน์โหลดไฟล์
|
||||||
|
* @param fileName ชื่อไฟล์
|
||||||
|
*/
|
||||||
async function downloadFileList(fileName: string) {
|
async function downloadFileList(fileName: string) {
|
||||||
showLoader();
|
showLoader();
|
||||||
await http
|
await http
|
||||||
|
|
@ -368,6 +323,7 @@ const author = ref<string>("");
|
||||||
const subject = ref<string>("");
|
const subject = ref<string>("");
|
||||||
const assignedPosition = ref<string>("");
|
const assignedPosition = ref<string>("");
|
||||||
|
|
||||||
|
/** function เรียกข้อมูลผลงาน*/
|
||||||
async function fetchDataSigner() {
|
async function fetchDataSigner() {
|
||||||
showLoader();
|
showLoader();
|
||||||
await http
|
await http
|
||||||
|
|
@ -386,19 +342,19 @@ async function fetchDataSigner() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(async () => {
|
||||||
fetchProfile();
|
await fetchProfile();
|
||||||
fetchDataSigner();
|
await fetchDataSigner();
|
||||||
downloadFileList(
|
await downloadFileList(
|
||||||
"แบบตรวจสอบความถูกต้องครบถ้วนของข้อมูลประกอบการประเมินผลงาน (เอกสารแบบ ค)"
|
"แบบตรวจสอบความถูกต้องครบถ้วนของข้อมูลประกอบการประเมินผลงาน (เอกสารแบบ ค)"
|
||||||
);
|
);
|
||||||
downloadFileList("บัญชีแสดงการรับ-ส่งผลงาน (เอกสารหมายเลข 15)");
|
await downloadFileList("บัญชีแสดงการรับ-ส่งผลงาน (เอกสารหมายเลข 15)");
|
||||||
downloadFileList("แบบประเมินผลงาน (เอกสารหมายเลข 16)");
|
await downloadFileList("แบบประเมินผลงาน (เอกสารหมายเลข 16)");
|
||||||
downloadFileList("แบบแสดงการประเมินผลงาน (เอกสารหมายเลข 17)");
|
await downloadFileList("แบบแสดงการประเมินผลงาน (เอกสารหมายเลข 17)");
|
||||||
downloadFileList("แบบรายงานผลการประเมินบุคคล (เอกสารหมายเลข 18)");
|
await downloadFileList("แบบรายงานผลการประเมินบุคคล (เอกสารหมายเลข 18)");
|
||||||
downloadFileList("แบบสรุปผลการประเมิน (เอกสารแบบ ง)");
|
await downloadFileList("แบบสรุปผลการประเมิน (เอกสารแบบ ง)");
|
||||||
|
|
||||||
checkDocEdit();
|
await checkDocEdit();
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,18 +1,22 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref } from "vue";
|
import { ref } from "vue";
|
||||||
import { useRouter, useRoute } from "vue-router";
|
import { useRoute } from "vue-router";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
import env from "@/api";
|
import env from "@/api";
|
||||||
|
|
||||||
|
/** importStore*/
|
||||||
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
|
|
||||||
|
/** use*/
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const mixin = useCounterMixin();
|
|
||||||
const { success } = mixin;
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
|
const mixin = useCounterMixin();
|
||||||
|
|
||||||
|
const { success } = mixin;
|
||||||
const id = ref<string>(route.params.id as string);
|
const id = ref<string>(route.params.id as string);
|
||||||
const status = ref<string>("DONE");
|
|
||||||
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}/${id.value}`;
|
const linkById = `${link.value}/${id.value}`;
|
||||||
navigator.clipboard.writeText(linkById);
|
navigator.clipboard.writeText(linkById);
|
||||||
|
|
@ -23,10 +27,7 @@ function copyLink() {
|
||||||
<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"
|
||||||
|
|
|
||||||
|
|
@ -24,23 +24,6 @@ const props = defineProps({
|
||||||
style="width: 610px"
|
style="width: 610px"
|
||||||
:rows-per-page-options="[10, 25, 50, 100]"
|
:rows-per-page-options="[10, 25, 50, 100]"
|
||||||
>
|
>
|
||||||
<!-- <template v-slot:header="props">
|
|
||||||
<q-tr :props="props">
|
|
||||||
<q-th v-for="col in props.cols" :key="col.name" :props="props">
|
|
||||||
<span class="text-weight-medium" v-html="col.label" />
|
|
||||||
</q-th>
|
|
||||||
<q-th auto-width />
|
|
||||||
</q-tr>
|
|
||||||
</template> -->
|
|
||||||
<!-- <template v-slot:body="props">
|
|
||||||
<q-tr :props="props" class="cursor-pointer">
|
|
||||||
<q-td v-for="col in props.cols" :key="col.name" :props="props">
|
|
||||||
<div>
|
|
||||||
{{ col.value }}
|
|
||||||
</div>
|
|
||||||
</q-td>
|
|
||||||
</q-tr>
|
|
||||||
</template> -->
|
|
||||||
</d-table>
|
</d-table>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,11 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, watch, onMounted } from "vue";
|
import { ref, watch, onMounted } from "vue";
|
||||||
import { VuePDF, usePDF } from "@tato30/vue-pdf";
|
import { VuePDF } from "@tato30/vue-pdf";
|
||||||
|
|
||||||
|
/** importStore*/
|
||||||
import { useEvaluateDetailStore } from "@/modules/12_evaluatePersonal/store/EvaluateDetail";
|
import { useEvaluateDetailStore } from "@/modules/12_evaluatePersonal/store/EvaluateDetail";
|
||||||
|
|
||||||
|
/** use*/
|
||||||
const store = useEvaluateDetailStore();
|
const store = useEvaluateDetailStore();
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
|
|
|
||||||
|
|
@ -1,15 +1,31 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import TableData from "@/modules/12_evaluatePersonal/components/Detail/viewstep/tableStep1.vue";
|
import { onMounted, reactive } from "vue";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
|
||||||
|
|
||||||
import { useEvaluateDetailStore } from "@/modules/12_evaluatePersonal/store/EvaluateDetail";
|
/** importType*/
|
||||||
import { onMounted, reactive, watch } from "vue";
|
|
||||||
import type {
|
import type {
|
||||||
EducationForm,
|
EducationForm,
|
||||||
CertificatesForm,
|
CertificatesForm,
|
||||||
} from "@/modules/12_evaluatePersonal/interface/index/evalute";
|
} from "@/modules/12_evaluatePersonal/interface/index/evalute";
|
||||||
|
|
||||||
|
/** importComponents*/
|
||||||
|
import TableData from "@/modules/12_evaluatePersonal/components/Detail/viewstep/tableStep1.vue";
|
||||||
|
|
||||||
|
/** import Store*/
|
||||||
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
|
import { useEvaluateDetailStore } from "@/modules/12_evaluatePersonal/store/EvaluateDetail";
|
||||||
|
|
||||||
|
/** use*/
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
|
const store = useEvaluateDetailStore();
|
||||||
|
|
||||||
|
const {
|
||||||
|
columnsCertificates,
|
||||||
|
columnSalaries,
|
||||||
|
columnTraining,
|
||||||
|
columnProjectsProposed,
|
||||||
|
} = store;
|
||||||
|
const { date2Thai } = mixin;
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
data: {
|
data: {
|
||||||
type: Object,
|
type: Object,
|
||||||
|
|
@ -17,18 +33,7 @@ const props = defineProps({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const { date2Thai } = mixin;
|
|
||||||
|
|
||||||
const store = useEvaluateDetailStore();
|
|
||||||
const {
|
|
||||||
columnsCertificates,
|
|
||||||
columnSalaries,
|
|
||||||
columnTraining,
|
|
||||||
columnProjectsProposed,
|
|
||||||
} = store;
|
|
||||||
|
|
||||||
const formDetail = reactive({
|
const formDetail = reactive({
|
||||||
userId: props.data.id,
|
|
||||||
citizenId: "",
|
citizenId: "",
|
||||||
prefix: "",
|
prefix: "",
|
||||||
fullName: "",
|
fullName: "",
|
||||||
|
|
@ -44,10 +49,12 @@ const formDetail = reactive({
|
||||||
salaries: [],
|
salaries: [],
|
||||||
trainings: [],
|
trainings: [],
|
||||||
assessments: [],
|
assessments: [],
|
||||||
// Type: "",
|
|
||||||
// Step: "",
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
function formattedNumber(x: number) {
|
||||||
|
return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
||||||
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
if (props.data) {
|
if (props.data) {
|
||||||
formDetail.prefix = props.data.prefix;
|
formDetail.prefix = props.data.prefix;
|
||||||
|
|
@ -118,10 +125,6 @@ onMounted(() => {
|
||||||
formDetail.assessments = props.data.assessments;
|
formDetail.assessments = props.data.assessments;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
function formattedNumber(x: number) {
|
|
||||||
return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|
@ -410,7 +413,9 @@ function formattedNumber(x: number) {
|
||||||
|
|
||||||
<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,12 +1,15 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref } from "vue";
|
import { ref } from "vue";
|
||||||
|
|
||||||
|
/** importComponts*/
|
||||||
import DialogHeader from "@/components/DialogHeader.vue";
|
import DialogHeader from "@/components/DialogHeader.vue";
|
||||||
import ViewPDF from "@/modules/12_evaluatePersonal/components/Detail/viewstep/viewPDF.vue";
|
import ViewPDF from "@/modules/12_evaluatePersonal/components/Detail/viewstep/viewPDF.vue";
|
||||||
|
|
||||||
|
/** importStore*/
|
||||||
import { useEvaluateDetailStore } from "@/modules/12_evaluatePersonal/store/EvaluateDetail";
|
import { useEvaluateDetailStore } from "@/modules/12_evaluatePersonal/store/EvaluateDetail";
|
||||||
|
|
||||||
|
/** use*/
|
||||||
const store = useEvaluateDetailStore();
|
const store = useEvaluateDetailStore();
|
||||||
|
|
||||||
const modalPerview = ref<boolean>(false);
|
const modalPerview = ref<boolean>(false);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,14 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref } from "vue";
|
import { ref } from "vue";
|
||||||
|
|
||||||
|
/** importComponents*/
|
||||||
import DialogHeader from "@/components/DialogHeader.vue";
|
import DialogHeader from "@/components/DialogHeader.vue";
|
||||||
import ViewPDF from "@/modules/12_evaluatePersonal/components/Detail/viewstep/viewPDF.vue";
|
import ViewPDF from "@/modules/12_evaluatePersonal/components/Detail/viewstep/viewPDF.vue";
|
||||||
|
|
||||||
|
/** importStore*/
|
||||||
import { useEvaluateDetailStore } from "@/modules/12_evaluatePersonal/store/EvaluateDetail";
|
import { useEvaluateDetailStore } from "@/modules/12_evaluatePersonal/store/EvaluateDetail";
|
||||||
|
|
||||||
|
/** use*/
|
||||||
const store = useEvaluateDetailStore();
|
const store = useEvaluateDetailStore();
|
||||||
|
|
||||||
const modalPerview = ref<boolean>(false);
|
const modalPerview = ref<boolean>(false);
|
||||||
|
|
@ -32,11 +36,8 @@ const modalPerview = ref<boolean>(false);
|
||||||
><q-tooltip>ดูเต็มจอ</q-tooltip></q-btn
|
><q-tooltip>ดูเต็มจอ</q-tooltip></q-btn
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
<!-- <q-tab-panels v-model="store.tabPanels" animated swipeable vertical>
|
|
||||||
<q-tab-panel name="1"> -->
|
|
||||||
<ViewPDF />
|
<ViewPDF />
|
||||||
<!-- </q-tab-panel>
|
|
||||||
</q-tab-panels> -->
|
|
||||||
|
|
||||||
<q-dialog v-model="modalPerview" full-width fullHeight>
|
<q-dialog v-model="modalPerview" full-width fullHeight>
|
||||||
<q-card>
|
<q-card>
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, useAttrs, onMounted, watch } from "vue";
|
import { ref, onMounted, watch } from "vue";
|
||||||
import type { QTableProps } from "quasar";
|
|
||||||
import router from "@/router";
|
import router from "@/router";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
|
|
@ -12,14 +11,7 @@ import config from "@/app.config";
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const dataStore = useEvaluateDirectorDataStore();
|
const dataStore = useEvaluateDirectorDataStore();
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const {
|
const { messageError, showLoader, hideLoader, dialogRemove, success } = mixin;
|
||||||
messageError,
|
|
||||||
showLoader,
|
|
||||||
hideLoader,
|
|
||||||
dialogConfirm,
|
|
||||||
dialogRemove,
|
|
||||||
success,
|
|
||||||
} = mixin;
|
|
||||||
|
|
||||||
const currentPage = ref<number>(1);
|
const currentPage = ref<number>(1);
|
||||||
const maxPage = ref<number>(1);
|
const maxPage = ref<number>(1);
|
||||||
|
|
@ -51,17 +43,13 @@ watch(
|
||||||
getList();
|
getList();
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
// currentPage.value,
|
|
||||||
// rowsPerPage.value,
|
|
||||||
// filterKeyword.value
|
|
||||||
function getList() {
|
function getList() {
|
||||||
showLoader();
|
showLoader();
|
||||||
http
|
http
|
||||||
.get(
|
.get(config.API.evaluateDirectorMain())
|
||||||
config.API.evaluateDirectorMain())
|
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
// maxPage.value = Math.ceil(res.data.result.total / rowsPerPage.value);
|
const data = res.data.result;
|
||||||
const data = res.data.result
|
|
||||||
dataStore.fetchData(data);
|
dataStore.fetchData(data);
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
|
|
@ -70,7 +58,6 @@ function getList() {
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
hideLoader();
|
hideLoader();
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -89,7 +76,7 @@ async function deleteData(id: string) {
|
||||||
showLoader();
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.delete(config.API.evaluateDirectorById(id))
|
.delete(config.API.evaluateDirectorById(id))
|
||||||
.then((res) => {
|
.then(() => {
|
||||||
success($q, "ลบข้อมูลสำเร็จ");
|
success($q, "ลบข้อมูลสำเร็จ");
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
|
|
@ -115,7 +102,6 @@ function resetFilter() {
|
||||||
|
|
||||||
function filterFn() {
|
function filterFn() {
|
||||||
getList();
|
getList();
|
||||||
console.log("enter", filterKeyword.value);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
|
|
||||||
|
|
@ -51,10 +51,33 @@ interface CertificatesForm {
|
||||||
issuer: string;
|
issuer: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
interface EvaluateList {
|
||||||
|
id: string;
|
||||||
|
citizanId: string;
|
||||||
|
fullName: string;
|
||||||
|
position: string;
|
||||||
|
level: string | null;
|
||||||
|
positionNumber: string;
|
||||||
|
agency: string;
|
||||||
|
status: string | null;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface FormFeature {
|
||||||
|
isEducationalQft: boolean;
|
||||||
|
isGovermantServiceHtr: boolean;
|
||||||
|
isOperatingExp: boolean;
|
||||||
|
isMinPeriodOfTenure: boolean;
|
||||||
|
isHaveSpecificQft: boolean;
|
||||||
|
isHaveProLicense: boolean;
|
||||||
|
isHaveMinPeriodOrHoldPos: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
export type {
|
export type {
|
||||||
FormCommand,
|
FormCommand,
|
||||||
FormCommandRef,
|
FormCommandRef,
|
||||||
EducationForm,
|
EducationForm,
|
||||||
CertificatesForm,
|
CertificatesForm,
|
||||||
FileEvaluationRefRef,
|
FileEvaluationRefRef,
|
||||||
|
EvaluateList,
|
||||||
|
FormFeature,
|
||||||
};
|
};
|
||||||
|
|
|
||||||
104
src/modules/12_evaluatePersonal/interface/response/evalute.ts
Normal file
104
src/modules/12_evaluatePersonal/interface/response/evalute.ts
Normal file
|
|
@ -0,0 +1,104 @@
|
||||||
|
interface EvaluateRes {
|
||||||
|
citizenId: string;
|
||||||
|
createdAt: Date;
|
||||||
|
fullName: string;
|
||||||
|
id: string;
|
||||||
|
oc: string;
|
||||||
|
posNo: string;
|
||||||
|
position: string;
|
||||||
|
step: string;
|
||||||
|
step_th: string;
|
||||||
|
type: string;
|
||||||
|
type_th: string;
|
||||||
|
updatedAt: Date;
|
||||||
|
}
|
||||||
|
interface PersonInformation {
|
||||||
|
assessments: Assessment[];
|
||||||
|
birthDate: string;
|
||||||
|
certificates: Certificate[];
|
||||||
|
educations: Education[];
|
||||||
|
experience: null;
|
||||||
|
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: Salary[];
|
||||||
|
salary: string;
|
||||||
|
trainings: Training[];
|
||||||
|
type: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface Assessment {
|
||||||
|
date: string;
|
||||||
|
point1Total: number;
|
||||||
|
point1: number;
|
||||||
|
point2Total: number;
|
||||||
|
point2: number;
|
||||||
|
pointSumTotal: number;
|
||||||
|
pointSum: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface Certificate {
|
||||||
|
certificateType: string;
|
||||||
|
issuer: string;
|
||||||
|
certificateNo: string;
|
||||||
|
issueDate: string;
|
||||||
|
expireDate: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface Education {
|
||||||
|
educationLevel: string;
|
||||||
|
institute: string;
|
||||||
|
isDate: boolean;
|
||||||
|
startDate: string;
|
||||||
|
endDate: string;
|
||||||
|
finishDate: string;
|
||||||
|
isEducation: boolean;
|
||||||
|
degree: string;
|
||||||
|
field: string;
|
||||||
|
fundName: string;
|
||||||
|
gpa: string;
|
||||||
|
country: string;
|
||||||
|
other: string;
|
||||||
|
duration: string;
|
||||||
|
durationYear: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface Salary {
|
||||||
|
date: string;
|
||||||
|
amount: number;
|
||||||
|
positionSalaryAmount: null;
|
||||||
|
mouthSalaryAmount: null;
|
||||||
|
position: string;
|
||||||
|
posNo: string;
|
||||||
|
salaryClass: null;
|
||||||
|
salaryRef: null;
|
||||||
|
refCommandNo: null;
|
||||||
|
refCommandDate: null;
|
||||||
|
salaryStatus: null;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface Training {
|
||||||
|
name: string;
|
||||||
|
topic: string;
|
||||||
|
startDate: string;
|
||||||
|
endDate: string;
|
||||||
|
yearly: number;
|
||||||
|
place: string;
|
||||||
|
duration: string;
|
||||||
|
department: string;
|
||||||
|
numberOrder: string;
|
||||||
|
dateOrder: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export type { EvaluateRes, PersonInformation };
|
||||||
|
|
@ -1,13 +1,19 @@
|
||||||
import { defineStore } from "pinia";
|
import { defineStore } from "pinia";
|
||||||
import { ref } from "vue";
|
import { ref } from "vue";
|
||||||
import type { QTableProps } from "quasar";
|
import type { QTableProps } from "quasar";
|
||||||
import type { DataOption } from "@/modules/12_evaluatePersonal/interface/index/Main";
|
|
||||||
|
import type { EvaluateList } from "@/modules/12_evaluatePersonal/interface/index/evalute";
|
||||||
|
import type { EvaluateRes } from "@/modules/12_evaluatePersonal/interface/response/evalute";
|
||||||
|
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
|
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { date2Thai } = mixin;
|
const { date2Thai } = mixin;
|
||||||
export const useEvalutuonStore = defineStore("EvalutuonStore", () => {
|
export const useEvalutuonStore = defineStore("EvalutuonStore", () => {
|
||||||
/** function สถานะ*/
|
/**
|
||||||
|
* function Convert สถานะ
|
||||||
|
* @param val สถานะ
|
||||||
|
*/
|
||||||
function convertStatus(val: string) {
|
function convertStatus(val: string) {
|
||||||
switch (val) {
|
switch (val) {
|
||||||
case "CHECK_SPEC":
|
case "CHECK_SPEC":
|
||||||
|
|
@ -31,6 +37,10 @@ export const useEvalutuonStore = defineStore("EvalutuonStore", () => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* function Convert ระดับที่ยื่นขอ
|
||||||
|
* @param val ระดับที่ยื่นขอ
|
||||||
|
*/
|
||||||
function convertType(val: string) {
|
function convertType(val: string) {
|
||||||
if (val === "EXPERT") {
|
if (val === "EXPERT") {
|
||||||
return "ชำนาญการ";
|
return "ชำนาญการ";
|
||||||
|
|
@ -39,15 +49,27 @@ export const useEvalutuonStore = defineStore("EvalutuonStore", () => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// ตรวจสอบคุณสมบัติด้วยตนเอง -> CHECK_SPEC
|
const rows = ref<EvaluateList[]>([]);
|
||||||
// จัดเตรียมเอกสารเล่ม 1-> PREPARE_DOC_V1
|
/**
|
||||||
// ตรวจสอบความถูกต้องของเอกสารเล่ม 1 -> CHECK_DOC_V1
|
* function เรียกข้่อมูลรายการคำขอประเมิน
|
||||||
// รอตรวจสอบคุณสมบัติ -> WAIT_CHECK_DOC_V1
|
* @param data รายการคำขอประเมิน
|
||||||
// ประกาศบนเว็บไซต์ -> ANNOUNCE_WEB
|
*/
|
||||||
// จัดเตรียมเอกสารเล่ม 2 -> PREPARE_DOC_V2
|
function fetchData(data: EvaluateRes[]) {
|
||||||
// ตรวจสอบความถูกต้องของเอกสารเล่ม 2 -> CHECK_DOC_V2
|
const dataList: EvaluateList[] = data.map(
|
||||||
// รอพิจารณาผลการประเมิน -> WAIT_CHECK_DOC_V2
|
(data: EvaluateRes) =>
|
||||||
// เสร็จสิ้น -> DONE
|
({
|
||||||
|
id: data.id,
|
||||||
|
citizanId: data.citizenId,
|
||||||
|
fullName: data.fullName,
|
||||||
|
position: data.position,
|
||||||
|
level: convertType(data.type),
|
||||||
|
positionNumber: data.posNo,
|
||||||
|
agency: data.oc,
|
||||||
|
status: convertStatus(data.step),
|
||||||
|
} as EvaluateList)
|
||||||
|
);
|
||||||
|
rows.value = dataList;
|
||||||
|
}
|
||||||
|
|
||||||
const visibleColumns = ref<String[]>([
|
const visibleColumns = ref<String[]>([
|
||||||
"no",
|
"no",
|
||||||
|
|
@ -59,23 +81,6 @@ export const useEvalutuonStore = defineStore("EvalutuonStore", () => {
|
||||||
"agency",
|
"agency",
|
||||||
"status",
|
"status",
|
||||||
]);
|
]);
|
||||||
const rows = ref<any[]>([]);
|
|
||||||
function fetchData(data: any[]) {
|
|
||||||
console.log(data);
|
|
||||||
const dataList: any[] = data.map((data: any) => ({
|
|
||||||
id: data.id,
|
|
||||||
citizanId: data.citizenId,
|
|
||||||
fullName: data.fullName,
|
|
||||||
position: data.position,
|
|
||||||
level: convertType(data.type),
|
|
||||||
positionNumber: data.posNo,
|
|
||||||
agency: data.oc,
|
|
||||||
status: convertStatus(data.step),
|
|
||||||
}));
|
|
||||||
rows.value = dataList;
|
|
||||||
console.log(dataList);
|
|
||||||
}
|
|
||||||
|
|
||||||
const columns = ref<QTableProps["columns"]>([
|
const columns = ref<QTableProps["columns"]>([
|
||||||
{
|
{
|
||||||
name: "no",
|
name: "no",
|
||||||
|
|
|
||||||
|
|
@ -2,33 +2,47 @@
|
||||||
import { ref, onMounted } from "vue";
|
import { ref, onMounted } from "vue";
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
import { useRoute, useRouter } from "vue-router";
|
import { useRoute, useRouter } from "vue-router";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
|
||||||
|
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
|
|
||||||
|
/** impolerType*/
|
||||||
|
import type { PersonInformation } from "@/modules/12_evaluatePersonal/interface/response/evalute";
|
||||||
|
|
||||||
|
/** importComponents*/
|
||||||
import Tab1 from "@/modules/12_evaluatePersonal/components/Detail/Tab1.vue"; // ชำนาญการ
|
import Tab1 from "@/modules/12_evaluatePersonal/components/Detail/Tab1.vue"; // ชำนาญการ
|
||||||
import Tab2 from "@/modules/12_evaluatePersonal/components/Detail/Tab2.vue"; // ชำนาญการพิเศษ
|
import Tab2 from "@/modules/12_evaluatePersonal/components/Detail/Tab2.vue"; // ชำนาญการพิเศษ
|
||||||
|
|
||||||
|
/** importStore*/
|
||||||
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useEvaluateDetailStore } from "@/modules/12_evaluatePersonal/store/EvaluateDetail";
|
import { useEvaluateDetailStore } from "@/modules/12_evaluatePersonal/store/EvaluateDetail";
|
||||||
|
|
||||||
|
/** use*/
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { showLoader, hideLoader, messageError } = mixin;
|
|
||||||
|
|
||||||
const store = useEvaluateDetailStore();
|
const store = useEvaluateDetailStore();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
|
|
||||||
const id = ref<string>(route.params.id as string);
|
const { showLoader, hideLoader, messageError } = mixin;
|
||||||
|
|
||||||
const data = ref<any>({});
|
const id = ref<string>(route.params.id as string); // id รายการประเมิน
|
||||||
function getData() {
|
|
||||||
|
const data = ref<PersonInformation[]>([]);
|
||||||
|
const prefix = ref<string>("");
|
||||||
|
const fullName = ref<string>("");
|
||||||
|
|
||||||
|
/** funmction เรียกขอ้มูลคุณสมบัติ*/
|
||||||
|
async function fetchFeature() {
|
||||||
showLoader();
|
showLoader();
|
||||||
http
|
await http
|
||||||
.get(config.API.evaluateGetDetail(id.value))
|
.get(config.API.evaluateGetDetail(id.value))
|
||||||
.then((res: any) => {
|
.then((res) => {
|
||||||
data.value = res.data.result;
|
data.value = res.data.result;
|
||||||
|
const person = data.value[0];
|
||||||
|
if (person) {
|
||||||
|
prefix.value = person.prefix;
|
||||||
|
fullName.value = person.fullName;
|
||||||
|
}
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
|
|
@ -38,8 +52,9 @@ function getData() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
/** HookLifecycle*/
|
||||||
getData();
|
onMounted(async () => {
|
||||||
|
await fetchFeature();
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
@ -56,9 +71,7 @@ onMounted(() => {
|
||||||
class="q-mr-sm"
|
class="q-mr-sm"
|
||||||
@click="router.go(-1)"
|
@click="router.go(-1)"
|
||||||
/>
|
/>
|
||||||
<div>
|
<div>รายละเอียดการประเมินบุคคลของ {{ `${prefix}${fullName}` }}</div>
|
||||||
รายละเอียดการประเมินบุคคลของ {{ `${data.prefix}${data.fullName}` }}
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<q-card flat bordered class="col-12 q-mt-sm q-pt-sm q-pa-md">
|
<q-card flat bordered class="col-12 q-mt-sm q-pt-sm q-pa-md">
|
||||||
|
|
|
||||||
|
|
@ -1,26 +1,20 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { onMounted, ref, watch, useAttrs } from "vue";
|
import { onMounted, ref, watch } from "vue";
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
import { useRouter } from "vue-router";
|
import { useRouter } from "vue-router";
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
|
|
||||||
import Table from "@/modules/12_evaluatePersonal/components/Table.vue";
|
/** importStore*/
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useEvalutuonStore } from "@/modules/12_evaluatePersonal/store/Evaluate";
|
import { useEvalutuonStore } from "@/modules/12_evaluatePersonal/store/Evaluate";
|
||||||
import type { Pagination } from "@/modules/03_recruiting/interface/index/Main";
|
|
||||||
|
|
||||||
const $q = useQuasar(); // show dialog
|
/** use*/
|
||||||
|
const $q = useQuasar();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
//search data table
|
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const store = useEvalutuonStore();
|
const store = useEvalutuonStore();
|
||||||
const { showLoader, hideLoader, messageError } = mixin;
|
const { showLoader, hideLoader, messageError } = mixin;
|
||||||
const attrs = ref<any>(useAttrs());
|
|
||||||
|
|
||||||
function Detailpage(id: string) {
|
|
||||||
router.push(`/evaluate/detail/${id}`);
|
|
||||||
}
|
|
||||||
|
|
||||||
const currentPage = ref<number>(1);
|
const currentPage = ref<number>(1);
|
||||||
const maxPage = ref<number>(0);
|
const maxPage = ref<number>(0);
|
||||||
|
|
@ -29,9 +23,7 @@ const total = ref<number>(0);
|
||||||
const filter = ref<string>("");
|
const filter = ref<string>("");
|
||||||
const pageSize = ref<number>(10);
|
const pageSize = ref<number>(10);
|
||||||
|
|
||||||
/**
|
/** pagination ของตาราง*/
|
||||||
*pagination ของตาราง
|
|
||||||
*/
|
|
||||||
const initialPagination = ref<any>({
|
const initialPagination = ref<any>({
|
||||||
sortBy: null,
|
sortBy: null,
|
||||||
descending: false,
|
descending: false,
|
||||||
|
|
@ -39,72 +31,75 @@ const initialPagination = ref<any>({
|
||||||
rowsPerPage: pageSize,
|
rowsPerPage: pageSize,
|
||||||
});
|
});
|
||||||
|
|
||||||
// Pagination - update rowsPerPage
|
/**
|
||||||
|
* function อัปเดท paging
|
||||||
|
* @param initialPagination ข้อมูล pagination
|
||||||
|
*/
|
||||||
async function updatePagination(initialPagination: any) {
|
async function updatePagination(initialPagination: any) {
|
||||||
currentPage.value = 1;
|
currentPage.value = 1;
|
||||||
pageSize.value = initialPagination.rowsPerPage;
|
pageSize.value = initialPagination.rowsPerPage;
|
||||||
page.value = 1; // set current page เป็น 1 เสมอเมื่อเปลี่ยน per row
|
page.value = 1; // set current page เป็น 1 เสมอเมื่อเปลี่ยน per row
|
||||||
}
|
}
|
||||||
// Pagination - page & change page & get new data
|
|
||||||
|
/** function callback เมื่อมีการเปลี่ยนหน้า*/
|
||||||
watch(
|
watch(
|
||||||
[
|
[
|
||||||
() => currentPage.value,
|
() => currentPage.value,
|
||||||
() => (pageSize.value = initialPagination.value.rowsPerPage),
|
() => (pageSize.value = initialPagination.value.rowsPerPage),
|
||||||
],
|
],
|
||||||
async () => {
|
async () => {
|
||||||
getList();
|
fetchEvaluteList();
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
// Pagination - page & change page & get new data
|
|
||||||
|
/** function callback เมื่อมีการเปลี่ยนหน้า*/
|
||||||
watch(
|
watch(
|
||||||
[() => currentPage.value, () => initialPagination.value.rowsPerPage],
|
[() => currentPage.value, () => initialPagination.value.rowsPerPage],
|
||||||
async () => {
|
async () => {
|
||||||
page.value = currentPage.value;
|
page.value = currentPage.value;
|
||||||
await getList();
|
await fetchEvaluteList();
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
/** function callback เมื่อมีการเปลี่ยนจำนวนแถว*/
|
||||||
watch(
|
watch(
|
||||||
() => initialPagination.value.rowsPerPage,
|
() => initialPagination.value.rowsPerPage,
|
||||||
() => {
|
() => {
|
||||||
pageSize.value = initialPagination.value.rowsPerPage;
|
pageSize.value = initialPagination.value.rowsPerPage;
|
||||||
currentPage.value = 1;
|
currentPage.value = 1;
|
||||||
getList();
|
fetchEvaluteList();
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
|
||||||
* filter function
|
|
||||||
*/
|
|
||||||
const filterRef = ref<HTMLInputElement | null>(null);
|
const filterRef = ref<HTMLInputElement | null>(null);
|
||||||
|
/** function ค้นหาตาม keyword*/
|
||||||
function filterFn() {
|
function filterFn() {
|
||||||
updatePagination(filter.value);
|
updatePagination(filter.value);
|
||||||
pageSize.value = initialPagination.value.rowsPerPage;
|
pageSize.value = initialPagination.value.rowsPerPage;
|
||||||
getList();
|
fetchEvaluteList();
|
||||||
}
|
}
|
||||||
const resetFilter = () => {
|
|
||||||
|
/** functrion ล้างค้นหา*/
|
||||||
|
function resetFilter() {
|
||||||
filter.value = "";
|
filter.value = "";
|
||||||
getList();
|
fetchEvaluteList();
|
||||||
if (filterRef.value) {
|
if (filterRef.value) {
|
||||||
filterRef.value.focus();
|
filterRef.value.focus();
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
function getList() {
|
/** function เรียกรายการคำขอประเมิน*/
|
||||||
|
async function fetchEvaluteList() {
|
||||||
showLoader();
|
showLoader();
|
||||||
http
|
await http
|
||||||
.get(
|
.get(
|
||||||
config.API.evaluationMain(currentPage.value, pageSize.value, filter.value)
|
config.API.evaluationMain(currentPage.value, pageSize.value, filter.value)
|
||||||
)
|
)
|
||||||
.then(async (res) => {
|
.then(async (res) => {
|
||||||
const data = res.data.result.data;
|
const data = res.data.result.data;
|
||||||
total.value = res.data.result.total;
|
total.value = res.data.result.total;
|
||||||
console.log(res.data.result.total);
|
|
||||||
maxPage.value = await Math.ceil(total.value / pageSize.value);
|
maxPage.value = await Math.ceil(total.value / pageSize.value);
|
||||||
maxPage.value = maxPage.value < 1 ? 1 : maxPage.value;
|
maxPage.value = maxPage.value < 1 ? 1 : maxPage.value;
|
||||||
console.log(total.value);
|
|
||||||
console.log(pageSize.value);
|
|
||||||
console.log(maxPage.value);
|
|
||||||
|
|
||||||
store.fetchData(data);
|
store.fetchData(data);
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
|
|
@ -115,11 +110,17 @@ function getList() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**เมื่อเริ่มโหลดหน้า
|
/**
|
||||||
* ส่งข้อมูลจำลองไปยัง store
|
* funcition redirectToDetail
|
||||||
|
* @param id รายการคำขอประเมิน
|
||||||
*/
|
*/
|
||||||
|
function Detailpage(id: string) {
|
||||||
|
router.push(`/evaluate/detail/${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** HookLifecycle */
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
getList();
|
await fetchEvaluteList(); // เรียกข้อมูลรายการปรัเมิน
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue