|
@@ -152,7 +152,7 @@
|
|
<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.state.name}}</p>
|
|
</div>
|
|
</div>
|
|
<div class="switch-for-min-box_b">
|
|
<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>
|
|
|
|
|
|
+ <p class="switch-null-ventilate"></p>
|
|
<el-switch
|
|
<el-switch
|
|
v-if="item.state.code == 3||item.state.code == 4"
|
|
v-if="item.state.code == 3||item.state.code == 4"
|
|
class="switch"
|
|
class="switch"
|
|
@@ -169,9 +169,10 @@
|
|
<div class="switch-for-min-box" v-if="item.hardwareTypeEnum.enumName == 'AI_VENTILATION'">
|
|
<div class="switch-for-min-box" v-if="item.hardwareTypeEnum.enumName == 'AI_VENTILATION'">
|
|
<div class="switch-for-min-box_t">
|
|
<div class="switch-for-min-box_t">
|
|
<p class="switch-for-min-title">{{item.hardwareName}}</p>
|
|
<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>
|
|
- <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>
|
|
<p class="switch-null-ventilate" v-if="item.hardwareTypeEnum.hardwareTypeCode==2 && item.state.code==3">{{item.dictLabel}}</p>
|
|
<el-switch
|
|
<el-switch
|
|
v-if="item.state.code == 3||item.state.code == 4"
|
|
v-if="item.state.code == 3||item.state.code == 4"
|
|
@@ -187,8 +188,8 @@
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="switch-for-min-box" v-if="item.hardwareTypeEnum.enumName == 'ONE_MACHINE'">
|
|
<div class="switch-for-min-box" v-if="item.hardwareTypeEnum.enumName == 'ONE_MACHINE'">
|
|
- <p class="switch-for-min-title">广播系统</p>
|
|
|
|
- <p class="switch-for-min-button" @click="handleAdd(item.subId)">播放文字</p>
|
|
|
|
|
|
+ <p class="switch-for-min-title">广播系统</p>
|
|
|
|
+ <p class="switch-for-min-button" @click="handleAdd(item.subId)">播放文字</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -314,6 +315,7 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
|
+import { controlSwitch } from "@/api/laboratory/hardware";
|
|
import mqtt from 'mqtt'
|
|
import mqtt from 'mqtt'
|
|
import flvjs from 'flv.js'
|
|
import flvjs from 'flv.js'
|
|
import { hardWareControl,alarmControl } from "@/api/laboratory/hardware";
|
|
import { hardWareControl,alarmControl } from "@/api/laboratory/hardware";
|
|
@@ -452,6 +454,20 @@ export default {
|
|
// this.queryHardByTypeList();
|
|
// this.queryHardByTypeList();
|
|
},
|
|
},
|
|
methods:{
|
|
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){
|
|
selectTriggerFun(data){
|
|
let self = this;
|
|
let self = this;
|
|
@@ -1091,7 +1107,8 @@ export default {
|
|
} else if (data.data[i].hardwareOperate == 'OFFLINE') {
|
|
} else if (data.data[i].hardwareOperate == 'OFFLINE') {
|
|
self.checkedSubject.VOlist[k].state.code = 0;
|
|
self.checkedSubject.VOlist[k].state.code = 0;
|
|
}
|
|
}
|
|
- if(self.checkedSubject.VOlist[k].hardwareTypeEnum.hardwareTypeCode == '2'){
|
|
|
|
|
|
+ if(self.checkedSubject.VOlist[k].hardwareTypeEnum.hardwareTypeCode == '2'&&
|
|
|
|
+ self.checkedSubject.VOlist[k].pcType == '0'){
|
|
self.subjectTriggerModes(self.checkedSubject.VOlist[k])
|
|
self.subjectTriggerModes(self.checkedSubject.VOlist[k])
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -1448,6 +1465,12 @@ export default {
|
|
line-height:24px;
|
|
line-height:24px;
|
|
color:#999;
|
|
color:#999;
|
|
}
|
|
}
|
|
|
|
+ .switch-pc-type-p{
|
|
|
|
+ font-size:14px;
|
|
|
|
+ line-height:24px;
|
|
|
|
+ color:#0183fa;
|
|
|
|
+ cursor: pointer;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
.switch-for-min-box_b{
|
|
.switch-for-min-box_b{
|
|
margin-top: 10px;
|
|
margin-top: 10px;
|