This commit is contained in:
2025-09-10 20:18:01 +08:00
parent f5244f3e66
commit 729735f412
7 changed files with 347 additions and 325 deletions

View File

@@ -95,7 +95,13 @@
// 加载学前教育数据
function loadPreschoolData() {
showLoading();
$.getJSON('/bigscreen/school/preschool/chart')
// 根据当前类型加载不同数据
var url = currentType === 'enroll' ?
'/bigscreen/school/preschool/chart' :
'/bigscreen/school/preschool/inschool/chart';
$.getJSON(url)
.done(function(data) {
chartData = data;
renderChart();
@@ -116,7 +122,7 @@
$('.btn').removeClass('active');
$(this).addClass('active');
currentType = $(this).data('type');
renderChart();
loadPreschoolData(); // 点击按钮后重新加载数据,而不是只渲染
});
// 窗口大小变化时调整图表