fix: 路由父级的记录改为全局 修复点击选项卡X无法跳转到正确来源的bug

This commit is contained in:
gaoyunqi
2024-04-25 10:43:33 +08:00
parent d6cdb7ee26
commit b58e013957
6 changed files with 15 additions and 13 deletions

View File

@ -82,8 +82,6 @@
const tabStore = useMultipleTabStore();
const router = useRouter();
const currentRoute = router.currentRoute.value;
const parentRoutePath = localStorage.getItem('parentRoutePath');
localStorage.removeItem('parentRoutePath');
const fullPath = currentRoute.fullPath;
const rQuery = currentRoute.query;
const rParams = currentRoute.params;
@ -137,7 +135,7 @@
}
function close() {
tabStore.closeTab(currentRoute, router, parentRoutePath);
tabStore.closeTab(currentRoute, router);
}
async function onApproveClick() {

View File

@ -79,9 +79,7 @@ const { t } = useI18n();
const { data, approveUserData, initProcessData, notificationSuccess, notificationError } = userTaskItem();
const currentRoute = router.currentRoute.value;
const rParams = currentRoute.params;
const fullPath = currentRoute.fullPath;
const parentRoutePath = localStorage.getItem('parentRoutePath');
localStorage.removeItem('parentRoutePath');
const fullPath = currentRoute.fullPath;;
const rSchemaId = rParams.arg1;
const rDraftsId = rParams.arg2;
const taskId = ref();
@ -125,7 +123,7 @@ function openFlowChart() {
}
function close() {
tabStore.closeTab(currentRoute, router, parentRoutePath);
tabStore.closeTab(currentRoute, router);
}
const props = defineProps({

View File

@ -47,8 +47,6 @@ const { currentRoute } = router;
const { formPath } = currentRoute.value.query;
const pathArr = formPath.split('/');
const parentRoutePath = localStorage.getItem('parentRoutePath');
localStorage.removeItem('parentRoutePath');
const tabStore = useMultipleTabStore();
const formProps = ref(null);
@ -93,7 +91,7 @@ async function setFormType() {
}
function close() {
tabStore.closeTab(currentRoute.value, router, parentRoutePath);
tabStore.closeTab(currentRoute.value, router);
}
async function handleSubmit() {