dedsudiyu 3 ay önce
ebeveyn
işleme
49a6e552c1

+ 11 - 0
src/api/index.js

@@ -184,6 +184,7 @@ export function reportReportBigDataCountStatistics (query) {
     params: query
   })
 }
+
 //人员设备安全
 export function reportReportBigDataPersonDeviceSafety (query) {
   return request({
@@ -192,6 +193,16 @@ export function reportReportBigDataPersonDeviceSafety (query) {
     params: query
   })
 }
+
+//人员设备安全-列表
+export function reportReportBigDataDeviceSafetyGroupCount (data) {
+  return request({
+    url: '/report/report/bigData/deviceSafetyGroupCount',
+    method: 'post',
+    data: data
+  })
+}
+
 //安全隐患分布
 export function reportReportBigDataDangerDistribution (query) {
   return request({

+ 6 - 2
src/views/home.vue

@@ -77,8 +77,12 @@
       },
       //切换页面
       pageCheck(type){
-        if(type !== this.pageType){
-          this.$set(this,'pageType',type);
+        if(type == 3){
+          window.open('http://www.baidu.com')
+        }else{
+          if(type !== this.pageType){
+            this.$set(this,'pageType',type);
+          }
         }
       },
       //时间定时器

+ 42 - 23
src/views/safetyOverview/pageComponent/monitoringComponents.vue

@@ -8,10 +8,10 @@
       <img v-if="!videoList[0]" class="null-img" src="@/assets/ZDimages/null-data-1.png">
     </div>
     <div class="monitoring-bottom-button-box">
-      <img class="left-button-img" src="@/assets/ZDimages/left_button.png">
+      <img class="left-button-img" @click="leftButton" src="@/assets/ZDimages/left_button.png">
       <div class="center-button-box">
       </div>
-      <img class="right-button-img" src="@/assets/ZDimages/right_button.png">
+      <img class="right-button-img" @click="rightButton" src="@/assets/ZDimages/right_button.png">
     </div>
   </div>
 </template>
@@ -36,22 +36,34 @@
         },
         //eCharts定时器
         eChartsTimer:null,
+        subList:[],
       }
     },
     created () {
-      this.timedRefresh();
+      // this.timedRefresh();
+      this.getData();
     },
     mounted () {
 
     },
     methods: {
+      leftButton(){
+        if(this.videoQueryParams.page>1){
+          this.videoQueryParams.page--
+          this.getData();
+        }
+      },
+      rightButton(){
+        this.videoQueryParams.page++
+        this.videoInitialize();
+      },
       timedRefresh(){
         let self = this;
         self.getData();
         //定时动画
         window.clearInterval(self.eChartsTimer);
         self.eChartsTimer = setInterval(function(){
-          self.getData();
+          self.videoInitialize();
         },1000*30);
       },
       getData(){
@@ -60,10 +72,13 @@
           for(let i=0;i<response.data.records.length;i++){
             subList.push(response.data.records[i].subId);
           }
-          this.videoInitialize(subList);
+          this.$set(this,'subList',subList);
+          this.$nextTick(()=>{
+            this.videoInitialize();
+          })
         });
       },
-      videoInitialize(subList) {
+      videoInitialize() {
         let self = this;
         self.$set(self, 'videoType', false);
         self.$set(self, 'videoList', []);
@@ -74,27 +89,31 @@
           buildId:'',
           floorId:'',
           passageway:'',
-          subIds:subList,
+          subIds:this.subList,
           protocol:window.location.href.indexOf('https') !== -1?'wss':'ws'
         };
         iotCameraFindByCondition(obj).then(response => {
-          let list = [];
-          for(let i=0;i<response.data.records.length;i++){
-            list.push(
-              {
-                width: this.width, //(宽度:非必传-默认600)
-                height: this.height, //(高度:非必传-默认338)
-                url: response.data.records[i].streamUrl,
-              }
-            )
+          if(response.data.records[0]){
+            let list = [];
+            for(let i=0;i<response.data.records.length;i++){
+              list.push(
+                {
+                  width: this.width, //(宽度:非必传-默认600)
+                  height: this.height, //(高度:非必传-默认338)
+                  url: response.data.records[i].streamUrl,
+                }
+              )
+            }
+            this.$set(this,'videoList',list)
+            this.$set(this,'videoTotal',response.data.total);
+            this.$nextTick(()=>{
+              setTimeout(function(){
+                self.$set(self, 'videoType', true);
+              },300);
+            })
+          }else{
+            this.videoQueryParams.page--
           }
-          this.$set(this,'videoList',list)
-          this.$set(this,'videoTotal',response.data.total);
-          this.$nextTick(()=>{
-            setTimeout(function(){
-              self.$set(self, 'videoType', true);
-            },1000);
-          })
         });
       },
     },

+ 1 - 1
src/views/safetyOverview/pageComponent/userEquipmentComponents.vue

@@ -38,7 +38,7 @@
       return {
         propsData:{
           title:'人员设备安全',
-          // checkType:'userEquipmentComponents', //二级未开发-暂时注掉
+          checkType:'userEquipmentComponents',
         },
         dataList:[],
         tableTimer:null,

+ 65 - 36
src/views/safetyOverview/pageComponent/warningComponents.vue

@@ -23,12 +23,13 @@
             <p>{{deptData.rate}}</p>
           </div>
         </div>
-        <div class="date-max-box">
-          <div :class="dayIndex==index?'checkColor':''" v-for="(item,index) in timeList" :key="index" @click="dayButton(index)">
-            <p>{{item.label}}</p>
-            <p>{{item.name}}</p>
-          </div>
-        </div>
+        <!--星期-->
+        <!--<div class="date-max-box">-->
+          <!--<div :class="dayIndex==index?'checkColor':''" v-for="(item,index) in timeList" :key="index" @click="dayButton(index)">-->
+            <!--<p>{{item.label}}</p>-->
+            <!--<p>{{item.name}}</p>-->
+          <!--</div>-->
+        <!--</div>-->
         <div class="for-position-dept-max-box">
           <div class="for-position-dept-box"
                v-for="(item,index) in deptData.warningHandleSubs" :key="index">
@@ -88,11 +89,8 @@ import {
         let self = this;
         self.getData();
         //定时动画
-        console.log('触发1')
         window.clearInterval(self.eChartsTimer);
-        console.log('触发2')
         self.eChartsTimer = setInterval(function(){
-          console.log('触发3')
           self.deptListIndex++
           if(self.deptList[self.deptListIndex]){
             self.$set(self,'deptData',self.deptList[self.deptListIndex]);
@@ -175,10 +173,8 @@ import {
       }
       .position-text-max-box {
         position: absolute;
-        top: 64px;
-        left: 20px;
+        top: 10px;
         display: flex;
-        flex-direction: column;
         div:nth-child(1), div:nth-child(2), div:nth-child(3) {
           margin-bottom: 40px;
         }
@@ -189,6 +185,7 @@ import {
           background-image: url("../../../assets/ZDimages/img_yjczbg@1x.png");
           background-size: 100%;
           display: flex;
+          margin-left:25px;
           p:nth-child(1) {
             color: #fff;
             line-height: 52px;
@@ -239,7 +236,7 @@ import {
           .for-position-name-box-one {
             border-radius: 8px;
             display: inline-block;
-            min-width: 180px;
+            min-width: 130px;
             height: 54px;
             border: 1px solid #D80707;
             box-shadow: inset 0px 0px 10px 0px #D80707;
@@ -253,7 +250,7 @@ import {
             }
             img {
               display: block;
-              width: 159px;
+              width: 120px;
               height: 4px;
               margin: 0 auto;
             }
@@ -261,7 +258,7 @@ import {
           .for-position-name-box {
             border-radius: 8px;
             display: inline-block;
-            min-width: 180px;
+            min-width: 130px;
             height: 30px;
             border: 1px solid #00E6FF;
             box-shadow: inset 0px 0px 10px 0px #047581;
@@ -275,7 +272,7 @@ import {
             }
             img {
               display: block;
-              width: 159px;
+              width: 120px;
               height: 4px;
               margin: 0 auto;
             }
@@ -307,44 +304,76 @@ import {
           }
         }
         .for-position-dept-box:nth-child(1){
-          top: 171px;
-          left: 257px;
+          top: 100px;
+          left: 30px;
         }
         .for-position-dept-box:nth-child(2){
-          top: 165px;
-          left: 544px;
+          top: 100px;
+          left: 280px;
         }
         .for-position-dept-box:nth-child(3){
-          top: 90px;
-          left: 739px;
+          top: 100px;
+          left: 530px;
         }
         .for-position-dept-box:nth-child(4){
-          top: 231px;
-          left: 742px;
+          top: 100px;
+          left: 780px;
         }
         .for-position-dept-box:nth-child(5){
-          top: 282px;
-          left: 294px;
+          top: 165px;
+          left: 153px;
         }
         .for-position-dept-box:nth-child(6){
-          top: 271px;
-          left: 533px;
+          top: 165px;
+          left: 403px;
         }
         .for-position-dept-box:nth-child(7){
-          top: 333px;
-          left: 717px;
+          top: 165px;
+          left: 653px;
         }
         .for-position-dept-box:nth-child(8){
-          top: 373px;
-          left: 454px;
+          top: 230px;
+          left: 30px;
         }
         .for-position-dept-box:nth-child(9){
-          top: 375px;
-          left: 230px;
+          top: 230px;
+          left: 280px;
         }
         .for-position-dept-box:nth-child(10){
-          top: 100px;
-          left: 384px;
+          top: 230px;
+          left: 530px;
+        }
+        .for-position-dept-box:nth-child(11){
+          top: 230px;
+          left: 780px;
+        }
+        .for-position-dept-box:nth-child(12){
+          top: 295px;
+          left: 153px;
+        }
+        .for-position-dept-box:nth-child(13){
+          top: 295px;
+          left: 403px;
+        }
+        .for-position-dept-box:nth-child(14){
+          top: 295px;
+          left: 653px;
+        }
+        .for-position-dept-box:nth-child(15){
+          top: 360px;
+          left: 30px;
+        }
+        .for-position-dept-box:nth-child(16){
+          top: 360px;
+          left: 280px;
+        }
+        .for-position-dept-box:nth-child(17){
+          top: 360px;
+          left: 530px;
+        }
+        .for-position-dept-box:nth-child(18){
+          top: 360px;
+          left: 780px;
         }
       }
     }

+ 53 - 61
src/views/safetyOverview/pageList/userEquipmentComponentsTable.vue

@@ -13,8 +13,8 @@
       <p class="table-title-p">数据筛选</p>
       <el-form :model="queryParams" class="form-box" ref="queryForm"
                :inline="true" style="width:100%;">
-        <el-form-item label="学院:" prop="state">
-          <el-select v-model="queryParams.state"
+        <el-form-item label="学院:" prop="deptId">
+          <el-select v-model="queryParams.deptId"
                      placeholder="请选择学院"
                      style="width: 260px">
             <el-option
@@ -35,18 +35,13 @@
         <el-table class="table-box" :row-class-name="tableRowClassName"
                   :data="dataList" @sort-change="sortChange">
           <el-table-column align="center" label="序号"  width="150"  type="index"/>
-          <el-table-column align="center" label="学院" prop="data1"  show-overflow-tooltip/>
-          <el-table-column align="center" sortable="custom" label="总人数" prop="data2" width="300" show-overflow-tooltip/>
-          <el-table-column align="center" sortable="custom" label="办理准入人数" prop="data3" width="300" show-overflow-tooltip/>
-          <el-table-column align="center" sortable="custom" label="实验人数" prop="data4" width="300" show-overflow-tooltip/>
-          <el-table-column align="center" sortable="custom" label="值日人数" prop="data5" width="300" show-overflow-tooltip/>
-          <el-table-column align="center" sortable="custom" label="检查次数" prop="data6" width="300" show-overflow-tooltip/>
-          <el-table-column align="center" sortable="custom" label="超期设备" prop="data7" width="300" show-overflow-tooltip/>
-          <!--<el-table-column align="center" label="创建时间" prop="createTime" width="200" show-overflow-tooltip>-->
-          <!--<template slot-scope="scope">-->
-          <!--<span>{{ parseTime(scope.row.createTime,"{y}-{m}-{d} {h}:{i}") }}</span>-->
-          <!--</template>-->
-          <!--</el-table-column>-->
+          <el-table-column align="center" label="学院" prop="deptName"  show-overflow-tooltip/>
+          <el-table-column align="center" sortable="custom" label="总人数" prop="totalNum" width="300" show-overflow-tooltip/>
+          <el-table-column align="center" sortable="custom" label="办理准入人数" prop="safeApplyNum" width="300" show-overflow-tooltip/>
+          <el-table-column align="center" sortable="custom" label="实验人数" prop="subPassOutNum" width="300" show-overflow-tooltip/>
+          <el-table-column align="center" sortable="custom" label="值日人数" prop="boardDutyNum" width="300" show-overflow-tooltip/>
+          <el-table-column align="center" sortable="custom" label="检查次数" prop="boardPatrolNum" width="300" show-overflow-tooltip/>
+          <el-table-column align="center" sortable="custom" label="超期设备" prop="deviceNum" width="300" show-overflow-tooltip/>
         </el-table>
         <pagination :page-sizes="[20, 30, 40, 50]"
                     v-show="total>0"
@@ -61,7 +56,7 @@
   </div>
 </template>
 <script>
-  import { getDeptDropList,} from "@/api/index";
+  import { getDeptDropList,reportReportBigDataDeviceSafetyGroupCount } from "@/api/index";
   export default {
     name: 'userEquipmentComponentsTable',
     data () {
@@ -72,8 +67,7 @@
         queryParams:{
           page:1,
           pageSize:20,
-          searchValue:"",
-          state :null,
+          deptId:"",
         },
         //列表数据
         dataList:[],
@@ -94,64 +88,62 @@
       },
       //排序方法
       sortChange(val){
-
+        if(val.prop == 'totalNum'){
+          //总人数
+          this.$set(this.queryParams,'sortType',val.order=='ascending'?1:(val.order=='descending'?2:''));
+          this.$set(this.queryParams,'sortAttri',1);
+          this.handleQuery();
+        }else if(val.prop == 'safeApplyNum'){
+          //办理准入人数
+          this.$set(this.queryParams,'sortType',val.order=='ascending'?1:(val.order=='descending'?2:''));
+          this.$set(this.queryParams,'sortAttri',2);
+          this.handleQuery();
+        }else if(val.prop == 'subPassOutNum'){
+          //实验人数
+          this.$set(this.queryParams,'sortType',val.order=='ascending'?1:(val.order=='descending'?2:''));
+          this.$set(this.queryParams,'sortAttri',3);
+          this.handleQuery();
+        }else if(val.prop == 'boardDutyNum'){
+          //值日人数
+          this.$set(this.queryParams,'sortType',val.order=='ascending'?1:(val.order=='descending'?2:''));
+          this.$set(this.queryParams,'sortAttri',4);
+          this.handleQuery();
+        }else if(val.prop == 'boardPatrolNum'){
+          //检查次数
+          this.$set(this.queryParams,'sortType',val.order=='ascending'?1:(val.order=='descending'?2:''));
+          this.$set(this.queryParams,'sortAttri',5);
+          this.handleQuery();
+        }else if(val.prop == 'deviceNum'){
+          //超期设备
+          this.$set(this.queryParams,'sortType',val.order=='ascending'?1:(val.order=='descending'?2:''));
+          this.$set(this.queryParams,'sortAttri',6);
+          this.handleQuery();
+        }else{
+          this.$set(this.queryParams,'ascOrDesc',null);
+          this.$set(this.queryParams,'sortAttri',null);
+          this.handleQuery();
+        }
       },
       //列表查询
       getList(){
-        let list = [];
-        let dataNameA = ['农学院','理学院','化学与药物','生命科学','园林艺术','植物保护','资源环境','国重楼'];
-        let dataNameB = [];
-        let dataNameC = [];
-        let maxNum = 20;
-        let num = 9;
-        function getRandomInt(min, max) {
-          min = Math.ceil(min); // 确保min是整数
-          max = Math.floor(max); // 确保max是整数
-          return Math.floor(Math.random() * (max - min + 1)) + min; // 返回介于min和max之间的整数
-        }
-        for(let i=0;i<maxNum;i++){
-          let obj = {};
-          for(let o=0;o<num;o++){
-            if(o == 0){
-              if(dataNameA[0]){
-                obj['data'+(o+1)] = dataNameA[getRandomInt(0,(dataNameA.length-1))]
-              }else{
-                obj['data'+(o+1)] = getRandomInt(1,500)
-              }
-            }else if(o == 1){
-              if(dataNameB[0]){
-                obj['data'+(o+1)] = dataNameB[getRandomInt(0,(dataNameB.length-1))]
-              }else{
-                obj['data'+(o+1)] = getRandomInt(1,500)
-              }
-            }else if(o == 2){
-              if(dataNameC[0]){
-                obj['data'+(o+1)] = dataNameC[getRandomInt(0,(dataNameC.length-1))]
-              }else{
-                obj['data'+(o+1)] = getRandomInt(1,500)
-              }
-            }else{
-              obj['data'+(o+1)] = getRandomInt(1,500)
-            }
-          }
-          list.push(obj)
-        }
-        this.$set(this,'dataList',list);
+        reportReportBigDataDeviceSafetyGroupCount(this.queryParams).then(response => {
+          this.$set(this,'dataList',response.data.records);
+          this.$set(this,'total',response.data.total);
+        });
       },
       //查询按钮
       handleQuery(){
         this.$set(this.queryParams,'page',1);
-        // this.getList();
+        this.getList();
       },
       //重置按钮
       resetQuery(){
         this.$set(this,'queryParams',{
           page:1,
           pageSize:20,
-          searchValue:"",
-          state :null,
+          deptId:"",
         });
-        // this.getList();
+        this.getList();
       },
       tableRowClassName({row, rowIndex}) {
         if (rowIndex  % 2 == 0) {

+ 5 - 3
src/views/videoSurveillance/pageComponent/videoComponent.vue

@@ -13,7 +13,7 @@
       <p class="name-p" style="margin-left:10px;">人</p>
     </div>
     <div class="video-max-big-box">
-      <H5PlayerVideo style="margin:10px 0 0 12px;"
+      <H5PlayerVideo style="margin:10px 0 0 18px;"
                      v-for="(item,index) in videoList" :key="index" :videoProps="item"></H5PlayerVideo>
       <img v-if="!videoList[0]" class="null-img" src="@/assets/ZDimages/null-data-1.png">
     </div>
@@ -41,8 +41,10 @@
         //人数
         floorUserNum:null,
         //视频
-        width:685,
-        height:350,
+        // width:685,
+        width:1027,
+        // height:350,
+        height:525,
         videoType:false,
         videoList:[],
         videoTotal:0,