Commit e83c2d35 authored by 张伯涛's avatar 张伯涛

大屏视频问题调整

parent bea56110
...@@ -427,7 +427,7 @@ import AMapLoader from "@amap/amap-jsapi-loader"; ...@@ -427,7 +427,7 @@ import AMapLoader from "@amap/amap-jsapi-loader";
<div class="titleStyleTwoVideo"><p>换热站监控</p></div> <div class="titleStyleTwoVideo"><p>换热站监控</p></div>
<div class="moreInfo" @click="PreviousVideo()">上一个</div> <div class="moreInfo" @click="PreviousVideo()">上一个</div>
<div class="moreInfo" @click="nextVideo()">下一个</div> <div class="moreInfo" @click="nextVideo()">下一个</div>
<!-- <div class="moreInfo" @click="moreVideo()">更多》</div>--> <div class="moreInfo" @click="moreVideo()">更多》</div>
</div> </div>
<video-components :divWidth="divWidth" :divHeight="divHeight" :queryParams="queryParams" :stopParams="stopParams"/> <video-components :divWidth="divWidth" :divHeight="divHeight" :queryParams="queryParams" :stopParams="stopParams"/>
...@@ -2983,20 +2983,24 @@ export default defineComponent({ ...@@ -2983,20 +2983,24 @@ export default defineComponent({
const container = this.$refs.myContainer; const container = this.$refs.myContainer;
this.divWidth = container.offsetWidth *0.9; // 获取元素的宽度,包括元素的padding,不包括border、margin和滚动条 this.divWidth = container.offsetWidth *0.9; // 获取元素的宽度,包括元素的padding,不包括border、margin和滚动条
this.divHeight = container.offsetHeight *0.8; // 获取元素的宽度,包括元素的padding,不包括border、margin和滚动条 this.divHeight = container.offsetHeight *0.8; // 获取元素的宽度,包括元素的padding,不包括border、margin和滚动条
console.log('width',this.divWidth);
console.log('divHeight',this.divHeight);
}, },
// 更多视频 // 更多视频
moreVideo() { moreVideo() {
this.videoOpen = true this.videoOpen = true
this.queryParams = ''
this.stopParams += 1 this.stopParams += 1
console.log('this.VideoInfo.playVideoList',this.VideoInfo.playVideoList) console.log('this.VideoInfo.playVideoList',this.VideoInfo.playVideoList)
this.queryParamsAll = JSON.stringify(this.VideoInfo.playVideoList) this.queryParamsAll = JSON.stringify(this.VideoInfo.playVideoList)
}, },
// 关闭更多视频弹窗 // 关闭更多视频弹窗
handleVideoClose() { handleVideoClose() {
this.queryParamsAll = ''
this.stopParamsAll += 1 this.stopParamsAll += 1
this.videoOpen = false this.videoOpen = false
const videoList = []
videoList.push(this.VideoInfo.playVideoList[this.videoNum])
this.getDivWidth()
this.queryParams = JSON.stringify(videoList)
}, },
// 下一个视频 // 下一个视频
nextVideo() { nextVideo() {
...@@ -3901,16 +3905,16 @@ export default defineComponent({ ...@@ -3901,16 +3905,16 @@ export default defineComponent({
top: 17%; top: 17%;
} }
.videoInfo{ .videoInfo{
width: 1300px; width: 100%;
height: 750px; height: 100%;
border: rgba(129, 210, 230, 0.5) solid 1px; border: rgba(129, 210, 230, 0.5) solid 1px;
//padding: 0 0 0 10px; //padding: 0 0 0 10px;
background: linear-gradient(318deg, rgba(29, 70, 128, 0.8) 0%, rgba(13, 23, 76, 0.8) 100%); background: linear-gradient(318deg, rgba(29, 70, 128, 0.8) 0%, rgba(13, 23, 76, 0.8) 100%);
color: white; color: white;
position: absolute; position: absolute;
z-index: 9; z-index: 9;
left: 13%; //left: 13%;
top: 10%; //top: 10%;
} }
.alarmTable{ .alarmTable{
margin-bottom: 20px; margin-bottom: 20px;
......
...@@ -642,14 +642,16 @@ function playVideotest(cameraIndexCode) { ...@@ -642,14 +642,16 @@ function playVideotest(cameraIndexCode) {
watch( watch(
() => pProps.queryParams, () => pProps.queryParams,
async (newData) => { async (newData) => {
await initIp();//ip
initPlugin();
showPlay()
const params = JSON.parse(pProps.queryParams) const params = JSON.parse(pProps.queryParams)
// const params = ['31c0d567dd1944d5b4ea3eddf94f740b'] // const params = ['31c0d567dd1944d5b4ea3eddf94f740b']
console.log('params',params) if(params && params.length > 0) {
console.log('divWidth',pProps.divWidth) await initIp();//ip
getVideoFromVideoList(params) initPlugin();
showPlay()
console.log('params',params)
console.log('divWidth',pProps.divWidth)
getVideoFromVideoList(params)
}
} }
) )
......
...@@ -107,8 +107,8 @@ const pProps = defineProps({ ...@@ -107,8 +107,8 @@ const pProps = defineProps({
var initCount = 0; var initCount = 0;
var pubKey = ''; var pubKey = '';
// var playWnd_width = window.innerWidth - 800; // var playWnd_width = window.innerWidth - 800;
var playWnd_width = 500; var playWnd_width = window.innerWidth - 200;
var playWnd_height = 500; var playWnd_height = window.innerHeight - 220;
var oWebControl; var oWebControl;
var videoIp="218.69.97.198";; var videoIp="218.69.97.198";;
var videoPort=1443; var videoPort=1443;
...@@ -131,7 +131,7 @@ function down(){ ...@@ -131,7 +131,7 @@ function down(){
function resetVideoWidth(){ function resetVideoWidth(){
var menuWidth=localStorage.getItem("tabWidth"); var menuWidth=localStorage.getItem("tabWidth");
if(!menuWidth || menuWidth ==='' || !Number(menuWidth)){ if(!menuWidth || menuWidth ==='' || !Number(menuWidth)){
playWnd_width = 500; playWnd_width = window.innerWidth - 200;
}else{ }else{
playWnd_width = window.innerWidth - Number(menuWidth); playWnd_width = window.innerWidth - Number(menuWidth);
} }
...@@ -635,14 +635,16 @@ function playVideotest(cameraIndexCode) { ...@@ -635,14 +635,16 @@ function playVideotest(cameraIndexCode) {
watch( watch(
() => pProps.queryParams, () => pProps.queryParams,
async (newData) => { async (newData) => {
await initIp();//ip
initPlugin();
showPlay()
const params = JSON.parse(pProps.queryParams) const params = JSON.parse(pProps.queryParams)
// const params = ['31c0d567dd1944d5b4ea3eddf94f740b'] // const params = ['31c0d567dd1944d5b4ea3eddf94f740b']
console.log('params',params) if(params && params.length > 0) {
console.log(' window.innerWidth', window.innerWidth) await initIp();//ip
getVideoFromVideoList(params) initPlugin();
showPlay()
console.log('params',params)
console.log(' window.innerWidth', window.innerWidth)
getVideoFromVideoList(params)
}
} }
) )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment