Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jiedao-app-operator-master
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
lanbaoming
jiedao-app-operator-master
Commits
77558614
Commit
77558614
authored
Aug 27, 2023
by
dragondean@qq.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
角标优化
parent
0e7c5761
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
7 deletions
+33
-7
task.js
src/api/bpm/task.js
+7
-0
Navbar.vue
src/layout/components/Navbar.vue
+7
-5
user.js
src/store/modules/user.js
+19
-2
No files found.
src/api/bpm/task.js
View file @
77558614
...
...
@@ -70,3 +70,10 @@ export function taskTodoCount(){
}
)
}
// 用户角标数据
export
function
userMark
(){
return
request
({
url
:
'
/system/user/profile/user-mark
'
,
})
}
src/layout/components/Navbar.vue
View file @
77558614
...
...
@@ -20,7 +20,7 @@
<el-image
style=
"width: 22px;height: 20px;cursor: pointer;"
:src=
"unreadMessage"
@
click=
"notRead"
></el-image>
</el-badge>
<el-badge
:value=
"
notDownload ? notDownload
: '' "
class=
"right-menu-item badge"
>
<el-badge
:value=
"
downloadCnt ? downloadCnt
: '' "
class=
"right-menu-item badge"
>
<el-image
style=
"width: 22px;height: 20px;cursor: pointer;"
:src=
"unDownload"
@
click=
"handleDownload"
></el-image>
</el-badge>
...
...
@@ -106,7 +106,7 @@ export default {
if
(
process
.
env
.
NODE_ENV
!=
'
development
'
){
setInterval
(()
=>
{
this
.
updateMessage
()
},
1
0000
)
},
2
0000
)
}
this
.
updateMessage
()
...
...
@@ -148,7 +148,10 @@ export default {
},
matterNum
(){
return
this
.
$store
.
state
.
user
.
matterNum
}
},
downloadCnt
(){
return
this
.
$store
.
state
.
user
.
download
}
},
watch
:{
lang
(
val
){
...
...
@@ -162,8 +165,7 @@ export default {
this
.
$router
.
push
(
'
/system/download
'
)
},
updateMessage
(){
this
.
$store
.
dispatch
(
'
getNotMessage
'
);
this
.
$store
.
dispatch
(
'
getToDoList
'
);
this
.
$store
.
dispatch
(
'
getUserBadge
'
);
},
toggleSideBar
()
{
this
.
$store
.
dispatch
(
'
app/toggleSideBar
'
)
...
...
src/store/modules/user.js
View file @
77558614
import
{
login
,
logout
,
getInfo
,
socialLogin
,
socialLogin2
}
from
'
@/api/login
'
import
{
getToken
,
setToken
,
removeToken
}
from
'
@/utils/auth
'
import
{
getNotReadInternalMessageTotal
,}
from
'
@/api/system/internalMessage
'
import
{
taskTodoCount
}
from
"
@/api/bpm/task
"
;
import
{
taskTodoCount
,
userMark
}
from
"
@/api/bpm/task
"
;
const
user
=
{
state
:
{
...
...
@@ -12,7 +12,8 @@ const user = {
roles
:
[],
permissions
:
[],
notMessage
:
0
,
matterNum
:
0
matterNum
:
0
,
download
:
0
},
mutations
:
{
...
...
@@ -39,6 +40,9 @@ const user = {
},
SET_TODO
:(
state
,
matterNum
)
=>
{
state
.
matterNum
=
matterNum
;
},
SET_DOWNLOAD
(
state
,
cnt
){
state
.
download
=
cnt
;
}
},
...
...
@@ -178,6 +182,19 @@ const user = {
reject
(
err
)
})
})
},
// 获取用户角标,包括未读消息、待办事项,下载数据
getUserBadge
({
commit
}){
return
new
Promise
((
resolve
,
reject
)
=>
{
userMark
().
then
(
r
=>
{
commit
(
'
SET_TODO
'
,
r
.
data
.
todoCount
)
commit
(
'
SET_UNREAD
'
,
r
.
data
.
notReadInternalMessageCount
)
commit
(
'
SET_DOWNLOAD
'
,
r
.
data
.
fileWaitDownCount
+
r
.
data
.
fileMakeQueuingCount
+
r
.
data
.
fileMakeProgressCount
)
resolve
()
}).
catch
(
err
=>
{
reject
(
err
)
})
})
}
}
}
...
...
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