From 5b7d906d44b05dfb104acf2784dcd611d7c69251 Mon Sep 17 00:00:00 2001 From: caoqianming Date: Tue, 11 Feb 2025 17:16:57 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E9=83=A8=E5=88=86=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/router/index.js | 10 +++-- src/views/sys/dept.vue | 2 +- src/views/sys/dict.vue | 4 +- src/views/sys/task.vue | 22 +++++----- src/views/sys/taskLogs.vue | 86 +++++--------------------------------- 5 files changed, 31 insertions(+), 93 deletions(-) diff --git a/src/router/index.js b/src/router/index.js index cae63e54..72dea5be 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -84,12 +84,14 @@ router.beforeEach(async (to, from, next) => { router.addRoute("layout", item) }); routes_404_r = router.addRoute(routes_404); - if (to.matched.length == 0) { - router.push(to.fullPath); - } isGetRouter = true; + next({ ...to, replace: true }); // 重新触发导航 + return; }catch (e) { - + isGetRouter = false; + console.error('路由加载失败:', e); + next('/login'); + return; } } diff --git a/src/views/sys/dept.vue b/src/views/sys/dept.vue index 05512c0d..9d9f9874 100644 --- a/src/views/sys/dept.vue +++ b/src/views/sys/dept.vue @@ -66,6 +66,7 @@ > diff --git a/src/views/sys/dict.vue b/src/views/sys/dict.vue index 1d4e8aad..349d3120 100644 --- a/src/views/sys/dict.vue +++ b/src/views/sys/dict.vue @@ -24,7 +24,7 @@ - 字典分类 + 字典分类 @@ -36,7 +36,7 @@ - + diff --git a/src/views/sys/task.vue b/src/views/sys/task.vue index 9d0f7b52..b30fd333 100644 --- a/src/views/sys/task.vue +++ b/src/views/sys/task.vue @@ -16,22 +16,22 @@
- 启用 - 停用 + 启用 + 停用
- + @@ -40,7 +40,7 @@ - +

添加计划任务

@@ -77,8 +77,8 @@ - - + + @@ -118,6 +118,7 @@ visible: false, isSaving: false, logsVisible: false, + ptask: "" } }, mounted() { @@ -180,7 +181,8 @@ //取消 }) }, - logs(){ + logs(item){ + this.ptask = item; this.logsVisible = true }, run(task){ diff --git a/src/views/sys/taskLogs.vue b/src/views/sys/taskLogs.vue index fe435dd7..73ca9733 100644 --- a/src/views/sys/taskLogs.vue +++ b/src/views/sys/taskLogs.vue @@ -1,96 +1,30 @@