Parcourir la source

Update 优化主屏图表显示

Yue il y a 1 an
Parent
commit
677cfcf681

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

@@ -472,7 +472,7 @@
             </div>
         </div>
     </div>
-@Html.Partial("/Views/Play/__/_Chart_RoundScore_Max.cshtml",0)
+    @Html.Partial("/Views/ExerciseV2/_Play/__/_Chart_RoundScore_Max.cshtml", 0)
 </div>
 @section scripts{
     <script src="~/Content/Libs/eCharts/echarts.min.js"></script>

+ 4 - 1
SourceCode/WeApp.Web/Views/ExerciseV2/_Play/IndexWithScore.cshtml

@@ -472,7 +472,7 @@
             </div>
         </div>
     </div>
-@Html.Partial("/Views/Play/__/_Chart_RoundScore_Max.cshtml",1)
+    @Html.Partial("/Views/ExerciseV2/_Play/__/_Chart_RoundScore_Max.cshtml", 1)
 </div>
 @section scripts{
     <script src="~/Content/Libs/eCharts/echarts.min.js"></script>
@@ -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 {

+ 2 - 1
SourceCode/WeApp.Web/Views/ExerciseV2/_Play/__/_Chart_RoundScore_Max.cshtml

@@ -159,8 +159,9 @@
             };
             //console.log(option);
             roundScoreChart_Max.setOption(option);
+            roundScoreChart_Max.resize();
         }
-      
+
         iwbHub.client.getShowTotalRoundScore = function (msg, isShow) {
             console.log('getShowTotalRoundScore: ', msg, isShow);
             @if (Model == 0)

+ 4 - 1
SourceCode/WeApp.Web/Views/Play/IndexWithScore.cshtml

@@ -472,7 +472,7 @@
             </div>
         </div>
     </div>
-@Html.Partial("/Views/Play/__/_Chart_RoundScore_Max.cshtml",1)
+    @Html.Partial("/Views/Play/__/_Chart_RoundScore_Max.cshtml", 1)
 </div>
 @section scripts{
     <script src="~/Content/Libs/eCharts/echarts.min.js"></script>
@@ -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 {

+ 2 - 1
SourceCode/WeApp.Web/Views/Play/__/_Chart_RoundScore_Max.cshtml

@@ -159,8 +159,9 @@
             };
             //console.log(option);
             roundScoreChart_Max.setOption(option);
+            roundScoreChart_Max.resize();
         }
-      
+
         iwbHub.client.getShowTotalRoundScore = function (msg, isShow) {
             console.log('getShowTotalRoundScore: ', msg, isShow);
             @if (Model == 0)