端上:#47~#55 打包 —— 行程双轨、动态类型、表单全局规范 (#53)

#48 计划/实际双轨:nodeAction(start/done/cancel),完成即转实际行程,
    实际行程不再显示状态;新增 actualStartedAt/actualEndedAt
#49 类型/出行方式/车辆 chip 改内部读状态(@Builder 值传参不刷新)
#50 类型点击立即变色、出行方式平铺、参与人显示已选头像
#51 节点类型动态加载(原硬编码5种)、地址 onPick 拿详细地址与坐标
#52 标签改主题色 Bold、必填红无星号、编辑行程标题同步
#53 表单两排版式(标签独占一行解决左右对不齐);电影弹层 layoutWeight 修滚动
#54 地址联想框加时间窗抑制(600ms 内不搜)、候选限高 180

含附件回填诊断日志(DIAG-ATTACH/FILL),待真机确认后移除
This commit is contained in:
2026-11-05 12:41:04 +08:00
parent 88fa38ecf9
commit 86de59616c
35 changed files with 5818 additions and 911 deletions
+14 -4
View File
@@ -71,6 +71,7 @@ import { fbOnScroll, fbOnTouch } from '../../common/FbScroll';
import { fbMaskTransition, fbSheetTransition } from '../../common/FbAnim';
import { FB_BACK } from '../../common/FbBack';
import { fbOpenNavigation } from '../../common/FbNav';
import { FbDiag } from '../../common/FbDiag';
import { fbModuleOf, FbModuleDef, fbThemeVars } from '../../model/Modules';
/** 日志域(与 `FbBackgroundSync` / `FbNav` 同一个值,端上统一 0x0000) */
@@ -208,6 +209,8 @@ export struct FbHomePage {
@Local tskEditBoardId: number = 0;
@Local tskEditCatId: number = 0;
@Local tskEditRepeat: string = '';
/** 编辑时的原状态(todo/doing/done) */
@Local tskEditStatus: string = 'todo';
/**
* 面板的"重画脉冲"(v79)。
*
@@ -284,6 +287,9 @@ export struct FbHomePage {
}
aboutToAppear(): void {
/* 诊断设施在这里初始化:地址联想发生在编辑弹窗里,
那时用户可能还没点过导航 ⇒ 不能等导航时才 init。 */
FbDiag.init(this.getUIContext().getHostContext());
// 显示方式来自日程设置(启动时已预载进内存,可同步读)
this.calStyle = FB_CAL_SETTINGS.getStyle();
/* 🔴 v73:**首页也要登记返回手势**。
@@ -486,6 +492,7 @@ export struct FbHomePage {
/* ⚠️ `fbOpenNavigation` 现在是 async(内部要 await 地理编码),
不接住 rejection 会报未处理异常。这里明确咽掉并提示 ——
导航失败不该把页面弄崩。 */
FbDiag.init(ctx);
fbOpenNavigation(ctx, place, title).catch((err: Error): void => {
hilog.warn(0x0000, 'FbNav', '导航调用异常:%{public}s', JSON.stringify(err));
});
@@ -554,6 +561,7 @@ export struct FbHomePage {
this.tskEditBoardId = d.base.boardId;
this.tskEditCatId = d.categoryId;
this.tskEditRepeat = d.repeat;
this.tskEditStatus = d.base.status !== '' ? d.base.status : 'todo';
this.tskEditOpen = true;
}
@@ -582,6 +590,7 @@ export struct FbHomePage {
this.tskEditBoardId = 0;
this.tskEditCatId = 0;
this.tskEditRepeat = '';
this.tskEditStatus = 'todo';
await this.loadTaskMeta();
this.tskEditOpen = true;
}
@@ -1123,7 +1132,7 @@ export struct FbHomePage {
Row() {
FbStatCell({ value: this.statToday, label: '今天日程' })
FbStatCell({ value: this.statDoing, label: '在做' })
FbStatCell({ value: this.statTodo, label: '待办' })
FbStatCell({ value: this.statTodo, label: '任务' })
FbStatCell({ value: this.statOverdue, label: '逾期', alarm: true })
}
.width('100%')
@@ -1198,7 +1207,7 @@ export struct FbHomePage {
Column({ space: 0 }) {
if (this.tasks.length === 0) {
Row() {
Text('没有进行中的任务,也没有待办。')
Text('没有进行中的任务,也没有待做的任务。')
.fontSize(FbMetric.fontSmall)
.fontColor(FbColors.muted)
}
@@ -1628,6 +1637,7 @@ export struct FbHomePage {
editingBoardId: this.tskEditBoardId,
editingCatId: this.tskEditCatId,
editingRepeat: this.tskEditRepeat,
editingStatus: this.tskEditStatus,
onClose: (): void => {
this.tskEditOpen = false;
},
@@ -1783,7 +1793,7 @@ export struct FbHomePage {
}
}
if (todo > 0) {
return doing.toString() + ' 件在做 · ' + todo.toString() + ' 件待办';
return doing.toString() + ' 件在做 · ' + todo.toString() + ' 件待做';
}
return doing.toString() + ' 件在做';
}
@@ -1825,7 +1835,7 @@ export struct FbHomePage {
.textOverflow({ overflow: TextOverflow.Ellipsis })
// 状态词(待办 / 进行中)—— 用户第 3 条要求
Text(t.status === 'doing' ? '进行中' : '待办')
Text(t.status === 'doing' ? '进行中' : '待做')
.fontSize(10)
.fontColor(t.status === 'doing' ? '#A8574F' : FbColors.faint)
.backgroundColor(t.status === 'doing' ? '#14A8574F' : FbColors.inputBg)