Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mes-ui
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
周远喜
mes-ui
Commits
41faacd1
Commit
41faacd1
authored
Sep 02, 2020
by
仇晓婷
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
消息
parent
8ec6fa8a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
62 additions
and
23 deletions
+62
-23
unreadMessage.vue
pages/home/component/unreadMessage.vue
+53
-21
index.vue
pages/home/index.vue
+9
-2
No files found.
pages/home/component/unreadMessage.vue
View file @
41faacd1
<
template
>
<Card
class=
"todolist-u"
>
<p
class=
"row_head"
>
<Icon
type=
"ios-chatbubbles"
class=
"f20"
/>
<Badge
:count=
"
3
"
:offset=
"[9,-5]"
>
<Badge
:count=
"
unreadMessage
"
:offset=
"[9,-5]"
>
<span
class=
"ml10"
>
未读消息
</span>
</Badge>
<a
href
class=
"row_more fr"
>
更多
</a>
<a
href
class=
"row_more fr"
@
click=
"link"
>
更多
</a>
</p>
<div
class=
"msg"
>
<Row
v-for=
"(item,index) in listTask"
:key=
"index"
class=
"row-text"
>
<Col
:span=
"2"
>
<div></div>
</Col>
<Col
:span=
"6"
>
{{
index
+
1
}}
&
nbsp
&
nbsp
{{
item
.
creator
}}
</Col>
<Col
:span=
"9"
>
<Row
v-for=
"(item,index) in messageList"
:key=
"index"
class=
"row-text"
>
<Col
:span=
"1"
>
{{
index
+
1
}}
</Col>
<Col
:span=
"8"
>
<Icon
:type=
"item.icon||'md-mail'"
/>
{{
item
.
title
}}
<Icon
type=
"md-link"
/>
</Col>
<Col
:span=
"7"
>
{{
item
.
creationTime
}}
</Col>
<Col
:span=
"7"
class=
"sender"
>
<User
:value=
"item.senderId"
/>
</Col>
<Col
:span=
"8"
class=
"sender-time"
>
{{
item
.
creationTime
}}
</Col>
</Row>
</div>
</Card>
</
template
>
<
script
>
import
Api
from
"../api"
;
import
{
mapState
}
from
"vuex"
;
export
default
{
name
:
"UnreadMessage"
,
data
()
{
return
{
imgUrl
:
iconImg
,
listTask
:
[],
// listTask: [],
messageList
:
[],
};
},
async
fetch
({
store
,
params
})
{
await
store
.
dispatch
(
"loadMessages"
);
// 加载数据字典
},
mounted
()
{
this
.
getInfo
();
// this.getInfo();
this
.
load
();
},
methods
:
{
link
()
{
console
.
log
(
"路径"
);
computed
:
{
...
mapState
({
messages
:
"messages"
}),
unreadMessage
()
{
let
unread
=
0
;
this
.
messageList
.
forEach
((
item
)
=>
{
if
(
item
.
status
!=
1
)
unread
++
;
});
return
unread
;
},
getInfo
()
{
let
conditions
=
[];
Api
.
list
({
conditions
:
conditions
}).
then
((
r
)
=>
{
this
.
listTask
=
r
.
result
;
},
methods
:
{
load
()
{
this
.
$store
.
dispatch
(
"loadMessages"
);
this
.
messageList
=
this
.
messages
.
filter
((
u
)
=>
{
return
true
;
});
// console.log("message55", this.messageList);
},
link
()
{
this
.
$router
.
push
(
"/home/msgRecord"
);
},
// getInfo() {
// let conditions = [];
// Api.list({ conditions: conditions }).then((r) => {
// this.listTask = r.result;
// });
// },
},
};
</
script
>
...
...
@@ -73,6 +96,15 @@ export default {
height: 40px;
line-height: 40px;
border-bottom: 1px solid #eee;
.sender {
text-align: center;
}
.sender-time {
text-align: right;
}
.ivu-icon-md-mail {
color: #2680eb;
}
}
}
</
style
>
\ No newline at end of file
pages/home/index.vue
View file @
41faacd1
...
...
@@ -13,7 +13,13 @@
</p>
</div>
<div
class=
"incon-carousel"
>
<Icon
type=
"ios-arrow-back"
class=
"bg-b"
@
click=
"clickLeft"
:class=
"num1
<0
?'
bg-b1
'
:
'
bg-b
'"
/>
<Icon
type=
"ios-arrow-back"
class=
"bg-b"
@
click=
"clickLeft"
:class=
"num1
<0
?'
bg-b1
'
:
'
bg-b
'"
v-if=
"collect.length>0"
/>
<div
class=
"list-shoucang"
:style=
"
{'margin-left': num1 * 230 + 'px',width :'990px',}">
<div
class=
"bg"
v-for=
"(item,i) in collect"
:key=
"i"
@
click=
"toPage(item)"
>
<Icon
:type=
"item.icon||'md-mail'"
/>
...
...
@@ -25,9 +31,10 @@
class=
"bg-l"
@
click=
"clickRight"
:class=
"collect.length>8 && showIcon ?'bg-l1':'bg-l'"
v-if=
"collect.length>0"
/>
<a
class=
"down-delete"
@
click=
"setDelete"
>
<Icon
type=
"md-settings"
class=
"f20"
/>
<Icon
type=
"md-settings"
class=
"f20"
v-if=
"collect.length>0"
/>
</a>
</div>
</div>
...
...
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