Compare commits
No commits in common. "62481ff1987a65560fb9d7bd52e1d2c187c6feca" and "3be20bad81dfe20267b1ace7c1be2e6a9676c825" have entirely different histories.
62481ff198
...
3be20bad81
|
@ -1717,33 +1717,10 @@
|
|||
margin: 10px 8px 0 !important;
|
||||
}
|
||||
|
||||
.realTime .page-content .status-view .status-view-content .status-true .status-fan > div.off span {
|
||||
color: #00C0F7;
|
||||
}
|
||||
|
||||
.realTime .page-content .status-view .status-view-content .status-true .status-fan > div > span {
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
.realTime .page-content .status-view .status-view-content .status-true .status-fan > div > img {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
margin-right: 0px;
|
||||
}
|
||||
|
||||
.realTime .page-content .status-view .status-view-content .status-true .status-fan > div > img.fan-img {
|
||||
animation: rotate 5s linear infinite;
|
||||
/* 持续时间为 5 秒,线性缓动,无限循环 */
|
||||
/* 定义旋转动画 */
|
||||
}
|
||||
|
||||
@keyframes rotate {
|
||||
from {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
to {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
.realTime .page-content .status-view .status-view-content .status-true .status-true-sel {
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1814,30 +1814,10 @@
|
|||
font-size: 14px;
|
||||
height: 30px;
|
||||
margin: 10px 8px 0 !important;
|
||||
&.off{
|
||||
span{
|
||||
color: #00C0F7;
|
||||
}
|
||||
}
|
||||
>span{
|
||||
margin-left: 5px;
|
||||
}
|
||||
>img{
|
||||
width: 16px;
|
||||
height:16px;
|
||||
margin-right: 0px;
|
||||
&.fan-img{
|
||||
animation: rotate 5s linear infinite; /* 持续时间为 5 秒,线性缓动,无限循环 */
|
||||
/* 定义旋转动画 */
|
||||
}
|
||||
@keyframes rotate {
|
||||
from {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
to {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
margin-right: 5px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 18 KiB |
|
@ -96,11 +96,11 @@
|
|||
<div class="liveVideo"></div>
|
||||
|
||||
<div class="liveVideo_content">
|
||||
<div class="swiper-container mySwiper_video" >
|
||||
<div class="swiper-container mySwiper_video">
|
||||
<div class="swiper-wrapper">
|
||||
<div class="swiper-slide swiper-slide_video" v-for="(item, index) in get_sel_eqbyid_list" :key="index">
|
||||
<div class="monitor" :id="'monitor'+item.number">
|
||||
<div ref="videoPlayer" class="video-js" :id="'video-js'+item.number"></div>
|
||||
<div class="monitor" ref="monitor" id="monitor">
|
||||
<div ref="videoPlayer" class="video-js" id="video-js"></div>
|
||||
</div>
|
||||
<div class="c_bottom">{{ item.deviceTypeName }}</div>
|
||||
</div>
|
||||
|
@ -335,12 +335,12 @@ export default {
|
|||
},
|
||||
|
||||
// 获取摄像头得地址 Copy
|
||||
getVideoData(cameraid, channelid,index) {
|
||||
getVideoData(cameraid, channelid) {
|
||||
this.api.camera_gethls(cameraid, channelid).then(res => {
|
||||
// console.log('获取摄像头得地址 Copy',res);
|
||||
if (res.data.code == 200) {
|
||||
// this.url = res.data.data.ezopen
|
||||
this.createVideoNew(res.data.data.accesstoken,res.data.data.ezopen,index )
|
||||
// this.createVideoNew(res.data.data.accessToken)
|
||||
// this.createVideo()
|
||||
}
|
||||
})
|
||||
|
@ -351,11 +351,10 @@ export default {
|
|||
|
||||
this.api.sel_eqbyid(userId).then(res => {
|
||||
// console.log('根据用户id查询对应的设备数据 Copy',res);
|
||||
res.data.data.forEach((item,index) => {
|
||||
if ( item.cameraSerialNumber != null) {
|
||||
this.get_sel_eqbyid_list.push({...item,number:index})
|
||||
|
||||
this.getVideoData(item.cameraSerialNumber, item.cameraChannelNumber,index)
|
||||
res.data.data.forEach(item => {
|
||||
if (item.equipmentName == 10 && item.cameraSerialNumber != null) {
|
||||
this.get_sel_eqbyid_list.push(item)
|
||||
this.getVideoData(item.cameraSerialNumber, item.cameraChannelNumber)
|
||||
// this.getVideoData("L18357958", "5")
|
||||
}
|
||||
})
|
||||
|
@ -394,15 +393,14 @@ export default {
|
|||
this.get_sel_eqbyid(userInfo.userid)
|
||||
},
|
||||
|
||||
createVideoNew(accessToken,url,index) {
|
||||
console.log(accessToken,url,index,111);
|
||||
createVideoNew(accessToken) {
|
||||
// divW和divH是获取了父级宽高 使播放容器能铺满div
|
||||
let divW = document.getElementById('monitor'+index).clientWidth
|
||||
let divH = document.getElementById('monitor'+index).clientHeight
|
||||
let divW = this.$refs.monitor.clientWidth
|
||||
let divH = this.$refs.monitor.clientHeight
|
||||
this.player = new EZUIKit.EZUIKitPlayer({
|
||||
id: 'video-js'+index, // 视频容器ID
|
||||
id: 'video-js', // 视频容器ID
|
||||
accessToken: accessToken,
|
||||
url: url,
|
||||
url: this.url,
|
||||
// 官方url例子:ezopen://open.ys7.com/G39444019/1.live 也可并非.live结尾 详见GitHub
|
||||
// 播放主题 simple-极简版; standard-标准版; security-安防版; voice-语音版; 自定义主题详见GitHub
|
||||
template: 'security',
|
||||
|
|
|
@ -107,30 +107,25 @@
|
|||
</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 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>
|
||||
1#风机
|
||||
</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 v-else src="../../assets/img/fan-off.png" alt=""> <span>2#风机</span>
|
||||
<img v-if="fanStatus.status[1] == 1" src="../../assets/img/fan-on.png" alt="">
|
||||
<img v-else src="../../assets/img/fan-off.png" alt=""> 2#风机
|
||||
</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 v-else src="../../assets/img/fan-off.png" alt=""> <span>3#风机</span>
|
||||
<img v-if="fanStatus.status[2] == 1" src="../../assets/img/fan-on.png" alt="">
|
||||
<img v-else src="../../assets/img/fan-off.png" alt=""> 3#风机
|
||||
</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 v-else src="../../assets/img/fan-off.png" alt=""> <span>4#风机</span>
|
||||
<img v-if="fanStatus.status[3] == 1" src="../../assets/img/fan-on.png" alt="">
|
||||
<img v-else src="../../assets/img/fan-off.png" alt=""> 4#风机
|
||||
</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 v-else src="../../assets/img/fan-off.png" alt=""> <span>5#风机</span>
|
||||
<img v-if="fanStatus.status[4] == 1" src="../../assets/img/fan-on.png" alt="">
|
||||
<img v-else src="../../assets/img/fan-off.png" alt=""> 5#风机
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -182,7 +177,7 @@
|
|||
<div :id="'statusCharts' + index"></div>
|
||||
</div>
|
||||
<div class="status-true-text">
|
||||
<div class="status-true-text-left">{{ getNumberStatus(item.index) }}</div>
|
||||
<div class="status-true-text-left">静止状态</div>
|
||||
<div class="status-true-text-right">{{ item.progress }}%</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -248,8 +243,6 @@ export default {
|
|||
timer: null,
|
||||
deviceName: 1,
|
||||
controlList: [],
|
||||
statusInterval: null,//status状态的Interval
|
||||
statusTime: 3,//status状态的秒数
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
|
@ -258,7 +251,6 @@ 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
|
||||
setTimeout(() => {
|
||||
|
||||
if (this.player) {
|
||||
|
@ -297,7 +289,6 @@ export default {
|
|||
this.player.destroy()
|
||||
this.player = null
|
||||
}
|
||||
clearInterval(this.statusInterval) && this.statusInterval
|
||||
that.timer && clearInterval(that.timer)
|
||||
this.$bus.$off('refreshTime')
|
||||
},
|
||||
|
@ -323,19 +314,7 @@ 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, {
|
||||
|
@ -562,13 +541,39 @@ export default {
|
|||
// console.log(this.controlList);
|
||||
})
|
||||
|
||||
this.getStatus()
|
||||
clearInterval(this.statusInterval) && this.statusInterval
|
||||
this.statusInterval = setInterval(() => {
|
||||
if (this.deviceName == 10) {
|
||||
this.getStatus()
|
||||
var TargetValue = {
|
||||
deviceId: store.equipmentList[this.indexs - 1].deviceId
|
||||
}
|
||||
this.api.getControlGetState(TargetValue).then(res => {
|
||||
if (res.data.code == 200) {
|
||||
console.log(res.data.data, 123123);
|
||||
this.fanStatus.open = res.data.data['1023']
|
||||
this.fanStatus.status = []
|
||||
var num = res.data.data['1024']
|
||||
var num1 = this.padString(num.toString(2), 5)
|
||||
var openListNew = []
|
||||
openListNew = num1.split("")
|
||||
this.fanStatus.status = openListNew.reverse()
|
||||
this.statusList = []
|
||||
for (var i = 0; i < 4; i++) {
|
||||
var statusData = { name: `顶卷膜${i + 1}`, open: res.data.data[(1025 + (i * 3))], progress: res.data.data[(1027 + (i * 3))], index: res.data.data[(1026 + (i * 3))] }
|
||||
this.statusList.push(statusData)
|
||||
|
||||
|
||||
}
|
||||
this.$forceUpdate();
|
||||
setTimeout(() => {
|
||||
this.statusList.forEach((el,index)=>{
|
||||
if(el.open!=0){
|
||||
statusCharts(`statusCharts${index}`,el.progress)
|
||||
}
|
||||
})
|
||||
}, 10);
|
||||
|
||||
} else {
|
||||
// this.$message.error(res.data.msg);
|
||||
}
|
||||
}, this.statusTime * 1000);
|
||||
})
|
||||
var data1 = store.equipmentList[this.indexs - 1].deviceId
|
||||
|
||||
this.api.getControlFsdata(data1).then(res => {
|
||||
|
@ -602,41 +607,6 @@ export default {
|
|||
}
|
||||
|
||||
},
|
||||
getStatus() {
|
||||
var store = this.$store.state
|
||||
var TargetValue = {
|
||||
deviceId: store.equipmentList[this.indexs - 1].deviceId
|
||||
}
|
||||
this.api.getControlGetState(TargetValue).then(res => {
|
||||
if (res.data.code == 200) {
|
||||
this.fanStatus.open = res.data.data['1023']
|
||||
this.fanStatus.status = []
|
||||
var num = res.data.data['1024']
|
||||
var num1 = this.padString(num.toString(2), 5)
|
||||
var openListNew = []
|
||||
openListNew = num1.split("")
|
||||
this.fanStatus.status = openListNew.reverse()
|
||||
this.statusList = []
|
||||
for (var i = 0; i < 4; i++) {
|
||||
var statusData = { name: `顶卷膜${i + 1}`, open: res.data.data[(1025 + (i * 3))], progress: res.data.data[(1027 + (i * 3))], index: res.data.data[(1026 + (i * 3))] }
|
||||
this.statusList.push(statusData)
|
||||
|
||||
|
||||
}
|
||||
this.$forceUpdate();
|
||||
setTimeout(() => {
|
||||
this.statusList.forEach((el, index) => {
|
||||
if (el.open != 0) {
|
||||
statusCharts(`statusCharts${index}`, el.progress)
|
||||
}
|
||||
})
|
||||
}, 10);
|
||||
|
||||
} else {
|
||||
// this.$message.error(res.data.msg);
|
||||
}
|
||||
})
|
||||
},
|
||||
getTime() {
|
||||
this.time = getnowtime()
|
||||
const that = this
|
||||
|
@ -687,4 +657,5 @@ export default {
|
|||
border: 1px solid #dcdfe6;
|
||||
color: #606266;
|
||||
font-size: 14px;
|
||||
}</style>
|
||||
}
|
||||
</style>
|
Loading…
Reference in New Issue