From 990c35a953991629f4a446b72b38a2f86efd3606 Mon Sep 17 00:00:00 2001 From: yumoqing Date: Mon, 27 Jul 2026 11:59:32 +0800 Subject: [PATCH] fix: sect_currency urldata crash, switch to render_urldata method The 4 period buttons used actiontype:urldata which calls _buildDataHandler requiring desc.status_of[data.status] mapping. Neither was provided, causing 'Cannot read properties of undefined (reading undefined)' crash. Fix: use actiontype:method with method:render_urldata (ChartBar's inherited EchartsExt method). ChartBar's data_url now uses data_params={'period':'all'} for default, buttons pass {period:x} via render_urldata params. --- wwwroot/sect_currency.ui | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/wwwroot/sect_currency.ui b/wwwroot/sect_currency.ui index 0c2200e..eee30e0 100644 --- a/wwwroot/sect_currency.ui +++ b/wwwroot/sect_currency.ui @@ -17,16 +17,17 @@ "id": "financial_chart", "options": { "height": "180px", - "data_url": "{{entire_url('/sage_datamart/api/financial_chart.dspy')}}?period=all", + "data_url": "{{entire_url('/sage_datamart/api/financial_chart.dspy')}}", + "data_params": {"period": "all"}, "nameField": "metric", "valueFields": ["value"] } } ], "binds": [ - {"wid": "btn_all", "event": "click", "actiontype": "urldata", "target": "financial_chart", "options": {"url": "{{entire_url('/sage_datamart/api/financial_chart.dspy')}}?period=all"}}, - {"wid": "btn_year", "event": "click", "actiontype": "urldata", "target": "financial_chart", "options": {"url": "{{entire_url('/sage_datamart/api/financial_chart.dspy')}}?period=year"}}, - {"wid": "btn_month", "event": "click", "actiontype": "urldata", "target": "financial_chart", "options": {"url": "{{entire_url('/sage_datamart/api/financial_chart.dspy')}}?period=month"}}, - {"wid": "btn_today", "event": "click", "actiontype": "urldata", "target": "financial_chart", "options": {"url": "{{entire_url('/sage_datamart/api/financial_chart.dspy')}}?period=today"}} + {"wid": "btn_all", "event": "click", "actiontype": "method", "target": "financial_chart", "method": "render_urldata", "params": {"period": "all"}}, + {"wid": "btn_year", "event": "click", "actiontype": "method", "target": "financial_chart", "method": "render_urldata", "params": {"period": "year"}}, + {"wid": "btn_month", "event": "click", "actiontype": "method", "target": "financial_chart", "method": "render_urldata", "params": {"period": "month"}}, + {"wid": "btn_today", "event": "click", "actiontype": "method", "target": "financial_chart", "method": "render_urldata", "params": {"period": "today"}} ] }