downloadFile จัดการคำขอ

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2023-09-29 09:50:13 +07:00
parent 118156a1f0
commit 2fe87c00c6
2 changed files with 21 additions and 1 deletions

View file

@ -40,6 +40,7 @@ const modalPopupBackToEdit = ref<boolean>(false); //model แก้ไข
onMounted(async () => { onMounted(async () => {
tab.value = DataStore.mainTab; tab.value = DataStore.mainTab;
await fecthlistRound(); await fecthlistRound();
DataStore.dataInsigniaType.length === 0 && (await fecthInsignia());
}); });
// //
@ -123,6 +124,18 @@ const fecthType = async () => {
messageError($q, err); messageError($q, err);
}); });
}; };
//
const fecthInsignia = async () => {
await http
.get(config.API.insignia)
.then((res) => {
let data = res.data.result;
DataStore.fetchInsigniaType(data);
})
.catch((err) => {
messageError($q, err);
});
};
// //
const changround = async () => { const changround = async () => {

View file

@ -37,6 +37,7 @@ export const useInsigniaDataStore = defineStore("insignia", () => {
{ id: '44', title: 'บัญชีแสดงจำนวนชั้นตราเครื่องราชฯ' } { id: '44', title: 'บัญชีแสดงจำนวนชั้นตราเครื่องราชฯ' }
]) ])
const mainTab = ref<string | undefined>("pending"); const mainTab = ref<string | undefined>("pending");
const dataInsigniaType = ref<any>([])
// เรียกราชชื่อการเสนอขอ // เรียกราชชื่อการเสนอขอ
const fetchData = async (data: any) => { const fetchData = async (data: any) => {
if (data !== null) { if (data !== null) {
@ -124,6 +125,10 @@ export const useInsigniaDataStore = defineStore("insignia", () => {
rows.value = listinsignia.value; rows.value = listinsignia.value;
} }
}; };
// ประเภทเครื่องราช
function fetchInsigniaType(data: any) {
dataInsigniaType.value = data
}
// ประเภทลูกจ้าง // ประเภทลูกจ้าง
const profileType = (val: string) => { const profileType = (val: string) => {
@ -167,11 +172,13 @@ export const useInsigniaDataStore = defineStore("insignia", () => {
employeeClass, employeeClass,
employeeClassOps, employeeClassOps,
fetchDataInsignia, fetchDataInsignia,
fetchInsigniaType,
isLock, isLock,
requestId, requestId,
roleUser, roleUser,
requestStatus, requestStatus,
optionReport, optionReport,
convertStatus convertStatus,
dataInsigniaType,
}; };
}); });