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, + }, + ], + }, + }, +];