dedsudiyu 11 months ago
parent
commit
753654f0cc

+ 5 - 1
src/api/commonality/permission.js

@@ -508,7 +508,11 @@ export function iotSensorFindBySubId(query) {
     params: query
     params: query
   })
   })
 }
 }
-//硬件-查询
+/* 硬件-查询
+* floorId 查询楼层内硬件  或   passageway 查询楼道内硬件
+* hardwareTypeKey 硬件类型key
+* */
+
 export function iotHardwareFindByType(data) {
 export function iotHardwareFindByType(data) {
   return request({
   return request({
     url: '/iot/hardware/findByType',
     url: '/iot/hardware/findByType',

+ 16 - 0
src/api/emergencyManagement/index.js

@@ -379,6 +379,22 @@ export function laboratoryBigViewHazardCensus(data) {
     data: data
     data: data
   })
   })
 }
 }
+//应急处置-开灯
+export function laboratoryExitRelayOpenLight(data) {
+  return request({
+    url: '/laboratory/exitRelay/openLight',
+    method: 'post',
+    data: data
+  })
+}
+//应急处置-关灯
+export function laboratoryExitRelayCloseLight(data) {
+  return request({
+    url: '/laboratory/exitRelay/closeLight',
+    method: 'post',
+    data: data
+  })
+}
 
 
 
 
 
 

File diff suppressed because it is too large
+ 1 - 0
src/assets/ZDimages/404.svg


File diff suppressed because it is too large
+ 1 - 0
src/assets/ZDimages/daaiya.svg


+ 258 - 114
src/views/chemicalManage/basicManagement/chemicalsCabinetManage/addPage.vue

@@ -34,29 +34,29 @@
               />
               />
             </el-select>
             </el-select>
           </el-form-item>
           </el-form-item>
-          <el-form-item label="摄像头:" prop="cameraId">
-            <el-select v-model="newData.cameraId" placeholder="请选择摄像头" style="width: 500px">
-              <el-option
-                v-for="item in cameraOptions"
-                :key="item.value"
-                :label="item.label"
-                :value="item.value"
-              />
-            </el-select>
-          </el-form-item>
-        </div>
-        <div class="form-max-box">
-          <el-form-item label="采集器:" prop="collectorId">
-            <el-select v-model="newData.collectorId" placeholder="请选择采集器" style="width: 500px">
-              <el-option
-                v-for="item in harvesterOptions"
-                :key="item.value"
-                :label="item.label"
-                :value="item.value"
-              />
-            </el-select>
-          </el-form-item>
+          <!--<el-form-item label="摄像头:" prop="cameraId">-->
+            <!--<el-select v-model="newData.cameraId" placeholder="请选择摄像头" style="width: 500px">-->
+              <!--<el-option-->
+                <!--v-for="item in cameraOptions"-->
+                <!--:key="item.value"-->
+                <!--:label="item.label"-->
+                <!--:value="item.value"-->
+              <!--/>-->
+            <!--</el-select>-->
+          <!--</el-form-item>-->
         </div>
         </div>
+        <!--<div class="form-max-box">-->
+          <!--<el-form-item label="采集器:" prop="collectorId">-->
+            <!--<el-select v-model="newData.collectorId" placeholder="请选择采集器" style="width: 500px">-->
+              <!--<el-option-->
+                <!--v-for="item in harvesterOptions"-->
+                <!--:key="item.value"-->
+                <!--:label="item.label"-->
+                <!--:value="item.value"-->
+              <!--/>-->
+            <!--</el-select>-->
+          <!--</el-form-item>-->
+        <!--</div>-->
         <div class="form-max-box">
         <div class="form-max-box">
           <el-form-item label="柜门设置:" prop="cabinetDoorModelList">
           <el-form-item label="柜门设置:" prop="cabinetDoorModelList">
             <div class="form-add-box">
             <div class="form-add-box">
@@ -95,15 +95,15 @@
                   remote
                   remote
                   clearable
                   clearable
                   reserve-keyword
                   reserve-keyword
-                  @change="userSelectClick(item)"
+                  @change="(val)=>userSelectClick(val,index)"
                   @clear="userClearClick"
                   @clear="userClearClick"
                   placeholder="请输入姓名进行搜索"
                   placeholder="请输入姓名进行搜索"
-                  :remote-method="userSelect">
+                  :remote-method="(val)=>userSelect(val,index)">
                   <el-option
                   <el-option
-                    v-for="item in userOptions"
-                    :key="item.userId"
-                    :label="item.userName"
-                    :value="item.userId">
+                    v-for="itemOptions in item.userOptions"
+                    :key="itemOptions.userId"
+                    :label="itemOptions.userName"
+                    :value="itemOptions.userId">
                   </el-option>
                   </el-option>
                 </el-select>
                 </el-select>
               </el-form-item>
               </el-form-item>
@@ -223,7 +223,27 @@
         adminAndSafeId:[],
         adminAndSafeId:[],
         //当前实验室管理员和安全员id和name
         //当前实验室管理员和安全员id和name
         adminAndSafeList:[],
         adminAndSafeList:[],
-        newData:{},
+        newData:{
+          cabinetName:'',
+          deptId:'',
+          deptName:'',
+          subId:'',
+          subName:'',
+          cameraId:'',
+          collectorId:'',
+          cabinetDoorModelList:[
+            {
+              doorName:'默认柜门1',
+              doorLayers:'',
+              cabinetAdminModelList:[],
+              unlockingMethod:'1',
+              cabinetLockList:[],
+              cabinetLattice:[],
+              userOptions:[],
+              userNameOptions:[],
+            }
+          ],
+        },
         rules:{
         rules:{
           cabinetName: [
           cabinetName: [
             { required: true, message: "请输入化学品柜名称", trigger: "blur" },
             { required: true, message: "请输入化学品柜名称", trigger: "blur" },
@@ -273,7 +293,10 @@
             { required: true, message: "请选择柜格", trigger: "blur" },
             { required: true, message: "请选择柜格", trigger: "blur" },
             { required: true, message: "请选择柜格", validator: this.spaceJudgment, trigger: "blur" }
             { required: true, message: "请选择柜格", validator: this.spaceJudgment, trigger: "blur" }
           ],
           ],
-        }
+        },
+        //实验室管理员数据
+        safeList:[],
+        safeIdList:[],
       }
       }
     },
     },
     created(){
     created(){
@@ -289,6 +312,54 @@
       initialize(){
       initialize(){
         let self=this;
         let self=this;
         if(this.propsData.cabinetId){
         if(this.propsData.cabinetId){
+          let obj = JSON.parse(JSON.stringify(this.propsData))
+          console.log('obj=>', obj)
+          let newData = {
+            cabinetName:obj.cabinetName,
+            deptId:obj.deptId,
+            deptName:obj.deptName,
+            subId:obj.subId,
+            subName:obj.subName,
+            cameraId:obj.cameraId,
+            collectorId:obj.collectorId,
+            cabinetDoorModelList:[],
+          }
+          obj.cabinetDoorVoList.forEach((item)=>{
+            console.log('item=>', item)
+            let minObj = {
+              doorLayers:item.doorLayers,
+              doorName:item.doorName,
+              unlockingMethod:item.unlockingMethod,
+              cabinetLockList:[],
+              cabinetAdminModelList:[],
+              userOptions:[],
+              userNameOptions:[],
+            };
+            item.cabinetLockVoList.forEach((bigItem)=>{
+              console.log('bigItem=>', bigItem)
+              minObj.cabinetLockList.push(bigItem.lockId)
+            })
+            item.cabinetAdminVoList.forEach((minItem)=>{
+              console.log('minItem=>', minItem)
+              minObj.cabinetAdminModelList.push(minItem.userId)
+              minObj.userOptions.push({
+                userId:minItem.userId,
+                userName:minItem.userName,
+              })
+              minObj.userNameOptions.push({
+                userId:minItem.userId,
+                userName:minItem.userName,
+              })
+            })
+            newData.cabinetDoorModelList.push(minObj);
+          })
+          this.subOptions=[{subId:obj.subId,subName:obj.subName,}]
+          this.$set(this,'newData',newData);
+          this.iotDeviceFindByType(this.newData.subId);
+
+
+
+          return
           this.$set(this,'newData',this.propsData);
           this.$set(this,'newData',this.propsData);
           //智能锁
           //智能锁
           this.iotDeviceFindByType(this.newData.subId);
           this.iotDeviceFindByType(this.newData.subId);
@@ -330,27 +401,6 @@
           self.userOptions=this.unique(self.userOptions)
           self.userOptions=this.unique(self.userOptions)
           self.userOptionsArr=this.unique(self.userOptions)
           self.userOptionsArr=this.unique(self.userOptions)
           this.newData.cabinetDoorModelList=this.newData.cabinetDoorVoList
           this.newData.cabinetDoorModelList=this.newData.cabinetDoorVoList
-
-        }else{
-          this.$set(this,'newData',{
-            cabinetName:'',
-            deptId:'',
-            deptName:'',
-            subId:'',
-            subName:'',
-            cameraId:'',
-            collectorId:'',
-            cabinetDoorModelList:[
-              {
-                doorName:'默认柜门1',
-                doorLayers:'',
-                cabinetAdminModelList:[],
-                unlockingMethod:'1',
-                cabinetLockList:[],
-                cabinetLattice:[],
-              }
-            ],
-          });
         }
         }
       },
       },
       // 返回按钮
       // 返回按钮
@@ -371,30 +421,81 @@
       },
       },
       /** 提交按钮 */
       /** 提交按钮 */
       submitForm() {
       submitForm() {
+        let self = this;
         this.$refs["form"].validate(valid => {
         this.$refs["form"].validate(valid => {
           if (valid) {
           if (valid) {
-            let self=this;
-            self.newData.cabinetDoorModelList.forEach(function(item) {
-              //管理员数据处理
-              item.cabinetAdminModelList=item.cabinetAdminModelListArr
-              //当开门方式为智能锁数据处理
-              if (item.unlockingMethod=='2'){
-                item.cabinetLockList= item.cabinetLockListArr
-              }
-              //当开门方式为钥匙柜时数据处理
-              if (item.unlockingMethod=='3'){
-                item.cabinetLockList= item.cabinetLockListArr
-                item.cabinetLockList[0].cabinetLattice=item.cabinetLattice.join(',')
-              }
+            let obj = JSON.parse(JSON.stringify(this.newData))
+            let modelList = [];
+            obj.cabinetDoorModelList.forEach((item)=>{
+              let userList = [];
+              item.cabinetAdminModelList.forEach((bigItem)=>{
+                let num = 0;
+                item.userNameOptions.forEach((minItem)=>{
+                  if(bigItem == minItem.userId){
+                    if(num < 1){
+                      num++
+                      userList.push({
+                        userId:minItem.userId,
+                        userName:minItem.userName,
+                      })
+                    }
+                  }
+                })
+              })
+              delete item.userOptions;
+              delete item.userNameOptions;
+              let lockList = [];
+              item.cabinetLockList.forEach((item)=>{
+                self.lockOptions.forEach((minItem)=>{
+                  if(item == minItem.lockId){
+                    lockList.push({
+                      lockId: minItem.lockId,
+                      lockName: minItem.lockName,
+                      lockNum: minItem.lockNum,
+                    })
+                  }
+                })
+              })
+              modelList.push({
+                doorLayers:item.doorLayers,
+                doorName:item.doorName,
+                unlockingMethod:item.unlockingMethod,
+                cabinetLockList:lockList,
+                cabinetAdminModelList:userList,
+              })
             })
             })
+            let upData = {
+              cabinetName : obj.cabinetName,
+              deptId : obj.deptId,
+              deptName : obj.deptName,
+              subId : obj.subId,
+              subName : obj.subName,
+              cameraId:1,
+              collectorId:1,
+              cabinetDoorModelList:modelList,
+            }
+            console.log('upData',upData);
+            // self.newData.cabinetDoorModelList.forEach(function(item) {
+            //   //管理员数据处理
+            //   item.cabinetAdminModelList=item.cabinetAdminModelListArr
+            //   //当开门方式为智能锁数据处理
+            //   if (item.unlockingMethod=='2'){
+            //     item.cabinetLockList= item.cabinetLockListArr
+            //   }
+            //   //当开门方式为钥匙柜时数据处理
+            //   if (item.unlockingMethod=='3'){
+            //     item.cabinetLockList= item.cabinetLockListArr
+            //     item.cabinetLockList[0].cabinetLattice=item.cabinetLattice.join(',')
+            //   }
+            // })
             if (this.newData.cabinetId){//编辑
             if (this.newData.cabinetId){//编辑
-              chemicalCabinetUpdate(self.newData).then( response => {
+              upData.cabinetId = this.newData.cabinetId;
+              chemicalCabinetUpdate(upData).then( response => {
                 self.msgSuccess("提交成功")
                 self.msgSuccess("提交成功")
                 self.$parent.tableButton(5);
                 self.$parent.tableButton(5);
               });
               });
             }else{//提交
             }else{//提交
-
-              chemicalCabinetAdd(self.newData).then( response => {
+              chemicalCabinetAdd(upData).then( response => {
                 self.msgSuccess("提交成功")
                 self.msgSuccess("提交成功")
                 self.$parent.tableButton(5);
                 self.$parent.tableButton(5);
               });
               });
@@ -411,12 +512,12 @@
       //学院选中
       //学院选中
       deptChange(){
       deptChange(){
         this.$set(this.newData,'subId','');
         this.$set(this.newData,'subId','');
-        this.$set(this,'userOptions',[]);
-        this.newData.cabinetDoorModelList.forEach((item)=>{
-          item.cabinetLockList = [];
-          item.cabinetLockListArr = [];
-          item.cabinetAdminModelList = [];
-        })
+        // this.$set(this,'userOptions',[]);
+        // this.newData.cabinetDoorModelList.forEach((item)=>{
+        //   item.cabinetLockList = [];
+        //   item.cabinetLockListArr = [];
+        //   item.cabinetAdminModelList = [];
+        // })
         for (let i=0;i<this.deptOptions.length;i++){
         for (let i=0;i<this.deptOptions.length;i++){
           if (this.newData.deptId==this.deptOptions[i].deptId){
           if (this.newData.deptId==this.deptOptions[i].deptId){
             this.$set(this.newData, 'deptName', this.deptOptions[i].deptName)
             this.$set(this.newData, 'deptName', this.deptOptions[i].deptName)
@@ -436,48 +537,90 @@
         });
         });
       },
       },
       //实验室选中
       //实验室选中
-      subChange(){
+      subChange(val){
+        let list = [];
+        let idList = [];
+        this.subOptions.forEach((item)=>{
+          if(item.subId == val){
+            this.$set(this.newData, 'subName', item.subName)
+            if (item.oneSafeId){
+              idList.push(item.oneSafeId)
+              list.push({
+                userId:item.oneSafeId,
+                userName:item.oneSafeName,
+              })
+            }
+            if (item.twoSafeId){
+              idList.push(item.twoSafeId)
+              list.push({
+                userId:item.twoSafeId,
+                userName:item.twoSafeName,
+              })
+            }
+          }
+        })
+        this.$set(this,'safeList',list);
+        this.$set(this,'safeIdList',idList);
+        //刷新现有数据
         this.newData.cabinetDoorModelList.forEach((item)=>{
         this.newData.cabinetDoorModelList.forEach((item)=>{
-          item.cabinetLockList = [];
-          item.cabinetLockListArr = [];
-          item.cabinetAdminModelList = [];
+          if(!item.cabinetAdminModelList[0]){
+            item.cabinetAdminModelList = idList;
+            item.userOptions = JSON.parse(JSON.stringify(list));
+            item.userNameOptions = JSON.parse(JSON.stringify(list));
+          }
         })
         })
-        this.adminAndSafeFun();
         this.iotDeviceFindByType(this.newData.subId);
         this.iotDeviceFindByType(this.newData.subId);
       },
       },
       //选中实验室后给柜门管理员赋值
       //选中实验室后给柜门管理员赋值
-      adminAndSafeFun(){
-        let list=[];
-        let list2=[];
-        for (let i=0;i<this.subOptions.length;i++){
-          if (this.newData.subId==this.subOptions[i].subId){
-            this.$set(this.newData, 'subName', this.subOptions[i].subName)
-            //获取当前实验室管理员和安全员
-            if (this.subOptions[i].adminId){
-              list.push(this.subOptions[i].adminId)
-              list2.push({userId:this.subOptions[i].adminId,userName:this.subOptions[i].adminName})
-            }
-            if (this.subOptions[i].oneSafeId){
-              list.push(this.subOptions[i].oneSafeId)
-              list2.push({userId:this.subOptions[i].oneSafeId,userName:this.subOptions[i].oneSafeName})
-            }
-            if (this.subOptions[i].twoSafeId){
-              list.push(this.subOptions[i].twoSafeId)
-              list2.push({userId:this.subOptions[i].twoSafeId,userName:this.subOptions[i].twoSafeName})
-            }
-          }
-        }
-        this.$set(this,'adminAndSafeId',list)
-        this.$set(this,'adminAndSafeList',list2)
-        this.$set(this,'userOptions',list2)
-        //循环给每个柜门的管理员赋值
-        for (let b=0;b<this.newData.cabinetDoorModelList.length;b++){
-          this.newData.cabinetDoorModelList[b].cabinetAdminModelList=list
-          this.newData.cabinetDoorModelList[b].cabinetAdminModelListArr=list2
-        }
+      adminAndSafeFun(val){
+        // let list=[];
+        // let list2=[];
+        // for (let i=0;i<this.subOptions.length;i++){
+        //   if (this.newData.subId==this.subOptions[i].subId){
+        //     this.$set(this.newData, 'subName', this.subOptions[i].subName)
+        //     //获取当前实验室管理员和安全员
+        //     if (this.subOptions[i].adminId){
+        //       list.push(this.subOptions[i].adminId)
+        //       list2.push({userId:this.subOptions[i].adminId,userName:this.subOptions[i].adminName})
+        //     }
+        //     if (this.subOptions[i].oneSafeId){
+        //       list.push(this.subOptions[i].oneSafeId)
+        //       list2.push({userId:this.subOptions[i].oneSafeId,userName:this.subOptions[i].oneSafeName})
+        //     }
+        //     if (this.subOptions[i].twoSafeId){
+        //       list.push(this.subOptions[i].twoSafeId)
+        //       list2.push({userId:this.subOptions[i].twoSafeId,userName:this.subOptions[i].twoSafeName})
+        //     }
+        //   }
+        // }
+        // this.$set(this,'adminAndSafeId',list)
+        // this.$set(this,'adminAndSafeList',list2)
+        // this.$set(this,'userOptions',list2)
+        // //循环给每个柜门的管理员赋值
+        // for (let b=0;b<this.newData.cabinetDoorModelList.length;b++){
+        //   this.newData.cabinetDoorModelList[b].cabinetAdminModelList=list
+        //   this.newData.cabinetDoorModelList[b].cabinetAdminModelListArr=list2
+        // }
       },
       },
       //人员选中触发
       //人员选中触发
-      userSelectClick(data){
+      userSelectClick(val,index){
+        let self = this;
+        console.log('val',val);
+        console.log('index',index);
+
+        this.newData.cabinetDoorModelList[index].userOptions.forEach((item)=>{
+          if(item.userId == val){
+            self.newData.cabinetDoorModelList[index].userNameOptions.push({
+              userId:item.userId,
+              userName:item.userName,
+            })
+          }
+        })
+
+
+
+
+
         let list=[];//管理员临时存储
         let list=[];//管理员临时存储
         for (let i=0;i<data.cabinetAdminModelList.length;i++){
         for (let i=0;i<data.cabinetAdminModelList.length;i++){
           for (let b=0;b<this.userOptionsArr.length;b++){
           for (let b=0;b<this.userOptionsArr.length;b++){
@@ -493,16 +636,16 @@
       userClearClick(){
       userClearClick(){
       },
       },
       //人员查询
       //人员查询
-      userSelect(query){
-        let self=this;
+      userSelect(query,index){
         if (query !== '') {
         if (query !== '') {
           let obj = {
           let obj = {
             userType:'',
             userType:'',
             userName:query,
             userName:query,
           }
           }
           systemUserSelect(obj).then(response => {
           systemUserSelect(obj).then(response => {
-            this.userOptions = response.data;
-            self.userOptionsArr=[...self.userOptionsArr,...response.data]
+            this.$set(this.newData.cabinetDoorModelList[index],'userOptions',response.data);
+            // this.userOptions = response.data;
+            // self.userOptionsArr=[...self.userOptionsArr,...response.data]
           });
           });
         } else {
         } else {
           this.userOptions = [];
           this.userOptions = [];
@@ -566,11 +709,12 @@
           this.newData.cabinetDoorModelList.push({
           this.newData.cabinetDoorModelList.push({
             doorName:'默认柜门'+Number(this.newData.cabinetDoorModelList.length+1),
             doorName:'默认柜门'+Number(this.newData.cabinetDoorModelList.length+1),
             doorLayers:'',
             doorLayers:'',
-            cabinetAdminModelList:this.adminAndSafeId,
-            cabinetAdminModelListArr:this.adminAndSafeList,
+            cabinetAdminModelList:this.safeIdList,
             unlockingMethod:'1',
             unlockingMethod:'1',
             cabinetLockList:[],
             cabinetLockList:[],
             cabinetLattice:'',
             cabinetLattice:'',
+            userOptions:this.safeList,
+            userNameOptions:this.safeList,
           })
           })
           this.$forceUpdate()
           this.$forceUpdate()
         }
         }

+ 36 - 7
src/views/emergencyManagement/performEvacuation/performEvacuationData.vue

@@ -148,9 +148,9 @@
                        v-for="(minItem,minIndex) in item.doorList" :key="minIndex"
                        v-for="(minItem,minIndex) in item.doorList" :key="minIndex"
                        :style="'top:'+minItem.y+'px;left:'+minItem.x+'px;width:'+minItem.w+'px;height:'+minItem.h+'px;'"></div>
                        :style="'top:'+minItem.y+'px;left:'+minItem.x+'px;width:'+minItem.w+'px;height:'+minItem.h+'px;'"></div>
                   <!--实验室人数-->
                   <!--实验室人数-->
-                  <div v-if="item.online!=null" class="user-num-box" :class="item.doorList[0].toward == 'top'?'user-num-two':'user-num-one'">
+                  <div v-if="item.onLineNum!=null" class="user-num-box" :class="item.doorList[0].toward == 'top'?'user-num-two':'user-num-one'">
                     <img src="@/assets/ZDimages/emergencyManagement/icon_pmt_ry.png">
                     <img src="@/assets/ZDimages/emergencyManagement/icon_pmt_ry.png">
-                    <p>{{item.online}} 人</p>
+                    <p>{{item.onLineNum}} 人</p>
                   </div>
                   </div>
                 </div>
                 </div>
               </div>
               </div>
@@ -159,7 +159,7 @@
                    :style="'top:'+item.y+'px;left:'+item.x+'px;width:'+item.w+'px;height:'+item.h+'px;'">
                    :style="'top:'+item.y+'px;left:'+item.x+'px;width:'+item.w+'px;height:'+item.h+'px;'">
                 <div class="newEvacuation-map-for-min-box">
                 <div class="newEvacuation-map-for-min-box">
                   <!--灯-->
                   <!--灯-->
-                  <div class="position-box"
+                  <div class="position-box" @click="shadeButton(2,minItem)"
                        :class="
                        :class="
                         minItem.state=='1'&&minItem.openType?'lightTopOn':(minItem.state=='1'&&!minItem.openType?'lightTopOff':
                         minItem.state=='1'&&minItem.openType?'lightTopOn':(minItem.state=='1'&&!minItem.openType?'lightTopOff':
                         (minItem.state=='2'&&minItem.openType?'lightBottomOn':(minItem.state=='2'&&!minItem.openType?'lightBottomOff':
                         (minItem.state=='2'&&minItem.openType?'lightBottomOn':(minItem.state=='2'&&!minItem.openType?'lightBottomOff':
@@ -374,7 +374,8 @@
     laboratoryExitLineEndEvacuation,laboratoryBigViewOnLineUserList,
     laboratoryExitLineEndEvacuation,laboratoryBigViewOnLineUserList,
     iotBigViewHardwareFindByType,iotBigViewDeviceList,iotBigViewSpeakerPlayText,
     iotBigViewHardwareFindByType,iotBigViewDeviceList,iotBigViewSpeakerPlayText,
     iotBigViewDeviceFindBySubId,iotBigViewDeviceFindByType,laboratoryBigViewHazardCensus,
     iotBigViewDeviceFindBySubId,iotBigViewDeviceFindByType,laboratoryBigViewHazardCensus,
-    iotBigViewHardwareOperatingHardware} from "@/api/emergencyManagement/index";
+    iotBigViewHardwareOperatingHardware,laboratoryExitRelayOpenLight,
+    laboratoryExitRelayCloseLight } from "@/api/emergencyManagement/index";
   import { laboratoryBigViewSelectTriggerInfo } from "@/api/commonality/permission";
   import { laboratoryBigViewSelectTriggerInfo } from "@/api/commonality/permission";
   import mpegtsVideo from '@/components/mpegtsVideo/mpegtsVideo.vue'
   import mpegtsVideo from '@/components/mpegtsVideo/mpegtsVideo.vue'
   export default {
   export default {
@@ -591,7 +592,7 @@
                       list[i].roomNum = response.data[0].buildLayoutVoList[o].roomNum;
                       list[i].roomNum = response.data[0].buildLayoutVoList[o].roomNum;
                       list[i].subName = response.data[0].buildLayoutVoList[o].subName;
                       list[i].subName = response.data[0].buildLayoutVoList[o].subName;
                       list[i].subId = response.data[0].buildLayoutVoList[o].subId;
                       list[i].subId = response.data[0].buildLayoutVoList[o].subId;
-                      list[i].online = response.data[0].buildLayoutVoList[o].online;
+                      list[i].onLineNum = response.data[0].buildLayoutVoList[o].onLineNum;
                       list[i].loginAdmin = response.data[0].buildLayoutVoList[o].loginAdmin;
                       list[i].loginAdmin = response.data[0].buildLayoutVoList[o].loginAdmin;
                       list[i].levelColor = response.data[0].buildLayoutVoList[o].levelColor?hex2Rgba(response.data[0].buildLayoutVoList[o].levelColor):'';
                       list[i].levelColor = response.data[0].buildLayoutVoList[o].levelColor?hex2Rgba(response.data[0].buildLayoutVoList[o].levelColor):'';
                       list[i].planType = false;
                       list[i].planType = false;
@@ -1286,10 +1287,10 @@
             //开关灯弹窗
             //开关灯弹窗
             if(this.shadeData.openType){
             if(this.shadeData.openType){
               //关闭
               //关闭
-              this.closeLight();
+              this.laboratoryExitRelayCloseLight();
             }else{
             }else{
               //开启
               //开启
-              this.openLight();
+              this.laboratoryExitRelayOpenLight();
             }
             }
           }else if(this.shadeType == 3){
           }else if(this.shadeType == 3){
             //设备开关弹窗
             //设备开关弹窗
@@ -1330,6 +1331,34 @@
           this.$set(this,'shadeType',6);
           this.$set(this,'shadeType',6);
         }
         }
       },
       },
+      //应急疏散时-开灯
+      laboratoryExitRelayOpenLight(){
+        let obj = {
+          buildId:this.buildingId,
+          floorId:this.floorId,
+          pointName:this.shadeData.key
+        };
+        laboratoryExitRelayOpenLight(obj).then(response => {
+          if(response.code==200){
+            this.$set(this,'shadeType',0)
+            this.msgSuccess(response.message)
+          }
+        });
+      },
+      //应急疏散时-关灯
+      laboratoryExitRelayCloseLight(){
+        let obj = {
+          buildId:this.buildingId,
+          floorId:this.floorId,
+          pointName:this.shadeData.key
+        };
+        laboratoryExitRelayCloseLight(obj).then(response => {
+          if(response.code==200){
+            this.$set(this,'shadeType',0)
+            this.msgSuccess(response.message)
+          }
+        });
+      },
     },
     },
   }
   }
 </script>
 </script>

+ 3 - 3
src/views/emergencyManagement/performEvacuation/performEvacuationHome.vue

@@ -73,9 +73,9 @@
                          v-for="(minItem,minIndex) in item.doorList" :key="minIndex"
                          v-for="(minItem,minIndex) in item.doorList" :key="minIndex"
                          :style="'top:'+minItem.y+'px;left:'+minItem.x+'px;width:'+minItem.w+'px;height:'+minItem.h+'px;'"></div>
                          :style="'top:'+minItem.y+'px;left:'+minItem.x+'px;width:'+minItem.w+'px;height:'+minItem.h+'px;'"></div>
                     <!--实验室人数-->
                     <!--实验室人数-->
-                    <div v-if="item.online!=null" class="user-num-box" :class="item.doorList[0].toward == 'top'?'user-num-two':'user-num-one'">
+                    <div v-if="item.onLineNum!=null" class="user-num-box" :class="item.doorList[0].toward == 'top'?'user-num-two':'user-num-one'">
                       <img src="@/assets/ZDimages/emergencyManagement/icon_pmt_ry.png">
                       <img src="@/assets/ZDimages/emergencyManagement/icon_pmt_ry.png">
-                      <p>{{item.online}} 人</p>
+                      <p>{{item.onLineNum}} 人</p>
                     </div>
                     </div>
                   </div>
                   </div>
                 </div>
                 </div>
@@ -408,7 +408,7 @@
                       list[i].roomNum = response.data[0].buildLayoutVoList[o].roomNum;
                       list[i].roomNum = response.data[0].buildLayoutVoList[o].roomNum;
                       list[i].subName = response.data[0].buildLayoutVoList[o].subName;
                       list[i].subName = response.data[0].buildLayoutVoList[o].subName;
                       list[i].subId = response.data[0].buildLayoutVoList[o].subId;
                       list[i].subId = response.data[0].buildLayoutVoList[o].subId;
-                      list[i].online = response.data[0].buildLayoutVoList[o].online;
+                      list[i].onLineNum = response.data[0].buildLayoutVoList[o].onLineNum;
                       list[i].loginAdmin = response.data[0].buildLayoutVoList[o].loginAdmin;
                       list[i].loginAdmin = response.data[0].buildLayoutVoList[o].loginAdmin;
                       list[i].levelColor = response.data[0].buildLayoutVoList[o].levelColor?hex2Rgba(response.data[0].buildLayoutVoList[o].levelColor):'';
                       list[i].levelColor = response.data[0].buildLayoutVoList[o].levelColor?hex2Rgba(response.data[0].buildLayoutVoList[o].levelColor):'';
                       list[i].planType = false;
                       list[i].planType = false;

+ 45 - 18
src/views/integratedManagement/laboratoryManagement/layoutManagement/buildingDetails.vue

@@ -196,25 +196,38 @@
           </el-form-item>
           </el-form-item>
         </div>
         </div>
         <div v-if="dialogOpenType == 6">
         <div v-if="dialogOpenType == 6">
-          <el-form-item label="继电器类型:" prop="relayType">
-            <el-radio-group v-model="dialogForm.relayType" style="margin-top:4px;">
-              <el-radio :label="2">新版继电器</el-radio>
-              <el-radio :label="1">老版继电器</el-radio>
-              <el-radio :label="3">泥人继电器</el-radio>
+          <!--<el-form-item label="继电器类型:" prop="relayType">-->
+            <!--<el-radio-group v-model="dialogForm.relayType" style="margin-top:4px;">-->
+              <!--<el-radio :label="2">新版继电器</el-radio>-->
+              <!--<el-radio :label="1">老版继电器</el-radio>-->
+              <!--<el-radio :label="3">泥人继电器</el-radio>-->
+            <!--</el-radio-group>-->
+          <!--</el-form-item>-->
+          <!--<el-form-item label="继电器参数:" prop="configName" v-if="dialogForm.relayType == 2">-->
+            <!--<el-input v-model="dialogForm.configName" placeholder="请输入继电器参数" maxlength="20" style="width:300px;"/>-->
+          <!--</el-form-item>-->
+          <!--<el-form-item label="状态参数:" prop="configStatus" style="width:398px;" v-if="dialogForm.relayType == 2">-->
+            <!--<el-input v-model="dialogForm.configStatus" placeholder="请输入状态参数" maxlength="20" style="width:300px;"/>-->
+          <!--</el-form-item>-->
+          <!--<el-form-item label="继电器编号:" prop="relayCode" v-if="dialogForm.relayType == 1 || dialogForm.relayType == 3">-->
+            <!--<el-input v-model="dialogForm.relayCode" placeholder="请输入继电器参数" maxlength="20" style="width:300px;"/>-->
+          <!--</el-form-item>-->
+          <!--<el-form-item label="继电器路数:" prop="relayBit" style="width:398px;" v-if="dialogForm.relayType == 1 || dialogForm.relayType == 3" class="dialog-relay-bit-form-item-box">-->
+            <!--<el-input-number v-model="dialogForm.relayBit" :min="1" :max="12" placeholder="请输入状态参数" :controls="false" style="width:300px;"></el-input-number>-->
+          <!--</el-form-item>-->
+          <el-form-item label="选择疏散灯:" prop="configName">
+            <el-radio-group v-model="dialogForm.configName" style="margin-top:4px;">
+              <el-select v-model="dialogForm.configName"
+                         placeholder="请选择房间" style="width:380px;">
+                <el-option
+                  v-for="item in configList"
+                  :key="item.roomId"
+                  :label="item.roomName"
+                  :value="item.roomId">
+                </el-option>
+              </el-select>
             </el-radio-group>
             </el-radio-group>
           </el-form-item>
           </el-form-item>
-          <el-form-item label="继电器参数:" prop="configName" v-if="dialogForm.relayType == 2">
-            <el-input v-model="dialogForm.configName" placeholder="请输入继电器参数" maxlength="20" style="width:300px;"/>
-          </el-form-item>
-          <el-form-item label="状态参数:" prop="configStatus" style="width:398px;" v-if="dialogForm.relayType == 2">
-            <el-input v-model="dialogForm.configStatus" placeholder="请输入状态参数" maxlength="20" style="width:300px;"/>
-          </el-form-item>
-          <el-form-item label="继电器编号:" prop="relayCode" v-if="dialogForm.relayType == 1 || dialogForm.relayType == 3">
-            <el-input v-model="dialogForm.relayCode" placeholder="请输入继电器参数" maxlength="20" style="width:300px;"/>
-          </el-form-item>
-          <el-form-item label="继电器路数:" prop="relayBit" style="width:398px;" v-if="dialogForm.relayType == 1 || dialogForm.relayType == 3" class="dialog-relay-bit-form-item-box">
-            <el-input-number v-model="dialogForm.relayBit" :min="1" :max="12" placeholder="请输入状态参数" :controls="false" style="width:300px;"></el-input-number>
-          </el-form-item>
           <el-form-item label="指示灯类型:" prop="state">
           <el-form-item label="指示灯类型:" prop="state">
             <el-radio-group v-model="dialogForm.state" style="margin-top:4px;">
             <el-radio-group v-model="dialogForm.state" style="margin-top:4px;">
               <el-radio :label="item.value" v-for="item in dialogOptions">{{item.label}}</el-radio>
               <el-radio :label="item.value" v-for="item in dialogOptions">{{item.label}}</el-radio>
@@ -296,6 +309,7 @@
   import { subjectList,lineVertex} from "@/apiDemo/evacuation3_2/index";
   import { subjectList,lineVertex} from "@/apiDemo/evacuation3_2/index";
   //V3
   //V3
   import { laboratoryBuildLayoutGetList,laboratoryExitLineAdd } from "@/api/integratedManagement/index";
   import { laboratoryBuildLayoutGetList,laboratoryExitLineAdd } from "@/api/integratedManagement/index";
+  import { iotHardwareFindByType } from "@/api/commonality/permission";
 
 
   export default {
   export default {
     name: "builDingDetails",
     name: "builDingDetails",
@@ -453,6 +467,8 @@
         subjectOptions:[],
         subjectOptions:[],
         buildName:'',
         buildName:'',
         floorName:'',
         floorName:'',
+        //疏散灯列表
+        configList:[],
       }
       }
     },
     },
     created() {
     created() {
@@ -462,6 +478,7 @@
       this.floorName = this.propsData.floorName
       this.floorName = this.propsData.floorName
       this.initialization();
       this.initialization();
       this.laboratoryBuildLayoutGetList();
       this.laboratoryBuildLayoutGetList();
+      this.iotHardwareFindByType();
       this.getDicts("layout_room_type").then(response => {
       this.getDicts("layout_room_type").then(response => {
         this.roomOptions = response.data;
         this.roomOptions = response.data;
         this.roomOptions.push({label:'其他',value:'-99'})
         this.roomOptions.push({label:'其他',value:'-99'})
@@ -564,6 +581,16 @@
           this.$set(this,'subOptionsList',list);
           this.$set(this,'subOptionsList',list);
         })
         })
       },
       },
+      //获取楼层下楼道疏散灯列表
+      iotHardwareFindByType(){
+        let obj = {
+          passageway:this.propsData.floorId,
+          hardwareTypeKey:'evacuationLight'
+        }
+        iotHardwareFindByType(obj).then(response => {
+          this.$set(this,'configList',response.data)
+        })
+      },
       /*********************************右键操作事件*********************************/
       /*********************************右键操作事件*********************************/
       //右键事件
       //右键事件
       boxRightClick(event,item,index,minIndex){
       boxRightClick(event,item,index,minIndex){
@@ -576,7 +603,7 @@
           this.$set(this,'dialogIndex',index)
           this.$set(this,'dialogIndex',index)
           this.$set(this,'dialogMinIndex',minIndex)
           this.$set(this,'dialogMinIndex',minIndex)
           let obj = {
           let obj = {
-            relayType:item.relayType?item.relayType:2,
+            relayType:item.relayType?item.relayType:3,
             state:item.state?item.state:"",
             state:item.state?item.state:"",
           }
           }
           if(obj.relayType == 1 || obj.relayType == 3){
           if(obj.relayType == 1 || obj.relayType == 3){