Merge pull request 'pc-master' (#107) from pc-master into portal

Reviewed-on: #107
portal
xiaomeng 2024-01-26 08:18:29 +00:00
commit 98b19c3f09
10 changed files with 152 additions and 19 deletions

View File

@ -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

View File

@ -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;
} }

View File

@ -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",
}); });
} }

View File

@ -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',

View File

@ -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') {

View File

@ -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">

View File

@ -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">

View File

@ -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">

View File

@ -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,//statusInterval
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) {
// divWdivH 使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,
// urlezopen://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>