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
6d541859
Commit
6d541859
authored
Aug 05, 2024
by
qjeslks
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
报警间隔改成一分钟
parent
7be83717
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
8 deletions
+25
-8
MyMenu.vue
src/components/MyMenu.vue
+20
-3
home.vue
src/views/home.vue
+5
-5
No files found.
src/components/MyMenu.vue
View file @
6d541859
...
...
@@ -5,7 +5,7 @@
<el-select
placement=
"bottom"
v-model=
"searchValue"
clearable
filterable
remote
reserve-keyword
:placeholder=
"'请输入关键字搜索...'"
:remote-method=
"remoteMethod"
@
change=
"selectChange"
:loading=
"loading"
>
<template
#
prefix
><i
class=
"el-icon-search"
></i></
template
>
<el-option
v-for=
"item in
menus.child
s"
:key=
"item.menuId"
:label=
"item.menuName"
:value=
"item.menuName"
/>
<el-option
v-for=
"item in
option
s"
:key=
"item.menuId"
:label=
"item.menuName"
:value=
"item.menuName"
/>
</el-select>
</div>
...
...
@@ -79,11 +79,11 @@
Menu
as
IconMenu
}
from
'@element-plus/icons-vue'
//
const searchValue = ref('');
const
searchValue
=
ref
(
''
);
// const proxy = getCurrentInstance();
// const props = defineProps(['meun', 'thisIndex']);
// const emit = defineEmits(['subEvent']);
//
const options = ref([]);
const
options
=
ref
([]);
// const loading = ref(false);
const
store
=
useStore
()
...
...
@@ -95,6 +95,23 @@
return
store
.
state
.
menus
})
setTimeout
(()
=>
{
getoptions
();
// 调用你的函数
},
1000
);
function
getoptions
(){
var
menus
=
store
.
state
.
menus
;
console
.
log
(
menus
[
1
].
childs
[
0
])
for
(
let
i
=
0
;
i
<
100
;
i
++
){
if
(
menus
[
i
]
===
undefined
)
break
;
for
(
let
j
=
0
;
j
<
100
;
j
++
){
if
(
menus
[
i
].
childs
[
j
]
===
undefined
)
break
;
options
.
value
.
push
(
menus
[
i
].
childs
[
j
])
}
}
console
.
log
(
options
.
value
)
// options.value.push()
}
onMounted
(()
=>
{
const
isdefaultActive
=
window
.
sessionStorage
.
getItem
(
'activePath'
)
if
(
isdefaultActive
){
...
...
src/views/home.vue
View file @
6d541859
...
...
@@ -605,7 +605,7 @@ export default defineComponent({
function
alarm
(){
http
.
post
(
"/api/alarm/GetAlarmMsg"
,
AlarmInfo
.
value
).
then
((
result
)
=>
{
if
(
result
.
data
!==
null
&&
sta
.
value
===
0
){
if
(
result
.
data
!==
null
&&
sta
.
value
===
0
&&
result
.
data
.
lengh
>
0
){
console
.
log
(
result
)
sta
.
value
=
1
;
title
.
value
=
result
.
data
[
0
].
title
;
...
...
@@ -616,7 +616,7 @@ export default defineComponent({
dangerouslyUseHTMLString
:
true
,
message
:
msg
.
value
.
replace
(
'
\
n'
,
'<br />'
),
position
:
'bottom-right'
,
type
:
'
error
'
,
type
:
'
warning
'
,
duration
:
0
,
onClick
()
{
activeTable
.
value
=
'/Video'
...
...
@@ -638,7 +638,7 @@ export default defineComponent({
}
function
countalarm
(){
http
.
post
(
"/api/alarm/GetAlarmMsg"
,
AlarmInfo
.
value
).
then
((
result
)
=>
{
if
(
result
.
data
!==
null
&&
consta
.
value
===
0
){
if
(
result
.
data
!==
null
&&
consta
.
value
===
0
&&
result
.
data
.
lengh
>
0
){
console
.
log
(
result
)
consta
.
value
=
1
;
counttitle
.
value
=
result
.
data
[
1
].
title
;
...
...
@@ -649,7 +649,7 @@ export default defineComponent({
dangerouslyUseHTMLString
:
true
,
message
:
countmsg
.
value
.
replace
(
'
\
n'
,
'<br />'
),
position
:
'bottom-right'
,
type
:
'
error
'
,
type
:
'
warning
'
,
duration
:
0
,
onClick
()
{
activeTable
.
value
=
'/Video'
...
...
@@ -674,7 +674,7 @@ export default defineComponent({
getinfo
();
alarm
();
countalarm
();
},
1
0
*
1000
);
// 每分钟执行一次
},
6
0
*
1000
);
// 每分钟执行一次
return
{
...
...
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