Merge branch 'develop' into devTee
This commit is contained in:
commit
cdceac58f2
57 changed files with 858 additions and 366 deletions
|
|
@ -72,9 +72,9 @@ const fecthappointmentByid = async () => {
|
|||
const data = res.data.result;
|
||||
appointment.value = data;
|
||||
profileId.value = data.profileId;
|
||||
title.value.fullname = `${data.prefix}${data.firstName ?? "-"} ${
|
||||
data.lastName ?? "-"
|
||||
}`;
|
||||
title.value.fullname = `${data.prefix === null ? "" : data.prefix}${
|
||||
data.firstName ?? "-"
|
||||
} ${data.lastName ?? "-"}`;
|
||||
title.value.organizationPositionOld = data.organizationPositionOld ?? "-";
|
||||
title.value.positionLevelOld = data.positionLevelOld ?? "-";
|
||||
title.value.positionTypeOld = data.positionTypeOld ?? "-";
|
||||
|
|
|
|||
|
|
@ -71,7 +71,9 @@ const columns = ref<QTableProps["columns"]>([
|
|||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
format(val, row) {
|
||||
return `${row.prefix}${row.firstName} ${row.lastName}`;
|
||||
return `${row.prefix === null ? "" : row.prefix}${row.firstName} ${
|
||||
row.lastName
|
||||
}`;
|
||||
},
|
||||
},
|
||||
{
|
||||
|
|
|
|||
|
|
@ -84,8 +84,8 @@ const fileDownload = async (no: number, type: string, fileName: string) => {
|
|||
.then(async (res) => {
|
||||
downloadFile(res, `${fileName}.${type}`);
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
.catch(async (e) => {
|
||||
messageError($q, JSON.parse(await e.response.data.text()));
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
|
|
|
|||
|
|
@ -950,8 +950,8 @@ async function clickdownloadFile(type: string) {
|
|||
`แบบมอบหมายงานการทดลองปฏิบัติหน้าที่ราชการ-${fullname.value}.${type}`
|
||||
);
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
.catch(async (e) => {
|
||||
messageError($q, JSON.parse(await e.response.data.text()));
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
|
|
|
|||
|
|
@ -160,8 +160,8 @@ async function clickdownloadFile(type: string) {
|
|||
.then((res) => {
|
||||
downloadFile(res, `แบบรายงานการประเมินฯ_${fullname.value}.${type}`);
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
.catch(async (e) => {
|
||||
messageError($q, JSON.parse(await e.response.data.text()));
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
|
|
|
|||
|
|
@ -37,13 +37,15 @@ const dataRole = ref<string>("mentor");
|
|||
/** get ข้อมูล มอบหมาย
|
||||
* @param id person id
|
||||
*/
|
||||
async function fecthAssign(id: string){
|
||||
async function fecthAssign(id: string) {
|
||||
showLoader();
|
||||
await http
|
||||
.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) => {
|
||||
|
|
@ -52,19 +54,19 @@ async function fecthAssign(id: string){
|
|||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* เปลี่ยน tab
|
||||
* @param tabVal type
|
||||
*/
|
||||
function changeTab(tabVal: string){
|
||||
function changeTab(tabVal: string) {
|
||||
tab.value = tabVal;
|
||||
dataArrayNumber.value = Number(tabVal.charAt(4));
|
||||
};
|
||||
}
|
||||
|
||||
/** convert file */
|
||||
function downloadFile(response: any, filename: string){
|
||||
function downloadFile(response: any, filename: string) {
|
||||
const link = document.createElement("a");
|
||||
var fileName = filename;
|
||||
link.href = window.URL.createObjectURL(new Blob([response.data]));
|
||||
|
|
@ -72,10 +74,10 @@ function downloadFile(response: any, filename: string){
|
|||
document.body.appendChild(link);
|
||||
link.click();
|
||||
document.body.removeChild(link);
|
||||
};
|
||||
}
|
||||
|
||||
/** download file */
|
||||
async function FileDownload(type: string){
|
||||
async function FileDownload(type: string) {
|
||||
let numTab = probationStore.evaluate.find(
|
||||
(e: any) => e.no === dataArrayNumber.value
|
||||
);
|
||||
|
|
@ -92,8 +94,8 @@ async function FileDownload(type: string){
|
|||
`แบบบันทึกผล(ผู้ดูเเล)_${fullname.value}_ครั้งที่${numTab.no}.${type}`
|
||||
);
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
.catch(async (e) => {
|
||||
messageError($q, JSON.parse(await e.response.data.text()));
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
|
|
@ -111,21 +113,21 @@ async function FileDownload(type: string){
|
|||
`แบบบันทึกผล(ผู้บังคับบัญชา)_${fullname.value}_ครั้งที่${numTab.no}.${type}`
|
||||
);
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
.catch(async (e) => {
|
||||
messageError($q, JSON.parse(await e.response.data.text()));
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
/** ไปหน้า page add */
|
||||
function addData(){
|
||||
function addData() {
|
||||
router.push(
|
||||
`/probation/detail/addresult/${personalId.value}/${assignId.value}`
|
||||
);
|
||||
};
|
||||
}
|
||||
|
||||
onMounted(async () => {
|
||||
await fecthAssign(assignId.value);
|
||||
|
|
|
|||
|
|
@ -40,9 +40,9 @@ onMounted(async () => {
|
|||
|
||||
/**
|
||||
* get data
|
||||
* @param id person id
|
||||
* @param id person id
|
||||
*/
|
||||
async function fecthAssign(id: string){
|
||||
async function fecthAssign(id: string) {
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.formevaluateCommander(id))
|
||||
|
|
@ -59,19 +59,19 @@ async function fecthAssign(id: string){
|
|||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* เปลี่ยน tab
|
||||
* @param tabVal type
|
||||
* @param tabVal type
|
||||
*/
|
||||
function changeTab(tabVal: string){
|
||||
function changeTab(tabVal: string) {
|
||||
tab.value = tabVal;
|
||||
dataArrayNumber.value = Number(tabVal.charAt(4));
|
||||
};
|
||||
}
|
||||
|
||||
/** เปลี่ยน type file */
|
||||
function downloadFile(response: any, filename: string){
|
||||
function downloadFile(response: any, filename: string) {
|
||||
const link = document.createElement("a");
|
||||
var fileName = filename;
|
||||
link.href = window.URL.createObjectURL(new Blob([response.data]));
|
||||
|
|
@ -79,13 +79,13 @@ function downloadFile(response: any, filename: string){
|
|||
document.body.appendChild(link);
|
||||
link.click();
|
||||
document.body.removeChild(link);
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* download file
|
||||
* @param type type
|
||||
*/
|
||||
async function FileDownload(type: string){
|
||||
async function FileDownload(type: string) {
|
||||
let numTab = probationStore.evaluate.find(
|
||||
(e: any) => e.no === dataArrayNumber.value
|
||||
);
|
||||
|
|
@ -102,8 +102,8 @@ async function FileDownload(type: string){
|
|||
`แบบบันทึกผล(ผู้บังคับบัญชา)_${fullname.value}_ครั้งที่${numTab.no}.${type}`
|
||||
);
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
.catch(async (e) => {
|
||||
messageError($q, JSON.parse(await e.response.data.text()));
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
|
|
@ -121,21 +121,21 @@ async function FileDownload(type: string){
|
|||
`แบบบันทึกผล(ผู้บังคับบัญชา)_${fullname.value}_ครั้งที่${numTab.no}.${type}`
|
||||
);
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
.catch(async (e) => {
|
||||
messageError($q, JSON.parse(await e.response.data.text()));
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
/** เปลี่ยนหน้า เพิ่ม */
|
||||
function addData(){
|
||||
function addData() {
|
||||
router.push(
|
||||
`/probation/detail/addevaluacommander/${personalId.value}/${assignId.value}`
|
||||
);
|
||||
};
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
|
|
|||
|
|
@ -37,12 +37,12 @@ const evaluate = ref<any>([]);
|
|||
|
||||
/**
|
||||
* เปลี่ยน tab
|
||||
* @param tabVal type
|
||||
* @param tabVal type
|
||||
*/
|
||||
function changeTab(tabVal: string){
|
||||
function changeTab(tabVal: string) {
|
||||
tab.value = tabVal;
|
||||
dataArrayNumber.value = Number(tabVal.charAt(4));
|
||||
};
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
fecthAssign(assignId.value);
|
||||
|
|
@ -50,9 +50,9 @@ onMounted(() => {
|
|||
|
||||
/**
|
||||
* get data
|
||||
* @param id person id
|
||||
* @param id person id
|
||||
*/
|
||||
async function fecthAssign(id: string){
|
||||
async function fecthAssign(id: string) {
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.createformCommader(id))
|
||||
|
|
@ -60,7 +60,9 @@ onMounted(() => {
|
|||
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.experimentee
|
||||
? res.data.data.experimentee.name
|
||||
: "";
|
||||
dataArrayNumber.value = 1;
|
||||
})
|
||||
.catch((e: any) => {
|
||||
|
|
@ -69,10 +71,10 @@ onMounted(() => {
|
|||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
/** เปลี่ยน type file */
|
||||
function downloadFile(response: any, filename: string){
|
||||
function downloadFile(response: any, filename: string) {
|
||||
const link = document.createElement("a");
|
||||
var fileName = filename;
|
||||
link.href = window.URL.createObjectURL(new Blob([response.data]));
|
||||
|
|
@ -80,13 +82,13 @@ function downloadFile(response: any, filename: string){
|
|||
document.body.appendChild(link);
|
||||
link.click();
|
||||
document.body.removeChild(link);
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* download file
|
||||
* @param type type
|
||||
*/
|
||||
async function FileDownload(type: string){
|
||||
async function FileDownload(type: string) {
|
||||
let numTab = evaluate.value.find((e: any) => e.no === dataArrayNumber.value);
|
||||
showLoader();
|
||||
await http
|
||||
|
|
@ -99,20 +101,20 @@ function downloadFile(response: any, filename: string){
|
|||
`แบบประเมินผล(ผู้บังคับบัญชา)_${fullname.value}_ครั้งที่${numTab.no}.${type}`
|
||||
);
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
.catch(async (e) => {
|
||||
messageError($q, JSON.parse(await e.response.data.text()));
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
/** เปลี่ยนหน้า เพิ่ม */
|
||||
function addData(){
|
||||
function addData() {
|
||||
router.push(
|
||||
`/probation/detail/addevalua/${personalId.value}/${assignId.value}`
|
||||
);
|
||||
};
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
|
|
|||
|
|
@ -47,7 +47,9 @@ 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.experimentee
|
||||
? res.data.data.experimentee.name
|
||||
: "";
|
||||
tabs.value = evaluate.value;
|
||||
dataArrayNumber.value = 1;
|
||||
})
|
||||
|
|
@ -81,8 +83,8 @@ const FileDownload = async (type: string) => {
|
|||
`แบบประเมินผล(คณะกรรมการ)_${fullname.value}_ครั้งที่${numTab.no}.${type}`
|
||||
);
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
.catch(async (e) => {
|
||||
messageError($q, JSON.parse(await e.response.data.text()));
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue