style(fe): 计划页只留日历和当天安排

去掉完成度卡和完整路线图。这页的用途是「排/看某一天要做什么」,
完成度是个统计(报告页的活),完整路线图和日历在说同一件事、
只是换了个排法——两张卡加起来把日历挤到了第二屏。

跟着清掉 doneCount / allOpen / toggleAll / dateLabel 和一个没人绑的 openSheet
(路线图里的 pk-body 原来绑它,现在那块没了)。

一个前提确认过:删掉路线图不会让节点变孤儿。模板从计划开始日生成 day 0-30,
正好落在本月和下月,两个月都能从日历翻到。只有很旧的计划(开始日在上个月之前)
会有节点翻不到,那些已经是过去的事。

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Blizzard
2026-07-30 11:12:46 +08:00
parent 9b30bfaaff
commit 2aaae2b917
2 changed files with 1 additions and 41 deletions
+1 -12
View File
@@ -50,7 +50,6 @@ Page({
data: {
pet: {},
plan: null,
doneCount: 0,
cells: [],
monthOff: 0,
monthLabel: '',
@@ -61,7 +60,6 @@ Page({
selDate: '',
selLabel: '',
dayTasks: [],
allOpen: false,
editShow: false,
editId: '',
form: { title: '', date: '', description: '', daily: false },
@@ -97,7 +95,7 @@ Page({
.catch(() => this.setData({ plan: null, cells: [], dayTasks: [] }));
},
apply(plan) {
const tasks = (plan.tasks || []).map((t) => ({ ...t, dateLabel: fmtMD(t.date) }));
const tasks = plan.tasks || [];
const byDate = {};
tasks.forEach((t) => {
if (!t.date) return;
@@ -106,7 +104,6 @@ Page({
this._byDate = byDate;
this.setData({
plan: { ...plan, tasks },
doneCount: tasks.filter((t) => t.done).length,
// 能排的区间:不早于计划开始日,不晚于下月月底。和后端 dayOffset 的校验一致
pickStart: (plan.start_date || '').slice(0, 10),
pickEnd: monthEnd(1),
@@ -151,9 +148,6 @@ Page({
if (d) this.selectDay(d);
},
toggleAll() {
this.setData({ allOpen: !this.data.allOpen });
},
toggleTask(e) {
api
.togglePlanTask(e.currentTarget.dataset.id)
@@ -230,11 +224,6 @@ Page({
});
},
openSheet(e) {
const type = e.currentTarget.dataset.type;
if (!type) return;
this.setData({ sheetType: type, sheetShow: true });
},
closeSheet() {
this.setData({ sheetShow: false });
},