fix: 统一详情页返回上级列表

- 修正管理端插件、工作流与系统详情页返回目标

- 修正用户中心执行记录与助手详情返回目标

- 保留审批页签及关联资源筛选上下文
This commit is contained in:
2026-07-28 12:23:36 +08:00
parent 1404c2ddc5
commit dc35ddc3e4
14 changed files with 144 additions and 11 deletions

View File

@@ -112,6 +112,23 @@ async function loadDetail() {
}
}
function backToApprovalList() {
const tab = String(route.query.tab || '');
if (
tab === 'flow' ||
tab === 'pending' ||
tab === 'processed' ||
tab === 'initiated'
) {
void router.replace({
path: '/sys/approval',
query: { tab },
});
return;
}
void router.replace({ path: '/sys/approval' });
}
async function submitApprovalAction(action: 'approve' | 'reject' | 'revoke') {
if (approvalActionLoading.value) {
return;
@@ -246,7 +263,7 @@ function formatEventInfo(row: Record<string, any>) {
<div class="flex h-full flex-col gap-4 p-6" v-loading="loading">
<div class="flex flex-wrap items-center justify-between gap-3">
<div class="flex items-center gap-3">
<ElButton :icon="ArrowLeft" @click="router.back()">
<ElButton :icon="ArrowLeft" @click="backToApprovalList">
{{ $t('button.back') }}
</ElButton>
<div class="flex items-center gap-2 text-lg font-semibold">

View File

@@ -466,7 +466,12 @@ function canSubmitApprovalAction(
}
function openInstanceDetail(row: any) {
router.push(`/sys/approval/detail/${row.id}`);
router.push({
path: `/sys/approval/detail/${row.id}`,
query: {
tab: activeTab.value,
},
});
}
function getFlowStatusType(status: string) {

View File

@@ -102,7 +102,7 @@ async function markStatus(_status: number) {
<ElButton
class="absolute left-5 top-5"
:icon="ArrowLeft"
@click="router.back()"
@click="router.replace({ path: '/sys/sysFeedback' })"
>
{{ $t('button.back') }}
</ElButton>

View File

@@ -48,7 +48,10 @@ function reset(formEl: FormInstance | undefined) {
<template>
<div class="page-container">
<div class="mb-3">
<ElButton :icon="ArrowLeft" @click="router.back()">
<ElButton
:icon="ArrowLeft"
@click="router.replace({ path: '/sys/sysJob' })"
>
{{ $t('button.back') }}
</ElButton>
</div>