Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
web-project
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
海康威视
web-project
Commits
56752d79
Commit
56752d79
authored
Jul 20, 2024
by
王亚晖
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://gitee.com/tj-wang-yahui/AMS_HeatSys_Vue_V10
parents
2e6ed3da
84a23ecb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
91 deletions
+8
-91
VideoViewPage.vue
src/views/Video/VideoViewPage.vue
+8
-91
No files found.
src/views/Video/VideoViewPage.vue
View file @
56752d79
...
@@ -98,19 +98,23 @@ onDeactivated(() => {
...
@@ -98,19 +98,23 @@ onDeactivated(() => {
hidePlay
();
hidePlay
();
})
})
// console.log('w:',window.innerWidth);
//声明公用变量
var
initCount
=
0
;
var
pubKey
=
''
;
var
playWnd_width
=
window
.
innerWidth
;
var
playWnd_height
=
700
;
var
oWebControl
;
var
videoIp
;
var
videoPort
=
1443
;
const
enterpriseId
=
ref
(
null
);
const
enterpriseId
=
ref
(
null
);
enterpriseId
.
value
=
store
.
getters
.
getEnterpriseId
();
enterpriseId
.
value
=
store
.
getters
.
getEnterpriseId
();
var
VideoInfo
=
reactive
({
var
VideoInfo
=
reactive
({
selectOptions
:
[],
selectOptions
:
[],
value
:
[],
value
:
[],
videoList
:
[],
videoList
:
[],
playVideoList
:
[]
playVideoList
:
[]
});
});
const
props
=
{
multiple
:
false
,
emitPath
:
false
}
const
props
=
{
multiple
:
false
,
emitPath
:
false
}
initPage
();
initPage
();
...
@@ -150,7 +154,6 @@ function getStats() {
...
@@ -150,7 +154,6 @@ function getStats() {
})
})
//增加供热站节点
//增加供热站节点
s
.
children
.
push
({
value
:
s
.
value
,
label
:
s
.
label
})
s
.
children
.
push
({
value
:
s
.
value
,
label
:
s
.
label
})
if
(
s
.
children
.
length
>
0
)
{
if
(
s
.
children
.
length
>
0
)
{
//判断该供热站是否有换热站机组,若有则加入列表
//判断该供热站是否有换热站机组,若有则加入列表
serv
.
children
.
push
(
s
);
serv
.
children
.
push
(
s
);
...
@@ -169,7 +172,6 @@ function getStats() {
...
@@ -169,7 +172,6 @@ function getStats() {
s
.
label
=
supply
.
supplyName
;
s
.
label
=
supply
.
supplyName
;
s
.
children
=
[];
s
.
children
=
[];
supply
.
transferList
.
forEach
(
unit
=>
{
supply
.
transferList
.
forEach
(
unit
=>
{
// var tmpUnit = { value: unit.unitName, label: unit.unitName }
var
tmpUnit
=
{
value
:
unit
.
unitId
,
label
:
unit
.
unitName
}
var
tmpUnit
=
{
value
:
unit
.
unitId
,
label
:
unit
.
unitName
}
s
.
children
.
push
(
tmpUnit
);
s
.
children
.
push
(
tmpUnit
);
})
})
...
@@ -186,19 +188,14 @@ function getStats() {
...
@@ -186,19 +188,14 @@ function getStats() {
}
}
}
}
}
}
// if (VideoInfo.selectOptions) {
// }
}
}
// console.log($)
//从数据库获得监控点信息
//从数据库获得监控点信息
function
getVideoInfo
()
{
function
getVideoInfo
()
{
http
.
post
(
'/api/video/GetVideoTable'
).
then
((
result
)
=>
{
http
.
post
(
'/api/video/GetVideoTable'
).
then
((
result
)
=>
{
//console.log(result);
//若获得视频列表,则存入
//若获得视频列表,则存入
if
(
result
.
data
.
count
>
0
)
{
if
(
result
.
data
.
count
>
0
)
{
VideoInfo
.
videoList
.
push
.
apply
(
VideoInfo
.
videoList
,
result
.
data
.
dataTable
);
VideoInfo
.
videoList
.
push
.
apply
(
VideoInfo
.
videoList
,
result
.
data
.
dataTable
);
...
@@ -211,25 +208,20 @@ function initPage() {
...
@@ -211,25 +208,20 @@ function initPage() {
getVideoInfo
();
//视频信息
getVideoInfo
();
//视频信息
getStats
();
//下拉列表
getStats
();
//下拉列表
initIp
();
//ip
initIp
();
//ip
// console.log(VideoInfo)
}
}
//从视频列表中找到当前被选中的换热站对应的所有视频id
//从视频列表中找到当前被选中的换热站对应的所有视频id
function
getVideoFromVideoList
(
Id
)
{
function
getVideoFromVideoList
(
Id
)
{
// console.log(Id)
stopAllPreview
();
stopAllPreview
();
VideoInfo
.
playVideoList
.
length
=
0
;
VideoInfo
.
playVideoList
.
length
=
0
;
VideoInfo
.
videoList
.
forEach
(
video
=>
{
VideoInfo
.
videoList
.
forEach
(
video
=>
{
if
(
video
.
stationId
===
Id
)
{
if
(
video
.
stationId
===
Id
)
{
//console.log(video)
var
videoId
=
video
.
videoId
.
replaceAll
(
'-'
,
''
);
var
videoId
=
video
.
videoId
.
replaceAll
(
'-'
,
''
);
VideoInfo
.
playVideoList
.
push
(
videoId
);
VideoInfo
.
playVideoList
.
push
(
videoId
);
}
}
})
})
console
.
log
(
VideoInfo
);
console
.
log
(
VideoInfo
);
if
(
oWebControl
)
{
if
(
oWebControl
)
{
// console.log('批量播放')
playVideoByVideoList
(
VideoInfo
.
playVideoList
)
playVideoByVideoList
(
VideoInfo
.
playVideoList
)
}
}
...
@@ -239,38 +231,12 @@ function visibleCascader(isshow) {
...
@@ -239,38 +231,12 @@ function visibleCascader(isshow) {
return
;
return
;
}
}
if
(
isshow
)
{
if
(
isshow
)
{
hidePlay
();
hidePlay
();
}
else
{
}
else
{
// resizeVideo();
showPlay
();
showPlay
();
}
}
}
}
//列出所有站
// {
// "videoId": "eb1907ab-4462-41b5-9776-268528ad27d9",
// "videoName": "枫雅园水箱",
// "supplyId": "b354f45b-23e5-42be-a210-0fb92394f457",
// "supplyName": "小王庄供热站",
// "stationId": "eef904a5-62e4-4dee-b1a9-3dde42b001b4",
// "videoAddress": "枫雅园换热站(6号地)",
// "centerId": "7e0263d8-61bc-46f9-aa4f-52394687f8cd",
// "centerName": "港东供热服务中心"
// }
//------视频播放控制
//页面加载时创建播放实例初始化
// $(window).load(function () {
// //将播放函数写入初始化成功回调函数中,以确保播放函数在初始化成功后执行
// // initPlugin();
// });
$
(
document
).
ready
(
function
()
{
$
(
document
).
ready
(
function
()
{
initPlugin
();
initPlugin
();
$
(
'#startPlay'
).
click
(
$
(
'#startPlay'
).
click
(
...
@@ -291,25 +257,10 @@ $(document).ready(function () {
...
@@ -291,25 +257,10 @@ $(document).ready(function () {
)
)
})
})
onUnmounted
(()
=>
{
onUnmounted
(()
=>
{
hidePlay
();
hidePlay
();
})
})
//声明公用变量
var
initCount
=
0
;
var
pubKey
=
''
;
var
playWnd_width
=
window
.
innerWidth
;
var
playWnd_height
=
700
;
// var testWeb= new WebControl();
var
oWebControl
;
var
videoIp
;
var
videoPort
=
1443
;
// 创建播放实例
// 创建播放实例
function
initPlugin
()
{
function
initPlugin
()
{
oWebControl
=
new
WebControl
({
oWebControl
=
new
WebControl
({
...
@@ -367,8 +318,6 @@ function initPlugin() {
...
@@ -367,8 +318,6 @@ function initPlugin() {
});
});
}
}
// 设置窗口控制回调
// 设置窗口控制回调
function
setCallbacks
()
{
function
setCallbacks
()
{
oWebControl
.
JS_SetWindowControlCallback
({
oWebControl
.
JS_SetWindowControlCallback
({
...
@@ -378,12 +327,6 @@ function setCallbacks() {
...
@@ -378,12 +327,6 @@ function setCallbacks() {
// 推送消息
// 推送消息
function
cbIntegrationCallBack
(
oData
)
{
function
cbIntegrationCallBack
(
oData
)
{
//showCBInfo(JSON.stringify(oData.responseMsg));
/* var json = JSON.stringify(oData.responseMsg);
console.log(json);
if (oData.responseMsg.type === 7) {
oWebControl.JS_HideWnd();
} */
}
}
//初始化ip
//初始化ip
...
@@ -473,12 +416,8 @@ $(window).resize(function () {
...
@@ -473,12 +416,8 @@ $(window).resize(function () {
});
});
function
resizeVideo
()
{
function
resizeVideo
()
{
// console.log('触发重绘')
// console.log('resize')
playWnd_width
=
window
.
innerWidth
;
playWnd_width
=
window
.
innerWidth
;
if
(
oWebControl
!=
null
)
{
if
(
oWebControl
!=
null
)
{
// console.log('startresize')
// console.log('重绘界面位置')
oWebControl
.
JS_Resize
(
playWnd_width
,
playWnd_height
);
oWebControl
.
JS_Resize
(
playWnd_width
,
playWnd_height
);
setWndCover
();
setWndCover
();
}
}
...
@@ -492,7 +431,6 @@ $(window).scroll(function () {
...
@@ -492,7 +431,6 @@ $(window).scroll(function () {
}
}
});
});
// 设置窗口裁剪,当因滚动条滚动导致窗口需要被遮住的情况下需要JS_CuttingPartWindow部分窗口
// 设置窗口裁剪,当因滚动条滚动导致窗口需要被遮住的情况下需要JS_CuttingPartWindow部分窗口
function
setWndCover
()
{
function
setWndCover
()
{
var
iWidth
=
$
(
window
).
width
();
var
iWidth
=
$
(
window
).
width
();
...
@@ -527,7 +465,6 @@ function setWndCover() {
...
@@ -527,7 +465,6 @@ function setWndCover() {
//视频预览功能
//视频预览功能
$
(
"#startPreview"
).
click
(
function
()
{
$
(
"#startPreview"
).
click
(
function
()
{
var
cameraIndexCode
=
$
(
"#cameraIndexCode"
).
val
();
//获取输入的监控点编号值,必填
var
cameraIndexCode
=
$
(
"#cameraIndexCode"
).
val
();
//获取输入的监控点编号值,必填
// cameraIndexCode = '875B9153-F5A6-4321-83EE-01C57EF561B5'
var
streamMode
=
0
;
//主子码流标识:0-主码流,1-子码流
var
streamMode
=
0
;
//主子码流标识:0-主码流,1-子码流
var
transMode
=
1
;
//传输协议:0-UDP,1-TCP
var
transMode
=
1
;
//传输协议:0-UDP,1-TCP
var
gpuMode
=
0
;
//是否启用GPU硬解,0-不启用,1-启用
var
gpuMode
=
0
;
//是否启用GPU硬解,0-不启用,1-启用
...
@@ -558,17 +495,6 @@ function stopAllPreview() {
...
@@ -558,17 +495,6 @@ function stopAllPreview() {
});
});
};
};
// 标签关闭
// $(window).unload(function () {
// if (oWebControl != null) {
// oWebControl.JS_HideWnd(); // 先让窗口隐藏,规避可能的插件窗口滞后于浏览器消失问题
// oWebControl.JS_Disconnect().then(function () { // 断开与插件服务连接成功
// },
// function () { // 断开与插件服务连接失败
// });
// }
// });
//播放视频函数,需要传入监控点编码☆☆☆☆
//播放视频函数,需要传入监控点编码☆☆☆☆
function
playVideo
(
videoCode
)
{
function
playVideo
(
videoCode
)
{
// stopAllPreview();
// stopAllPreview();
...
@@ -605,17 +531,11 @@ function playVideoByVideoList(videoList) {
...
@@ -605,17 +531,11 @@ function playVideoByVideoList(videoList) {
if
(
!
videoList
||
videoList
.
length
===
0
)
{
if
(
!
videoList
||
videoList
.
length
===
0
)
{
return
;
return
;
}
}
// console.log("play:" + String(cameraIndexCode));
// var cameraIndexCode = String(cameraIndexCode); //获取输入的监控点编号值,必填
var
streamMode
=
0
;
//主子码流标识:0-主码流,1-子码流
var
streamMode
=
0
;
//主子码流标识:0-主码流,1-子码流
var
transMode
=
1
;
//传输协议:0-UDP,1-TCP
var
transMode
=
1
;
//传输协议:0-UDP,1-TCP
var
gpuMode
=
0
;
//是否启用GPU硬解,0-不启用,1-启用
var
gpuMode
=
0
;
//是否启用GPU硬解,0-不启用,1-启用
var
wndId
=
-
1
;
//播放窗口序号(在2x2以上布局下可指定播放窗口)
var
wndId
=
-
1
;
//播放窗口序号(在2x2以上布局下可指定播放窗口)
// cameraIndexCode = cameraIndexCode.replace(/(^\s*)/g, "");
// cameraIndexCode = cameraIndexCode.replace(/(\s*$)/g, "");
var
list
=
[]
var
list
=
[]
for
(
var
i
=
0
;
i
<
videoList
.
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
videoList
.
length
;
i
++
)
{
...
@@ -634,7 +554,6 @@ function playVideoByVideoList(videoList) {
...
@@ -634,7 +554,6 @@ function playVideoByVideoList(videoList) {
}
}
list
.
push
(
tmp
);
list
.
push
(
tmp
);
}
}
// console.log(list)
if
(
list
.
length
===
0
)
{
if
(
list
.
length
===
0
)
{
return
;
return
;
}
}
...
@@ -668,8 +587,6 @@ function playVideotest(cameraIndexCode) {
...
@@ -668,8 +587,6 @@ function playVideotest(cameraIndexCode) {
return
;
return
;
}
}
console
.
log
(
"play:"
+
String
(
cameraIndexCode
));
var
cameraIndexCode
=
String
(
cameraIndexCode
);
//获取输入的监控点编号值,必填
var
cameraIndexCode
=
String
(
cameraIndexCode
);
//获取输入的监控点编号值,必填
var
streamMode
=
0
;
//主子码流标识:0-主码流,1-子码流
var
streamMode
=
0
;
//主子码流标识:0-主码流,1-子码流
var
transMode
=
1
;
//传输协议:0-UDP,1-TCP
var
transMode
=
1
;
//传输协议:0-UDP,1-TCP
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment