From 48abf71b290f13fbdd80786dbefca7f55dbb7a23 Mon Sep 17 00:00:00 2001 From: zhengkunwang <31820853+zhengkunwang223@users.noreply.github.com> Date: Wed, 19 Feb 2025 18:16:35 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20Fixed=20the=20issue=20with=20incorrect?= =?UTF-8?q?=20routing=20for=20quick=20jump=20during=20app=E2=80=A6=20(#791?= =?UTF-8?q?6)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- agent/app/service/file.go | 2 +- frontend/src/routers/index.ts | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/agent/app/service/file.go b/agent/app/service/file.go index b0c954189..a41ebc919 100644 --- a/agent/app/service/file.go +++ b/agent/app/service/file.go @@ -466,7 +466,7 @@ func (f *FileService) ReadLogByLine(req request.FileReadByLineReq) (*response.Fi if req.TaskID != "" { opts = append(opts, taskRepo.WithByID(req.TaskID)) } else { - opts = append(opts, repo.WithByType(req.TaskType), taskRepo.WithOperate(req.TaskOperate), taskRepo.WithResourceID(req.ID)) + opts = append(opts, repo.WithByType(req.TaskType), taskRepo.WithOperate(req.TaskOperate), taskRepo.WithResourceID(req.ResourceID)) } taskModel, err := taskRepo.GetFirst(opts...) if err != nil { diff --git a/frontend/src/routers/index.ts b/frontend/src/routers/index.ts index 50daaca18..e93449a9e 100644 --- a/frontend/src/routers/index.ts +++ b/frontend/src/routers/index.ts @@ -39,9 +39,12 @@ router.beforeEach((to, from, next) => { return; } + if (to.path === '/apps/all' && to.query.install != undefined) { + return next(); + } + const activeMenuKey = 'cachedRoute' + (to.meta.activeMenu || ''); const cachedRoute = localStorage.getItem(activeMenuKey); - if ( to.meta.activeMenu && to.meta.activeMenu != from.meta.activeMenu &&