fix(registry): use window.open instead of router.push
This commit is contained in:
parent
6b0d3b9887
commit
4af1421770
4 changed files with 22 additions and 7 deletions
|
|
@ -800,6 +800,19 @@ function openDialogSendTransferResign(
|
|||
: (modalDialogResign.value = true);
|
||||
}
|
||||
|
||||
/** ฟังก์ชันจัดการการกลับหน้า*/
|
||||
function handleBackNavigation() {
|
||||
if (window.history.length > 1) {
|
||||
router.go(-1);
|
||||
} else {
|
||||
if (empType.value === "") {
|
||||
router.push("/registry-officer");
|
||||
} else if (empType.value === "-employee") {
|
||||
router.push("/registry-employee");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
onMounted(async () => {
|
||||
await fetchDataPersonal();
|
||||
});
|
||||
|
|
@ -816,7 +829,7 @@ onMounted(async () => {
|
|||
flat
|
||||
color="primary"
|
||||
class="q-mr-sm"
|
||||
@click="router.go(-1)"
|
||||
@click="handleBackNavigation"
|
||||
/>
|
||||
{{ titleName }}
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue