Jelajahi Sumber

Merge branch 'master' of gitee.com:sh_13808852820/program

Foystor 3 tahun lalu
induk
melakukan
84cef3e924
1 mengubah file dengan 21 tambahan dan 22 penghapusan
  1. 21 22
      src/pages/report/index.vue

+ 21 - 22
src/pages/report/index.vue

@@ -545,15 +545,29 @@ export default {
         (res) => {
           Toast.clear();
           let $res = res.data;
-          console.log($res.data);
-
-          $this.record = $res.data;
-
-          // console.log("成绩记录数据", $res.data.interfereArr);
-          // console.log("数据长度:", $res.data.line);
 
           $this.report_show = $res.data.line.length > 0;
+          if (!$this.report_show) {
+            return false;
+          }
           setTimeout(() => {
+            $this.record = $res.data;
+            let $options = getHightPieChartOption(
+              $this.record.height,
+              $this.record.total
+            );
+            hight_att_pie_charts.setOption($options);
+
+            //设置雷达图
+            $options = getRadarChartOption([
+              $this.record.att_average, //平均
+              $this.record.att_scope, //广度
+              $this.record.att_burst, //爆发
+              $this.record.att_interfere, //抗干扰
+              $this.record.att_start, //启动
+              $this.record.att_height, // 高专注占比
+            ]);
+            radar_charts.setOption($options);
 
             // 平均专注力大字
             $this.record["att_average_big"] = parseInt(
@@ -574,22 +588,7 @@ export default {
             $this.record.height_absorbed = Math.ceil(
               $this.record.height / $this.record.total * 100
             );
-            let $options = getHightPieChartOption(
-              $this.record.height,
-              $this.record.total
-            );
-            hight_att_pie_charts.setOption($options);
 
-            //设置雷达图
-            $options = getRadarChartOption([
-              $this.record.att_average, //平均
-              $this.record.att_scope, //广度
-              $this.record.att_burst, //爆发
-              $this.record.att_interfere, //抗干扰
-              $this.record.att_start, //启动
-              $this.record.att_height, // 高专注占比
-            ]);
-            radar_charts.setOption($options);
 
             let $pie_data = $this.record.level;
             // 时间
@@ -654,7 +653,7 @@ export default {
               // // 处理 delta theta
               $this.get_game_dt($this.record.delta, $this.record.theta);
             }
-          }, 800);
+          }, 1000);
         },
         (err) => {
           Toast.fail("错误代码:" + res.code + ",联系客服");