王通 2 anos atrás
pai
commit
8feeae58d2
1 arquivos alterados com 15 adições e 16 exclusões
  1. 15 16
      src/views/leader.vue

+ 15 - 16
src/views/leader.vue

@@ -368,9 +368,12 @@ 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.ryList;
+        // that.zrs = res.data.visuForestCloudRyZxBO.zrs;
+        that.zxrs = 0;
+        that.visuForestCloudRYBO.forEach(item=>{
+          that.zrs+=parseInt(item.number)
+        })
         this.personnelChart();
       });
     },
@@ -506,11 +509,7 @@ export default {
               "总人数:" +
               handred +
               "人" +
-              "\n" +
-              "\n" +
-              "在线人数:" +
-              point +
-              "人",
+              "\n" ,
             x: "48%",
             y: "25%",
             textStyle: {
@@ -544,8 +543,8 @@ export default {
             },
             data: [
               {
-                value: point,
-                name: "当前在线",
+                value: handred,
+                name: "总人数",
                 label: {
                   show: true, //单独显示该数据项
                   formatter: "{c}人",
@@ -581,12 +580,12 @@ export default {
                   },
                 },
               },
-              {
-                value: handred - point,
-                itemStyle: {
-                  color: "#666",
-                },
-              },
+              // {
+              //   value: handred - point,
+              //   itemStyle: {
+              //     color: "#666",
+              //   },
+              // },
             ],
           },
         ],