彭宇 2 år sedan
förälder
incheckning
29c81b6288
2 ändrade filer med 16 tillägg och 7 borttagningar
  1. 8 4
      src/views/forest.vue
  2. 8 3
      src/views/leader.vue

+ 8 - 4
src/views/forest.vue

@@ -497,8 +497,6 @@
 
       this.getBaseInfo()
       this.getTodayEvent()
-			this.personnelChart()
-
       /** ----------------------------------weosocket开始------------------------------------- */
       this.initWebSocket();
       /** ----------------------------------weosocket结束------------------------------------- */
@@ -527,6 +525,8 @@
         todayEventCountDeptList: [],//事件分布
         todayEventCountTypeList: [],//事件分类
         eventChartData: [],//右侧eachar图表数据
+        zrs:0,//总人数
+        zxrs:0,//在线人数
 				iframeBoo: true,
 				open: false,
 				iframeVue: null,
@@ -843,8 +843,8 @@
 				// 基于准备好的dom,初始化echarts实例
 				let myChart = echarts.init(document.getElementById('personnel-chart'))
 				// 绘制图表
-				const handred = 100
-				let point = 66
+				const handred = this.zrs
+				let point = this.zxrs
 				myChart.setOption({
 					title: [{
 						text: '总人数:' + handred + '人' + '\n' + '\n' + '在线人数:' + point + '人',
@@ -1326,6 +1326,7 @@
         that.sourceData = [];
         //获取左侧菜单列表
         getBaseInfo().then(res => {
+          console.log(res.data)
           that.forestInfo = res.data.baseinfo.baseinfo;//基本情况
           that.cameraList = res.data.cameraList;
           that.visuForestCloudMapDeviceBOList=res.data.visuForestCloudMapDeviceBOList;
@@ -1337,7 +1338,10 @@
             }
           }
           that.visuForestCloudRYBO=res.data.visuForestCloudRYBO;
+          that.zrs=res.data.visuForestCloudRyZxBO.zrs;
+          that.zxrs=res.data.visuForestCloudRyZxBO.zxrs;
           this.cameraChat();
+          this.personnelChart();
         })
       },
       getTodayEvent() {

+ 8 - 3
src/views/leader.vue

@@ -120,7 +120,9 @@
         visuForestCloudRYBO: [],//人员类型列表
         peopleList: [],//人员列表
         connectList: [],//画线
-        xunLinListOne: []//巡林计划
+        xunLinListOne: [],//巡林计划
+        zrs:0,//总人数
+        zxrs:0,//在线人数
       }
     },
     created() {
@@ -164,7 +166,10 @@
         let that = this
         //获取左侧菜单列表
         getBaseInfo().then(res => {
+          console.log(res.data)
           that.visuForestCloudRYBO = res.data.visuForestCloudRYBO
+          that.zrs=res.data.visuForestCloudRyZxBO.zrs;
+          that.zxrs=res.data.visuForestCloudRyZxBO.zxrs;
           this.personnelChart()
         })
         //获取巡林计划
@@ -234,8 +239,8 @@
         // 基于准备好的dom,初始化echarts实例
         let myChart = echarts.init(document.getElementById('personnel-chart'))
         // 绘制图表
-        const handred = 100
-        let point = 66
+        const handred = this.zrs
+        let point = this.zxrs
         myChart.setOption({
           title: [{
             text: '总人数:' + handred + '人' + '\n' + '\n' + '在线人数:' + point + '人',