fixing report probation

This commit is contained in:
Warunee Tamkoo 2024-07-03 22:52:40 +07:00
parent af8937c29f
commit ef6b015113
5 changed files with 23 additions and 24 deletions

View file

@ -5,6 +5,8 @@ import { useCounterMixin } from "@/stores/mixin";
import { useRoute, useRouter } from "vue-router";
import http from "@/plugins/http";
import config from "@/app.config";
import { useProbationDataStore } from "@/modules/05_placement/storeProbation";
const probationStore = useProbationDataStore();
const $q = useQuasar();
const myForm = ref<any>(null);
@ -39,7 +41,7 @@ const reson52 = ref<string>("");
const chairman_dated = ref<Date>();
const director1_dated = ref<any>("");
const director2_dated = ref<any>("");
const fullname = ref<string>("");
// const fullname = ref<string>("");
const director_id = ref<any>(null);
const director_id2 = ref<any>(null);
const director_id3 = ref<any>(null);
@ -158,7 +160,10 @@ async function clickdownloadFile(type: string) {
responseType: "blob",
})
.then((res) => {
downloadFile(res, `แบบรายงานการประเมินฯ_${fullname.value}.${type}`);
downloadFile(
res,
`แบบรายงานการประเมินฯ_${probationStore.person.name}.${type}`
);
})
.catch(async (e) => {
messageError($q, JSON.parse(await e.response.data.text()));

View file

@ -29,7 +29,7 @@ const mixin = useCounterMixin();
const { showLoader, hideLoader, messageError } = mixin;
const assignId = ref<string>(route.params.form.toString());
const personalId = ref<string>(route.params.personalId.toString());
const fullname = ref<string>("");
// const fullname = ref<string>("");
const tab = ref<string>("save1");
const dataArrayNumber = ref<number>();
const dataRole = ref<string>("mentor");
@ -43,9 +43,9 @@ async function fecthAssign(id: string) {
.get(config.API.formevaluate(id))
.then(async (res: any) => {
await fecthdataAssign(res.data.data);
fullname.value = res.data.data.experimentee
? res.data.data.experimentee.name
: "";
// fullname.value = res.data.data.experimentee
// ? res.data.data.experimentee.name
// : "";
dataArrayNumber.value = 1;
})
.catch((e: any) => {
@ -91,7 +91,7 @@ async function FileDownload(type: string) {
.then(async (res) => {
downloadFile(
res,
`แบบบันทึกผล(ผู้ดูเเล)_${fullname.value}_ครั้งที่${numTab.no}.${type}`
`แบบบันทึกผล(ผู้ดูเเล)_${probationStore.person.name}_ครั้งที่${numTab.no}.${type}`
);
})
.catch(async (e) => {
@ -110,7 +110,7 @@ async function FileDownload(type: string) {
.then(async (res) => {
downloadFile(
res,
`แบบบันทึกผล(ผู้บังคับบัญชา)_${fullname.value}_ครั้งที่${numTab.no}.${type}`
`แบบบันทึกผล(ผู้บังคับบัญชา)_${probationStore.person.name}_ครั้งที่${numTab.no}.${type}`
);
})
.catch(async (e) => {

View file

@ -29,7 +29,7 @@ const mixin = useCounterMixin();
const { showLoader, hideLoader, messageError } = mixin;
const assignId = ref<string>(route.params.form.toString());
const personalId = ref<string>(route.params.personalId.toString());
const fullname = ref<string>("");
// const fullname = ref<string>("");
const tab = ref<string>("save1");
const dataArrayNumber = ref<number>();
const dataRole = ref<string>("mentor");
@ -48,9 +48,7 @@ async function fecthAssign(id: string) {
.get(config.API.formevaluateCommander(id))
.then(async (res: any) => {
await fecthdataAssign(res.data.data);
fullname.value = res.data.data.experimentee
? res.data.data.experimentee.name
: "";
// fullname.value = res.data.person ? res.data.person.name : "";
dataArrayNumber.value = 1;
})
.catch((e: any) => {
@ -99,7 +97,7 @@ async function FileDownload(type: string) {
.then(async (res) => {
downloadFile(
res,
`แบบบันทึกผล(ผู้บังคับบัญชา)_${fullname.value}_ครั้งที่${numTab.no}.${type}`
`แบบบันทึกผล(ผู้บังคับบัญชา)_${probationStore.person.name}_ครั้งที่${numTab.no}.${type}`
);
})
.catch(async (e) => {
@ -118,7 +116,7 @@ async function FileDownload(type: string) {
.then(async (res) => {
downloadFile(
res,
`แบบบันทึกผล(ผู้บังคับบัญชา)_${fullname.value}_ครั้งที่${numTab.no}.${type}`
`แบบบันทึกผล(ผู้บังคับบัญชา)_${probationStore.person.name}_ครั้งที่${numTab.no}.${type}`
);
})
.catch(async (e) => {

View file

@ -29,7 +29,7 @@ const probationStore = useProbationDataStore();
const { fecthdataAssign } = probationStore;
const assignId = ref<string>(route.params.form.toString());
const personalId = ref<string>(route.params.personalId.toString());
const fullname = ref<string>("");
// const fullname = ref<string>("");
const tab = ref<string>("save1");
const tabs = ref<any>([]);
const dataArrayNumber = ref<number>(1);
@ -60,9 +60,7 @@ async function fecthAssign(id: string) {
await fecthdataAssign(res.data.data);
evaluate.value = probationStore.evaluate;
tabs.value = evaluate.value;
fullname.value = res.data.data.experimentee
? res.data.data.experimentee.name
: "";
// fullname.value = res.data.data.person ? res.data.data.person.name : "";
dataArrayNumber.value = 1;
})
.catch((e: any) => {
@ -98,7 +96,7 @@ async function FileDownload(type: string) {
.then(async (res) => {
downloadFile(
res,
`แบบประเมินผล(ผู้บังคับบัญชา)_${fullname.value}_ครั้งที่${numTab.no}.${type}`
`แบบประเมินผล(ผู้บังคับบัญชา)_${probationStore.person.name}_ครั้งที่${numTab.no}.${type}`
);
})
.catch(async (e) => {

View file

@ -30,7 +30,7 @@ const { showLoader, hideLoader, messageError, success } = mixin;
const assignId = ref<string>(route.params.form.toString());
const personalId = ref<string>(route.params.personalId.toString());
const fullname = ref<string>("");
// const fullname = ref<string>("");
const tab = ref<string>("save1");
const tabs = ref<any>([]);
const dataArrayNumber = ref<number>(1);
@ -47,9 +47,7 @@ const fecthAssign = async (id: string) => {
.then(async (res: any) => {
await fecthdataAssign(res.data.data);
evaluate.value = probationStore.evaluate;
fullname.value = res.data.data.experimentee
? res.data.data.experimentee.name
: "";
// fullname.value = res.data.data.person ? res.data.data.person.name : "";
tabs.value = evaluate.value;
dataArrayNumber.value = 1;
})
@ -80,7 +78,7 @@ const FileDownload = async (type: string) => {
.then(async (res) => {
downloadFile(
res,
`แบบประเมินผล(คณะกรรมการ)_${fullname.value}_ครั้งที่${numTab.no}.${type}`
`แบบประเมินผล(คณะกรรมการ)_${probationStore.person.name}_ครั้งที่${numTab.no}.${type}`
);
})
.catch(async (e) => {