From 4b769ed187f8296120f9cb03299583fe2e89ffe1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E8=9A=82=E8=9A=81=E4=BA=91?= Date: Sat, 12 Sep 2026 19:19:53 +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 --- .gitignore | 1 - 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 +++ 5 files changed, 400 insertions(+), 1 deletion(-) 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/.gitignore b/.gitignore index e1abe4a..b71c9fe 100644 --- a/.gitignore +++ b/.gitignore @@ -9,7 +9,6 @@ .vscode/ vender/ # 业务模块 log 目录(src/modules/log)须入库,特例排除 -log/ !src/modules/log/ composer.lock gitpush.sh 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, + }, + ], + }, + }, +];