dedsudiyu 2 年之前
父節點
當前提交
fb23ae8324
共有 2 個文件被更改,包括 57 次插入7 次删除
  1. 26 3
      src/views/comprehensive/laboratoryManagement/subject/index.vue
  2. 31 4
      src/views/newEvacuationBigData.vue

+ 26 - 3
src/views/comprehensive/laboratoryManagement/subject/index.vue

@@ -150,9 +150,9 @@
                     <p class="switch-null-p" v-else>{{item.state.name}}</p>
                   </div>
                   <div class="switch-for-min-box" v-if="item.hardwareTypeEnum.enumName == 'AI_VENTILATION'">
-                    <p class="switch-for-min-title">智能通风</p>
+                    <p class="switch-for-min-title">{{item.pcType == 1?'通风橱':'智能通风'}}</p>
                     <el-switch
-                      v-if="item.state.code == 3||item.state.code == 4"
+                      v-if="(item.state.code == 3||item.state.code == 4) && item.pcType != 1"
                       class="switch"
                       @click.native="changeIsNeedCaptcha(item)"
                       v-model="item.state.code"
@@ -162,7 +162,8 @@
                       inactive-text="关"
                       disabled>
                     </el-switch>
-                    <p class="switch-null-p" v-else>{{item.state.name}}</p>
+                    <p class="switch-null-p" v-if="(item.state.code != 3&&item.state.code != 4) && item.pcType != 1">{{item.state.name}}</p>
+                    <p class="switch-button-p" v-if="item.pcType == 1" @click="switchButton(item.id)">操作</p>
                   </div>
                   <!--<div class="switch-for-min-box" v-if="item.hardwareTypeEnum.enumName == 'ONE_MACHINE'">-->
                   <!--<p class="switch-for-min-title">广播系统</p>-->
@@ -271,6 +272,7 @@ import admissionConfiguration from "./admissionConfiguration.vue";
 import associationConfiguration from "./associationConfiguration.vue";
 import infoPage from "./infoPage.vue";
 import { getHxpAlarmRecordNoAuthList,getEnablelist } from "@/api/medicUniversity-3_1/index";
+import { controlSwitch } from "@/api/laboratory/hardware";
 export default {
   filters:{
     ellipsis(value){
@@ -373,6 +375,21 @@ export default {
         path: `/chemicalLibrary/alarmRecord`,
       })
     },
+    //通风橱开关
+    switchButton(id){
+      let self = this;
+      this.$confirm(`是否确认操作此设备`, "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(async () => {
+        controlSwitch({id:id}).then(response => {
+          self.msgSuccess(response.msg);
+        });
+      }).catch(() => {
+
+      })
+    },
     //报警器开启关闭方法
     changeIsNeedCaptchaAlarm(row){
       let self = this;
@@ -1202,6 +1219,12 @@ export default {
                   line-height:58px;
                   color:#999;
                 }
+                .switch-button-p{
+                  font-size:16px;
+                  line-height:58px;
+                  color:#0183fa;
+                  cursor: pointer;
+                }
                 .switch-for-min-button{
                   width:70px;
                   height:30px;

+ 31 - 4
src/views/newEvacuationBigData.vue

@@ -11,6 +11,7 @@
           </div>
           <div class="max-sensor-box scrollbar-box" id="max-sensor-box">
             <div class="sensor-for-max-box" :class="item.type==1?'sensor-alarm-one':'sensor-alarm-two'"
+                 v-if="item.funNum != 'huoyan'"
                  v-for="(item,index) in sensorList" :key="index">
               <div class="sensor-min-img-box">
               </div>
@@ -37,7 +38,7 @@
               </div>
               <img class="position-big-img" src="@/assets/ZDimages/bigData3_2/icon_znkz_wq.png">
               <el-switch
-                v-if="item.code == 3||item.code == 4"
+                v-if="(item.code == 3||item.code == 4) && item.pcType != 1"
                 class="switch"
                 @click.native="changeIsNeedCaptcha(item)"
                 v-model="item.code"
@@ -47,7 +48,8 @@
                 inactive-text="开启"
                 disabled>
               </el-switch>
-              <p class="control-null-p" v-if="item.code != 3&&item.code != 4">离线</p>
+              <p class="control-null-p" v-if="(item.code != 3&&item.code != 4) && item.pcType != 1">离线</p>
+              <p class="control-button-p" v-if="item.pcType == 1" @click="shadeButton(8,item.id)">操作</p>
             </div>
             <p v-if="!controlList[0]" style="line-height:200px;font-size:16px;color:#fff;text-align: center">暂无数据</p>
           </div>
@@ -345,7 +347,7 @@
             <p>是否确认执行一键灭火</p>
             <p>该操作存在风险,请您务必确认实验室内人员已安全撤离</p>
           </div>
-          <div class="text-box" v-if="shadeType == 2 || shadeType == 3 || shadeType == 4 || shadeType == 5">
+          <div class="text-box" v-if="shadeType == 2 || shadeType == 3 || shadeType == 4 || shadeType == 5 || shadeType == 6">
             <p>{{shadeText}}</p>
             <p></p>
           </div>
@@ -431,6 +433,7 @@
            executeEvacuation,endEvacuation,openLight,closeLight,getRedisEvacuation,
            outfirepc,isCancelOutFile,selectTriggerInfo,riskPlanId} from '@/api/evacuationBigData/index.js'
   import { closeRiskPlan } from '@/api/bigData/index.js'
+  import { controlSwitch } from "@/api/laboratory/hardware";
   export default {
     name: 'newEvacuationBigData',
     props:{
@@ -735,6 +738,12 @@
               this.$set(this,'shadeType',0);
               this.selectTriggerInfo();
             });
+          }else if(this.shadeType == 6){
+            //通风橱开关
+            controlSwitch({id:this.checkRiskPlanId}).then(response => {
+              this.$set(this,'shadeType',0);
+              this.selectTriggerInfo();
+            });
           }
         }else if(type == 6){
           this.$set(this,'shadeText','是否结束疏散?');
@@ -743,6 +752,10 @@
           this.$set(this,'shadeText','是否结束预案?');
           this.$set(this,'checkRiskPlanId',text);
           this.$set(this,'shadeType',5);
+        }else if(type == 8){
+          this.$set(this,'shadeText','是否确认操作该通风橱?');
+          this.$set(this,'checkRiskPlanId',text);
+          this.$set(this,'shadeType',6);
         }
       },
       //选中优先展示的预案弹窗
@@ -1316,7 +1329,8 @@
                   id:response.data.labHardwareVOList[i].id,
                   name:response.data.labHardwareVOList[i].hardwareName?response.data.labHardwareVOList[i].hardwareName:'未命名',
                   enumName:response.data.labHardwareVOList[i].hardwareTypeEnum.enumName,
-                  code:response.data.labHardwareVOList[i].state.code
+                  code:response.data.labHardwareVOList[i].state.code,
+                  pcType:response.data.labHardwareVOList[i].pcType
                 }
                 list.push(obj);
               }
@@ -2142,6 +2156,7 @@
           let obj = {
             id:list[i].id,
             funcName:list[i].funcName,
+            funNum:list[i].funNum,
             formatVal:list[i].formatVal,
             type:0,
           }
@@ -2412,6 +2427,18 @@
               border-radius:15px;
               margin:12px 0 0 44px;
             }
+            .control-button-p{
+              color:#24D1F9;
+              width:70px;
+              height:30px;
+              line-height:30px;
+              border:1px solid #24D1F9;
+              font-size:14px;
+              text-align: center;
+              border-radius:15px;
+              margin:12px 0 0 44px;
+              cursor: pointer;
+            }
           }
         }
       }