From 467b98dcca4cfc84da577ea9c5e873ddd20c7867 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E8=9A=82=E8=9A=81=E4=BA=91?= Date: Tue, 20 Oct 2026 19:45:32 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AD=BE=E5=85=A5=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/.env | 11 ++ ui/src/layout/components/Main/index.ts | 3 + ui/src/layout/components/Main/index.vue | 30 +++ ui/src/views/monitor/job/log/columns.ts | 87 +++++++++ ui/src/views/monitor/job/log/edit.vue | 99 ++++++++++ ui/src/views/monitor/job/log/index.vue | 184 +++++++++++++++++++ ui/src/views/monitor/job/log/querySchemas.ts | 30 +++ 7 files changed, 444 insertions(+) create mode 100644 ui/.env create mode 100644 ui/src/layout/components/Main/index.ts create mode 100644 ui/src/layout/components/Main/index.vue create mode 100644 ui/src/views/monitor/job/log/columns.ts create mode 100644 ui/src/views/monitor/job/log/edit.vue create mode 100644 ui/src/views/monitor/job/log/index.vue create mode 100644 ui/src/views/monitor/job/log/querySchemas.ts diff --git a/ui/.env b/ui/.env new file mode 100644 index 0000000..0989ca1 --- /dev/null +++ b/ui/.env @@ -0,0 +1,11 @@ +# port +VITE_PORT = 8002 + +# spa-title +VITE_GLOB_APP_TITLE = GoFrame+AntDesign版 + +# spa shortname (仅允许字母、数字和下划线,不可含+/-/空格等特殊字符) +VITE_GLOB_APP_SHORT_NAME = EasyGoAdmin + +# 生产环境 开启mock +VITE_GLOB_PROD_MOCK = false diff --git a/ui/src/layout/components/Main/index.ts b/ui/src/layout/components/Main/index.ts new file mode 100644 index 0000000..f63218e --- /dev/null +++ b/ui/src/layout/components/Main/index.ts @@ -0,0 +1,3 @@ +import MainView from './index.vue'; + +export { MainView }; diff --git a/ui/src/layout/components/Main/index.vue b/ui/src/layout/components/Main/index.vue new file mode 100644 index 0000000..3eb2843 --- /dev/null +++ b/ui/src/layout/components/Main/index.vue @@ -0,0 +1,30 @@ + + + + + diff --git a/ui/src/views/monitor/job/log/columns.ts b/ui/src/views/monitor/job/log/columns.ts new file mode 100644 index 0000000..e7e2c00 --- /dev/null +++ b/ui/src/views/monitor/job/log/columns.ts @@ -0,0 +1,87 @@ +import { h } from 'vue'; + +export const columns = [ + { + title: 'ID', + dataIndex: 'id', + fixed: 'left', + width: 100, + }, + { + title: '任务名称', + dataIndex: 'jobName', + width: 200, + }, + { + title: '任务组名', + dataIndex: 'jobGroup', + width: 100, + }, + { + title: '任务触发器', + dataIndex: 'jobTrigger', + width: 200, + }, + { + title: '任务日志信息', + dataIndex: 'jobMessage', + width: 300, + }, + { + title: '执行表达式', + dataIndex: 'cronExpression', + width: 150, + }, + { + title: '执行状态', + dataIndex: 'status', + width: 100, + customRender({ record }) { + let typeText = ''; + switch (record.status) { + case 0: + typeText = '未发布'; + break; + case 1: + typeText = '运行中'; + break; + case 2: + typeText = '暂停'; + break; + case 3: + typeText = '删除'; + break; + default: + break; + } + return h('span', typeText || '-'); + }, + }, + { + title: '任务开始时间', + dataIndex: 'startTime', + width: 180, + }, + { + title: '任务结束时间', + dataIndex: 'startTime', + width: 180, + }, + { + title: '任务执行时间', + dataIndex: 'createTime', + width: 180, + }, + { + title: '任务执行耗时', + dataIndex: 'consumeTime', + width: 120, + }, + { + title: '操作', + fixed: 'right', + dataIndex: 'action', + key: 'action', + width: 200, + }, +]; diff --git a/ui/src/views/monitor/job/log/edit.vue b/ui/src/views/monitor/job/log/edit.vue new file mode 100644 index 0000000..edbc229 --- /dev/null +++ b/ui/src/views/monitor/job/log/edit.vue @@ -0,0 +1,99 @@ + + diff --git a/ui/src/views/monitor/job/log/index.vue b/ui/src/views/monitor/job/log/index.vue new file mode 100644 index 0000000..de8de95 --- /dev/null +++ b/ui/src/views/monitor/job/log/index.vue @@ -0,0 +1,184 @@ + + + + + diff --git a/ui/src/views/monitor/job/log/querySchemas.ts b/ui/src/views/monitor/job/log/querySchemas.ts new file mode 100644 index 0000000..19b6e36 --- /dev/null +++ b/ui/src/views/monitor/job/log/querySchemas.ts @@ -0,0 +1,30 @@ +import { FormSchema } from '@/components/Form/index'; +export const schemas: FormSchema[] = [ + { + name: 'jobName', + component: 'Input', + label: '任务名称', + componentProps: { + placeholder: '请输入数据源名称', + }, + }, + { + name: 'status', + component: 'Select', + label: '任务状态', + componentProps: { + placeholder: '请选择任务状态', + clearable: true, + options: [ + { + label: '正常', + value: 0, + }, + { + label: '失败', + value: 1, + }, + ], + }, + }, +];