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
034a9223
Commit
034a9223
authored
Aug 05, 2024
by
qjeslks
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
菜单栏搜索功能
parent
dd9a44a0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
8 deletions
+12
-8
MyMenu.vue
src/components/MyMenu.vue
+12
-6
BoilerArt.vue
src/components/art/BoilerArt.vue
+0
-2
No files found.
src/components/MyMenu.vue
View file @
034a9223
...
@@ -2,10 +2,10 @@
...
@@ -2,10 +2,10 @@
<el-scrollbar>
<el-scrollbar>
<div
class=
"ams-el-menu"
>
<div
class=
"ams-el-menu"
>
<div
class=
"menu-search"
>
<div
class=
"menu-search"
>
<el-select
placement=
"bottom"
v-model=
"searchValue"
clearable
filterable
remote
reserve-keyword
<el-select
placement=
"bottom"
v-model=
"searchValue"
clearable
filterable
:placeholder=
"'请输入关键字搜索...'"
:remote-method=
"remoteMethod"
@
change=
"selectChange"
:loading=
"loading
"
>
:placeholder=
"'请输入关键字搜索...'"
@
change=
"save(searchValue)
"
>
<template
#
prefix
><i
class=
"el-icon-search"
></i></
template
>
<template
#
prefix
><i
class=
"el-icon-search"
></i></
template
>
<el-option
v-for=
"item in options"
:key=
"item.menuId"
:label=
"item.menuName"
:value=
"item.
menuName
"
/>
<el-option
v-for=
"item in options"
:key=
"item.menuId"
:label=
"item.menuName"
:value=
"item.
navigateUrl
"
/>
</el-select>
</el-select>
</div>
</div>
...
@@ -78,8 +78,10 @@
...
@@ -78,8 +78,10 @@
import
{
import
{
Menu
as
IconMenu
Menu
as
IconMenu
}
from
'@element-plus/icons-vue'
}
from
'@element-plus/icons-vue'
import
{
useRouter
}
from
'vue-router'
;
const
searchValue
=
ref
(
''
);
const
searchValue
=
ref
();
const
router
=
useRouter
();
// const proxy = getCurrentInstance();
// const proxy = getCurrentInstance();
// const props = defineProps(['meun', 'thisIndex']);
// const props = defineProps(['meun', 'thisIndex']);
// const emit = defineEmits(['subEvent']);
// const emit = defineEmits(['subEvent']);
...
@@ -97,10 +99,9 @@
...
@@ -97,10 +99,9 @@
setTimeout
(()
=>
{
setTimeout
(()
=>
{
getoptions
();
// 调用你的函数
getoptions
();
// 调用你的函数
},
1
000
);
},
2
000
);
function
getoptions
(){
function
getoptions
(){
var
menus
=
store
.
state
.
menus
;
var
menus
=
store
.
state
.
menus
;
console
.
log
(
menus
[
1
].
childs
[
0
])
for
(
let
i
=
0
;
i
<
100
;
i
++
){
for
(
let
i
=
0
;
i
<
100
;
i
++
){
if
(
menus
[
i
]
===
undefined
)
break
;
if
(
menus
[
i
]
===
undefined
)
break
;
for
(
let
j
=
0
;
j
<
100
;
j
++
){
for
(
let
j
=
0
;
j
<
100
;
j
++
){
...
@@ -132,5 +133,10 @@
...
@@ -132,5 +133,10 @@
defaultActive
.
value
=
path
defaultActive
.
value
=
path
window
.
sessionStorage
.
setItem
(
'activePath'
,
path
)
window
.
sessionStorage
.
setItem
(
'activePath'
,
path
)
}
}
const
save
=
(
routePath
)
=>
{
defaultActive
.
value
=
routePath
window
.
sessionStorage
.
setItem
(
'activePath'
,
routePath
)
router
.
push
({
path
:
routePath
});
}
</
script
>
</
script
>
\ No newline at end of file
src/components/art/BoilerArt.vue
View file @
034a9223
...
@@ -209,7 +209,6 @@ const InstantFlow = ref();
...
@@ -209,7 +209,6 @@ const InstantFlow = ref();
getSupplysList
();
getSupplysList
();
function
getSupplysList
()
{
function
getSupplysList
()
{
var
result
=
store
.
getters
.
getEnterprise
();
var
result
=
store
.
getters
.
getEnterprise
();
console
.
log
(
result
);
if
(
result
)
{
if
(
result
)
{
enterpriseId
.
value
=
result
[
0
].
enterpriseId
;
enterpriseId
.
value
=
result
[
0
].
enterpriseId
;
result
[
0
].
serviceCenterList
.
forEach
(
center
=>
{
result
[
0
].
serviceCenterList
.
forEach
(
center
=>
{
...
@@ -325,7 +324,6 @@ function getPipeData() {
...
@@ -325,7 +324,6 @@ function getPipeData() {
setInterval
(()
=>
{
setInterval
(()
=>
{
getBoilerData
();
getBoilerData
();
console
.
log
(
refreshTime
.
value
)
},
refreshTime
.
value
*
1000
);
// 每分钟执行一次
},
refreshTime
.
value
*
1000
);
// 每分钟执行一次
...
...
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