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
fb8097c0
Commit
fb8097c0
authored
Jul 20, 2024
by
梁淳峰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
240720
parent
b586f5b0
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
62 additions
and
13 deletions
+62
-13
DataMenu.vue
src/components/DataMenu.vue
+18
-3
VideoViewPage.vue
src/views/Video/VideoViewPage.vue
+15
-5
home.vue
src/views/home.vue
+29
-5
No files found.
src/components/DataMenu.vue
View file @
fb8097c0
<
template
>
<el-menu
active-text-color=
"#409eff"
text-color=
"#fff"
default-active=
"1"
class=
"el-menu-vertical-demo "
style=
"height: 100%;"
@
select=
"subEvent"
@
open=
"subEvent"
>
@
select=
"subEvent"
>
<MyMenu
:meun=
"toRaw(meun)"
:thisIndex=
"'1'"
></MyMenu>
</el-menu>
...
...
@@ -28,7 +28,7 @@ import { reactive, ref } from 'vue'
import
MyMenu
from
'./MyMenu.vue'
;
import
{
toRaw
}
from
'@vue/reactivity'
const
props
=
defineProps
([
'meun'
]);
const
emit
=
defineEmits
([
'subEvent'
]);
const
emit
=
defineEmits
([
'subEvent'
,
'openM'
,
'closeM'
]);
// console.log('data props:')
...
...
@@ -45,8 +45,23 @@ function subEvent(index, indexPath,item){
emit
(
'subEvent'
,
index
)
}
function
closeM
(){
console
.
log
(
'提交收起事件'
)
emit
(
'closeM'
);
}
function
test
()
{
console
.
log
(
'test'
);
}
function
openM
(){
console
.
log
(
'提交展开事件'
)
emit
(
'openM'
);
}
function
subMenuEvent
(
menu
){
emit
(
'subEvent'
,
menu
.
menuId
);
}
const
handleOpen
=
(
key
:
string
,
keyPath
:
string
[])
=>
{
console
.
log
(
key
,
keyPath
)
}
</
script
>
\ No newline at end of file
src/views/Video/VideoViewPage.vue
View file @
fb8097c0
...
...
@@ -102,8 +102,9 @@ onDeactivated(() => {
//声明公用变量
var
initCount
=
0
;
var
pubKey
=
''
;
var
playWnd_width
=
window
.
innerWidth
;
var
playWnd_height
=
700
;
var
playWnd_width
=
window
.
innerWidth
-
200
;
console
.
log
(
app
)
var
playWnd_height
=
window
.
innerHeight
-
220
;
var
oWebControl
;
var
videoIp
;
var
videoPort
=
1443
;
...
...
@@ -123,6 +124,15 @@ function down(){
const
filepath
=
'/OutputFile/VideoWebPlugin.zip'
;
window
.
open
(
filepath
);
}
function
resetVideoWidth
(){
var
menuWidth
=
localStorage
.
getItem
(
"tabWidth"
);
if
(
!
menuWidth
||
menuWidth
===
''
||
!
Number
(
menuWidth
)){
playWnd_width
=
window
.
innerWidth
-
200
;
}
else
{
playWnd_width
=
window
.
innerWidth
-
Number
(
menuWidth
);
}
console
.
log
(
'playVW'
,
playWnd_width
);
}
//获取服务中心->供热站->换热站,三级列表
function
getStats
()
{
...
...
@@ -238,7 +248,6 @@ $(document).ready(function () {
$
(
'#startPlay'
).
click
(
function
()
{
if
(
oWebControl
)
{
// resizeVideo();
showPlay
();
}
else
{
initPlugin
();
...
...
@@ -403,15 +412,15 @@ function setEncrypt(value) {
// 监听resize事件,使插件窗口尺寸跟随DIV窗口变化
$
(
window
).
resize
(
function
()
{
resetVideoWidth
();
if
(
oWebControl
!=
null
)
{
oWebControl
.
JS_Resize
(
playWnd_width
,
playWnd_height
);
setWndCover
();
}
});
function
resizeVideo
()
{
playWnd_width
=
window
.
innerWidth
;
resetVideoWidth
()
;
if
(
oWebControl
!=
null
)
{
oWebControl
.
JS_Resize
(
playWnd_width
,
playWnd_height
);
setWndCover
();
...
...
@@ -420,6 +429,7 @@ function resizeVideo() {
// 监听滚动条scroll事件,使插件窗口跟随浏览器滚动而移动
$
(
window
).
scroll
(
function
()
{
resetVideoWidth
();
if
(
oWebControl
!=
null
)
{
oWebControl
.
JS_Resize
(
playWnd_width
,
playWnd_height
);
setWndCover
();
...
...
src/views/home.vue
View file @
fb8097c0
...
...
@@ -14,7 +14,7 @@
</i>
</div>
<div
class=
"ams-menu"
>
<DataMenu></DataMenu>
<DataMenu
@
mouseenter=
"enterMenu"
@
mouseleave=
"leaveMenu"
></DataMenu>
</div>
</div>
<div
class=
"ams-container"
:style=
"
{ left: menuWidth - 2 + 'px' }">
...
...
@@ -216,6 +216,7 @@ var $this;
var
$interval
;
const
componentView
=
ref
(
null
);
localStorage
.
setItem
(
'tabWidth'
,
''
);
export
default
defineComponent
({
components
:
{
...
...
@@ -290,15 +291,13 @@ export default defineComponent({
amslogo_style
.
width
=
store
.
state
.
iscollapse
?
40
:
150
;
mainWidth
.
value
=
window
.
innerWidth
-
menuWidth
.
value
;
await
EventBus
.
emit
(
'changeValue'
,
mainWidth
.
value
);
localStorage
.
setItem
(
'tabWidth'
,
menuWidth
.
value
);
console
.
log
(
'触发'
)
// console.log(proxy.$refs.componentView);
// console.log(proxy.$refs.componentView.resizeVideo);
if
(
proxy
.
$refs
.
componentView
&&
proxy
.
$refs
.
componentView
.
showPlay
){
proxy
.
$refs
.
componentView
.
showPlay
();
}
// if(proxy.$refs.componentView && proxy.$refs.componentView.resizeVideo){
// proxy.$refs.componentView.resizeVideo();
// }
}
//开放手动折叠菜单方法
...
...
@@ -534,6 +533,29 @@ export default defineComponent({
}
}
}
function
enterMenu
(){
var
menuWidth
=
localStorage
.
getItem
(
"tabWidth"
);
if
(
menuWidth
&&
menuWidth
===
'63'
){
// console.log('e');
//隐藏视频插件
if
(
proxy
.
$refs
.
componentView
&&
proxy
.
$refs
.
componentView
.
hidePlay
)
{
proxy
.
$refs
.
componentView
.
hidePlay
();
}
}
}
function
leaveMenu
(){
var
menuWidth
=
localStorage
.
getItem
(
"tabWidth"
);
if
(
menuWidth
&&
menuWidth
===
'63'
){
// console.log('l');
//重置视频插件位置
if
(
proxy
.
$refs
.
componentView
&&
proxy
.
$refs
.
componentView
.
showPlay
)
{
proxy
.
$refs
.
componentView
.
showPlay
();
}
}
}
function
openMap
(){
const
routePath
=
'/GisHome'
;
// 要导航到的路由路径
...
...
@@ -574,7 +596,9 @@ export default defineComponent({
changeTabsHandle
,
activeTable
,
logout
,
openMap
openMap
,
enterMenu
,
leaveMenu
//enterpriseId
};
},
...
...
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