fix report โครงสร้าง ลูกจ้าง
This commit is contained in:
parent
409b58c82c
commit
344ecd4424
4 changed files with 28 additions and 23 deletions
|
|
@ -36,12 +36,12 @@ const modalPersonal = ref<boolean>(false);
|
|||
|
||||
const profileId = ref<string | null>("");
|
||||
|
||||
function fetchDataProfile(data: DataProfile) {
|
||||
async function fetchDataProfile(data: DataProfile) {
|
||||
if (data.profileId) {
|
||||
fetchCheckAvatar(data.profileId);
|
||||
}
|
||||
profile.id = data.profileId;
|
||||
profile.fullName = `${data.prefix ?? ""}${data.firstName ?? ""} ${
|
||||
profile.fullName = `${data.rank ? data.rank : data.prefix ?? ""}${data.firstName ?? ""} ${
|
||||
data.lastName ?? ""
|
||||
} `;
|
||||
|
||||
|
|
|
|||
|
|
@ -104,7 +104,11 @@ async function fetchInformation(id: string) {
|
|||
)
|
||||
.then(async (res) => {
|
||||
const data = await res.data.result;
|
||||
imformation.prefix = data.prefix ? data.prefix : "-";
|
||||
imformation.prefix = data.rank
|
||||
? data.rank
|
||||
: data.prefix
|
||||
? data.prefix
|
||||
: "-";
|
||||
imformation.citizenId = data.citizenId ? data.citizenId : "-";
|
||||
imformation.firstName = data.firstName ? data.firstName : "-";
|
||||
imformation.lastName = data.lastName ? data.lastName : "-";
|
||||
|
|
@ -112,7 +116,9 @@ async function fetchInformation(id: string) {
|
|||
imformation.age = data.birthDate ? calculateAge(data.birthDate) : "-";
|
||||
imformation.gender = data.gender ?? "-";
|
||||
|
||||
avatar.fullname = `${data.prefix}${data.firstName} ${data.lastName}`;
|
||||
avatar.fullname = `${data.rank ? data.rank : data.prefix}${
|
||||
data.firstName
|
||||
} ${data.lastName}`;
|
||||
|
||||
avatar.position = data.position ? data.position : "-";
|
||||
if (data.avatarName) {
|
||||
|
|
|
|||
|
|
@ -260,6 +260,7 @@ interface DataProfile {
|
|||
status: string;
|
||||
positionType?: string;
|
||||
positionLevel?: string;
|
||||
rank: string;
|
||||
}
|
||||
|
||||
interface tableType {
|
||||
|
|
@ -376,8 +377,6 @@ interface DataPermissions {
|
|||
tab7: TabPermissions;
|
||||
}
|
||||
|
||||
|
||||
|
||||
export type {
|
||||
DataOption,
|
||||
DataOptionInsignia,
|
||||
|
|
@ -407,7 +406,7 @@ export type {
|
|||
AppointTopic,
|
||||
AppointTopicMain,
|
||||
DataPermissions,
|
||||
TabPermissions
|
||||
TabPermissions,
|
||||
};
|
||||
|
||||
export { AddressDataDefualt, FamilyDataDefualt };
|
||||
|
|
|
|||
|
|
@ -106,7 +106,7 @@ const listMenu = ref<ListMenu[]>([
|
|||
const documentItems = ref<DataDocumentList[]>([
|
||||
{
|
||||
name: "รายงานสรุปจำนวนกรอบอัตรากำลังของลูกจ้างประจำกรุงเทพมหานคร",
|
||||
val: "report4",
|
||||
val: "report4-employee",
|
||||
},
|
||||
]);
|
||||
|
||||
|
|
@ -338,21 +338,21 @@ function getSummary() {
|
|||
/** function DownloadReport*/
|
||||
async function onClickDownloadReport(val: string, name: string) {
|
||||
// รอ API
|
||||
// showLoader();
|
||||
// await http
|
||||
// .get(config.API.orgReport(val) + `/${orgRootId.value}`)
|
||||
// .then(async (res) => {
|
||||
// const data = res.data.result;
|
||||
// if (data) {
|
||||
// await genreport(data, name);
|
||||
// }
|
||||
// })
|
||||
// .catch((err) => {
|
||||
// messageError($q, err);
|
||||
// })
|
||||
// .finally(() => {
|
||||
// hideLoader();
|
||||
// });
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.orgReport(val) + `/${treeId.value}`)
|
||||
.then(async (res) => {
|
||||
const data = res.data.result;
|
||||
if (data) {
|
||||
await genreport(data, name);
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
}
|
||||
|
||||
const pagination = ref({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue