pull/36/head
parent
8490006970
commit
94c0fa90b2
|
@ -107,24 +107,29 @@
|
|||
</div>
|
||||
<div class="status-fan">
|
||||
<div class="btn" :class="fanStatus.status[0] == 1 ? 'blue' : 'off'">
|
||||
<img class="fan-img" v-if="fanStatus.status[0] == 1" src="../../assets/img/fan-on.png" alt="">
|
||||
<img class="fan-img" v-if="fanStatus.status[0] == 1" src="../../assets/img/fan-on.png"
|
||||
alt="">
|
||||
<img v-else src="../../assets/img/fan-off.png" alt="">
|
||||
<span>1#风机</span>
|
||||
</div>
|
||||
<div class="btn" :class="fanStatus.status[1] == 1 ? 'blue' : 'off'">
|
||||
<img class="fan-img" v-if="fanStatus.status[1] == 1" src="../../assets/img/fan-on.png" alt="">
|
||||
<img class="fan-img" v-if="fanStatus.status[1] == 1" src="../../assets/img/fan-on.png"
|
||||
alt="">
|
||||
<img v-else src="../../assets/img/fan-off.png" alt=""> <span>2#风机</span>
|
||||
</div>
|
||||
<div class="btn" :class="fanStatus.status[2] == 1 ? 'blue' : 'off'">
|
||||
<img class="fan-img" v-if="fanStatus.status[2] == 1" src="../../assets/img/fan-on.png" alt="">
|
||||
<img class="fan-img" v-if="fanStatus.status[2] == 1" src="../../assets/img/fan-on.png"
|
||||
alt="">
|
||||
<img v-else src="../../assets/img/fan-off.png" alt=""> <span>3#风机</span>
|
||||
</div>
|
||||
<div class="btn" :class="fanStatus.status[3] == 1 ? 'blue' : 'off'">
|
||||
<img class="fan-img" v-if="fanStatus.status[3] == 1" src="../../assets/img/fan-on.png" alt="">
|
||||
<img class="fan-img" v-if="fanStatus.status[3] == 1" src="../../assets/img/fan-on.png"
|
||||
alt="">
|
||||
<img v-else src="../../assets/img/fan-off.png" alt=""> <span>4#风机</span>
|
||||
</div>
|
||||
<div class="btn" :class="fanStatus.status[4] == 1 ? 'blue' : 'off'">
|
||||
<img class="fan-img" v-if="fanStatus.status[4] == 1" src="../../assets/img/fan-on.png" alt="">
|
||||
<img class="fan-img" v-if="fanStatus.status[4] == 1" src="../../assets/img/fan-on.png"
|
||||
alt="">
|
||||
<img v-else src="../../assets/img/fan-off.png" alt=""> <span>5#风机</span>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -177,7 +182,7 @@
|
|||
<div :id="'statusCharts' + index"></div>
|
||||
</div>
|
||||
<div class="status-true-text">
|
||||
<div class="status-true-text-left">静止状态</div>
|
||||
<div class="status-true-text-left">{{ getNumberStatus(item.index) }}</div>
|
||||
<div class="status-true-text-right">{{ item.progress }}%</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -243,8 +248,8 @@ export default {
|
|||
timer: null,
|
||||
deviceName: 1,
|
||||
controlList: [],
|
||||
statusInterval:null,//status状态的Interval
|
||||
statusTime:3,//status状态的秒数
|
||||
statusInterval: null,//status状态的Interval
|
||||
statusTime: 3,//status状态的秒数
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
|
@ -253,7 +258,7 @@ export default {
|
|||
const store = this.$store.state
|
||||
this.indexs = this.$route.query.index ? this.$route.query.index : store.equipmentIndex;
|
||||
this.deviceName = store.equipmentList[this.indexs - 1].deviceName
|
||||
clearInterval(this.statusInterval)&&this.statusInterval
|
||||
clearInterval(this.statusInterval) && this.statusInterval
|
||||
setTimeout(() => {
|
||||
|
||||
if (this.player) {
|
||||
|
@ -292,7 +297,7 @@ export default {
|
|||
this.player.destroy()
|
||||
this.player = null
|
||||
}
|
||||
clearInterval(this.statusInterval)&&this.statusInterval
|
||||
clearInterval(this.statusInterval) && this.statusInterval
|
||||
that.timer && clearInterval(that.timer)
|
||||
this.$bus.$off('refreshTime')
|
||||
},
|
||||
|
@ -318,7 +323,19 @@ export default {
|
|||
})
|
||||
console.log(this.player);
|
||||
},
|
||||
getNumberStatus(index) {
|
||||
if (index == 0) {
|
||||
return '静止状态'
|
||||
} else if (index == 1) {
|
||||
return '正向打开中'
|
||||
} else if (index == 2) {
|
||||
return '反向关闭中'
|
||||
} else {
|
||||
return ''
|
||||
}
|
||||
},
|
||||
createVideo() {
|
||||
|
||||
// 创建视频播放器
|
||||
videojs.addLanguage('zh-CN', video_zhCN)
|
||||
this.player = videojs(this.$refs.videoPlayer, {
|
||||
|
@ -546,12 +563,12 @@ export default {
|
|||
})
|
||||
|
||||
this.getStatus()
|
||||
clearInterval(this.statusInterval)&&this.statusInterval
|
||||
clearInterval(this.statusInterval) && this.statusInterval
|
||||
this.statusInterval = setInterval(() => {
|
||||
if(this.deviceName==10){
|
||||
if (this.deviceName == 10) {
|
||||
this.getStatus()
|
||||
}
|
||||
}, this.statusTime*1000);
|
||||
}, this.statusTime * 1000);
|
||||
var data1 = store.equipmentList[this.indexs - 1].deviceId
|
||||
|
||||
this.api.getControlFsdata(data1).then(res => {
|
||||
|
@ -585,7 +602,7 @@ export default {
|
|||
}
|
||||
|
||||
},
|
||||
getStatus(){
|
||||
getStatus() {
|
||||
var store = this.$store.state
|
||||
var TargetValue = {
|
||||
deviceId: store.equipmentList[this.indexs - 1].deviceId
|
||||
|
@ -608,9 +625,9 @@ export default {
|
|||
}
|
||||
this.$forceUpdate();
|
||||
setTimeout(() => {
|
||||
this.statusList.forEach((el,index)=>{
|
||||
if(el.open!=0){
|
||||
statusCharts(`statusCharts${index}`,el.progress)
|
||||
this.statusList.forEach((el, index) => {
|
||||
if (el.open != 0) {
|
||||
statusCharts(`statusCharts${index}`, el.progress)
|
||||
}
|
||||
})
|
||||
}, 10);
|
||||
|
@ -670,5 +687,4 @@ export default {
|
|||
border: 1px solid #dcdfe6;
|
||||
color: #606266;
|
||||
font-size: 14px;
|
||||
}
|
||||
</style>
|
||||
}</style>
|
Loading…
Reference in New Issue