From 8578d1164e07d49ea0d93144c2c0e3722b294b10 Mon Sep 17 00:00:00 2001 From: lzq <2495532633@qq.com> Date: Tue, 23 Dec 2025 18:40:58 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AD=97=E5=85=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/common/utils/evt.ts | 2 +- src/components/data-list/DataList.vue | 83 ---------- src/components/data-list/data-list.ts | 31 ---- src/dts/components.d.ts | 9 +- src/pages/sys/task/TaskForm.vue | 14 +- src/pages/sys/task/cron/Cron.vue | 39 +++++ .../sys/task/cron/cron-panel/CronPanel.vue | 83 ++++++++++ .../sys/task/cron/cron-panel/DayPanel.vue | 153 ++++++++++++++++++ .../sys/task/cron/cron-panel/HourPanel.vue | 129 +++++++++++++++ .../sys/task/cron/cron-panel/MinutePanel.vue | 130 +++++++++++++++ .../sys/task/cron/cron-panel/MonthPanel.vue | 135 ++++++++++++++++ .../sys/task/cron/cron-panel/SecondPanel.vue | 129 +++++++++++++++ .../sys/task/cron/cron-panel/WeekPanel.vue | 148 +++++++++++++++++ .../sys/task/cron/cron-panel/YearPanel.vue | 103 ++++++++++++ 14 files changed, 1070 insertions(+), 118 deletions(-) delete mode 100644 src/components/data-list/DataList.vue delete mode 100644 src/components/data-list/data-list.ts create mode 100644 src/pages/sys/task/cron/Cron.vue create mode 100644 src/pages/sys/task/cron/cron-panel/CronPanel.vue create mode 100644 src/pages/sys/task/cron/cron-panel/DayPanel.vue create mode 100644 src/pages/sys/task/cron/cron-panel/HourPanel.vue create mode 100644 src/pages/sys/task/cron/cron-panel/MinutePanel.vue create mode 100644 src/pages/sys/task/cron/cron-panel/MonthPanel.vue create mode 100644 src/pages/sys/task/cron/cron-panel/SecondPanel.vue create mode 100644 src/pages/sys/task/cron/cron-panel/WeekPanel.vue create mode 100644 src/pages/sys/task/cron/cron-panel/YearPanel.vue diff --git a/src/common/utils/evt.ts b/src/common/utils/evt.ts index b2aeafe..619b12d 100644 --- a/src/common/utils/evt.ts +++ b/src/common/utils/evt.ts @@ -1,6 +1,6 @@ import mitt, { type EventType } from 'mitt' -interface EventList extends Record { +export interface EventList extends Record { login?: string logout?: string connect_ws?: string diff --git a/src/components/data-list/DataList.vue b/src/components/data-list/DataList.vue deleted file mode 100644 index 9d09059..0000000 --- a/src/components/data-list/DataList.vue +++ /dev/null @@ -1,83 +0,0 @@ - - - - - diff --git a/src/components/data-list/data-list.ts b/src/components/data-list/data-list.ts deleted file mode 100644 index 337840a..0000000 --- a/src/components/data-list/data-list.ts +++ /dev/null @@ -1,31 +0,0 @@ -import type { R } from '@/common/utils/http-util.ts' - -/* export interface SearchForm extends Record { - keywords?: string - } - - export interface AddForm extends Record { - } - - export interface ModifyForm extends Record { - id: string - } - - export interface Data extends Record { - id: string - } */ - -export interface DataSource, S extends G.PageParam> { - paging: (searchForm: S) => Promise> - del: (ids: string[]) => Promise - detail: (id: string) => Promise> - add: (addForm: Record) => Promise - modify: (modifyForm: Record) => Promise - treeLoad?: (row: D, treeNode: unknown, resolve: (data: D[]) => void) => void -} - -export interface Column { - prop: string - label: string - width?: string -} diff --git a/src/dts/components.d.ts b/src/dts/components.d.ts index 2ebc0f1..7d80095 100644 --- a/src/dts/components.d.ts +++ b/src/dts/components.d.ts @@ -5,7 +5,6 @@ // ------ // Generated by unplugin-vue-components // Read more: https://github.com/vuejs/core/pull/3399 -import { GlobalComponents } from 'vue' export {} @@ -33,6 +32,7 @@ declare module 'vue' { ElHeader: typeof import('element-plus/es')['ElHeader'] ElIcon: typeof import('element-plus/es')['ElIcon'] ElIconPicture: typeof import('@element-plus/icons-vue')['Picture'] + ElIconTimer: typeof import('@element-plus/icons-vue')['Timer'] ElImage: typeof import('element-plus/es')['ElImage'] ElInput: typeof import('element-plus/es')['ElInput'] ElInputNumber: typeof import('element-plus/es')['ElInputNumber'] @@ -40,6 +40,8 @@ declare module 'vue' { ElOption: typeof import('element-plus/es')['ElOption'] ElPagination: typeof import('element-plus/es')['ElPagination'] ElPopconfirm: typeof import('element-plus/es')['ElPopconfirm'] + ElRadio: typeof import('element-plus/es')['ElRadio'] + ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup'] ElSelect: typeof import('element-plus/es')['ElSelect'] ElSwitch: typeof import('element-plus/es')['ElSwitch'] ElTable: typeof import('element-plus/es')['ElTable'] @@ -83,6 +85,7 @@ declare global { const ElHeader: typeof import('element-plus/es')['ElHeader'] const ElIcon: typeof import('element-plus/es')['ElIcon'] const ElIconPicture: typeof import('@element-plus/icons-vue')['Picture'] + const ElIconTimer: typeof import('@element-plus/icons-vue')['Timer'] const ElImage: typeof import('element-plus/es')['ElImage'] const ElInput: typeof import('element-plus/es')['ElInput'] const ElInputNumber: typeof import('element-plus/es')['ElInputNumber'] @@ -90,6 +93,8 @@ declare global { const ElOption: typeof import('element-plus/es')['ElOption'] const ElPagination: typeof import('element-plus/es')['ElPagination'] const ElPopconfirm: typeof import('element-plus/es')['ElPopconfirm'] + const ElRadio: typeof import('element-plus/es')['ElRadio'] + const ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup'] const ElSelect: typeof import('element-plus/es')['ElSelect'] const ElSwitch: typeof import('element-plus/es')['ElSwitch'] const ElTable: typeof import('element-plus/es')['ElTable'] @@ -104,4 +109,4 @@ declare global { const ElUpload: typeof import('element-plus/es')['ElUpload'] const RouterLink: typeof import('vue-router')['RouterLink'] const RouterView: typeof import('vue-router')['RouterView'] -} \ No newline at end of file +} diff --git a/src/pages/sys/task/TaskForm.vue b/src/pages/sys/task/TaskForm.vue index 29be73d..5ba4460 100644 --- a/src/pages/sys/task/TaskForm.vue +++ b/src/pages/sys/task/TaskForm.vue @@ -22,7 +22,17 @@ - + + @@ -41,6 +51,7 @@ import TaskApi from '@/pages/sys/task/task-api.ts' import Strings from '@/common/utils/strings.ts' import { ElMessage } from 'element-plus' +import Cron from '@/pages/sys/task/cron/Cron.vue' const emits = defineEmits([ 'editSucc' ]) const scheduleTypeList = [ @@ -104,6 +115,7 @@ defineExpose({ }) } else { status.value = 'add' + data.scheduleConf = '* * * * * ? ?' taskFormData.value = data // taskFormData = {} // for (const key in taskFormData) { diff --git a/src/pages/sys/task/cron/Cron.vue b/src/pages/sys/task/cron/Cron.vue new file mode 100644 index 0000000..17dfc43 --- /dev/null +++ b/src/pages/sys/task/cron/Cron.vue @@ -0,0 +1,39 @@ + + + + + diff --git a/src/pages/sys/task/cron/cron-panel/CronPanel.vue b/src/pages/sys/task/cron/cron-panel/CronPanel.vue new file mode 100644 index 0000000..5ea5b39 --- /dev/null +++ b/src/pages/sys/task/cron/cron-panel/CronPanel.vue @@ -0,0 +1,83 @@ + + + + + diff --git a/src/pages/sys/task/cron/cron-panel/DayPanel.vue b/src/pages/sys/task/cron/cron-panel/DayPanel.vue new file mode 100644 index 0000000..7079307 --- /dev/null +++ b/src/pages/sys/task/cron/cron-panel/DayPanel.vue @@ -0,0 +1,153 @@ + + + + + diff --git a/src/pages/sys/task/cron/cron-panel/HourPanel.vue b/src/pages/sys/task/cron/cron-panel/HourPanel.vue new file mode 100644 index 0000000..0dbd51b --- /dev/null +++ b/src/pages/sys/task/cron/cron-panel/HourPanel.vue @@ -0,0 +1,129 @@ + + + + + diff --git a/src/pages/sys/task/cron/cron-panel/MinutePanel.vue b/src/pages/sys/task/cron/cron-panel/MinutePanel.vue new file mode 100644 index 0000000..251bb65 --- /dev/null +++ b/src/pages/sys/task/cron/cron-panel/MinutePanel.vue @@ -0,0 +1,130 @@ + + + + + diff --git a/src/pages/sys/task/cron/cron-panel/MonthPanel.vue b/src/pages/sys/task/cron/cron-panel/MonthPanel.vue new file mode 100644 index 0000000..223924d --- /dev/null +++ b/src/pages/sys/task/cron/cron-panel/MonthPanel.vue @@ -0,0 +1,135 @@ + + + + + diff --git a/src/pages/sys/task/cron/cron-panel/SecondPanel.vue b/src/pages/sys/task/cron/cron-panel/SecondPanel.vue new file mode 100644 index 0000000..c222948 --- /dev/null +++ b/src/pages/sys/task/cron/cron-panel/SecondPanel.vue @@ -0,0 +1,129 @@ + + + + + diff --git a/src/pages/sys/task/cron/cron-panel/WeekPanel.vue b/src/pages/sys/task/cron/cron-panel/WeekPanel.vue new file mode 100644 index 0000000..71afec2 --- /dev/null +++ b/src/pages/sys/task/cron/cron-panel/WeekPanel.vue @@ -0,0 +1,148 @@ + + + + + diff --git a/src/pages/sys/task/cron/cron-panel/YearPanel.vue b/src/pages/sys/task/cron/cron-panel/YearPanel.vue new file mode 100644 index 0000000..86e3c0f --- /dev/null +++ b/src/pages/sys/task/cron/cron-panel/YearPanel.vue @@ -0,0 +1,103 @@ + + + + +