每日计划:旧时间缺失时区时显示未知来源

This commit is contained in:
baobao 2026-10-15 10:31:48 +08:00
parent eee509e91b
commit 6a5ae12c74
1 changed files with 6 additions and 1 deletions

View File

@ -3252,7 +3252,12 @@ createApp({
grade:'评价', stance:'立场'}; grade:'评价', stance:'立场'};
const show = x => x == null ? '未知' : Array.isArray(x) ? x.map(show).join(';') : const show = x => x == null ? '未知' : Array.isArray(x) ? x.map(show).join(';') :
typeof x === 'object' ? Object.entries(x).map(([k,v]) => (fields[k] || k) + ':' + show(v)).join(';') : String(x); typeof x === 'object' ? Object.entries(x).map(([k,v]) => (fields[k] || k) + ':' + show(v)).join(';') : String(x);
const when = x => x ? new Date(x).toLocaleString('zh-CN', { timeZone: 'Asia/Shanghai' }) + '(北京时间)' : '未知'; const when = x => {
if (!x) return '未知';
if (!/(?:Z|[+-]\d{2}:?\d{2})$/i.test(String(x))) return x + '(时区未记录)';
const date = new Date(x);
return Number.isNaN(date.getTime()) ? '未知' : date.toLocaleString('zh-CN', { timeZone: 'Asia/Shanghai' }) + '(北京时间)';
};
return ['计划版本:' + (d.id || '旧数据,追溯不完整'), '变更原因:' + (d.reason || '未记录'), return ['计划版本:' + (d.id || '旧数据,追溯不完整'), '变更原因:' + (d.reason || '未记录'),
'决策截止:' + when(d.cutoff_at), '独立研究观察:' + when(h.observation_at), '报告生成:' + when(r.report_ran_at), '决策截止:' + when(d.cutoff_at), '独立研究观察:' + when(h.observation_at), '报告生成:' + when(r.report_ran_at),
...[['投资论点','thesis'], ['反方论点','antithesis'], ['预期差','expectation'], ['周期位置','cycle'], ...[['投资论点','thesis'], ['反方论点','antithesis'], ['预期差','expectation'], ['周期位置','cycle'],