Ver Fonte

104 总后台系统配置:定时任务中点击任务日志跳转后顶部菜单及系统图标问题

Long há 3 dias atrás
pai
commit
181861fce2
2 ficheiros alterados com 9 adições e 4 exclusões
  1. 7 3
      src/views/monitor/job/index.vue
  2. 2 1
      src/views/monitor/job/log.vue

+ 7 - 3
src/views/monitor/job/index.vue

@@ -341,10 +341,14 @@ export default {
     },
     },
     handleShowCron() { this.expression = this.form.cronExpression; this.openCron = true; },
     handleShowCron() { this.expression = this.form.cronExpression; this.openCron = true; },
     crontabFill(value) { this.form.cronExpression = value; },
     crontabFill(value) { this.form.cronExpression = value; },
-    handleJobLog() { this.$router.push({ path: '/jobLog' }); },
-    // 表格行内“日志”按钮:跳转日志页并预填任务名称,便于快速查看该模板在各租户的执行记录(再在日志页选择租户)
+    handleJobLog() {
+      const logPath = this.$route.path.startsWith('/admin/') ? '/admin/shezhi/jobLog' : '/monitor/jobLog';
+      this.$router.push({ path: logPath });
+    },
+    // 表格行内"日志"按钮:跳转日志页并预填任务名称,便于快速查看该模板在各租户的执行记录(再在日志页选择租户)
     handleRowJobLog(row) {
     handleRowJobLog(row) {
-      this.$router.push({ path: '/jobLog', query: { jobName: row.jobName } });
+      const logPath = this.$route.path.startsWith('/admin/') ? '/admin/shezhi/jobLog' : '/monitor/jobLog';
+      this.$router.push({ path: logPath, query: { jobName: row.jobName } });
     },
     },
     // Bean 注册表
     // Bean 注册表
     handleTaskRegistry() { this.openRegistry = true; },
     handleTaskRegistry() { this.openRegistry = true; },

+ 2 - 1
src/views/monitor/job/log.vue

@@ -289,7 +289,8 @@ export default {
     // 返回按钮
     // 返回按钮
     handleClose() {
     handleClose() {
       this.$store.dispatch("tagsView/delView", this.$route);
       this.$store.dispatch("tagsView/delView", this.$route);
-      this.$router.push({ path: "/job" });
+      const backPath = this.$route.path.startsWith('/admin/') ? '/admin/shezhi/job' : '/monitor/job';
+      this.$router.push({ path: backPath });
     },
     },
     /** 搜索按钮操作 */
     /** 搜索按钮操作 */
     handleQuery() {
     handleQuery() {