feat(alarms): 完成 M06 报警中心与人工处理

落地正式异常创建/合并、三状态人工处置与控制台,关闭 M06 DONE_LOCAL(含 D40 认领文案「处理」)。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
unknownandCursor committed 2026-11-19 15:27:06 +08:00
1 parent df991417d7
commit 47d3b85a4b
88 files changed
+12658 -30

No files matched your search

+21
View File
@@ -0,0 +1,21 @@
/**
* Alarm timestamps for tables. Empty or invalid values stay blank.
* Boundary: display only. It does not parse filter input.
* Depends on the browser time zone.
*/
function pad(value: number): string {
return String(value).padStart(2, "0");
}
/** "2026-11-17 09:12" in the browser's time zone, or "" when unset or invalid. */
export function formatDateTime(iso: string | null | undefined): string {
if (!iso) {
return "";
}
const date = new Date(iso);
if (Number.isNaN(date.getTime())) {
return "";
}
return `${date.getFullYear()}-${pad(date.getMonth() + 1)}-${pad(date.getDate())} ${pad(date.getHours())}:${pad(date.getMinutes())}`;
}