Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
agcs2.0-web
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
liang
agcs2.0-web
Commits
86be8412
Commit
86be8412
authored
Mar 10, 2023
by
miaojiale
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.处理消息模块
parent
dcacef75
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
11 deletions
+24
-11
index.vue
src/layouts/components/NavBar/index.vue
+15
-5
index.vue
src/layouts/index.vue
+9
-6
No files found.
src/layouts/components/NavBar/index.vue
View file @
86be8412
...
@@ -37,9 +37,10 @@
...
@@ -37,9 +37,10 @@
<avatar></avatar>
<avatar></avatar>
</div>
</div>
<el-popover
<el-popover
v-if=
"messageCount != 0"
placement=
"top-start"
placement=
"top-start"
width=
"300"
width=
"300"
:trigger=
"messageCount == 0 ? 'none' : 'hover'
"
trigger=
"hover
"
popper-class=
"message-pop"
popper-class=
"message-pop"
>
>
<div
class=
"messageBox"
>
<div
class=
"messageBox"
>
...
@@ -71,6 +72,12 @@
...
@@ -71,6 +72,12 @@
</el-badge>
</el-badge>
</
template
>
</
template
>
</el-popover>
</el-popover>
<el-badge
v-else
:value=
"0"
:class-name=
"'badge'"
>
<div
class=
"user"
>
<img
src=
"~@/assets/img/DataCenter/message.png"
alt
/>
消息
</div>
</el-badge>
<div
class=
"user"
@
click=
"$router.push('/home')"
>
<div
class=
"user"
@
click=
"$router.push('/home')"
>
<img
src=
"~@/assets/img/DataCenter/backhome.png"
alt
/>
<img
src=
"~@/assets/img/DataCenter/backhome.png"
alt
/>
<span>
返回首页
</span>
<span>
返回首页
</span>
...
@@ -147,10 +154,13 @@ export default {
...
@@ -147,10 +154,13 @@ export default {
}),
}),
},
},
watch
:
{
watch
:
{
curSelectedIndex
(
v
)
{
curSelectedIndex
:
{
this
.
messageList
=
[]
handler
(
v
)
{
this
.
pageNum
=
1
this
.
messageList
=
[]
this
.
getMessage
()
this
.
pageNum
=
1
this
.
getMessage
()
},
immediate
:
true
,
},
},
getMessageFlag
(
v
)
{
getMessageFlag
(
v
)
{
if
(
v
)
{
if
(
v
)
{
...
...
src/layouts/index.vue
View file @
86be8412
...
@@ -322,15 +322,18 @@ export default {
...
@@ -322,15 +322,18 @@ export default {
},
},
},
},
watch
:
{
watch
:
{
curSelectedIndex
(
v
)
{
curSelectedIndex
:
{
this
.
getRefuteMessage
()
handler
(
v
)
{
this
.
getRefuteMessage
()
},
immediate
:
false
,
},
},
},
},
created
()
{
created
()
{
this
.
selectedIndex
=
sessionStorage
.
getItem
(
"
selectedIndex
"
)
||
""
this
.
selectedIndex
=
sessionStorage
.
getItem
(
"
selectedIndex
"
)
||
""
this
.
curSelectedIndex
=
String
(
this
.
selectedIndex
)
?
this
.
selectedIndex
:
""
this
.
curSelectedIndex
=
String
(
this
.
selectedIndex
)
?
this
.
selectedIndex
:
""
if
(
this
.
curSelectedIndex
)
{
if
(
this
.
curSelectedIndex
)
{
this
.
getRefuteMessage
()
//
this.getRefuteMessage()
}
}
},
},
mounted
()
{
mounted
()
{
...
@@ -344,9 +347,9 @@ export default {
...
@@ -344,9 +347,9 @@ export default {
:
""
:
""
}
}
// console.log(this.curSelectedIndex)
// console.log(this.curSelectedIndex)
if
(
this
.
curSelectedIndex
)
{
//
if (this.curSelectedIndex) {
this
.
getRefuteMessage
()
//
this.getRefuteMessage()
}
//
}
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
window
.
addEventListener
(
window
.
addEventListener
(
"
storage
"
,
"
storage
"
,
...
...
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