dedsudiyu 1 mesiac pred
rodič
commit
c0e8b9a185

+ 26 - 0
src/api/index.js

@@ -436,3 +436,29 @@ export function chemicalStockHazMartClassStatistics (query) {
     params: query
   })
 }
+
+//新楼栋-楼层树结构
+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
+  })
+}

+ 31 - 54
src/views/emergencyManagement/pageComponent/deptListComponent.vue

@@ -1,30 +1,5 @@
 <template>
   <div class="deptListComponent">
-    <!--<p class="title-p">西北农林林大学</p>-->
-    <!--<div class="for-big-box" v-for="(bigItem,bigIndex) in treeList" :key="bigItem.id" v-if="bigItem.onType">-->
-      <!--<div class="for-big-name-box">-->
-        <!--<p class="border-p"></p>-->
-        <!--<p></p>-->
-        <!--<p :class="bigItem.id == deptId?'checkColor':''">{{bigItem.name}}</p>-->
-      <!--</div>-->
-      <!--<div class="for-box" v-for="(item,index) in bigItem.buildFloorVoList" :key="item.id" v-if="item.onType">-->
-        <!--<div class="for-name-box">-->
-          <!--<p class="none-p-1"></p>-->
-          <!--<p class="border-p"></p>-->
-          <!--<p></p>-->
-          <!--<p :class="item.id == buildId?'checkColor':''">{{item.name}}</p>-->
-        <!--</div>-->
-        <!--<div class="for-min-box" v-for="(minItem,minIndex) in item.buildFloorVoList" :key="minItem.id">-->
-          <!--<div class="for-min-name-box" @click="checkButton(bigItem,item,minItem)">-->
-            <!--<p class="none-p-1"></p>-->
-            <!--<p class="none-p-2"></p>-->
-            <!--<p class="border-p"></p>-->
-            <!--<p></p>-->
-            <!--<p :class="minItem.id == floorId?'checkColor':''">{{minItem.name}}</p>-->
-          <!--</div>-->
-        <!--</div>-->
-      <!--</div>-->
-    <!--</div>-->
     <div class="tree-max-box">
       <el-tree
         class="tree-line"
@@ -49,7 +24,7 @@
                 overflow:hidden;
                 text-overflow:ellipsis;
                 white-space:nowrap;"
-                  :style="!data.level?'font-size:20px':(data.level==1?'font-size:26px':(data.level==2||data.level==3||data.level==4?'font-size:24px':(data.level==5?'font-size:20px':'')))">{{data.deptName}}</span>
+                  :style="!data.level?'font-size:20px':(data.level==1?'font-size:26px':(data.level==2?'font-size:24px':(data.level==3?'font-size:20px':'')))">{{data.deptName}}</span>
         </template>
       </el-tree>
     </div>
@@ -57,7 +32,7 @@
 </template>
 <script>
   import {
-    laboratoryLabDeptTreeGetTreeList,
+    laboratoryLabDeptTreeLargeTree,
     laboratorySubPassOutGetCountByBuildId,
   } from "@/api/index";
   export default {
@@ -89,7 +64,7 @@
     },
     mounted(){
       // this.systemBuildingGetTreeList()
-      this.laboratoryLabDeptTreeGetTreeList()
+      this.laboratoryLabDeptTreeLargeTree()
     },
     methods:{
       //选中楼层
@@ -167,17 +142,17 @@
       },
 
       //新树
-      laboratoryLabDeptTreeGetTreeList() {
+      laboratoryLabDeptTreeLargeTree() {
         let self = this;
-        laboratoryLabDeptTreeGetTreeList({}).then(response => {
+        laboratoryLabDeptTreeLargeTree({}).then(response => {
           let self = this;
-          let list = this.delList(response.data);
+          let list = this.forTreeId(response.data);
           this.$nextTick(()=>{
-            let checkData = list[0].childTreeList[0].childTreeList[0].childTreeList[0].childTreeList[0];
+            let checkData = list[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]);
+            this.$set(this,'defaultKey',[list[0].treeId,list[0].childTreeList[0].treeId]);
             setTimeout(function(){
               //选中列表
               self.$refs.tree.setCurrentKey(checkData.treeId);
@@ -194,32 +169,34 @@
           })
         })
       },
-      //空数据处理
-      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)
-              }
-            }else{
-              item.leaf = true;
+        list.forEach((item,index)=>{
+          item.treeId = item.id;
+          item.deptName = item.name;
+          item.level = item.type;
+          if(item.level != 3){
+            item.childTreeList = item.buildFloorVoList;
+            item.leaf = false;
+          }else{
+            item.leaf = true;
+          }
+          delete item.id
+          delete item.name
+          delete item.type
+          delete item.buildFloorVoList
+          if(item.childTreeList){
+            if(item.childTreeList[0]){
+              self.forTreeId(item.childTreeList);
             }
-          })
-        }
+          }
+        })
         return list
       },
       //点击操作
       nodeClickButton(e,data){
         this.$nextTick(() => {
-          if (e.level == 5) {
+          if (e.level == 3) {
             if(this.treeId != e.treeId){
               this.treeId = e.treeId;
               //等待后续逻辑-面板展示-实验室信息-视屏信息
@@ -240,10 +217,10 @@
       loadNode(node, resolve) {
         let self = this;
         if (node.data){
-          if(node.data.level != 5){
+          if(node.data.level != 3){
             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]){

+ 1 - 1
src/views/home.vue

@@ -52,7 +52,7 @@
         timeData:null,
         // 定时器
         timer:null,
-        pageType:1,
+        pageType:4,
       }
     },
     created(){

+ 8 - 8
src/views/newSafetyOverview/pageComponent/canvasMap.vue

@@ -114,15 +114,15 @@
           {school:'老附中校区',	name:'附中教学楼',	buildId:'101093843117592791',centerValue:'',valueList:[],alarmType:false,},
         ],
         // 本地
-        modelsUrlN:'/models/NxiaoQu.glb',
-        modelsUrlB:'/models/BxiaoQu.glb',
-        alarmUrl:'/png/alarm.png',
-        noAlarmUrl:'/png/noAlarm.png',
+        // modelsUrlN:'/models/NxiaoQu.glb',
+        // modelsUrlB:'/models/BxiaoQu.glb',
+        // alarmUrl:'/png/alarm.png',
+        // noAlarmUrl:'/png/noAlarm.png',
         // 本地部署
-        // modelsUrlN:this.judgmentNetworkReturnAddress()?'/v3/largeScreen/models/NxiaoQu.glb':'/labAppTest/largeScreen/models/NxiaoQu.glb',
-        // modelsUrlB:this.judgmentNetworkReturnAddress()?'/v3/largeScreen/models/BxiaoQu.glb':'/labAppTest/largeScreen/models/BxiaoQu.glb',
-        // alarmUrl:this.judgmentNetworkReturnAddress()?'/v3/largeScreen/png/alarm.png':'/labAppTest/largeScreen/png/alarm.png',
-        // noAlarmUrl:this.judgmentNetworkReturnAddress()?'/v3/largeScreen/png/noAlarm.png':'/labAppTest/largeScreen/png/noAlarm.png',
+        modelsUrlN:this.judgmentNetworkReturnAddress()?'/v3/largeScreen/models/NxiaoQu.glb':'/labAppTest/largeScreen/models/NxiaoQu.glb',
+        modelsUrlB:this.judgmentNetworkReturnAddress()?'/v3/largeScreen/models/BxiaoQu.glb':'/labAppTest/largeScreen/models/BxiaoQu.glb',
+        alarmUrl:this.judgmentNetworkReturnAddress()?'/v3/largeScreen/png/alarm.png':'/labAppTest/largeScreen/png/alarm.png',
+        noAlarmUrl:this.judgmentNetworkReturnAddress()?'/v3/largeScreen/png/noAlarm.png':'/labAppTest/largeScreen/png/noAlarm.png',
         // 线上部署
         // modelsUrlN:'/largeScreen/models/NxiaoQu.glb',
         // modelsUrlB:'/largeScreen/models/BxiaoQu.glb',

+ 112 - 75
src/views/videoSurveillance/pageComponent/deptListComponent.vue

@@ -2,26 +2,46 @@
   <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="实验室"
-            clearable
-            style="width:178px;"
-          />
-        </el-form-item>
-        <p class="form-inquire-common-style-button" @click="handleQuery">查询</p>
-        <p class="form-reset-common-style-button" @click="resetQuery">重置</p>
-      </el-form>
-      <div class="for-level-max-box">
-        <div class="for-level-box"
-             @click="checkLevelButton(item,index)"
-             v-for="(item,index) in levelList" :key="index">
-          {{item.titleName}}
-          <p class="checkLevel" v-if="checkLeveList[index].type"><span class="el-icon-check"></span></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: 217px">
+              <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:60px;" @click="handleQuery">查询</p>
+          <p class="form-reset-common-style-button" style="width:60px;" @click="resetQuery">重置</p>
         </div>
-      </div>
+        <div style="margin-top:20px;">
+          <el-form-item label="" prop="searchValue">
+            <el-input
+              v-model="queryParams.searchValue"
+              placeholder="请输入"
+              style="width:370px;"
+            >
+              <el-select v-model="inputType" class="input-select" 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>
+        <div class="for-level-max-box">
+          <div class="for-level-box"
+               @click="checkLevelButton(item,index)"
+               v-for="(item,index) in levelList" :key="index">
+            {{item.titleName}}
+            <p class="checkLevel" v-if="checkLeveList[index].type"><span class="el-icon-check"></span></p>
+          </div>
+        </div>
+      </el-form>
       <div class="tree-max-box">
         <el-tree
           class="tree-line"
@@ -46,7 +66,7 @@
                 overflow:hidden;
                 text-overflow:ellipsis;
                 white-space:nowrap;"
-              :style="!data.level?'font-size:20px':(data.level==1?'font-size:26px':(data.level==2||data.level==3||data.level==4?'font-size:24px':(data.level==5?'font-size:20px':'')))">{{data.deptName}}</span>
+              :style="!data.level?'font-size:20px':(data.level==1?'font-size:26px':(data.level==2?'font-size:24px':(data.level==3?'font-size:20px':'')))">{{data.deptName}}</span>
          </template>
         </el-tree>
       </div>
@@ -56,9 +76,10 @@
 <script>
   import {
     laboratoryLevelConfigGetLevelTitleList,
-    laboratoryLabDeptTreeGetTreeList,
-    laboratoryLabDeptTreeGetRoomList,
+    laboratoryLabDeptTreeLargeTree,
+    laboratoryLabDeptTreeLargeRooms,
     laboratorySubPassOutGetCountByBuildId,
+    getDeptDropList,
   } from "@/api/index";
   export default {
     name: 'deptListComponent',
@@ -72,9 +93,11 @@
         buildName:null,
         floorId:null,
         floorName:null,
+        deptList:[],
         //新树
         deptOptions: null,
         defaultKey:null,
+        inputType:'1',
         defaultProps: {
           children: "childTreeList",
           label: "deptName",
@@ -84,6 +107,7 @@
         treeId:null,
         queryParams: {
           searchValue: '',
+          deptId:'',
         },
         levelList:[],
         checkLeveList:[],
@@ -93,24 +117,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 +158,35 @@
         });
       },
       //新树
-      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);
           this.$nextTick(()=>{
-            let checkData = list[0].childTreeList[0].childTreeList[0].childTreeList[0];
+            let checkData = list[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]);
+            this.$set(this,'defaultKey',[list[0].treeId,list[0].childTreeList[0].treeId]);
             setTimeout(function(){
               //选中列表
               self.$refs.tree.setCurrentKey(checkData.treeId);
@@ -162,60 +198,37 @@
               //父级视屏数据
               self.$parent.setVideoData(checkData);
             },200);
-            // let minObj = JSON.parse(JSON.stringify(obj))
-            // minObj.floorId = list[0].childTreeList[0].childTreeList[0].childTreeList[0].treeId;
-            // laboratoryLabDeptTreeGetRoomList(minObj).then(minResponse => {
-            //   for(let i=0;i<minResponse.data.length;i++){
-            //     minResponse.data[i].leaf = true;
-            //   }
-            //   list[0].childTreeList[0].childTreeList[0].childTreeList[0].childTreeList[0].childTreeList = minResponse.data[0]?minResponse.data:[];
-            //   //选中逻辑
-            //   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,list[0].childTreeList[0].childTreeList[0].childTreeList[0].childTreeList[0].treeId]
-            //   this.$nextTick(()=>{
-            //     this.$refs.tree.setCurrentKey(list[0].childTreeList[0].childTreeList[0].childTreeList[0].childTreeList[0].treeId);
-            //     this.$nextTick(()=>{
-            //       setTimeout(function(){
-            //         self.$refs.tree.setCurrentKey(list[0].childTreeList[0].childTreeList[0].childTreeList[0].childTreeList[0].childTreeList[0].treeId);
-            //         self.$set(self,'treeId',list[0].childTreeList[0].childTreeList[0].childTreeList[0].childTreeList[0].childTreeList[0].treeId);
-            //       },200);
-            //     })
-            //   })
-            //   this.$set(this,'deptOptions',list)
-            // })
           })
         })
       },
-      //空数据处理
-      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);
@@ -228,19 +241,25 @@
       loadNode(node, resolve) {
         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:[]);
@@ -248,7 +267,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]){
@@ -311,6 +330,12 @@
           this.$parent.setUserNum(response.data)
         });
       },
+      //查询学院列表
+      getDeptDropList(){
+        getDeptDropList({deptName:"",level:2,deptType:1}).then(response => {
+          this.$set(this, 'deptList', response.data)
+        });
+      },
     },
   }
 </script>
@@ -335,11 +360,23 @@
           line-height: 38px;
           font-size: 16px;
         }
+        .input-select{
+          ::v-deep .el-input--medium .el-input__inner{
+            background: #013138;
+            font-size: 18px;
+            line-height: 20px;
+            width:140px;
+            color:#fff;
+          }
+        }
         ::v-deep .el-form-item__content{
           height:40px;
         }
         ::v-deep .el-input--medium .el-input__inner{
           height:40px;
+          border:1px solid #04BECB;
+          font-size:18px;
+          line-height: 20px;
         }
         .form-reset-common-style-button{
           width:80px;
@@ -365,7 +402,7 @@
       }
       .for-level-max-box{
         display: flex;
-        padding-left:29px;
+        margin-top:20px;
         .for-level-box{
           cursor: pointer;
           color:#fff;

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

@@ -28,7 +28,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 {
@@ -95,6 +95,7 @@
       },
       //刷新视屏
       getVideoData(data){
+        console.log('data',data)
         let obj = {
           page:1,
           pageSize:4,
@@ -121,7 +122,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(