瀏覽代碼

Fix 修复主屏分数图表显示出错的问题

Yue 1 年之前
父節點
當前提交
8b1fe634de

+ 3 - 0
SourceCode/WeApp.Web/Views/ExerciseV2/_Play/Index.cshtml

@@ -595,6 +595,9 @@
                             var wlChartData = wlChart.data[0];
                             for (var j = 0; j < wlTags.length; j++) {
                                 var tag_wl = tags.find(vv => vv.tagNo == wlTags[j]);
+                                if (!tag_wl) {
+                                    tag_wl = { tagNo: wlTags[j], totalScore: 0, correctionScore: 0 }
+                                }
                                 if (wlChart.indicator.length <= j) {
                                     wlChart.indicator.push({ name: tag_wl.tagNo, max: tag_wl.totalScore || 0 });
                                 } else {

+ 3 - 0
SourceCode/WeApp.Web/Views/Play/Index.cshtml

@@ -595,6 +595,9 @@
                             var wlChartData = wlChart.data[0];
                             for (var j = 0; j < wlTags.length; j++) {
                                 var tag_wl = tags.find(vv => vv.tagNo == wlTags[j]);
+                                if (!tag_wl) {
+                                    tag_wl = { tagNo: wlTags[j], totalScore: 0, correctionScore: 0 }
+                                }
                                 if (wlChart.indicator.length <= j) {
                                     wlChart.indicator.push({ name: tag_wl.tagNo, max: tag_wl.totalScore || 0 });
                                 } else {