From 1aad8249eea185cba580c6411aa08b0b78ca78fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=B9=8F=E5=AE=87?= Date: Wed, 10 Jun 2026 17:51:57 +0800 Subject: [PATCH] =?UTF-8?q?ai=E6=8A=A5=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../static/src/html/report_template.html | 31 +++++++++++++------ 1 file changed, 22 insertions(+), 9 deletions(-) diff --git a/yuthon_ai_agent/static/src/html/report_template.html b/yuthon_ai_agent/static/src/html/report_template.html index b8c82b1e7..5f29b6f7a 100644 --- a/yuthon_ai_agent/static/src/html/report_template.html +++ b/yuthon_ai_agent/static/src/html/report_template.html @@ -213,11 +213,12 @@ tr.ch.h{display:none}
@@ -297,6 +298,16 @@ let grpExp={}; let fzCount=0; let dark=true; let qcState={dim:'',val:'',type:'bar'}; +let chartVisible=true; + +function toggleChartView(){ + chartVisible=!chartVisible; + const area=$('chartsArea'); + const btn=$('btnList'); + if(area)area.style.display=chartVisible?'':'none'; + if(btn)btn.classList.toggle('act',!chartVisible); + if(chartVisible)renderCharts(); +} function init(){ $('rptTitle').textContent = REPORT_CONFIG.title || '报表'; @@ -345,25 +356,27 @@ function initChartCtrls(){ const dimSel=$('qcDimSel'); const valSel=$('qcValSel'); if(dimSel){ - dimSel.innerHTML=''+COLS.map(c=>``).join(''); + dimSel.innerHTML=''+COLS.map(c=>``).join(''); dimSel.value=qcState.dim; } if(valSel){ - valSel.innerHTML=''+numCols.map(c=>``).join(''); + valSel.innerHTML=''+numCols.map(c=>``).join(''); valSel.value=qcState.val; } updateChartTypeBtns(); } function updateChartTypeBtns(){ - ['bar','pie','doughnut','line','polarArea'].forEach(t=>{ - const btn=$(`btn${t==='bar'?'Bar':t==='pie'?'Pie':t==='doughnut'?'Doughnut':t==='line'?'Line':'Polar'}`); + ['bar','pie','doughnut','line'].forEach(t=>{ + const btn=$(`btn${t==='bar'?'Bar':t==='pie'?'Pie':t==='doughnut'?'Doughnut':'Line'}`); if(btn)btn.classList.toggle('act',qcState.type===t); }); + ['btnList'].forEach(id=>{const b=$(id);if(b)b.classList.remove('act')}); } function setChartType(type){ qcState.type=type; + if(!chartVisible){chartVisible=true;$('chartsArea').style.display='';$('btnList').classList.remove('act')} updateChartTypeBtns(); renderCharts(); }