Refactoring code module 06_evaluate
This commit is contained in:
parent
4253226ac3
commit
d03e3b9e98
22 changed files with 192 additions and 400 deletions
|
|
@ -1,24 +1,17 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, watch } from "vue";
|
import { ref, watch } from "vue";
|
||||||
import { useRouter } from "vue-router";
|
import { useRouter } from "vue-router";
|
||||||
import { useQuasar } from "quasar";
|
|
||||||
|
|
||||||
/** import Components*/
|
|
||||||
import DialogHeader from "@/components/DialogHeader.vue";
|
|
||||||
|
|
||||||
/** import Store*/
|
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useEvaluateStore } from "@/modules/06_evaluate/store";
|
import { useEvaluateStore } from "@/modules/06_evaluate/store";
|
||||||
|
|
||||||
|
import DialogHeader from "@/components/DialogHeader.vue";
|
||||||
|
|
||||||
/** use*/
|
/** use*/
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const $q = useQuasar();
|
|
||||||
const mixin = useCounterMixin();
|
|
||||||
const store = useEvaluateStore();
|
const store = useEvaluateStore();
|
||||||
const slide = ref<string>("1");
|
const slide = ref<string>("1");
|
||||||
|
|
||||||
const { dialogConfirm } = mixin;
|
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
modal: {
|
modal: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
|
|
|
||||||
|
|
@ -2,8 +2,11 @@
|
||||||
import { ref, reactive, onMounted, watch } from "vue";
|
import { ref, reactive, onMounted, watch } from "vue";
|
||||||
import { useRouter, useRoute } from "vue-router";
|
import { useRouter, useRoute } from "vue-router";
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
|
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
|
import { useEvaluateStore } from "@/modules/06_evaluate/store";
|
||||||
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
|
|
||||||
/** import Type*/
|
/** import Type*/
|
||||||
import type {
|
import type {
|
||||||
|
|
@ -29,17 +32,12 @@ import ViewStep3 from "@/modules/06_evaluate/components/viewstep/viewStep3.vue";
|
||||||
import ViewStep7 from "@/modules/06_evaluate/components/viewstep/viewStep7.vue"; //
|
import ViewStep7 from "@/modules/06_evaluate/components/viewstep/viewStep7.vue"; //
|
||||||
import PopupHistory from "@/modules/06_evaluate/components/viewstep/popupHistory.vue"; // ประวัติการประเมิน
|
import PopupHistory from "@/modules/06_evaluate/components/viewstep/popupHistory.vue"; // ประวัติการประเมิน
|
||||||
|
|
||||||
/** import Store*/
|
|
||||||
import { useEvaluateStore } from "@/modules/06_evaluate/store";
|
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
|
||||||
|
|
||||||
/** use*/
|
/** use*/
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const store = useEvaluateStore();
|
const store = useEvaluateStore();
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const splitterModel = 20;
|
|
||||||
|
|
||||||
const {
|
const {
|
||||||
showLoader,
|
showLoader,
|
||||||
|
|
@ -232,7 +230,6 @@ async function updateCheckSpec(data: FormSpec) {
|
||||||
*/
|
*/
|
||||||
function updateFormDetail(data: any) {
|
function updateFormDetail(data: any) {
|
||||||
formDetail.value = data;
|
formDetail.value = data;
|
||||||
console.log("🚀 ~ updateFormDetail ~ data:", data);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** function เช็คการการคุณสมบัติ*/
|
/** function เช็คการการคุณสมบัติ*/
|
||||||
|
|
|
||||||
|
|
@ -1,19 +1,20 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { reactive, onMounted } from "vue";
|
import { reactive, onMounted } from "vue";
|
||||||
import { useRouter } from "vue-router";
|
import { useRouter } from "vue-router";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
|
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
|
|
||||||
const router = useRouter();
|
import type { FormCommandSe } from "@/modules/06_evaluate/interface/evalute";
|
||||||
|
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
|
const router = useRouter();
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { dialogConfirm, messageError, showLoader, hideLoader } = mixin;
|
const { dialogConfirm, messageError, showLoader, hideLoader } = mixin;
|
||||||
|
|
||||||
const formData = reactive({
|
const formData = reactive<FormCommandSe>({
|
||||||
subject: "",
|
subject: "",
|
||||||
author: "",
|
author: "",
|
||||||
commanderFullname: "",
|
commanderFullname: "",
|
||||||
|
|
|
||||||
|
|
@ -1,20 +1,20 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, reactive, watch, onMounted } from "vue";
|
import { ref, reactive, watch, onMounted } from "vue";
|
||||||
import { useRouter, useRoute } from "vue-router";
|
import { useRouter, useRoute } from "vue-router";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
import type { FormRef } from "@/modules/06_evaluate/interface/evalute";
|
|
||||||
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 genReport from "@/plugins/genreport";
|
import genReport from "@/plugins/genreport";
|
||||||
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
|
|
||||||
const router = useRouter();
|
import type {
|
||||||
const route = useRoute();
|
FormRef,
|
||||||
|
FormCommand,
|
||||||
|
FormData,
|
||||||
|
} from "@/modules/06_evaluate/interface/evalute";
|
||||||
|
|
||||||
const evaluateId = ref<string>(route.params.id as string);
|
|
||||||
const profile = ref<any>();
|
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const {
|
const {
|
||||||
|
|
@ -25,36 +25,31 @@ const {
|
||||||
date2Thai,
|
date2Thai,
|
||||||
success,
|
success,
|
||||||
} = mixin;
|
} = mixin;
|
||||||
|
const router = useRouter();
|
||||||
|
const route = useRoute();
|
||||||
|
|
||||||
interface FormCommand {
|
const evaluateId = ref<string>(route.params.id as string);
|
||||||
commanderFullname: string;
|
const profile = ref<any>();
|
||||||
commanderPosition: string;
|
|
||||||
commanderAboveFullname: string;
|
|
||||||
commanderAbovePosition: string;
|
|
||||||
author: string;
|
|
||||||
subject: string;
|
|
||||||
assignedPosition: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** form ผู้เซ็นเอกสาร*/
|
/** form ผู้เซ็นเอกสาร*/
|
||||||
const formCommand = reactive<FormCommand>({
|
const formCommand = reactive<FormCommand>({
|
||||||
commanderFullname: "",
|
commanderFullname: "", //ผู้บังคับบัญชาชั้นต้น
|
||||||
commanderPosition: "",
|
commanderPosition: "", //ตำแหน่ง ผู้บังคับบัญชาชั้นต้น
|
||||||
commanderAboveFullname: "",
|
commanderAboveFullname: "", //ผู้บังคับบัญชาเหนือขึ้นไป 1 ระดับ
|
||||||
commanderAbovePosition: "",
|
commanderAbovePosition: "", //ตำแหน่ง ผู้บังคับบัญชาเหนือขึ้นไป 1 ระดับ
|
||||||
author: "",
|
author: "", //เจ้าของผลงาน
|
||||||
subject: "",
|
subject: "", //ชื่อผลงาน
|
||||||
assignedPosition: "",
|
assignedPosition: "",
|
||||||
});
|
});
|
||||||
|
|
||||||
const formData = reactive<any>({
|
const formData = reactive<FormData>({
|
||||||
id: "",
|
id: "",
|
||||||
subject: "",
|
subject: "", // ชื่อผลงาน
|
||||||
author: "",
|
author: "", //เจ้าของผลงาน
|
||||||
commanderFullname: "",
|
commanderFullname: "", //ผู้บังคับบัญชาชั้นต้น
|
||||||
commanderPosition: "",
|
commanderPosition: "", //ตำแหน่ง ผู้บังคับบัญชาชั้นต้น
|
||||||
commanderAboveFullname: "",
|
commanderAboveFullname: "", //ผู้บังคับบัญชาเหนือขึ้นไป 1 ระดับ
|
||||||
commanderAbovePosition: "",
|
commanderAbovePosition: "", //ตำแหน่ง ผู้บังคับบัญชาเหนือขึ้นไป 1 ระดับ
|
||||||
});
|
});
|
||||||
|
|
||||||
const downloadFile1 = ref<string>("");
|
const downloadFile1 = ref<string>("");
|
||||||
|
|
@ -65,12 +60,12 @@ const downloadFile5 = ref<string>("");
|
||||||
const downloadFile6 = ref<string>("");
|
const downloadFile6 = ref<string>("");
|
||||||
|
|
||||||
/** ตัวแปร file*/
|
/** ตัวแปร file*/
|
||||||
const fileEvaluation1 = ref<any>();
|
const fileEvaluation1 = ref<File | null>();
|
||||||
const fileEvaluation2 = ref<any>();
|
const fileEvaluation2 = ref<File | null>();
|
||||||
const fileEvaluation3 = ref<any>();
|
const fileEvaluation3 = ref<File | null>();
|
||||||
const fileEvaluation4 = ref<any>();
|
const fileEvaluation4 = ref<File | null>();
|
||||||
const fileEvaluation5 = ref<any>();
|
const fileEvaluation5 = ref<File | null>();
|
||||||
const fileEvaluation6 = ref<any>();
|
const fileEvaluation6 = ref<File | null>();
|
||||||
|
|
||||||
const fileEvaluation1Ref = ref<object | null>(null);
|
const fileEvaluation1Ref = ref<object | null>(null);
|
||||||
const fileEvaluation2Ref = ref<object | null>(null);
|
const fileEvaluation2Ref = ref<object | null>(null);
|
||||||
|
|
@ -98,60 +93,6 @@ const objectRef: FormRef = {
|
||||||
commanderAbovePosition: commanderAbovePositionRef,
|
commanderAbovePosition: commanderAbovePositionRef,
|
||||||
};
|
};
|
||||||
|
|
||||||
const files = [
|
|
||||||
{
|
|
||||||
id: "file1",
|
|
||||||
fileName: "แบบพิจารณาคุณสมบัติบุคคล",
|
|
||||||
pathName: "1-แบบพิจารณาคุณสมบัติบุคคล",
|
|
||||||
tp: "EV1_005",
|
|
||||||
templateName: "template-1",
|
|
||||||
nameFile: "แบบพิจารณาคุณสมบัติบุคคล",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: "file2",
|
|
||||||
fileName: "แบบแสดงรายละเอียดการเสนอผลงาน",
|
|
||||||
pathName: "2-แบบแสดงรายละเอียดการเสนอผลงาน",
|
|
||||||
tp: "EV1_006",
|
|
||||||
templateName: "template-2",
|
|
||||||
nameFile: "แบบแสดงรายละเอียดการเสนอผลงาน",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: "file3",
|
|
||||||
fileName:
|
|
||||||
"แบบตรวจสอบความถูกต้องครบถ้วนของข้อมูลเพื่อประกอบการคัดเลือกบุคคล (เอกสารแบบ ก)",
|
|
||||||
pathName:
|
|
||||||
"3-แบบตรวจสอบความถูกต้องครบถ้วนของข้อมูลเพื่อประกอบการคัดเลือกบุคคล (เอกสารแบบ ก)",
|
|
||||||
tp: "EV1_007",
|
|
||||||
templateName: "template-3",
|
|
||||||
nameFile:
|
|
||||||
"แบบตรวจสอบความถูกต้องครบถ้วนของข้อมูลเพื่อประกอบการคัดเลือกบุคคล (เอกสารแบบ ก)",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: "file4",
|
|
||||||
fileName: "แบบประเมินคุณลักษณะบุคคล",
|
|
||||||
pathName: "4-แบบประเมินคุณลักษณะบุคคล",
|
|
||||||
tp: "EV1_008",
|
|
||||||
templateName: "template-4",
|
|
||||||
nameFile: "แบบประเมินคุณลักษณะบุคคล",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: "file5",
|
|
||||||
fileName: "แบบสรุปข้อมูลของผู้ขอรับการคัดเลือก (เอกสารหมายเลข 9)",
|
|
||||||
pathName: "5-แบบสรุปข้อมูลของผู้ขอรับการคัดเลือก (เอกสารหมายเลข 9)",
|
|
||||||
tp: "EV1_009",
|
|
||||||
templateName: "template-5",
|
|
||||||
nameFile: "แบบสรุปข้อมูลของผู้ขอรับการคัดเลือก (เอกสารหมายเลข 9)",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: "file6",
|
|
||||||
fileName: "ผลงานที่จะส่งประเมิน (เอกสารหมายเลข 11)",
|
|
||||||
pathName: "6-ผลงานที่จะส่งประเมิน (เอกสารหมายเลข 11)",
|
|
||||||
tp: "EV1_010",
|
|
||||||
templateName: "template-6",
|
|
||||||
nameFile: "ผลงานที่จะส่งประเมิน (เอกสารหมายเลข 11)",
|
|
||||||
},
|
|
||||||
];
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* function ดาวน์โหลดไฟล์
|
* function ดาวน์โหลดไฟล์
|
||||||
* @param fileName ชื่อไฟล์
|
* @param fileName ชื่อไฟล์
|
||||||
|
|
@ -169,54 +110,24 @@ async function downloadFile(fileName: string) {
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
if (fileName === "1-แบบพิจารณาคุณสมบัติบุคคล") {
|
if (fileName === "1-แบบพิจารณาคุณสมบัติบุคคล") {
|
||||||
downloadFile1.value = res.data.downloadUrl;
|
downloadFile1.value = res.data.downloadUrl;
|
||||||
// fileEvaluation1.value = res.data.upload;
|
|
||||||
} else if (fileName === "2-แบบแสดงรายละเอียดการเสนอผลงาน") {
|
} else if (fileName === "2-แบบแสดงรายละเอียดการเสนอผลงาน") {
|
||||||
downloadFile2.value = res.data.downloadUrl;
|
downloadFile2.value = res.data.downloadUrl;
|
||||||
// fileEvaluation2.value = res.data.upload;
|
|
||||||
} else if (
|
} else if (
|
||||||
fileName ===
|
fileName ===
|
||||||
"3-แบบตรวจสอบความถูกต้องครบถ้วนของข้อมูลเพื่อประกอบการคัดเลือกบุคคล (เอกสารแบบ ก)"
|
"3-แบบตรวจสอบความถูกต้องครบถ้วนของข้อมูลเพื่อประกอบการคัดเลือกบุคคล (เอกสารแบบ ก)"
|
||||||
) {
|
) {
|
||||||
downloadFile3.value = res.data.downloadUrl;
|
downloadFile3.value = res.data.downloadUrl;
|
||||||
// fileEvaluation3.value = res.data.upload;
|
|
||||||
} else if (fileName === "4-แบบประเมินคุณลักษณะบุคคล") {
|
} else if (fileName === "4-แบบประเมินคุณลักษณะบุคคล") {
|
||||||
downloadFile4.value = res.data.downloadUrl;
|
downloadFile4.value = res.data.downloadUrl;
|
||||||
// fileEvaluation4.value = res.data.upload;
|
|
||||||
} else if (
|
} else if (
|
||||||
fileName === "5-แบบสรุปข้อมูลของผู้ขอรับการคัดเลือก (เอกสารหมายเลข 9)"
|
fileName === "5-แบบสรุปข้อมูลของผู้ขอรับการคัดเลือก (เอกสารหมายเลข 9)"
|
||||||
) {
|
) {
|
||||||
downloadFile5.value = res.data.downloadUrl;
|
downloadFile5.value = res.data.downloadUrl;
|
||||||
// fileEvaluation5.value = res.data.upload;
|
|
||||||
} else if (fileName === "6-ผลงานที่จะส่งประเมิน (เอกสารหมายเลข 11)") {
|
} else if (fileName === "6-ผลงานที่จะส่งประเมิน (เอกสารหมายเลข 11)") {
|
||||||
downloadFile6.value = res.data.downloadUrl;
|
downloadFile6.value = res.data.downloadUrl;
|
||||||
// fileEvaluation6.value = res.data.upload;
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
const ref = {
|
|
||||||
commanderFullnameRef: commanderFullnameRef.value,
|
|
||||||
commanderPositionRef: commanderPositionRef.value,
|
|
||||||
commanderAboveFullnameRef: commanderAboveFullnameRef.value,
|
|
||||||
commanderAbovePositionRef: commanderAbovePositionRef.value,
|
|
||||||
fileEvaluation1Ref: fileEvaluation1Ref.value,
|
|
||||||
fileEvaluation2Ref: fileEvaluation2Ref.value,
|
|
||||||
fileEvaluation3Ref: fileEvaluation3Ref.value,
|
|
||||||
fileEvaluation4Ref: fileEvaluation4Ref.value,
|
|
||||||
fileEvaluation5Ref: fileEvaluation5Ref.value,
|
|
||||||
fileEvaluation6Ref: fileEvaluation6Ref.value,
|
|
||||||
performance: performanceRef.value,
|
|
||||||
performanceOwner: performanceOwnerRef.value,
|
|
||||||
downloadFile: [
|
|
||||||
downloadFile1.value,
|
|
||||||
downloadFile2.value,
|
|
||||||
downloadFile3.value,
|
|
||||||
downloadFile4.value,
|
|
||||||
downloadFile5.value,
|
|
||||||
downloadFile6.value,
|
|
||||||
],
|
|
||||||
statusUpload: false,
|
|
||||||
};
|
|
||||||
|
|
||||||
hideLoader();
|
hideLoader();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
@ -226,9 +137,7 @@ function onSubmit() {
|
||||||
showLoader();
|
showLoader();
|
||||||
http
|
http
|
||||||
.post(config.API.evaluationExpertise, formData)
|
.post(config.API.evaluationExpertise, formData)
|
||||||
.then((res) => {
|
.then((res) => {})
|
||||||
// props.fetchActive?.();
|
|
||||||
})
|
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
messageError($q, err);
|
messageError($q, err);
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -2,13 +2,11 @@
|
||||||
import { ref, watch } from "vue";
|
import { ref, watch } from "vue";
|
||||||
import type { QTableProps } from "quasar";
|
import type { QTableProps } from "quasar";
|
||||||
|
|
||||||
/***importComponents*/
|
import { useEvaluateStore } from "@/modules/06_evaluate/store";
|
||||||
|
|
||||||
import Table from "@/components/Table.vue";
|
import Table from "@/components/Table.vue";
|
||||||
import DialogHeader from "@/components/DialogHeader.vue";
|
import DialogHeader from "@/components/DialogHeader.vue";
|
||||||
|
|
||||||
/** importStore*/
|
|
||||||
import { useEvaluateStore } from "@/modules/06_evaluate/store";
|
|
||||||
|
|
||||||
/**use*/
|
/**use*/
|
||||||
const store = useEvaluateStore();
|
const store = useEvaluateStore();
|
||||||
|
|
||||||
|
|
@ -164,9 +162,6 @@ watch(props, () => {
|
||||||
>
|
>
|
||||||
<template #columns="props">
|
<template #columns="props">
|
||||||
<q-tr :props="props">
|
<q-tr :props="props">
|
||||||
<!-- <q-td key="no" :props="props">
|
|
||||||
{{ props.rowIndex + 1 }}
|
|
||||||
</q-td> -->
|
|
||||||
<q-td key="degree" :props="props">
|
<q-td key="degree" :props="props">
|
||||||
{{ props.row.degree }}
|
{{ props.row.degree }}
|
||||||
</q-td>
|
</q-td>
|
||||||
|
|
@ -180,8 +175,6 @@ watch(props, () => {
|
||||||
{{ props.row.special }}
|
{{ props.row.special }}
|
||||||
</q-td>
|
</q-td>
|
||||||
<q-td key="checked" :props="props">
|
<q-td key="checked" :props="props">
|
||||||
<!-- v-if="educations?.find((x:any)=> (props.row.year && x.educationLevel == props.row.checked && x.year == props.row.year) || (!props.row.year && x.educationLevel == props.row.checked))" -->
|
|
||||||
<!-- {{ props.row.year }}-{{ props.row.checked }}-{{ educations }} -->
|
|
||||||
<q-icon
|
<q-icon
|
||||||
v-if="educations?.find((x:any)=> (props.row.year && x.educationLevel == props.row.checked && x.durationYear == props.row.year) || (!props.row.year && x.educationLevel == props.row.checked))"
|
v-if="educations?.find((x:any)=> (props.row.year && x.educationLevel == props.row.checked && x.durationYear == props.row.year) || (!props.row.year && x.educationLevel == props.row.checked))"
|
||||||
name="checked"
|
name="checked"
|
||||||
|
|
|
||||||
|
|
@ -2,20 +2,17 @@
|
||||||
import { ref, onMounted, watch } from "vue";
|
import { ref, onMounted, watch } from "vue";
|
||||||
import { useRouter } from "vue-router";
|
import { useRouter } from "vue-router";
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
import config from "@/app.config";
|
|
||||||
import http from "@/plugins/http";
|
|
||||||
|
|
||||||
/**import Type */
|
|
||||||
import type { QTableProps } from "quasar";
|
import type { QTableProps } from "quasar";
|
||||||
|
|
||||||
/** import Store */
|
import config from "@/app.config";
|
||||||
|
import http from "@/plugins/http";
|
||||||
import { useEvaluateStore } from "@/modules/06_evaluate/store";
|
import { useEvaluateStore } from "@/modules/06_evaluate/store";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
|
|
||||||
/** use*/
|
/** use*/
|
||||||
|
const $q = useQuasar();
|
||||||
const store = useEvaluateStore();
|
const store = useEvaluateStore();
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const $q = useQuasar();
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
|
||||||
const { dialogRemove, showLoader, hideLoader, success, messageError } = mixin;
|
const { dialogRemove, showLoader, hideLoader, success, messageError } = mixin;
|
||||||
|
|
@ -140,16 +137,16 @@ function redirectToDetail(data: any) {
|
||||||
router.push(`/evaluate/detail/${data.typeparam.toLowerCase()}/${data.id}`);
|
router.push(`/evaluate/detail/${data.typeparam.toLowerCase()}/${data.id}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** function Callblck ทำงานเมื่อ pagination มีการเปลี่ยนแปลง */
|
||||||
|
watch([() => currentPage.value, () => pagination.value.rowsPerPage], () => {
|
||||||
|
updateProp(pagination.value, currentPage.value);
|
||||||
|
});
|
||||||
|
|
||||||
/** Hook lifecycle*/
|
/** Hook lifecycle*/
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
store.columns = columns.value;
|
store.columns = columns.value;
|
||||||
store.visibleColumns = visibleColumns.value;
|
store.visibleColumns = visibleColumns.value;
|
||||||
});
|
});
|
||||||
|
|
||||||
/** function Callblck ทำงานเมื่อ pagination มีการเปลี่ยนแปลง */
|
|
||||||
watch([() => currentPage.value, () => pagination.value.rowsPerPage], () => {
|
|
||||||
updateProp(pagination.value, currentPage.value);
|
|
||||||
});
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|
|
||||||
|
|
@ -41,15 +41,6 @@ const columnsDrictor = ref<QTableProps["columns"]>([
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
},
|
},
|
||||||
// {
|
|
||||||
// name: "duty",
|
|
||||||
// align: "left",
|
|
||||||
// label: "หน้าที่",
|
|
||||||
// sortable: true,
|
|
||||||
// field: "duty",
|
|
||||||
// headerStyle: "font-size: 14px",
|
|
||||||
// style: "font-size: 14px",
|
|
||||||
// },
|
|
||||||
{
|
{
|
||||||
name: "email",
|
name: "email",
|
||||||
align: "left",
|
align: "left",
|
||||||
|
|
|
||||||
|
|
@ -1,18 +1,15 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { reactive, onMounted, ref } from "vue";
|
import { reactive, onMounted, ref } from "vue";
|
||||||
|
|
||||||
/**importTyep*/
|
import { useEvaluateStore } from "@/modules/06_evaluate/store";
|
||||||
|
|
||||||
import type {
|
import type {
|
||||||
PersonInformation,
|
PersonInformation,
|
||||||
FormSpec,
|
FormSpec,
|
||||||
} from "@/modules/06_evaluate/interface/evalute";
|
} from "@/modules/06_evaluate/interface/evalute";
|
||||||
|
|
||||||
/** importComponents*/
|
|
||||||
import PopupCheckFeatures from "@/modules/06_evaluate/components/PopupCheckFeatures.vue";
|
import PopupCheckFeatures from "@/modules/06_evaluate/components/PopupCheckFeatures.vue";
|
||||||
|
|
||||||
/** importStores*/
|
|
||||||
import { useEvaluateStore } from "@/modules/06_evaluate/store";
|
|
||||||
|
|
||||||
/** use*/
|
/** use*/
|
||||||
const store = useEvaluateStore();
|
const store = useEvaluateStore();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,18 +1,17 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, watch, onMounted, reactive } from "vue";
|
import { ref, watch, onMounted, reactive } from "vue";
|
||||||
import { useRouter, useRoute } from "vue-router";
|
import { useRoute } from "vue-router";
|
||||||
import { VuePDF, usePDF } from "@tato30/vue-pdf";
|
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
|
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 axios from "axios";
|
|
||||||
import genReport from "@/plugins/genreport";
|
import genReport from "@/plugins/genreport";
|
||||||
import { tokenParsed } from "@/plugins/auth";
|
import { tokenParsed } from "@/plugins/auth";
|
||||||
|
import { VuePDF } from "@tato30/vue-pdf";
|
||||||
|
|
||||||
/** importType*/
|
|
||||||
import type { FormCommand } from "@/modules/06_evaluate/interface/evalute";
|
import type { FormCommand } from "@/modules/06_evaluate/interface/evalute";
|
||||||
|
|
||||||
/** importStore*/
|
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useEvaluateStore } from "@/modules/06_evaluate/store";
|
import { useEvaluateStore } from "@/modules/06_evaluate/store";
|
||||||
|
|
||||||
|
|
@ -21,7 +20,6 @@ const $q = useQuasar();
|
||||||
const store = useEvaluateStore();
|
const store = useEvaluateStore();
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
|
|
||||||
const { showLoader, hideLoader, date2Thai, messageError, success } = mixin;
|
const { showLoader, hideLoader, date2Thai, messageError, success } = mixin;
|
||||||
|
|
||||||
const evaluateId = ref<string>(route.params.id.toString());
|
const evaluateId = ref<string>(route.params.id.toString());
|
||||||
|
|
@ -86,12 +84,12 @@ function updateInput(val: any) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/** ตัวแปร file*/
|
/** ตัวแปร file*/
|
||||||
const fileEvaluation1 = ref<any>();
|
const fileEvaluation1 = ref<File | null>();
|
||||||
const fileEvaluation2 = ref<any>();
|
const fileEvaluation2 = ref<File | null>();
|
||||||
const fileEvaluation3 = ref<any>();
|
const fileEvaluation3 = ref<File | null>();
|
||||||
const fileEvaluation4 = ref<any>();
|
const fileEvaluation4 = ref<File | null>();
|
||||||
const fileEvaluation5 = ref<any>();
|
const fileEvaluation5 = ref<File | null>();
|
||||||
const fileEvaluation6 = ref<any>();
|
const fileEvaluation6 = ref<File | null>();
|
||||||
|
|
||||||
const modalView = ref<boolean>(false);
|
const modalView = ref<boolean>(false);
|
||||||
const numOfPages = ref<number>(0);
|
const numOfPages = ref<number>(0);
|
||||||
|
|
@ -399,32 +397,6 @@ async function downloadFile(fileName: string) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**lifecycle Hooks*/
|
|
||||||
onMounted(async () => {
|
|
||||||
const user = await tokenParsed();
|
|
||||||
if (user) {
|
|
||||||
formCommand.author = user.name;
|
|
||||||
}
|
|
||||||
showLoader();
|
|
||||||
await Promise.all([
|
|
||||||
fetcheSigner(evaluateId.value),
|
|
||||||
fetchCheckSpec(evaluateId.value),
|
|
||||||
downloadFile("1-แบบพิจารณาคุณสมบัติบุคคล"),
|
|
||||||
downloadFile("2-แบบแสดงรายละเอียดการเสนอผลงาน"),
|
|
||||||
downloadFile(
|
|
||||||
"3-แบบตรวจสอบความถูกต้องครบถ้วนของข้อมูลเพื่อประกอบการคัดเลือกบุคคล (เอกสารแบบ ก)"
|
|
||||||
),
|
|
||||||
downloadFile("4-แบบประเมินคุณลักษณะบุคคล"),
|
|
||||||
downloadFile("5-แบบสรุปข้อมูลของผู้ขอรับการคัดเลือก (เอกสารหมายเลข 9)"),
|
|
||||||
downloadFile("6-ผลงานที่จะส่งประเมิน (เอกสารหมายเลข 11)"),
|
|
||||||
]);
|
|
||||||
// .then(() => {
|
|
||||||
// setTimeout(() => {
|
|
||||||
// hideLoader();
|
|
||||||
// }, 2000);
|
|
||||||
// });
|
|
||||||
});
|
|
||||||
|
|
||||||
function getCommander() {
|
function getCommander() {
|
||||||
http
|
http
|
||||||
.get(config.API.searchCommander)
|
.get(config.API.searchCommander)
|
||||||
|
|
@ -475,6 +447,27 @@ watch(
|
||||||
}, 200);
|
}, 200);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
/**lifecycle Hooks*/
|
||||||
|
onMounted(async () => {
|
||||||
|
const user = await tokenParsed();
|
||||||
|
if (user) {
|
||||||
|
formCommand.author = user.name;
|
||||||
|
}
|
||||||
|
showLoader();
|
||||||
|
await Promise.all([
|
||||||
|
fetcheSigner(evaluateId.value),
|
||||||
|
fetchCheckSpec(evaluateId.value),
|
||||||
|
downloadFile("1-แบบพิจารณาคุณสมบัติบุคคล"),
|
||||||
|
downloadFile("2-แบบแสดงรายละเอียดการเสนอผลงาน"),
|
||||||
|
downloadFile(
|
||||||
|
"3-แบบตรวจสอบความถูกต้องครบถ้วนของข้อมูลเพื่อประกอบการคัดเลือกบุคคล (เอกสารแบบ ก)"
|
||||||
|
),
|
||||||
|
downloadFile("4-แบบประเมินคุณลักษณะบุคคล"),
|
||||||
|
downloadFile("5-แบบสรุปข้อมูลของผู้ขอรับการคัดเลือก (เอกสารหมายเลข 9)"),
|
||||||
|
downloadFile("6-ผลงานที่จะส่งประเมิน (เอกสารหมายเลข 11)"),
|
||||||
|
]);
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|
@ -488,10 +481,6 @@ watch(
|
||||||
<div class="col-12"><q-separator /></div>
|
<div class="col-12"><q-separator /></div>
|
||||||
<div class="col-12 q-pa-sm">
|
<div class="col-12 q-pa-sm">
|
||||||
<div class="row q-col-gutter-sm">
|
<div class="row q-col-gutter-sm">
|
||||||
<!-- <div class="text-weight-medium q-py-sm">
|
|
||||||
ผู้บังคับบัญชาชั้นต้น
|
|
||||||
</div> -->
|
|
||||||
|
|
||||||
<q-input
|
<q-input
|
||||||
:readonly="store.currentStep != 2 || store.statusUpload"
|
:readonly="store.currentStep != 2 || store.statusUpload"
|
||||||
ref="performanceRef"
|
ref="performanceRef"
|
||||||
|
|
|
||||||
|
|
@ -2,15 +2,13 @@
|
||||||
import { ref, onMounted } from "vue";
|
import { ref, onMounted } from "vue";
|
||||||
import { useRoute } from "vue-router";
|
import { useRoute } from "vue-router";
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
import http from "@/plugins/http";
|
|
||||||
import config from "@/app.config";
|
|
||||||
import axios from "axios";
|
import axios from "axios";
|
||||||
|
|
||||||
/** importStroe*/
|
import http from "@/plugins/http";
|
||||||
|
import config from "@/app.config";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useEvaluateStore } from "@/modules/06_evaluate/store";
|
import { useEvaluateStore } from "@/modules/06_evaluate/store";
|
||||||
|
|
||||||
/** use*/
|
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const store = useEvaluateStore();
|
const store = useEvaluateStore();
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
|
|
|
||||||
|
|
@ -2,15 +2,15 @@
|
||||||
import { ref, onMounted } from "vue";
|
import { ref, onMounted } from "vue";
|
||||||
import { useRoute } from "vue-router";
|
import { useRoute } from "vue-router";
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
|
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
|
|
||||||
/** importStore*/
|
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
|
|
||||||
|
import type { FileObject } from "@/modules/06_evaluate/interface/main";
|
||||||
/** use*/
|
/** use*/
|
||||||
const mixins = useCounterMixin();
|
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
|
const mixins = useCounterMixin();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const { date2Thai, success, showLoader, hideLoader } = mixins;
|
const { date2Thai, success, showLoader, hideLoader } = mixins;
|
||||||
|
|
||||||
|
|
@ -22,7 +22,7 @@ const dateEndAnnounce = ref<string | null>(date2Thai(new Date()));
|
||||||
const statusFile = ref<boolean>(false);
|
const statusFile = ref<boolean>(false);
|
||||||
|
|
||||||
/** เอกสารประกาศผลการคัดเลือกบุคคล*/
|
/** เอกสารประกาศผลการคัดเลือกบุคคล*/
|
||||||
const items = ref<any>([
|
const items = ref<FileObject[]>([
|
||||||
{
|
{
|
||||||
label: "แบบสรุปข้อมูลของผู้ขอรับการคัดเลือก (เอกสารหมายเลข 9)",
|
label: "แบบสรุปข้อมูลของผู้ขอรับการคัดเลือก (เอกสารหมายเลข 9)",
|
||||||
fileName: "5-แบบสรุปข้อมูลของผู้ขอรับการคัดเลือก (เอกสารหมายเลข 9)",
|
fileName: "5-แบบสรุปข้อมูลของผู้ขอรับการคัดเลือก (เอกสารหมายเลข 9)",
|
||||||
|
|
|
||||||
|
|
@ -2,20 +2,18 @@
|
||||||
import { ref, reactive, watch, onMounted } from "vue";
|
import { ref, reactive, watch, onMounted } from "vue";
|
||||||
import { useRoute } from "vue-router";
|
import { useRoute } from "vue-router";
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
|
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 axios from "axios";
|
|
||||||
import { tokenParsed } from "@/plugins/auth";
|
import { tokenParsed } from "@/plugins/auth";
|
||||||
/** importType*/
|
|
||||||
import type { FormCommand } from "@/modules/06_evaluate/interface/evalute";
|
|
||||||
|
|
||||||
/** importComponents*/
|
|
||||||
import ViewPDF from "@/modules/06_evaluate/components/viewstep/viewPDF.vue";
|
|
||||||
|
|
||||||
/** importStore*/
|
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useEvaluateStore } from "@/modules/06_evaluate/store";
|
import { useEvaluateStore } from "@/modules/06_evaluate/store";
|
||||||
|
|
||||||
|
import type { FormCommand } from "@/modules/06_evaluate/interface/evalute";
|
||||||
|
|
||||||
|
import ViewPDF from "@/modules/06_evaluate/components/viewstep/viewPDF.vue";
|
||||||
|
|
||||||
/** use*/
|
/** use*/
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const store = useEvaluateStore();
|
const store = useEvaluateStore();
|
||||||
|
|
@ -211,19 +209,6 @@ function checkDoc() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/** hook lifecycle*/
|
|
||||||
onMounted(async () => {
|
|
||||||
const user = await tokenParsed();
|
|
||||||
if (user) {
|
|
||||||
formCommand.author = user.name;
|
|
||||||
}
|
|
||||||
checkDoc();
|
|
||||||
if (store.currentStep > 2) {
|
|
||||||
fetcheSigner(evaluateId.value);
|
|
||||||
}
|
|
||||||
await fetchCheckDate();
|
|
||||||
});
|
|
||||||
|
|
||||||
function getCommander() {
|
function getCommander() {
|
||||||
http
|
http
|
||||||
.get(config.API.searchCommander)
|
.get(config.API.searchCommander)
|
||||||
|
|
@ -256,6 +241,19 @@ watch(
|
||||||
}, 200);
|
}, 200);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
/** hook lifecycle*/
|
||||||
|
onMounted(async () => {
|
||||||
|
const user = await tokenParsed();
|
||||||
|
if (user) {
|
||||||
|
formCommand.author = user.name;
|
||||||
|
}
|
||||||
|
checkDoc();
|
||||||
|
if (store.currentStep > 2) {
|
||||||
|
fetcheSigner(evaluateId.value);
|
||||||
|
}
|
||||||
|
await fetchCheckDate();
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|
|
||||||
|
|
@ -2,18 +2,17 @@
|
||||||
import { onMounted, ref } from "vue";
|
import { onMounted, ref } from "vue";
|
||||||
import { useRoute } from "vue-router";
|
import { useRoute } from "vue-router";
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
import http from "@/plugins/http";
|
|
||||||
import config from "@/app.config";
|
|
||||||
import axios from "axios";
|
import axios from "axios";
|
||||||
|
|
||||||
/** importStroe*/
|
import http from "@/plugins/http";
|
||||||
|
import config from "@/app.config";
|
||||||
|
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
|
|
||||||
/** use*/
|
/** use*/
|
||||||
const mixin = useCounterMixin();
|
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
|
const mixin = useCounterMixin();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
|
|
||||||
const { showLoader, hideLoader, messageError } = mixin;
|
const { showLoader, hideLoader, messageError } = mixin;
|
||||||
|
|
||||||
/** emit*/
|
/** emit*/
|
||||||
|
|
|
||||||
|
|
@ -3,17 +3,15 @@ import { ref, onMounted } from "vue";
|
||||||
import { useRoute } from "vue-router";
|
import { useRoute } from "vue-router";
|
||||||
import { useQuasar } from "quasar";
|
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 genReport from "@/plugins/genreport";
|
|
||||||
|
|
||||||
/** importStore*/
|
|
||||||
import { useEvaluateStore } from "@/modules/06_evaluate/store";
|
import { useEvaluateStore } from "@/modules/06_evaluate/store";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
|
|
||||||
/**use*/
|
/**use*/
|
||||||
const store = useEvaluateStore();
|
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
|
const store = useEvaluateStore();
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
|
|
||||||
|
|
@ -23,7 +21,7 @@ const evaluateId = ref<string>(route.params.id.toString());
|
||||||
|
|
||||||
const status = ref<string>("WAIT_CHECK_DOC_V2");
|
const status = ref<string>("WAIT_CHECK_DOC_V2");
|
||||||
|
|
||||||
const fileEvaluationEdit = ref<any>();
|
const fileEvaluationEdit = ref<File | null>();
|
||||||
|
|
||||||
const modalView = ref<boolean>(false);
|
const modalView = ref<boolean>(false);
|
||||||
const numOfPages = ref<number>(0);
|
const numOfPages = ref<number>(0);
|
||||||
|
|
@ -179,53 +177,11 @@ onMounted(async () => {
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- <div class="col-12">
|
|
||||||
<q-card bordered style="border: 1px solid #d6dee1">
|
|
||||||
<q-card class="col-12 items-center">
|
|
||||||
<q-tabs
|
|
||||||
v-model="tabMenu"
|
|
||||||
dense
|
|
||||||
align="left"
|
|
||||||
inline-label
|
|
||||||
class="rounded-borders"
|
|
||||||
indicator-color="primary"
|
|
||||||
active-bg-color="teal-1"
|
|
||||||
active-class="text-primary"
|
|
||||||
>
|
|
||||||
<q-tab name="director" label="กรรมการ" />
|
|
||||||
<q-tab name="meeting" label="การประชุม" />
|
|
||||||
</q-tabs>
|
|
||||||
<q-separator />
|
|
||||||
<q-tab-panels v-model="tabMenu" animated>
|
|
||||||
<q-tab-panel name="director"
|
|
||||||
><TableDirector :type="tabMenu" :row="directorList"
|
|
||||||
/></q-tab-panel>
|
|
||||||
|
|
||||||
<q-tab-panel name="meeting">
|
|
||||||
<TableDirector :type="tabMenu" :row="meetingList"
|
|
||||||
/></q-tab-panel>
|
|
||||||
</q-tab-panels>
|
|
||||||
</q-card>
|
|
||||||
</q-card>
|
|
||||||
</div> -->
|
|
||||||
|
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<q-card class="shadow-0" bordered>
|
<q-card class="shadow-0" bordered>
|
||||||
<div class="row col-12 bg-grey-1 q-px-sm q-py-xs items-center">
|
<div class="row col-12 bg-grey-1 q-px-sm q-py-xs items-center">
|
||||||
<div class="text-weight-medium">เอกสารเล่ม 2 (ฉบับแก้ไข)</div>
|
<div class="text-weight-medium">เอกสารเล่ม 2 (ฉบับแก้ไข)</div>
|
||||||
<q-space />
|
<q-space />
|
||||||
|
|
||||||
<!-- <q-btn
|
|
||||||
v-if="downloadUrl != ''"
|
|
||||||
:href="downloadUrl"
|
|
||||||
target="_blank"
|
|
||||||
color="blue"
|
|
||||||
flat
|
|
||||||
dense
|
|
||||||
icon="visibility"
|
|
||||||
>
|
|
||||||
<q-tooltip> ดูไฟล์เอกสาร </q-tooltip></q-btn
|
|
||||||
> -->
|
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12"><q-separator /></div>
|
<div class="col-12"><q-separator /></div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|
@ -282,18 +238,6 @@ onMounted(async () => {
|
||||||
<q-tooltip> ดูไฟล์เอกสาร </q-tooltip></q-btn
|
<q-tooltip> ดูไฟล์เอกสาร </q-tooltip></q-btn
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
<!-- <div>เอกสารเล่ม 2 (ฉบับแก้ไข)</div>
|
|
||||||
<q-btn
|
|
||||||
v-if="downloadUrl != ''"
|
|
||||||
:href="downloadUrl"
|
|
||||||
target="_blank"
|
|
||||||
color="blue"
|
|
||||||
flat
|
|
||||||
dense
|
|
||||||
icon="visibility"
|
|
||||||
>
|
|
||||||
<q-tooltip> ดูไฟล์เอกสาร </q-tooltip></q-btn
|
|
||||||
> -->
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -1,18 +1,15 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref } from "vue";
|
import { ref } from "vue";
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
import { useRouter, useRoute } from "vue-router";
|
import { useRoute } from "vue-router";
|
||||||
|
|
||||||
import env from "@/api";
|
import env from "@/api";
|
||||||
|
|
||||||
/** importStore*/
|
|
||||||
|
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
|
|
||||||
/** use*/
|
/** use*/
|
||||||
const mixin = useCounterMixin();
|
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
|
const mixin = useCounterMixin();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const router = useRouter();
|
|
||||||
|
|
||||||
const evaluateId = ref<string>(route.params.id.toString());
|
const evaluateId = ref<string>(route.params.id.toString());
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,21 +2,19 @@
|
||||||
import { ref, watch, computed } from "vue";
|
import { ref, watch, computed } from "vue";
|
||||||
import { useRoute } from "vue-router";
|
import { useRoute } from "vue-router";
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
|
import type { QTableProps } from "quasar";
|
||||||
|
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
|
|
||||||
import HeaderDialog from "@/components/DialogHeader.vue";
|
import HeaderDialog from "@/components/DialogHeader.vue";
|
||||||
|
|
||||||
import type { QTableProps } from "quasar";
|
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
|
||||||
|
|
||||||
const route = useRoute();
|
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
|
const route = useRoute();
|
||||||
const mixins = useCounterMixin();
|
const mixins = useCounterMixin();
|
||||||
const { showLoader, hideLoader, date2Thai, messageError } = mixins;
|
const { showLoader, hideLoader, date2Thai, messageError } = mixins;
|
||||||
|
|
||||||
// const evaluateId = ref<string>(route.params.id.toString());
|
|
||||||
|
|
||||||
const evaluateId = computed(() => {
|
const evaluateId = computed(() => {
|
||||||
const id = route.params.id ? route.params.id.toString() : "";
|
const id = route.params.id ? route.params.id.toString() : "";
|
||||||
return id;
|
return id;
|
||||||
|
|
|
||||||
|
|
@ -2,8 +2,11 @@
|
||||||
import { reactive, onMounted } from "vue";
|
import { reactive, onMounted } from "vue";
|
||||||
import { useRoute } from "vue-router";
|
import { useRoute } from "vue-router";
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
|
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
|
import { useEvaluateDetailStore } from "@/modules/06_evaluate/stores/evaluteDetail";
|
||||||
|
|
||||||
/** importType*/
|
/** importType*/
|
||||||
import type {
|
import type {
|
||||||
|
|
@ -14,16 +17,11 @@ import type {
|
||||||
/** importComponents*/
|
/** importComponents*/
|
||||||
import TableData from "@/modules/06_evaluate/components/viewstep/tableStep1.vue";
|
import TableData from "@/modules/06_evaluate/components/viewstep/tableStep1.vue";
|
||||||
|
|
||||||
/** importStore*/
|
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
|
||||||
import { useEvaluateDetailStore } from "@/modules/06_evaluate/stores/evaluteDetail";
|
|
||||||
|
|
||||||
/** use*/
|
/** use*/
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const store = useEvaluateDetailStore();
|
const store = useEvaluateDetailStore();
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
|
|
||||||
const { showLoader, hideLoader, messageError, date2Thai } = mixin;
|
const { showLoader, hideLoader, messageError, date2Thai } = mixin;
|
||||||
const {
|
const {
|
||||||
columnsCertificates,
|
columnsCertificates,
|
||||||
|
|
@ -242,10 +240,6 @@ function getData() {
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
// route.name === "evaluate-add" && (await fetchDetail());
|
|
||||||
// props.data && fetchCheckSpec(props.data);
|
|
||||||
// getData();
|
|
||||||
|
|
||||||
const promises = [];
|
const promises = [];
|
||||||
|
|
||||||
if (route.name === "evaluate-add") {
|
if (route.name === "evaluate-add") {
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,11 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref } from "vue";
|
import { ref } from "vue";
|
||||||
|
|
||||||
|
import { useEvaluateStore } from "@/modules/06_evaluate/store";
|
||||||
|
|
||||||
import DialogHeader from "@/components/DialogHeader.vue";
|
import DialogHeader from "@/components/DialogHeader.vue";
|
||||||
import ViewPDF from "@/modules/06_evaluate/components/viewstep/viewPDF.vue";
|
import ViewPDF from "@/modules/06_evaluate/components/viewstep/viewPDF.vue";
|
||||||
|
|
||||||
import { useEvaluateStore } from "@/modules/06_evaluate/store";
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
pdfSrc: {
|
pdfSrc: {
|
||||||
type: String,
|
type: String,
|
||||||
|
|
@ -16,7 +18,6 @@ const props = defineProps({
|
||||||
const modalPerview = ref<boolean>(false);
|
const modalPerview = ref<boolean>(false);
|
||||||
|
|
||||||
const store = useEvaluateStore();
|
const store = useEvaluateStore();
|
||||||
const tabPanels = store.tabPanels;
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|
|
||||||
|
|
@ -45,6 +45,25 @@ interface FormCommand {
|
||||||
assignedPosition: string;
|
assignedPosition: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
interface FormCommandSe {
|
||||||
|
commanderFullname: string;
|
||||||
|
commanderPosition: string;
|
||||||
|
commanderAboveFullname: string;
|
||||||
|
commanderAbovePosition: string;
|
||||||
|
author: string;
|
||||||
|
subject: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface FormData {
|
||||||
|
id: string;
|
||||||
|
commanderFullname: string;
|
||||||
|
commanderPosition: string;
|
||||||
|
commanderAboveFullname: string;
|
||||||
|
commanderAbovePosition: string;
|
||||||
|
author: string;
|
||||||
|
subject: string;
|
||||||
|
}
|
||||||
|
|
||||||
interface FormCommandRef {
|
interface FormCommandRef {
|
||||||
commanderFullname: object | null;
|
commanderFullname: object | null;
|
||||||
commanderPosition: object | null;
|
commanderPosition: object | null;
|
||||||
|
|
@ -114,4 +133,6 @@ export type {
|
||||||
CertificatesForm,
|
CertificatesForm,
|
||||||
ListMenu,
|
ListMenu,
|
||||||
FormRef,
|
FormRef,
|
||||||
|
FormData,
|
||||||
|
FormCommandSe
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -3,4 +3,26 @@ interface OptionStatus {
|
||||||
label: string;
|
label: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export type { OptionStatus };
|
interface FileObject {
|
||||||
|
label: string;
|
||||||
|
fileName: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface MainList {
|
||||||
|
id: string;
|
||||||
|
typeparam:string;
|
||||||
|
type:string;
|
||||||
|
type_th:string;
|
||||||
|
dateSend:string;
|
||||||
|
status:string;
|
||||||
|
step:string;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface ListResponse {
|
||||||
|
id:string
|
||||||
|
type:string
|
||||||
|
type_th:string
|
||||||
|
updatedAt:Date|null
|
||||||
|
step:string
|
||||||
|
}
|
||||||
|
export type { OptionStatus, FileObject,MainList,ListResponse };
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,12 @@ import { ref } from "vue";
|
||||||
|
|
||||||
import type { QTableProps } from "quasar";
|
import type { QTableProps } from "quasar";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
|
|
||||||
|
import type {
|
||||||
|
MainList,
|
||||||
|
ListResponse,
|
||||||
|
} from "@/modules/06_evaluate/interface/main";
|
||||||
|
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { date2Thai } = mixin;
|
const { date2Thai } = mixin;
|
||||||
|
|
||||||
|
|
@ -10,14 +16,14 @@ export const useEvaluateStore = defineStore("evaluateStore", () => {
|
||||||
const filterKeyword = ref<string>("");
|
const filterKeyword = ref<string>("");
|
||||||
const columns = ref<QTableProps["columns"]>([]);
|
const columns = ref<QTableProps["columns"]>([]);
|
||||||
const visibleColumns = ref<string[]>([]);
|
const visibleColumns = ref<string[]>([]);
|
||||||
const row = ref<any>();
|
const row = ref<MainList[]>([]);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* function เรียกข่อมูลรายการประเมิน
|
* function เรียกข่อมูลรายการประเมิน
|
||||||
* @param data ข้อมูลรายการประเมิน
|
* @param data ข้อมูลรายการประเมิน
|
||||||
*/
|
*/
|
||||||
async function fetchEvaluateList(data: any) {
|
async function fetchEvaluateList(data: any) {
|
||||||
const list = data.map((e: any) => ({
|
const list = data.map((e: ListResponse) => ({
|
||||||
id: e.id,
|
id: e.id,
|
||||||
typeparam: e.type,
|
typeparam: e.type,
|
||||||
type: e.type,
|
type: e.type,
|
||||||
|
|
|
||||||
|
|
@ -2,27 +2,25 @@
|
||||||
import { ref, computed, onMounted, watch } from "vue";
|
import { ref, computed, onMounted, 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 { useEvaluateStore } from "@/modules/06_evaluate/store";
|
||||||
/** import Type*/
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import type { ListMenu } from "@/modules/06_evaluate/interface/evalute";
|
|
||||||
import type { OptionStatus } from "@/modules/06_evaluate/interface/main";
|
|
||||||
|
|
||||||
/** import Components*/
|
/** import Components*/
|
||||||
import TableListEvaluate from "@/modules/06_evaluate/components/TableListEvaluate.vue"; // ตารางประเมิน
|
import TableListEvaluate from "@/modules/06_evaluate/components/TableListEvaluate.vue"; // ตารางประเมิน
|
||||||
import DialogMain from "@/modules/06_evaluate/components/DialogMain.vue"; // popup การเพิ่มประเมิน
|
import DialogMain from "@/modules/06_evaluate/components/DialogMain.vue"; // popup การเพิ่มประเมิน
|
||||||
|
|
||||||
/** import Store*/
|
/** import Type*/
|
||||||
import { useEvaluateStore } from "@/modules/06_evaluate/store";
|
import type { ListMenu } from "@/modules/06_evaluate/interface/evalute";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import type { OptionStatus } from "@/modules/06_evaluate/interface/main";
|
||||||
|
|
||||||
/** use*/
|
/** use*/
|
||||||
|
const $q = useQuasar();
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const store = useEvaluateStore();
|
const store = useEvaluateStore();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const $q = useQuasar();
|
|
||||||
|
|
||||||
const { showLoader, hideLoader, messageError } = mixin;
|
const { showLoader, hideLoader, messageError } = mixin;
|
||||||
|
|
||||||
/** ตัวแปร*/
|
/** ตัวแปร*/
|
||||||
|
|
@ -98,11 +96,6 @@ async function getProfileCheck() {
|
||||||
.get(config.API.profilePosition())
|
.get(config.API.profilePosition())
|
||||||
.then(async (res: any) => {
|
.then(async (res: any) => {
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
// data.posTypeRank = await 2;
|
|
||||||
// data.posLevelRank = await 4;
|
|
||||||
// console.log("posTypeRank===>",data.posTypeRank);
|
|
||||||
// console.log("posLevelRank===>",data.posLevelRank);
|
|
||||||
|
|
||||||
if (
|
if (
|
||||||
data.posTypeRank != 2 ||
|
data.posTypeRank != 2 ||
|
||||||
(data.posTypeRank == 2 && data.posLevelRank >= 4)
|
(data.posTypeRank == 2 && data.posLevelRank >= 4)
|
||||||
|
|
@ -187,17 +180,17 @@ function filterOption(val: any, update: Function) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/** hook lifecycle*/
|
|
||||||
onMounted(async () => {
|
|
||||||
await fetchEvaluteList();
|
|
||||||
});
|
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
() => store.filterKeyword,
|
() => store.filterKeyword,
|
||||||
async () => {
|
async () => {
|
||||||
store.filterKeyword === "" && (await fetchEvaluteList());
|
store.filterKeyword === "" && (await fetchEvaluteList());
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
/** hook lifecycle*/
|
||||||
|
onMounted(async () => {
|
||||||
|
await fetchEvaluteList();
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|
@ -253,35 +246,6 @@ watch(
|
||||||
</q-btn>
|
</q-btn>
|
||||||
</div>
|
</div>
|
||||||
<q-space />
|
<q-space />
|
||||||
<!-- <div class="col-xs-12 col-sm-3 col-md-2">
|
|
||||||
<q-input
|
|
||||||
dense
|
|
||||||
outlined
|
|
||||||
v-model="store.filterKeyword"
|
|
||||||
label="ค้นหา"
|
|
||||||
debounce="300"
|
|
||||||
@keydown.enter.prevent="filterFn"
|
|
||||||
>
|
|
||||||
<template v-slot:append>
|
|
||||||
<q-icon name="search" />
|
|
||||||
</template>
|
|
||||||
</q-input>
|
|
||||||
</div> -->
|
|
||||||
<!-- <div class="col-xs-12 col-sm-3 col-md-2">
|
|
||||||
<q-select
|
|
||||||
v-model="store.visibleColumns"
|
|
||||||
multiple
|
|
||||||
outlined
|
|
||||||
dense
|
|
||||||
options-dense
|
|
||||||
:display-value="$q.lang.table.columns"
|
|
||||||
emit-value
|
|
||||||
map-options
|
|
||||||
:options="store.columns"
|
|
||||||
option-value="name"
|
|
||||||
options-cover
|
|
||||||
/>
|
|
||||||
</div> -->
|
|
||||||
</div>
|
</div>
|
||||||
<div class="row col-12 q-mb-sm q-col-gutter-sm">
|
<div class="row col-12 q-mb-sm q-col-gutter-sm">
|
||||||
<div class="col-xs-12 col-sm-3 col-md-2">
|
<div class="col-xs-12 col-sm-3 col-md-2">
|
||||||
|
|
@ -313,23 +277,6 @@ watch(
|
||||||
</q-item>
|
</q-item>
|
||||||
</template>
|
</template>
|
||||||
</q-select>
|
</q-select>
|
||||||
<!-- <q-btn size="12px" flat round color="primary" icon="mdi-plus">
|
|
||||||
<q-menu>
|
|
||||||
<q-list style="min-width: auto">
|
|
||||||
<q-item
|
|
||||||
v-for="(item, index) in listMenu"
|
|
||||||
:key="index"
|
|
||||||
clickable
|
|
||||||
v-close-popup
|
|
||||||
@click.stop="onclickAddEvaluate(item)"
|
|
||||||
>
|
|
||||||
<q-item-section>{{ item.label }}</q-item-section>
|
|
||||||
<q-tooltip>{{ item.label }}</q-tooltip>
|
|
||||||
</q-item>
|
|
||||||
</q-list>
|
|
||||||
</q-menu>
|
|
||||||
<q-tooltip>เพิ่มการประเมินบุคคล</q-tooltip>
|
|
||||||
</q-btn> -->
|
|
||||||
</div>
|
</div>
|
||||||
<q-space />
|
<q-space />
|
||||||
<div class="col-xs-12 col-sm-3 col-md-2">
|
<div class="col-xs-12 col-sm-3 col-md-2">
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue