Merge branch 'develop' into devTee
This commit is contained in:
commit
e6ee9efded
3 changed files with 14 additions and 21 deletions
|
|
@ -42,7 +42,7 @@ const modalPopupBackToEdit = ref<boolean>(false); //model แก้ไข
|
|||
|
||||
/** function เรียกรอบการเสนอขอพระราชทานเครื่อง*/
|
||||
async function fecthlistRound() {
|
||||
showLoader();
|
||||
// showLoader();
|
||||
await http
|
||||
.get(config.API.listRoundInsignia())
|
||||
.then(async (res: any) => {
|
||||
|
|
@ -68,15 +68,12 @@ async function fecthlistRound() {
|
|||
})
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
// hideLoader();
|
||||
});
|
||||
}
|
||||
|
||||
/** function เรียกดู Stat ของรอบการเสนอขอพระราชทานเครื่อง*/
|
||||
const fecthStat = async (id: string) => {
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.insigniaDashboard(id))
|
||||
.then((res) => {
|
||||
|
|
@ -84,9 +81,6 @@ const fecthStat = async (id: string) => {
|
|||
})
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -133,14 +127,10 @@ function fetchListOrg(id: string) {
|
|||
})
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**function เรียกประเภทเครื่องราช*/
|
||||
async function fecthInsignia() {
|
||||
await http
|
||||
|
|
@ -235,8 +225,8 @@ async function sendToDirector() {
|
|||
messageError($q, err);
|
||||
})
|
||||
.finally(async () => {
|
||||
await hideLoader();
|
||||
await fecthStat(round.value);
|
||||
await hideLoader();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -219,6 +219,7 @@ function fetchTree(id: string) {
|
|||
.then((res) => {
|
||||
const data = res.data.result;
|
||||
node.value = data;
|
||||
fetchListProject();
|
||||
})
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
|
|
@ -267,7 +268,6 @@ watch(
|
|||
/** ดึงข้อมูลเมื่อโหลดหน้าเสร็จสิ้น */
|
||||
onMounted(() => {
|
||||
fetchActive();
|
||||
fetchListProject();
|
||||
});
|
||||
</script>
|
||||
|
||||
|
|
|
|||
|
|
@ -477,14 +477,17 @@ watch(
|
|||
|
||||
const handleButtonClick = () => {
|
||||
const currentPath = route.name;
|
||||
// const popupPath =
|
||||
// config.manualConfig[currentPath as keyof typeof config.manualConfig];
|
||||
const popupPath = config.generatePopupPath(currentPath);
|
||||
if (popupPath) {
|
||||
// console.log(currentPath);
|
||||
window.open(popupPath);
|
||||
const queryParams = { role: "officer" }; // Replace with your query parameters
|
||||
const queryString = new URLSearchParams(queryParams).toString();
|
||||
|
||||
// Assuming config.generatePopupPath() returns a base URL
|
||||
const popupBasePath = config.generatePopupPath(currentPath);
|
||||
|
||||
if (popupBasePath) {
|
||||
const popupPath = `${popupBasePath}?${queryString}`;
|
||||
window.open(popupPath, "_blank"); // Opens in a new tab/window
|
||||
} else {
|
||||
console.log("no manual in this page ", currentPath);
|
||||
console.log("No manual available for this page:", currentPath);
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue