diff --git a/src/api/types.ts b/src/api/types.ts index 83336ab3..1c1984a2 100644 --- a/src/api/types.ts +++ b/src/api/types.ts @@ -1261,3 +1261,45 @@ export interface SiteCategory { cat: string desc: string } + +// 动作 +export interface Action { + // 动作ID (类名) + id?: string; + // 动作名称 + name?: string; + // 动作描述 + description?: string; + // 是否需要循环 + loop?: boolean; + // 循环间隔 (秒) + loop_interval?: number; + // 参数 + params?: { [key: string]: any }; +} + +// 工作流 +export interface Workflow { + // 工作流ID + id?: string; + // 工作流名称 + name?: string; + // 工作流描述 + description?: string; + // 定时器 + timer?: string; + // 状态 + state?: string; + // 当前执行动作 + current_action?: string; + // 任务执行结果 + result?: string; + // 已执行次数 + run_count?: number; + // 动作列表 + actions?: Action[]; + // 创建时间 + add_time?: string; + // 最后执行时间 + last_time?: string; +} diff --git a/src/pages/workflow.vue b/src/pages/workflow.vue new file mode 100644 index 00000000..db70166f --- /dev/null +++ b/src/pages/workflow.vue @@ -0,0 +1,7 @@ + + + diff --git a/src/router/index.ts b/src/router/index.ts index b1f8860d..57dbfe50 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -68,6 +68,14 @@ const router = createRouter({ subType: '电视剧', }, }, + { + path: '/workflow', + component: () => import('../pages/workflow.vue'), + meta: { + keepAlive: true, + requiresAuth: true, + }, + }, { path: '/calendar', component: () => import('../pages/calendar.vue'), diff --git a/src/router/menu.ts b/src/router/menu.ts index e92505f0..dc28886c 100644 --- a/src/router/menu.ts +++ b/src/router/menu.ts @@ -49,6 +49,16 @@ export const SystemNavMenus = [ admin: false, footer: true, }, + + { + title: '工作流', + full_title: '自定义工作流', + icon: 'mdi-state-machine', + to: '/workflow', + header: '订阅', + admin: false, + footer: false, + }, { title: '日历', full_title: '订阅日历', diff --git a/src/views/workflow/WorkflowListView.vue b/src/views/workflow/WorkflowListView.vue new file mode 100644 index 00000000..92fbedc3 --- /dev/null +++ b/src/views/workflow/WorkflowListView.vue @@ -0,0 +1,150 @@ + + +