pc-master #107
|
@ -1798,6 +1798,10 @@
|
||||||
margin-top: 30px;
|
margin-top: 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.realTime .page-content .realTime-bottom.videoMonitoring-monitor {
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
|
||||||
.realTime .page-content .realTime-bottom > div {
|
.realTime .page-content .realTime-bottom > div {
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1899,7 +1899,9 @@
|
||||||
.realTime-bottom {
|
.realTime-bottom {
|
||||||
height: 350px;
|
height: 350px;
|
||||||
margin-top: 30px;
|
margin-top: 30px;
|
||||||
|
&.videoMonitoring-monitor{
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
>div {
|
>div {
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -277,11 +277,11 @@ export default {
|
||||||
|
|
||||||
if (isParamInArray16) {
|
if (isParamInArray16) {
|
||||||
this.routerList.push({
|
this.routerList.push({
|
||||||
name: "天窗控制", list: [
|
name: "通风窗控制", list: [
|
||||||
{ name: '天窗1', status: -1, router: 'sunroofControl', index: 1 },
|
{ name: '通风窗1', status: -1, router: 'sunroofControl', index: 1 },
|
||||||
{ name: '天窗2', status: -1, router: 'sunroofControl', index: 2 },
|
{ name: '通风窗2', status: -1, router: 'sunroofControl', index: 2 },
|
||||||
{ name: '天窗3', status: -1, router: 'sunroofControl', index: 3 },
|
{ name: '通风窗3', status: -1, router: 'sunroofControl', index: 3 },
|
||||||
{ name: '天窗4', status: -1, router: 'sunroofControl', index: 4 },
|
{ name: '通风窗4', status: -1, router: 'sunroofControl', index: 4 },
|
||||||
], router: "sunroofControl",
|
], router: "sunroofControl",
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -46,6 +46,10 @@ const routes = [
|
||||||
path: '/formula',
|
path: '/formula',
|
||||||
name: 'formula',
|
name: 'formula',
|
||||||
component: () => import('../views/page/formula.vue')
|
component: () => import('../views/page/formula.vue')
|
||||||
|
},{
|
||||||
|
path: '/videoMonitoring',
|
||||||
|
name: 'videoMonitoring',
|
||||||
|
component: () => import('../views/page/videoMonitoring.vue')
|
||||||
},{
|
},{
|
||||||
path: '/irrigateSet',
|
path: '/irrigateSet',
|
||||||
name: 'irrigateSet',
|
name: 'irrigateSet',
|
||||||
|
|
|
@ -63,13 +63,13 @@ export default {
|
||||||
{ name: '实时数据', router: 'realTime', routerList: ['realTime'], img: require('../assets/image/header-img1.png') },
|
{ name: '实时数据', router: 'realTime', routerList: ['realTime'], img: require('../assets/image/header-img1.png') },
|
||||||
// { name: '设定值参数', router: 'status', index: 1, routerList: ['formula', 'irrigateSet', 'PIDSet', 'systemSet', 'upload', 'sensorSet'], img: require('../assets/image/header-img0.png') },
|
// { name: '设定值参数', router: 'status', index: 1, routerList: ['formula', 'irrigateSet', 'PIDSet', 'systemSet', 'upload', 'sensorSet'], img: require('../assets/image/header-img0.png') },
|
||||||
{ name: '设定值参数', router: 'status', index: 1, routerList: ['status','exitSettings', 'skylight','systemSet-con', 'fan', 'upload-con', 'sensorSet-con','alarmSettings', 'synthesis-con','waterPump', 'geothermalFan', 'uptake', 'downtake', 'rollByRoll', 'snowRemoval',"targetTemperature", "targetHumidity", "targetCo2", "sunroofControl", "outsizeSunshade", "insizeSunshade", "wetFan", "LED", 'electromagneticControl', "coercionMist", "circulationCan", "internalInsulation", "forceOutput", "intrinsicParameter", "parameterSet",], img: require('../assets/image/header-img0.png') },
|
{ name: '设定值参数', router: 'status', index: 1, routerList: ['status','exitSettings', 'skylight','systemSet-con', 'fan', 'upload-con', 'sensorSet-con','alarmSettings', 'synthesis-con','waterPump', 'geothermalFan', 'uptake', 'downtake', 'rollByRoll', 'snowRemoval',"targetTemperature", "targetHumidity", "targetCo2", "sunroofControl", "outsizeSunshade", "insizeSunshade", "wetFan", "LED", 'electromagneticControl', "coercionMist", "circulationCan", "internalInsulation", "forceOutput", "intrinsicParameter", "parameterSet",], img: require('../assets/image/header-img0.png') },
|
||||||
{ name: '设备菜单', router: '', routerList: [], img: require('../assets/image/header-img1.png') },
|
{ name: '图库数据', router: '', routerList: [], img: require('../assets/image/header-img1.png') },
|
||||||
{ name: '视频监控', router: '', routerList: [], img: require('../assets/image/header-img2.png') },
|
{ name: '视频监控', router: 'videoMonitoring', routerList: ['videoMonitoring'], img: require('../assets/image/header-img2.png') },
|
||||||
// history history
|
// history history
|
||||||
{ name: '历史数据', router: '', index: 1, routerList: [''], img: require('../assets/image/header-img3.png') },
|
{ name: '历史数据', router: '', index: 1, routerList: [''], img: require('../assets/image/header-img3.png') },
|
||||||
//dataAnalysis dataAnalysis
|
//dataAnalysis dataAnalysis
|
||||||
{ name: '数据分析', router: '', index: 1, routerList: [''], img: require('../assets/image/header-img4.png') },
|
{ name: '数据分析', router: '', index: 1, routerList: [''], img: require('../assets/image/header-img4.png') },
|
||||||
{ name: '设备菜单', router: '', routerList: [], img: require('../assets/image/header-img5.png') },
|
// { name: '设备菜单', router: '', routerList: [], img: require('../assets/image/header-img5.png') },
|
||||||
//systemManage systemManage
|
//systemManage systemManage
|
||||||
{ name: '管理', router: '', routerList: [''], img: require('../assets/image/header-img6.png') },
|
{ name: '管理', router: '', routerList: [''], img: require('../assets/image/header-img6.png') },
|
||||||
|
|
||||||
|
@ -79,9 +79,9 @@ export default {
|
||||||
activeNames: [3],
|
activeNames: [3],
|
||||||
leftList: [
|
leftList: [
|
||||||
{ name: '首页', img: require('../assets/image/index-icon.png'), list: [], router: 'realTime', isRouter: true, },
|
{ name: '首页', img: require('../assets/image/index-icon.png'), list: [], router: 'realTime', isRouter: true, },
|
||||||
{ name: '温室', routerList: ['realTime','exitSettings', 'skylight', 'control','systemSet-con', 'fan', 'upload-con', 'sensorSet-con', 'synthesis-con','alarmSettings', 'waterPump', 'geothermalFan', 'uptake', 'downtake', 'rollByRoll', 'snowRemoval', "targetTemperature", "targetHumidity", "targetCo2", "sunroofControl", "outsizeSunshade", "insizeSunshade", "wetFan", "LED", 'electromagneticControl', "coercionMist", "circulationCan", "internalInsulation", "forceOutput", "intrinsicParameter", "parameterSet"], img: require('../assets/image/left-img0.png'), list: [] },
|
{ name: '温室', routerList: ['realTime','exitSettings','videoMonitoring', 'skylight', 'control','systemSet-con', 'fan', 'upload-con', 'sensorSet-con', 'synthesis-con','alarmSettings', 'waterPump', 'geothermalFan', 'uptake', 'downtake', 'rollByRoll', 'snowRemoval', "targetTemperature", "targetHumidity", "targetCo2", "sunroofControl", "outsizeSunshade", "insizeSunshade", "wetFan", "LED", 'electromagneticControl', "coercionMist", "circulationCan", "internalInsulation", "forceOutput", "intrinsicParameter", "parameterSet"], img: require('../assets/image/left-img0.png'), list: [] },
|
||||||
// { name: '二号温室', img: require('../assets/image/left-img1.png'), list: [] },
|
// { name: '二号温室', img: require('../assets/image/left-img1.png'), list: [] },
|
||||||
{ name: '施肥机', routerList: ['formula', 'irrigateSet', 'PIDSet', 'systemSet', 'upload', 'sensorSet', 'realTime', 'history', 'dataAnalysis'], img: require('../assets/image/left-img2.png'), list: [] },
|
{ name: '施肥机', routerList: ['formula', 'irrigateSet','videoMonitoring', 'PIDSet', 'systemSet', 'upload', 'sensorSet', 'realTime', 'history', 'dataAnalysis'], img: require('../assets/image/left-img2.png'), list: [] },
|
||||||
{ name: '生态气象站', routerList: ['realTime','exitSettings', 'skylight', 'control','systemSet-con', 'fan', 'upload-con', 'sensorSet-con', 'synthesis-con','alarmSettings', 'waterPump', 'geothermalFan', 'uptake', 'downtake', 'rollByRoll', 'snowRemoval', "targetTemperature", "targetHumidity", "targetCo2", "sunroofControl", "outsizeSunshade", "insizeSunshade", "wetFan", "LED", 'electromagneticControl', "coercionMist", "circulationCan", "internalInsulation", "forceOutput", "intrinsicParameter", "parameterSet"], img: require('../assets/image/left-img3.png'), list: [] },
|
{ name: '生态气象站', routerList: ['realTime','exitSettings', 'skylight', 'control','systemSet-con', 'fan', 'upload-con', 'sensorSet-con', 'synthesis-con','alarmSettings', 'waterPump', 'geothermalFan', 'uptake', 'downtake', 'rollByRoll', 'snowRemoval', "targetTemperature", "targetHumidity", "targetCo2", "sunroofControl", "outsizeSunshade", "insizeSunshade", "wetFan", "LED", 'electromagneticControl', "coercionMist", "circulationCan", "internalInsulation", "forceOutput", "intrinsicParameter", "parameterSet"], img: require('../assets/image/left-img3.png'), list: [] },
|
||||||
],
|
],
|
||||||
|
|
||||||
|
@ -291,7 +291,7 @@ export default {
|
||||||
} else if (item.router == 'dataAnalysis' && this.$route.query.index != item.index) {
|
} else if (item.router == 'dataAnalysis' && this.$route.query.index != item.index) {
|
||||||
this.$router.push({ path: `/dataAnalysis?index=${item.index ? item.index : 1}` })
|
this.$router.push({ path: `/dataAnalysis?index=${item.index ? item.index : 1}` })
|
||||||
|
|
||||||
} else if (this.routerNow == 'realTime' && item.router == 'status' && (this.deviceName == '10'||this.deviceName == '30')) {
|
} else if (item.router == 'status' && (this.deviceName == '10'||this.deviceName == '30')) {
|
||||||
this.$router.push({ path: `/control` })
|
this.$router.push({ path: `/control` })
|
||||||
} else if (item.router == 'realTime') {
|
} else if (item.router == 'realTime') {
|
||||||
|
|
||||||
|
|
|
@ -62,7 +62,7 @@
|
||||||
<span>高温报警时,禁止启动补光灯</span>
|
<span>高温报警时,禁止启动补光灯</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="input-btn">
|
<div class="input-btn">
|
||||||
<div class="btn btn-w80" @click="changeIndexOpen2(1)" :class="actList3[0] == '1' ? 'blue' : 'off'">
|
<div class="btn btn-w80" @click="changeIndexOpen2(0)" :class="actList3[0] == '1' ? 'blue' : 'off'">
|
||||||
{{actList3[0] == '1' ? '有效' : '无效'}}
|
{{actList3[0] == '1' ? '有效' : '无效'}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -70,7 +70,7 @@
|
||||||
<span>使用1#日标温度</span>
|
<span>使用1#日标温度</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="input-btn">
|
<div class="input-btn">
|
||||||
<div class="btn btn-w80" @click="changeIndexOpen2(2)" :class="actList3[1] == '1' ? 'blue' : 'off'">
|
<div class="btn btn-w80" @click="changeIndexOpen2(1)" :class="actList3[1] == '1' ? 'blue' : 'off'">
|
||||||
{{actList3[1] == '1' ? '有效' : '无效'}}
|
{{actList3[1] == '1' ? '有效' : '无效'}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -88,7 +88,7 @@
|
||||||
<span>室外光照大于</span>
|
<span>室外光照大于</span>
|
||||||
<input @blur="blurChange10(21403, $event)" v-model="inputData[21403]" @input="changeCount10(21403, $event)"
|
<input @blur="blurChange10(21403, $event)" v-model="inputData[21403]" @input="changeCount10(21403, $event)"
|
||||||
type="text" placeholder="0">
|
type="text" placeholder="0">
|
||||||
<span>时,禁止启用补光灯。 (KLux)</span>
|
<span>(KLux)时,禁止启用补光灯。 </span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex-view padding-none shrink-none">
|
<div class="flex-view padding-none shrink-none">
|
||||||
|
|
|
@ -170,7 +170,7 @@
|
||||||
src="../../assets/image/irrigateSet-icon2-act.png"
|
src="../../assets/image/irrigateSet-icon2-act.png"
|
||||||
alt=""
|
alt=""
|
||||||
/>
|
/>
|
||||||
灌凝结束时,清空混液罐
|
灌溉结束时,清空混液罐
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
@click="(open3 = !open3), change59()"
|
@click="(open3 = !open3), change59()"
|
||||||
|
@ -204,7 +204,7 @@
|
||||||
src="../../assets/image/irrigateSet-icon0-act.png"
|
src="../../assets/image/irrigateSet-icon0-act.png"
|
||||||
alt=""
|
alt=""
|
||||||
/>
|
/>
|
||||||
灌深清水时不启动进水泵
|
灌溉清水时不启动进水泵
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="input-view">
|
<div class="input-view">
|
||||||
|
|
|
@ -90,7 +90,7 @@
|
||||||
<span>室外温度低于</span>
|
<span>室外温度低于</span>
|
||||||
<input @blur="blurChangeCount(startList[indexs-1]+8, $event)" v-model="inputData[startList[indexs-1]+8]" @input="changeCountData(startList[indexs-1]+8, $event)"
|
<input @blur="blurChangeCount(startList[indexs-1]+8, $event)" v-model="inputData[startList[indexs-1]+8]" @input="changeCountData(startList[indexs-1]+8, $event)"
|
||||||
type="text" placeholder="0">
|
type="text" placeholder="0">
|
||||||
<span>度禁止开启通风窗。</span>
|
<span>度时,禁止开启通风窗。</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex-view padding-none">
|
<div class="flex-view padding-none">
|
||||||
|
|
|
@ -0,0 +1,123 @@
|
||||||
|
<template>
|
||||||
|
<div class="formula realTime videoMonitoring">
|
||||||
|
<div class="page-content new-data">
|
||||||
|
<div class="table-title">
|
||||||
|
<img src="../../assets/image/real-time.png" alt="" />
|
||||||
|
{{deviceTypeName}}—视频监控<span class="outline" v-if="deviceState == 0">(设备离线)</span>
|
||||||
|
</div>
|
||||||
|
<div class="flex-list realTime-bottom videoMonitoring-monitor">
|
||||||
|
<div class="left-view" v-if="deviceName != 30">
|
||||||
|
<div ref="monitor" class="monitor" id="monitor">
|
||||||
|
<!-- <video ref="videoPlayer" class="video-js" id="video-js"></video> -->
|
||||||
|
<div ref="videoPlayer" class="video-js" id="video-js"></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import EZUIKit from 'ezuikit-js';
|
||||||
|
import videojs from 'video.js';
|
||||||
|
import video_zhCN from 'video.js/dist/lang/zh-CN.json'
|
||||||
|
export default {
|
||||||
|
data(){
|
||||||
|
return {
|
||||||
|
deviceTypeName:'',
|
||||||
|
deviceName:'',
|
||||||
|
deviceState:1,
|
||||||
|
statusInterval: null,//status状态的Interval
|
||||||
|
player: null,
|
||||||
|
url: '',
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
$route(newVal, oldVal) {
|
||||||
|
const that = this;
|
||||||
|
const store = this.$store.state
|
||||||
|
this.indexs = this.$route.query.index ? this.$route.query.index : store.equipmentIndex;
|
||||||
|
this.deviceTypeName = store.equipmentList[this.indexs - 1].deviceTypeName
|
||||||
|
this.deviceName = store.equipmentList[this.indexs - 1].deviceName
|
||||||
|
this.deviceState = store.equipmentList[this.indexs - 1].deviceState
|
||||||
|
clearInterval(this.statusInterval) && this.statusInterval
|
||||||
|
setTimeout(() => {
|
||||||
|
|
||||||
|
if (this.player) {
|
||||||
|
this.player.stop()
|
||||||
|
that.player.destroy()
|
||||||
|
that.player = null
|
||||||
|
}
|
||||||
|
that.dataInit();
|
||||||
|
|
||||||
|
|
||||||
|
}, 0);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
beforeDestroy() {
|
||||||
|
const that = this;
|
||||||
|
// 销毁播放器
|
||||||
|
if (this.player) {
|
||||||
|
// this.player.dispose();
|
||||||
|
this.player.stop()
|
||||||
|
this.player.destroy()
|
||||||
|
this.player = null
|
||||||
|
}
|
||||||
|
clearInterval(this.statusInterval) && this.statusInterval
|
||||||
|
},
|
||||||
|
mounted(){
|
||||||
|
const that = this;
|
||||||
|
const store = this.$store.state
|
||||||
|
this.indexs = this.$route.query.index ? this.$route.query.index : store.equipmentIndex;
|
||||||
|
this.deviceTypeName = store.equipmentList[this.indexs - 1].deviceTypeName
|
||||||
|
this.deviceName = store.equipmentList[this.indexs - 1].deviceName
|
||||||
|
this.deviceState = store.equipmentList[this.indexs - 1].deviceState
|
||||||
|
setTimeout(() => {
|
||||||
|
that.dataInit();
|
||||||
|
}, 0);
|
||||||
|
},
|
||||||
|
methods:{
|
||||||
|
createVideoNew(accessToken) {
|
||||||
|
// divW和divH是获取了父级宽高 使播放容器能铺满div
|
||||||
|
let divW = this.$refs.monitor.clientWidth
|
||||||
|
let divH = this.$refs.monitor.clientHeight
|
||||||
|
this.player = new EZUIKit.EZUIKitPlayer({
|
||||||
|
id: 'video-js', // 视频容器ID
|
||||||
|
accessToken: accessToken,
|
||||||
|
url: this.url,
|
||||||
|
// 官方url例子:ezopen://open.ys7.com/G39444019/1.live 也可并非.live结尾 详见GitHub
|
||||||
|
// 播放主题 simple-极简版; standard-标准版; security-安防版; voice-语音版; 自定义主题详见GitHub
|
||||||
|
template: 'security',
|
||||||
|
useHardDev: true,// 开启高性能模式 依赖需高于7.7.x 截止到2023.11.7 建议保持最新版本为7.7.6
|
||||||
|
// plugin: ["talk"], // 加载插件,talk-对讲 非必填
|
||||||
|
width: divW, // 播放容器宽高 也可以直接设置成数字 如 1920 单位是px
|
||||||
|
height: divH, // 播放容器宽高 也可以直接设置成数字 如 1080 单位是px
|
||||||
|
})
|
||||||
|
},
|
||||||
|
dataInit(){
|
||||||
|
const store = this.$store.state
|
||||||
|
var nowDevice = store.equipmentList[this.indexs - 1]
|
||||||
|
var data2 = {
|
||||||
|
cameraid: nowDevice.cameraSerialNumber,
|
||||||
|
channelid: nowDevice.cameraChannelNumber
|
||||||
|
}
|
||||||
|
if (!this.player) {
|
||||||
|
this.api.getGethls(data2).then(res => {
|
||||||
|
// console.log(res.data, 11);
|
||||||
|
if (res.data.code == 200) {
|
||||||
|
this.url = res.data.data.ezopen
|
||||||
|
this.createVideoNew(res.data.data.accesstoken)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<style lang="scss">
|
||||||
|
|
||||||
|
</style>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue