|
@@ -144,7 +144,7 @@
|
|
|
<i>当前位置:{{checkedSubject.subAddrr.buildName}}{{checkedSubject.subAddrr.floorName}}</i>
|
|
|
</el-tooltip>
|
|
|
</p>
|
|
|
- <div class="switch-for-max-box" v-show="checkedSubject.VOlist[0]" v-hasPermi="['laboratory:subcontrol:set']">
|
|
|
+ <div class="switch-for-max-box scrollbar-box" v-show="checkedSubject.VOlist[0]" v-hasPermi="['laboratory:subcontrol:set']">
|
|
|
<div class="switch-for-big-box" v-for="(item,index) in checkedSubject.VOlist" :key="index">
|
|
|
<div class="switch-for-min-box" v-if="item.hardwareTypeEnum.enumName == 'SWITCH'">
|
|
|
<div class="switch-for-min-box_t">
|
|
@@ -152,7 +152,6 @@
|
|
|
<p class="switch-null-p" v-if="item.state.code != 3 && item.state.code != 4" >{{item.state.name}}</p>
|
|
|
</div>
|
|
|
<div class="switch-for-min-box_b">
|
|
|
- <p class="switch-null-ventilate" v-if="item.hardwareTypeEnum.hardwareTypeCode==2 && item.state.code==3">{{item.dictLabel}}</p>
|
|
|
<el-switch
|
|
|
v-if="item.state.code == 3||item.state.code == 4"
|
|
|
class="switch"
|
|
@@ -169,9 +168,10 @@
|
|
|
<div class="switch-for-min-box" v-if="item.hardwareTypeEnum.enumName == 'AI_VENTILATION'">
|
|
|
<div class="switch-for-min-box_t">
|
|
|
<p class="switch-for-min-title">{{item.hardwareName}}</p>
|
|
|
- <p class="switch-null-p" v-if="item.state.code != 3 && item.state.code != 4">{{item.state.name}}</p>
|
|
|
+ <p class="switch-null-p" v-if="item.state.code != 3 && item.state.code != 4 && item.pcType == 0">{{item.state.name}}</p>
|
|
|
+ <p class="switch-pc-type-p" v-if="item.pcType == 1" @click="tableButton(item)">操作</p>
|
|
|
</div>
|
|
|
- <div class="switch-for-min-box_b">
|
|
|
+ <div class="switch-for-min-box_b" v-if="item.pcType == 0">
|
|
|
<p class="switch-null-ventilate" v-if="item.hardwareTypeEnum.hardwareTypeCode==2 && item.state.code==3">{{item.dictLabel}}</p>
|
|
|
<el-switch
|
|
|
v-if="item.state.code == 3||item.state.code == 4"
|
|
@@ -204,7 +204,7 @@
|
|
|
<i>当前位置:{{checkedSubject.subAddrr.buildName}}{{checkedSubject.subAddrr.floorName}}</i>
|
|
|
</el-tooltip>
|
|
|
</p>
|
|
|
- <div class="video-for-max-box" v-if="checkedSubject.videoData[0]">
|
|
|
+ <div class="video-for-max-box scrollbar-box" v-if="checkedSubject.videoData[0]">
|
|
|
<div class="switch-for-big-box" v-for="(item,index) in checkedSubject.videoData" :key="index">
|
|
|
<video :id="item.divId" ref="videoRef" autoplay controls muted width="490px" height="262px"></video>
|
|
|
<p class="el-icon-full-screen position-p" @click="videoFullScreen(index)"></p>
|
|
@@ -314,6 +314,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+ import { controlSwitch } from "@/api/laboratory/hardware";
|
|
|
import mqtt from 'mqtt'
|
|
|
import flvjs from 'flv.js'
|
|
|
import { hardWareControl,alarmControl } from "@/api/laboratory/hardware";
|
|
@@ -323,8 +324,7 @@ import {
|
|
|
updateSubject,
|
|
|
mangerVoice,
|
|
|
startUrl,
|
|
|
- queryHardByTypeList,
|
|
|
- subjectTriggerModes,
|
|
|
+ queryHardByTypeList, subjectTriggerModes,
|
|
|
} from '@/api/laboratory/subject'
|
|
|
import { listData} from "@/api/system/dict/data";
|
|
|
import { filterDept } from "@/api/medicUniversity-3_1/index";
|
|
@@ -451,6 +451,20 @@ export default {
|
|
|
// this.queryHardByTypeList();
|
|
|
},
|
|
|
methods:{
|
|
|
+ tableButton(row){
|
|
|
+ let self = this;
|
|
|
+ this.$confirm(`是否确认操作此设备`, "提示", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ }).then(async () => {
|
|
|
+ controlSwitch({id:row.id}).then(response => {
|
|
|
+ self.msgSuccess(response.msg);
|
|
|
+ });
|
|
|
+ }).catch(() => {
|
|
|
+
|
|
|
+ })
|
|
|
+ },
|
|
|
//查询当前用户下的预案触发数据
|
|
|
selectTriggerFun(data){
|
|
|
let self = this;
|
|
@@ -737,34 +751,28 @@ export default {
|
|
|
let self=this;
|
|
|
subjectTriggerModes(row.id).then(response => {
|
|
|
if(response.code==200){
|
|
|
- row.hardwareTypeEnum.hardwareTypeCode=response.data.hardwareType.hardwareTypeCode
|
|
|
- row.triggerModes=response.data.triggerModes
|
|
|
for(let b=0;b<self.fanList.length;b++){
|
|
|
- if(self.fanList[b].dictValue==row.triggerModes){
|
|
|
- row.dictLabel=self.fanList[b].dictLabel
|
|
|
+ if(self.fanList[b].dictValue==response.data.triggerModes){
|
|
|
+ for(let i=0;i<self.checkedSubject.VOlist.length;i++){
|
|
|
+ if(row.id == self.checkedSubject.VOlist[i].id){
|
|
|
+ this.$set(self.checkedSubject.VOlist[i],'dictLabel',self.fanList[b].dictLabel);
|
|
|
+ this.$set(self.checkedSubject.VOlist[i],'triggerModes',response.data.triggerModes);
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
- console.log(self.checkedSubject.VOlist)
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
//开关按钮
|
|
|
switchChange(row){
|
|
|
- let self=this;
|
|
|
let switchData = {
|
|
|
id:row.id,
|
|
|
switchVal:row.state.code==3?'close':(row.state.code==4?'open':'')
|
|
|
};
|
|
|
hardWareControl(switchData).then(response => {
|
|
|
if(response.code==200){
|
|
|
-
|
|
|
this.msgSuccess("操作成功")
|
|
|
- //如果是开启的时候调用
|
|
|
- if(row.state.code==4 && row.hardwareTypeEnum.hardwareTypeCode==2){
|
|
|
- self.subjectTriggerModes(row)
|
|
|
- }else{
|
|
|
- //row.state.code = row.state.code==3?4:(row.state.code==4?3:'')
|
|
|
- }
|
|
|
}
|
|
|
});
|
|
|
|
|
@@ -1088,14 +1096,10 @@ export default {
|
|
|
self.checkedSubject.VOlist[k].state.code = 0;
|
|
|
}
|
|
|
}
|
|
|
- if(self.checkedSubject.VOlist[k].hardwareTypeEnum.hardwareTypeCode == '2'){
|
|
|
- for(let b=0;b<self.fanList.length;b++){
|
|
|
- if(self.fanList[b].dictValue==self.checkedSubject.VOlist[k].triggerModes){
|
|
|
- self.checkedSubject.VOlist[k].dictLabel=self.fanList[b].dictLabel
|
|
|
- }
|
|
|
- }
|
|
|
+ if(self.checkedSubject.VOlist[k].hardwareTypeEnum.hardwareTypeCode == '2'&&
|
|
|
+ self.checkedSubject.VOlist[k].pcType == '0'){
|
|
|
+ self.subjectTriggerModes(self.checkedSubject.VOlist[k])
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
}
|
|
|
if(self.newData.labHardwareVOList){
|
|
@@ -1389,6 +1393,9 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
.bottom-switch-box{
|
|
|
+ overflow: hidden;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
background: #fff;
|
|
|
width:424px;
|
|
|
flex: 1;
|
|
@@ -1446,6 +1453,12 @@ export default {
|
|
|
line-height:24px;
|
|
|
color:#999;
|
|
|
}
|
|
|
+ .switch-pc-type-p{
|
|
|
+ font-size:14px;
|
|
|
+ line-height:24px;
|
|
|
+ color:#0183fa;
|
|
|
+ cursor: pointer;
|
|
|
+ }
|
|
|
}
|
|
|
.switch-for-min-box_b{
|
|
|
margin-top: 10px;
|
|
@@ -1486,6 +1499,9 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
.bottom-video-box{
|
|
|
+ overflow: hidden;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
background: #fff;
|
|
|
width:424px;
|
|
|
border-radius: 0 10px 10px 10px;
|