fix(dashboard): 控制台剖析图表支持仓房与品种智能双向联动及空状态优雅提示

这个提交包含在:
wikiboss
2026-11-02 15:45:38 +08:00
父节点 1b4e4babbe
当前提交 e115815596
共有 8 个文件被更改,包括 124 次插入 和 41 次删除

查看文件

@@ -767,7 +767,9 @@ function setupForecastEnvControls() {
const month = parseInt(document.getElementById('input-forecast-month')?.value, 10) || 7;
const day = parseInt(document.getElementById('input-forecast-day')?.value, 10) || 13;
STATE.forecastEnv = { tm_i, hm_i, tm_o, hm_o, month, day };
const currentYear = new Date().getFullYear();
const baseDate = currentYear + '-' + String(month).padStart(2, '0') + '-' + String(day).padStart(2, '0');
STATE.forecastEnv = { tm_i, hm_i, tm_o, hm_o, month, day, baseDate };
delete STATE.forecastCache[STATE.activeId];
const currentItem = STATE.list.find(i => i.id === STATE.activeId) || STATE.list[0];
@@ -778,13 +780,15 @@ function setupForecastEnvControls() {
if (btnReset && !btnReset.dataset.bound) {
btnReset.dataset.bound = 'true';
btnReset.addEventListener('click', async () => {
const currentYear = new Date().getFullYear();
STATE.forecastEnv = {
tm_i: 18.5,
tm_o: 32.5,
hm_i: 72.4,
hm_o: 54.2,
month: 7,
day: 13
day: 13,
baseDate: currentYear + '-07-13'
};
delete STATE.forecastCache[STATE.activeId];