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