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
8e6b4d6a
Commit
8e6b4d6a
authored
Jul 29, 2024
by
qjeslks
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
7.29.4
parent
451d697e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
96 additions
and
87 deletions
+96
-87
VideoViewPage.vue
src/views/Video/VideoViewPage.vue
+3
-0
home.vue
src/views/home.vue
+93
-87
No files found.
src/views/Video/VideoViewPage.vue
View file @
8e6b4d6a
...
...
@@ -89,6 +89,9 @@ onDeactivated(() => {
hidePlay
();
})
const
route
=
useRoute
();
console
.
log
(
route
.
query
.
id
)
//声明公用变量
var
initCount
=
0
;
...
...
src/views/home.vue
View file @
8e6b4d6a
...
...
@@ -574,6 +574,99 @@ export default defineComponent({
// );
}
//报警弹窗
const
userId
=
ref
();
const
roleIds
=
ref
();
const
title
=
ref
();
const
msg
=
ref
();
const
id
=
ref
();
const
counttitle
=
ref
();
const
countmsg
=
ref
();
const
countid
=
ref
();
//获取用户信息
function
getuser
(){
var
user
=
store
.
getters
.
getUserInfo
();
if
(
user
){
enterpriseId
.
value
=
user
.
enterpriseId
;
userId
.
value
=
user
.
userId
;
roleIds
.
value
=
user
.
roleId
;
}
}
const
AlarmInfo
=
ref
({});
function
getinfo
(){
AlarmInfo
.
value
=
{
"enterpriseId"
:
enterpriseId
.
value
,
"UserId"
:
userId
.
value
,
"RoleId"
:
roleIds
.
value
};
}
function
alarm
(){
http
.
post
(
"/api/alarm/GetAlarmMsg"
,
AlarmInfo
.
value
).
then
((
result
)
=>
{
if
(
result
.
data
!==
null
){
if
(
result
.
data
!==
null
&&
title
.
value
!==
result
.
data
[
0
].
title
||
msg
.
value
!==
result
.
data
[
0
].
msg
){
title
.
value
=
result
.
data
[
0
].
title
;
msg
.
value
=
result
.
data
[
0
].
msg
;
id
.
value
=
result
.
data
[
0
].
id
;
ElNotification
({
title
:
title
.
value
,
message
:
msg
.
value
,
position
:
'bottom-right'
,
type
:
'warning'
,
duration
:
0
,
onClick
()
{
activeTable
.
value
=
'/Video'
localStorage
.
setItem
(
"activeTab"
,
'/Video'
);
//路由跳转
this
.
$router
.
push
({
//如果要是用 name 传参 就直接 携带一个 query 对象中包含参数
path
:
"/Video"
,
query
:{
id
:
id
.
value
}
});
},
})
}
}
});
}
function
countalarm
(){
http
.
post
(
"/api/alarm/GetAlarmMsg"
,
AlarmInfo
.
value
).
then
((
result
)
=>
{
if
(
result
.
data
!==
null
){
if
(
result
.
data
!==
null
&&
counttitle
.
value
!==
result
.
data
[
1
].
title
||
countmsg
.
value
!==
result
.
data
[
1
].
msg
){
counttitle
.
value
=
result
.
data
[
1
].
title
;
countmsg
.
value
=
result
.
data
[
1
].
msg
;
countid
.
value
=
result
.
data
[
1
].
id
;
ElNotification
({
title
:
counttitle
.
value
,
message
:
countmsg
.
value
,
position
:
'bottom-right'
,
type
:
'warning'
,
duration
:
0
,
onClick
()
{
activeTable
.
value
=
'/Video'
localStorage
.
setItem
(
"activeTab"
,
'/Video'
);
//路由跳转
this
.
$router
.
push
({
//如果要是用 name 传参 就直接 携带一个 query 对象中包含参数
path
:
"/Video"
,
query
:{
id
:
id
.
value
}
});
},
})
}
}
});
}
setInterval
(()
=>
{
getuser
()
getinfo
();
alarm
();
countalarm
();
},
10
*
1000
);
// 每分钟执行一次
return
{
menuWidth
,
mainHeight
,
...
...
@@ -639,93 +732,6 @@ export default defineComponent({
},
});
//报警弹窗
const
userId
=
ref
();
const
roleId
=
ref
();
const
title
=
ref
();
const
msg
=
ref
();
const
id
=
ref
();
const
counttitle
=
ref
();
const
countmsg
=
ref
();
const
countid
=
ref
();
const
route
=
useRoute
();
//获取用户信息
function
getuser
(){
var
user
=
store
.
getters
.
getUserInfo
();
if
(
user
){
enterpriseId
.
value
=
user
.
enterpriseId
;
userId
.
value
=
user
.
userId
;
roleId
.
value
=
user
.
roleId
;
}
}
const
AlarmInfo
=
ref
({});
function
getinfo
(){
AlarmInfo
.
value
=
{
"enterpriseId"
:
enterpriseId
.
value
,
"UserId"
:
userId
.
value
,
"RoleId"
:
roleId
.
value
};
}
function
alarm
(){
http
.
post
(
"/api/alarm/GetAlarmMsg"
,
AlarmInfo
.
value
).
then
((
result
)
=>
{
if
(
result
.
data
!==
null
){
if
(
result
.
data
!==
null
&&
title
.
value
!==
result
.
data
[
0
].
title
||
msg
.
value
!==
result
.
data
[
0
].
msg
){
title
.
value
=
result
.
data
[
0
].
title
;
msg
.
value
=
result
.
data
[
0
].
msg
;
id
.
value
=
result
.
data
[
0
].
id
;
ElNotification
({
title
:
title
.
value
,
message
:
msg
.
value
,
position
:
'bottom-right'
,
type
:
'warning'
,
duration
:
0
,
// onClick() {
// console.log(111111)
// const routePath = '/Home/Video'; // 要导航到的路由路径
// const routeQuery = { id: id.value }; // 如果需要,可以传递参数
// // 序列化查询参数
// const queryString = new URLSearchParams(routeQuery).toString();
// // 打开新窗口并导航到指定路由
// window.open(
// `${routePath}?${queryString}`,
// '_blank',
// 'toolbar=yes,location=yes,status=yes,menubar=yes,width=600,height=400,scrollbars=yes'
// );
// },
})
}
}
});
}
const
router
=
useRouter
()
function
countalarm
(){
http
.
post
(
"/api/alarm/GetAlarmMsg"
,
AlarmInfo
.
value
).
then
((
result
)
=>
{
if
(
result
.
data
!==
null
){
if
(
result
.
data
!==
null
&&
counttitle
.
value
!==
result
.
data
[
1
].
title
||
countmsg
.
value
!==
result
.
data
[
1
].
msg
){
counttitle
.
value
=
result
.
data
[
1
].
title
;
countmsg
.
value
=
result
.
data
[
1
].
msg
;
countid
.
value
=
result
.
data
[
1
].
id
;
ElNotification
({
title
:
counttitle
.
value
,
message
:
countmsg
.
value
,
position
:
'bottom-right'
,
type
:
'warning'
,
duration
:
0
,
// onClick() {
// router.push({ path: '/GisHome'})
// },
})
}
}
});
}
setInterval
(()
=>
{
getuser
()
getinfo
();
alarm
();
countalarm
();
},
10
*
1000
);
// 每分钟执行一次
</
script
>
...
...
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