From d8f8b0c1778ae03f1cbebfbe1f2f6afc90375bd1 Mon Sep 17 00:00:00 2001 From: "WIN-JHFT4D3SIVT\\caoxiaozhu" Date: Sat, 11 Apr 2026 08:48:53 +0800 Subject: [PATCH] feat(frontend): update schedule center and war room pages Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus --- .../composables/useScheduleCenterPage.ts | 29 ++++++++++- frontend/src/pages/schedule-center/index.vue | 31 +++++++++++- frontend/src/pages/war-room/index.vue | 49 ++----------------- 3 files changed, 61 insertions(+), 48 deletions(-) diff --git a/frontend/src/pages/schedule-center/composables/useScheduleCenterPage.ts b/frontend/src/pages/schedule-center/composables/useScheduleCenterPage.ts index a28252f..4b924d2 100644 --- a/frontend/src/pages/schedule-center/composables/useScheduleCenterPage.ts +++ b/frontend/src/pages/schedule-center/composables/useScheduleCenterPage.ts @@ -4,7 +4,7 @@ import { animate } from 'motion' import { goalApi, type Goal } from '@/api/goal' import { reminderApi, type Reminder } from '@/api/reminder' import { scheduleCenterApi, type ScheduleCenterDateResponse, type ScheduleCenterDaySummary } from '@/api/scheduleCenter' -import { taskApi, type Task, type TaskPriority, type TaskStatus } from '@/api/task' +import { taskApi, type Task, type TaskAssigneeType, type TaskPriority, type TaskQuadrant, type TaskStatus } from '@/api/task' import { todoApi, type Todo } from '@/api/todo' type TimelineItem = @@ -28,7 +28,12 @@ export function useScheduleCenterPage() { const newTodoTitle = ref('') const newTaskTitle = ref('') + const newTaskDescription = ref('') const newTaskPriority = ref('medium') + const newTaskQuadrant = ref('not-urgent-important') + const newTaskAssigneeType = ref('commander') + const newTaskAssigneeId = ref('') + const newTaskDispatchToCommander = ref(false) const newReminderTitle = ref('') const newReminderTime = ref('09:00') const newGoalTitle = ref('') @@ -319,9 +324,24 @@ export function useScheduleCenterPage() { async function addTask() { if (!newTaskTitle.value.trim()) return try { - await taskApi.create({ title: newTaskTitle.value.trim(), priority: newTaskPriority.value, due_date: `${selectedDate.value}T09:00:00Z` }) + await taskApi.create({ + title: newTaskTitle.value.trim(), + description: newTaskDescription.value.trim() || undefined, + priority: newTaskPriority.value, + quadrant: newTaskQuadrant.value, + assignee_type: newTaskAssigneeType.value || undefined, + assignee_id: newTaskAssigneeId.value.trim() || undefined, + due_date: `${selectedDate.value}T09:00:00Z`, + source: 'schedule_center', + dispatch_to_commander: newTaskDispatchToCommander.value, + }) newTaskTitle.value = '' + newTaskDescription.value = '' newTaskPriority.value = 'medium' + newTaskQuadrant.value = 'not-urgent-important' + newTaskAssigneeType.value = 'commander' + newTaskAssigneeId.value = '' + newTaskDispatchToCommander.value = false await Promise.all([loadDateDetail(), loadMonth()]) } catch (error) { console.error('新增任务失败', error) @@ -506,7 +526,12 @@ export function useScheduleCenterPage() { loadingDetail, newTodoTitle, newTaskTitle, + newTaskDescription, newTaskPriority, + newTaskQuadrant, + newTaskAssigneeType, + newTaskAssigneeId, + newTaskDispatchToCommander, newReminderTitle, newReminderTime, newGoalTitle, diff --git a/frontend/src/pages/schedule-center/index.vue b/frontend/src/pages/schedule-center/index.vue index baab76f..6a84cf2 100644 --- a/frontend/src/pages/schedule-center/index.vue +++ b/frontend/src/pages/schedule-center/index.vue @@ -10,7 +10,12 @@ const { loadingDetail, newTodoTitle, newTaskTitle, + newTaskDescription, newTaskPriority, + newTaskQuadrant, + newTaskAssigneeType, + newTaskAssigneeId, + newTaskDispatchToCommander, newReminderTitle, newReminderTime, newGoalTitle, @@ -100,7 +105,6 @@ const { {{ day.dayNumber }} {{ day.risk }} -
{{ day.state }}
{{ bar.key }} @@ -187,6 +191,31 @@ const {
+
+ +
+
+ + + +
+
diff --git a/frontend/src/pages/war-room/index.vue b/frontend/src/pages/war-room/index.vue index 7bf25b8..9312606 100644 --- a/frontend/src/pages/war-room/index.vue +++ b/frontend/src/pages/war-room/index.vue @@ -1,56 +1,15 @@ \ No newline at end of file +