dedsudiyu 1 月之前
父節點
當前提交
7bbf060981

+ 2 - 2
.env.development

@@ -50,7 +50,7 @@ VUE_APP_BASE_API = '172.16.0.65/api'
 # ####################内网接口配置####################
 
 # 现场
-# VUE_APP_BASE_LOCAL_API = '172.16.0.65/api'
+VUE_APP_BASE_LOCAL_API = '172.16.0.65/api'
 
 # 小飞
 # VUE_APP_BASE_LOCAL_API = '192.168.1.17:8080'
@@ -68,7 +68,7 @@ VUE_APP_BASE_API = '172.16.0.65/api'
 # VUE_APP_BASE_LOCAL_API = '192.168.1.8/api'
 
 # 43内网地址
-VUE_APP_BASE_LOCAL_API = '192.168.1.43/api'
+# VUE_APP_BASE_LOCAL_API = '192.168.1.43/api'
 
 # 开发人员地址
 # VUE_APP_BASE_LOCAL_API = '192.168.1.24:8080'

+ 26 - 0
src/api/index.js

@@ -452,3 +452,29 @@ export function laboratorySubPassOutGetCountByBuildId (data) {
     data: data
   })
 }
+
+//新楼栋-楼层树结构
+export function laboratoryLabDeptTreeLargeTree (data) {
+  return request({
+    url: '/laboratory/labDeptTree/large/tree',
+    method: 'post',
+    data: data
+  })
+}
+//楼层下查询房间列表
+export function laboratoryLabDeptTreeLargeRooms (data) {
+  return request({
+    url: '/laboratory/labDeptTree/large/rooms',
+    method: 'post',
+    data: data
+  })
+}
+
+//根据过滤条件获取摄像头流地址
+export function iotCameraLargeFindByCondition(data) {
+  return request({
+    url: '/iot/camera/large/findByCondition',
+    method: 'post',
+    data: data
+  })
+}

+ 36 - 0
src/assets/styles/index.scss

@@ -107,3 +107,39 @@ html::-webkit-scrollbar-track{
   border-radius: 0;
   background: #FFFFFF;
 }
+
+//下拉菜单
+
+.el-select-dropdown{
+  //background-color:rgba(0,114,221,0.6)!important;
+  background-color:rgba(2,18,42,1)!important;
+  border: 1px solid #0591F3;
+}
+.el-select-dropdown__item.selected{
+  color: #0591F3;
+}
+.el-select-dropdown__item{
+  color: #fff;
+  font-size:34px;
+  line-height: 60px;
+  height:60px;
+}
+.el-select-dropdown__item.hover, .el-select-dropdown__item:hover{
+  background-color:rgba(5,145,243,0.6)!important;
+  color: #fff;
+}
+
+*::-webkit-scrollbar {
+  width: 6px; /*高宽分别对应横竖滚动条的尺寸*/
+  height: 6px;
+}
+*::-webkit-scrollbar-thumb {
+  border-radius: 5px;
+  -webkit-box-shadow: inset 0 0 5px #0591F3;
+  background: #0591F3;
+}
+*::-webkit-scrollbar-track {
+  -webkit-box-shadow: inset 0 0 5px #101F38;
+  border-radius: 0;
+  background: #101F38;
+}

+ 9 - 0
src/components/fullH5PlayerVideo/fullH5PlayerVideo.vue

@@ -137,6 +137,15 @@ import { iotCameraGetPreviewURLs } from '@/api/index'
           () => {
             // console.info('JS_Play success')
             // do you want...
+            //开启声音
+            this.myPlugin.JS_OpenSound().then(
+              () => {
+                console.log('openSound success')
+              },
+              e => {
+                console.error('声音开启失败',e)
+              }
+            )
           },
           (err) => {
             // console.info('JS_Play failed:', err)

+ 1 - 1
src/views/cengterMaxBox/canvasMap/index.vue

@@ -88,7 +88,7 @@
           {school:'N',	name:'家畜生物学重点实验室楼',	buildId:'101093843117592787',centerValue:'101093843117592787',valueList:['101093843117592787'],alarmType:false,},
           {school:'N',	name:'木艺坊',	buildId:'101093843117592819',centerValue:'101093843117592819',valueList:['101093843117592819'],alarmType:false,},
           {school:'N',	name:'林学院实验楼',	buildId:'101093843117592818',centerValue:'',valueList:[],alarmType:false,},
-          {school:'N',	name:'科研主楼',	buildId:'101093843117592784',centerValue:'101093843117592784',valueList:['101093843117592784'],alarmType:false,},
+          {school:'N',	name:'科研主楼',	buildId:'101093843117592784',centerValue:'101093843117592784',valueList:['101093843117592784','101093843117592822'],alarmType:false,},
           {school:'N',	name:'科研楼',	buildId:'101093843117592822',centerValue:'',valueList:[],alarmType:false,},
           {school:'N',	name:'经管园林楼(文科楼)A',	buildId:'101093843117592777',centerValue:'101093843117592777',valueList:['101093843117592777'],alarmType:false,},
           {school:'N',	name:'经管园林楼(文科楼)C',	buildId:'101093843117592778',centerValue:'',valueList:[],alarmType:false,},

+ 1 - 1
src/views/cengterMaxBox/canvasMap/newIndex.vue

@@ -90,7 +90,7 @@
           {school:'N',	name:'家畜生物学重点实验室楼',	buildId:'101093843117592787',centerValue:'101093843117592787',valueList:['101093843117592787'],alarmType:false,},
           {school:'N',	name:'木艺坊',	buildId:'101093843117592819',centerValue:'101093843117592819',valueList:['101093843117592819'],alarmType:false,},
           {school:'N',	name:'林学院实验楼',	buildId:'101093843117592818',centerValue:'',valueList:[],alarmType:false,},
-          {school:'N',	name:'科研主楼',	buildId:'101093843117592784',centerValue:'101093843117592784',valueList:['101093843117592784'],alarmType:false,},
+          {school:'N',	name:'科研主楼',	buildId:'101093843117592784',centerValue:'101093843117592784',valueList:['101093843117592784','101093843117592822'],alarmType:false,},
           {school:'N',	name:'科研楼',	buildId:'101093843117592822',centerValue:'',valueList:[],alarmType:false,},
           {school:'N',	name:'经管园林楼(文科楼)A',	buildId:'101093843117592777',centerValue:'101093843117592777',valueList:['101093843117592777'],alarmType:false,},
           {school:'N',	name:'经管园林楼(文科楼)C',	buildId:'101093843117592778',centerValue:'',valueList:[],alarmType:false,},

+ 177 - 53
src/views/cengterMaxBox/videoSurveillance/pageComponent/deptListComponent.vue

@@ -2,16 +2,37 @@
   <div class="deptListComponent">
     <div id="tree-box">
       <el-form :model="queryParams" class="form-box" ref="queryForm"
-               :inline="true" style="width:100%;">
-        <el-form-item label="" prop="state">
-          <el-input
-            v-model="queryParams.searchValue"
-            placeholder="实验室"
-            style="width:350px;border-radius:10px;"
-          />
-        </el-form-item>
-        <p class="form-inquire-common-style-button" @click="handleQuery">查询</p>
-        <p class="form-reset-common-style-button" @click="resetQuery">重置</p>
+               :inline="true" style="width:100%;display: flex;flex-direction: column">
+        <div style="display: flex;">
+          <el-form-item label="" prop="deptId">
+            <el-select v-model="queryParams.deptId"
+                       placeholder="请选择学院"
+                       style="width: 450px">
+              <el-option
+                v-for="item in deptList"
+                :key="item.deptId"
+                :label="item.deptName"
+                :value="item.deptId"
+              />
+            </el-select>
+          </el-form-item>
+          <p class="form-inquire-common-style-button" style="width:100px;margin:0 20px 0 10px;" @click="handleQuery">查询</p>
+          <p class="form-reset-common-style-button" style="width:100px;" @click="resetQuery">重置</p>
+        </div>
+        <div class="input-select">
+          <el-form-item label="" prop="searchValue">
+            <el-input
+              v-model="queryParams.searchValue"
+              placeholder="请输入"
+              style="width:690px;"
+            >
+              <el-select v-model="inputType" slot="prepend" placeholder="请选择">
+                <el-option label="实验室名称" value="1"></el-option>
+                <el-option label="房号" value="2"></el-option>
+              </el-select>
+            </el-input>
+          </el-form-item>
+        </div>
       </el-form>
       <div class="for-level-max-box">
         <div class="for-level-box"
@@ -46,7 +67,7 @@
                 overflow:hidden;
                 text-overflow:ellipsis;
                 white-space:nowrap;"
-              :style="!data.level?'font-size:34px':(data.level==1?'font-size:40px':(data.level==2||data.level==3||data.level==4?'font-size:36px':(data.level==5?'font-size:34px':'')))">{{data.deptName}}</span>
+              :style="!data.level?'font-size:34px':(data.level==1?'font-size:40px':(data.level==2?'font-size:36px':(data.level==3?'font-size:34px':'')))">{{data.deptName}}</span>
          </template>
         </el-tree>
       </div>
@@ -56,9 +77,10 @@
 <script>
   import {
     laboratoryLevelConfigGetLevelTitleList,
-    laboratoryLabDeptTreeGetTreeList,
-    laboratoryLabDeptTreeGetRoomList,
+    laboratoryLabDeptTreeLargeTree,
+    laboratoryLabDeptTreeLargeRooms,
     laboratorySubPassOutGetCountByBuildId,
+    getDeptDropList,
   } from "@/api/index";
   export default {
     name: 'deptListComponent',
@@ -72,9 +94,11 @@
         buildName:null,
         floorId:null,
         floorName:null,
+        deptList:[],
         //新树
         deptOptions: null,
         defaultKey:null,
+        inputType:'1',
         defaultProps: {
           children: "childTreeList",
           label: "deptName",
@@ -84,6 +108,7 @@
         treeId:null,
         queryParams: {
           searchValue: '',
+          deptId:'',
         },
         levelList:[],
         checkLeveList:[],
@@ -93,24 +118,27 @@
 
     },
     mounted(){
+      this.getDeptDropList();
       this.laboratoryLevelConfigGetLevelTitleList();
-      this.laboratoryLabDeptTreeGetTreeList()
+      this.laboratoryLabDeptTreeLargeTree()
     },
     methods:{
       //查询按钮
       handleQuery(){
-        this.laboratoryLabDeptTreeGetTreeList();
+        this.laboratoryLabDeptTreeLargeTree();
       },
       //重置按钮
       resetQuery(){
         let self = this;
+        this.$set(this,'inputType','1');
         this.$set(this,'queryParams',{
           searchValue: '',
+          deptId:'',
         });
         for(let i=0;i<self.checkLeveList.length;i++){
           self.checkLeveList[i].type = false;
         }
-        this.laboratoryLabDeptTreeGetTreeList();
+        this.laboratoryLabDeptTreeLargeTree();
       },
       //选中级别
       checkLevelButton(item,index){
@@ -131,26 +159,46 @@
         });
       },
       //新树
-      laboratoryLabDeptTreeGetTreeList() {
+      laboratoryLabDeptTreeLargeTree() {
         let self = this;
         let obj = {
-          searchValue:this.searchValue,
+          deptId:this.queryParams.deptId,
           levelIds:[],
         }
+        if (this.inputType == 1){
+          obj.subName = this.queryParams.searchValue;
+        } else if(this.inputType == 2){
+          obj.roomNum = this.queryParams.searchValue;
+        }
         for(let i=0;i<self.checkLeveList.length;i++){
           if(self.checkLeveList[i].type){
             obj.levelIds.push(self.checkLeveList[i].levelId)
           }
         }
-        laboratoryLabDeptTreeGetTreeList(obj).then(response => {
+        laboratoryLabDeptTreeLargeTree(obj).then(response => {
+          if(!response.data[0]){
+            this.msgSuccess('未找到相关数据')
+            return
+          }
           let self = this;
-          let list = this.delList(response.data);
+          let list = this.forTreeId(response.data);
+          //写入楼层下数据
+          self.$set(self,'deptOptions',list)
           this.$nextTick(()=>{
-            let checkData = list[0].childTreeList[0].childTreeList[0].childTreeList[0];
-            //写入楼层下数据
-            this.$set(this,'deptOptions',list)
-            //展开列表
-            this.$set(this,'defaultKey',[list[0].treeId,list[0].childTreeList[0].treeId,list[0].childTreeList[0].childTreeList[0].treeId,list[0].childTreeList[0].childTreeList[0].childTreeList[0].treeId]);
+            let checkData = []
+            if(obj.subName || obj.roomNum){
+              checkData = list[0].childTreeList[0].childTreeList[0];
+              //展开列表
+              // self.$set(self,'defaultKey',[list[0].treeId,list[0].childTreeList[0].childTreeList[0].treeId]);
+              self.$set(self,'defaultKey',[list[0].treeId,list[0].childTreeList[0].treeId]);
+              setTimeout(function(){
+                self.$set(self,'defaultKey',[list[0].treeId,list[0].childTreeList[0].childTreeList[0].treeId]);
+              },200)
+            }else{
+              checkData = list[0].childTreeList[0];
+              //展开列表
+              self.$set(self,'defaultKey',[list[0].treeId,list[0].childTreeList[0].treeId]);
+            }
             setTimeout(function(){
               //选中列表
               self.$refs.tree.setCurrentKey(checkData.treeId);
@@ -160,45 +208,42 @@
               //查询实验室人数
               self.laboratorySubPassOutGetCountByBuildId(1,checkData.treeId);
               //父级视屏数据
-              self.$parent.setVideoData(checkData);
-            },200);
+              self.getSubId(checkData);
+            },600);
           })
         })
       },
-      //空数据处理
-      delList(list){
+      forTreeId(list){
         let self = this;
-        for(let i=1;i<4;i++){
-          list.forEach((item,index)=>{
-            if(item.level != 5){
-              if(item.childTreeList){
-                if(!item.childTreeList[0]){
-                  list.splice(index,1)
-                }else{
-                  self.delList(item.childTreeList);
-                }
-              }else{
-                list.splice(index,1)
-              }
-            }
-          })
-        }
+        list.forEach((item,index)=>{
+          item.treeId = item.id;
+          item.deptName = item.name;
+          item.level = item.type;
+          item.childTreeList = item.buildFloorVoList;
+          delete item.id
+          delete item.name
+          delete item.type
+          delete item.buildFloorVoList
+          if(item.childTreeList[0]){
+            self.forTreeId(item.childTreeList);
+          }
+        })
         return list
       },
       //点击操作
       nodeClickButton(e,data){
         this.$nextTick(() => {
-          if (!e.level||e.level == 4||e.level == 5) {
+          if (!e.level||e.level == 2||e.level == 3) {
             if(this.treeId != e.treeId){
               this.treeId = e.treeId;
               //等待后续逻辑-面板展示-实验室信息-视屏信息
               //当前位置展示
               this.checkAddress(e.treeId);
               //查询实验室人数
-              let type = !e.subId&&!e.level?3:(e.level == 4 ?1:(e.level == 5?2:''))
+              let type = !e.subId&&!e.level?3:(e.level == 2 ?1:(e.level == 3?2:''))
               this.laboratorySubPassOutGetCountByBuildId(type,e.treeId);
-              //父级视屏数据
-              this.$parent.setVideoData(e);
+              //查询楼栋/楼层下所有实验室ID
+              this.getSubId(e);
             }
           }
           this.$refs.tree.setCurrentKey(this.treeId);
@@ -206,21 +251,28 @@
       },
       //手动加载
       loadNode(node, resolve) {
+        console.log('手动')
         let self = this;
         if (node.data){
-          if(node.data.level == 5){
+          if(node.data.level == 3){
             let obj = {
-              searchValue:this.searchValue,
+              deptId:this.queryParams.deptId,
               levelIds:[],
             }
+            if (this.inputType == 1){
+              obj.subName = this.queryParams.searchValue;
+            } else if(this.inputType == 2){
+              obj.roomNum = this.queryParams.searchValue;
+            }
             for(let i=0;i<self.checkLeveList.length;i++){
               if(self.checkLeveList[i].type){
                 obj.levelIds.push(self.checkLeveList[i].levelId)
               }
             }
             obj.floorId = node.data.treeId;
-            laboratoryLabDeptTreeGetRoomList(obj).then(response => {
+            laboratoryLabDeptTreeLargeRooms(obj).then(response => {
               for(let i=0;i<response.data.length;i++){
+                response.data[i].deptName = response.data[i].formatRoomName;
                 response.data[i].leaf = true;
               }
               resolve(response.data[0]?response.data:[]);
@@ -228,7 +280,7 @@
           }else{
             if(node.data.childTreeList){
               if(node.data.childTreeList[0]){
-                if(node.data.level != 4){
+                if(node.data.level != 2){
                   node.data.childTreeList.forEach((item)=>{
                     if(item.childTreeList){
                       if(!item.childTreeList[0]){
@@ -250,6 +302,48 @@
         }
 
       },
+      //实验室ID查询
+      getSubId(e){
+        let self = this;
+        let obj = {
+          deptId:this.queryParams.deptId,
+          levelIds:[],
+        }
+        if (this.inputType == 1){
+          obj.subName = this.queryParams.searchValue;
+        } else if(this.inputType == 2){
+          obj.roomNum = this.queryParams.searchValue;
+        }
+        for(let i=0;i<self.checkLeveList.length;i++){
+          if(self.checkLeveList[i].type){
+            obj.levelIds.push(self.checkLeveList[i].levelId)
+          }
+        }
+        if(!e.level){
+          //实验室
+          this.$parent.setVideoData([e.treeId]);
+        }else if(e.level == 2){
+          //楼栋
+          obj.buildingId = e.treeId;
+          laboratoryLabDeptTreeLargeRooms(obj).then(response => {
+            let  list = [];
+            for(let i=0;i<response.data.length;i++){
+              list.push(response.data[i].treeId)
+            }
+            this.$parent.setVideoData(list);
+          })
+        }else if(e.level == 3){
+          //楼层
+          obj.floorId = e.treeId;
+          laboratoryLabDeptTreeLargeRooms(obj).then(response => {
+            let  list = [];
+            for(let i=0;i<response.data.length;i++){
+              list.push(response.data[i].treeId)
+            }
+            this.$parent.setVideoData(list);
+          })
+        }
+      },
       //选中位置联查
       checkAddress(id){
         let list = this.forAddress(this.$refs.tree._data.root.childNodes,id);
@@ -291,6 +385,12 @@
           this.$parent.setUserNum(response.data)
         });
       },
+      //查询学院列表
+      getDeptDropList(){
+        getDeptDropList({deptName:"",level:2,deptType:1}).then(response => {
+          this.$set(this, 'deptList', response.data)
+        });
+      },
     },
   }
 </script>
@@ -318,6 +418,30 @@
           font-size: 34px;
           font-family: SOURCEHANSANSCN;
         }
+        .input-select{
+          margin-top:20px;
+          ::v-deep .el-input--medium .el-input__inner{
+            border: none;
+          }
+          ::v-deep .el-input-group__prepend .el-input{
+            border-right:1px solid #0591F3;
+          }
+          ::v-deep .el-form-item__content .el-input-group{
+            border:1px solid #0591F3;
+            border-radius: 10px;
+          }
+          ::v-deep .el-input-group__prepend{
+            border: none;
+            background-color: rgba(0,0,0,0);
+          }
+          ::v-deep .el-input--medium .el-input__inner{
+            font-size: 34px;
+            line-height: 68px;
+            width:220px;
+            color:#fff;
+            font-family: SOURCEHANSANSCN;
+          }
+        }
         ::v-deep .el-form-item__content{
           height:70px;
         }
@@ -327,7 +451,7 @@
           color: #fff;
           height:70px;
           background-color:rgba(0,0,0,0)!important;
-          border:1px solid #0591F3!important;
+          border:1px solid #0591F3;
           border-radius:10px;
         }
         .form-reset-common-style-button{

+ 12 - 11
src/views/cengterMaxBox/videoSurveillance/pageComponent/videoComponent.vue

@@ -33,7 +33,7 @@
   </div>
 </template>
 <script>
-  import { iotCameraFindByCondition } from "@/api/index";
+  import { iotCameraLargeFindByCondition } from "@/api/index";
   import H5PlayerVideo from '@/components/H5PlayerVideo/H5PlayerVideo.vue';
   import fullH5PlayerVideo from '@/components/fullH5PlayerVideo/fullH5PlayerVideo.vue'
   export default {
@@ -107,16 +107,17 @@
           protocol:window.location.href.indexOf('https') !== -1?'wss':'ws',
           streamType:1,
           source:0,
+          subIds:data,
         };
-        if(data.level == 4){
-          obj.buildId = data.treeId;
-        }else if(data.level == 5){
-          obj.floorId = data.treeId;
-        }else if(!data.subId&&!data.level){
-          obj.floorId = data.treeId;
-        }else if(data.subId&&!data.level){
-          obj.subIds = [data.treeId];
-        }
+        // if(data.level == 4){
+        //   obj.buildId = data.treeId;
+        // }else if(data.level == 5){
+        //   obj.floorId = data.treeId;
+        // }else if(!data.subId&&!data.level){
+        //   obj.floorId = data.treeId;
+        // }else if(data.subId&&!data.level){
+        //   obj.subIds = [data.treeId];
+        // }
         this.$set(this,'videoQueryParams',obj);
         this.$nextTick(()=>{
           this.videoInitialize()
@@ -126,7 +127,7 @@
         let self = this;
         self.$set(self, 'videoType', false);
         self.$set(self, 'videoList', []);
-        iotCameraFindByCondition(this.videoQueryParams).then(response => {
+        iotCameraLargeFindByCondition(this.videoQueryParams).then(response => {
           let list = [];
           for(let i=0;i<response.data.records.length;i++){
             list.push(

+ 2 - 2
src/views/home.vue

@@ -259,8 +259,8 @@
           {school:'N',	name:'家畜生物学重点实验室楼',	buildId:'101093843117592787',buildIdList:[],},
           {school:'N',	name:'木艺坊',	buildId:'101093843117592819',buildIdList:[],},
           {school:'N',	name:'林学院实验楼',	buildId:'101093843117592818',buildIdList:[],},
-          {school:'N',	name:'科研主楼',	buildId:'101093843117592784',buildIdList:[],},
-          {school:'N',	name:'科研楼',	buildId:'101093843117592822',buildIdList:[],},
+          {school:'N',	name:'科研主楼',	buildId:'101093843117592784',buildIdList:['101093843117592784','101093843117592822'],},
+          // {school:'N',	name:'科研楼',	buildId:'101093843117592822',buildIdList:[],},
           {school:'N',	name:'经管园林楼(文科楼)A',	buildId:'101093843117592777',buildIdList:[],},
           {school:'N',	name:'经管园林楼(文科楼)C',	buildId:'101093843117592778',buildIdList:[],},
           {school:'N',	name:'草业与草原楼',	buildId:'101093843117592825',buildIdList:[],},