王通 vor 2 Jahren
Ursprung
Commit
e3ee2c7a0b
1 geänderte Dateien mit 16 neuen und 16 gelöschten Zeilen
  1. 16 16
      src/views/leader.vue

+ 16 - 16
src/views/leader.vue

@@ -345,9 +345,13 @@ export default {
       this.listCurrentIndex2 = "";
       //获取左侧菜单列表
       getRy().then((res) => {
-        that.visuForestCloudRYBO = res.data.visuForestCloudRYBO;
-        that.zrs = res.data.visuForestCloudRyZxBO.zrs;
-        that.zxrs = res.data.visuForestCloudRyZxBO.zxrs;
+        that.visuForestCloudRYBO = res.data.user;
+        // that.zrs = res.data.visuForestCloudRyZxBO.zrs;
+        that.zxrs = 0
+        that.visuForestCloudRYBO.forEach(item=>
+        {
+          that.zrs+=parseInt(item.number)
+          })
         this.personnelChart();
       });
     },
@@ -483,11 +487,7 @@ export default {
               "总人数:" +
               handred +
               "人" +
-              "\n" +
-              "\n" +
-              "在线人数:" +
-              point +
-              "人",
+              "\n",
             x: "48%",
             y: "25%",
             textStyle: {
@@ -521,8 +521,8 @@ export default {
             },
             data: [
               {
-                value: point,
-                name: "当前在线",
+                value: handred,
+                name: "总人数",
                 label: {
                   show: true, //单独显示该数据项
                   formatter: "{c}人",
@@ -558,12 +558,12 @@ export default {
                   },
                 },
               },
-              {
-                value: handred - point,
-                itemStyle: {
-                  color: "#666",
-                },
-              },
+              // {
+              //   value: handred - point,
+              //   itemStyle: {
+              //     color: "#666",
+              //   },
+              // },
             ],
           },
         ],