From f59150cfc9e7629c6b338dc737db321310f0c8db Mon Sep 17 00:00:00 2001 From: WindowBird <13870814+windows-bird@user.noreply.gitee.com> Date: Wed, 5 Nov 2025 14:18:51 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E8=AF=A6=E6=83=85=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/ContentDashboard.vue | 37 +- components/TodoList.vue | 26 +- pages.json | 7 + pages/task-detail/index.vue | 722 ++++++++++++++++++++++++++++++++ 4 files changed, 781 insertions(+), 11 deletions(-) create mode 100644 pages/task-detail/index.vue diff --git a/components/ContentDashboard.vue b/components/ContentDashboard.vue index 16d28f5..fc60308 100644 --- a/components/ContentDashboard.vue +++ b/components/ContentDashboard.vue @@ -11,7 +11,7 @@ - + 逾期 {{ task.date }} @@ -21,7 +21,7 @@ 发布时间: {{ task.releaseTime }} - + @@ -127,13 +127,30 @@ const customerStatus = ref([ { label: '即将跟进', count: 1 } ]); +// 跳转到任务详情页 +const goToTaskDetail = (task) => { + // 将任务数据存储到本地,供详情页使用 + uni.setStorageSync('taskDetailData', { + id: task.id, + name: task.description || '待办任务名称', + project: task.project || '所属项目', + statusTags: ['已逾期', '紧急'], + deadline: task.date || '2025-10-14 18:00', + creator: '张珊珊', + responsible: task.owner || '张珊珊、李志', + publishTime: task.releaseTime || '2025-10-17', + content: task.description || '任务内容任务。这里是详细的任务描述,可以包含多行文本。根据实际需求,这里可以展示任务的详细要求、步骤说明、注意事项等。任务内容应该清晰明了,便于负责人理解和执行。', + submitRecords: [] + }); + + uni.navigateTo({ + url: `/pages/task-detail/index?id=${task.id}` + }); +}; + // 处理逾期任务 const handleOverdueTask = (task) => { - console.log('处理逾期任务:', task); - uni.showToast({ - title: '跳转到任务处理', - icon: 'none' - }); + goToTaskDetail(task); }; // 查看公告 @@ -199,6 +216,12 @@ const viewAnnouncement = (announcement) => { display: flex; align-items: flex-start; position: relative; + cursor: pointer; + transition: opacity 0.2s; +} + +.overdue-card:active { + opacity: 0.8; } .overdue-badge { diff --git a/components/TodoList.vue b/components/TodoList.vue index 47e9007..9aadd8b 100644 --- a/components/TodoList.vue +++ b/components/TodoList.vue @@ -59,10 +59,22 @@ const toggleTodo = (todo) => { }; const handleTodoClick = (todo) => { - console.log('点击待办:', todo); - uni.showToast({ - title: '查看待办详情', - icon: 'none' + // 将待办数据存储到本地,供详情页使用 + uni.setStorageSync('taskDetailData', { + id: todo.id, + name: todo.title || '待办任务名称', + project: '待办事项', + statusTags: todo.priority === 'high' ? ['紧急'] : todo.priority === 'medium' ? ['重要'] : ['普通'], + deadline: todo.time || '2025-10-14 18:00', + creator: '系统', + responsible: '当前用户', + publishTime: todo.time || '2025-10-17', + content: todo.description || '任务内容任务。这里是详细的任务描述,可以包含多行文本。根据实际需求,这里可以展示任务的详细要求、步骤说明、注意事项等。任务内容应该清晰明了,便于负责人理解和执行。', + submitRecords: [] + }); + + uni.navigateTo({ + url: `/pages/task-detail/index?id=${todo.id}` }); }; @@ -88,6 +100,12 @@ const handleTodoClick = (todo) => { align-items: flex-start; gap: 12px; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06); + transition: opacity 0.2s, transform 0.1s; +} + +.todo-item:active { + opacity: 0.8; + transform: scale(0.98); } .todo-checkbox { diff --git a/pages.json b/pages.json index f83a889..697c408 100644 --- a/pages.json +++ b/pages.json @@ -41,6 +41,13 @@ "navigationBarTitleText": "日程详情", "navigationStyle": "custom" } + }, + { + "path": "pages/task-detail/index", + "style": { + "navigationBarTitleText": "任务详情" + + } } ], diff --git a/pages/task-detail/index.vue b/pages/task-detail/index.vue new file mode 100644 index 0000000..17edb03 --- /dev/null +++ b/pages/task-detail/index.vue @@ -0,0 +1,722 @@ + + + + +