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
f61bff97
Commit
f61bff97
authored
Aug 28, 2020
by
周远喜
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ok
parent
13b0f861
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
94 additions
and
42 deletions
+94
-42
index.vue
layouts/basic-layout/header-bug/index.vue
+1
-1
index.vue
layouts/basic-layout/header-log/index.vue
+1
-1
index.vue
layouts/basic-layout/header-notice/index.vue
+37
-39
message.vue
layouts/basic-layout/header-notice/message.vue
+54
-0
product.vue
layouts/basic-layout/product.vue
+1
-1
No files found.
layouts/basic-layout/header-bug/index.vue
View file @
f61bff97
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
<span
class=
"i-layout-header-trigger i-layout-header-trigger-min"
>
<span
class=
"i-layout-header-trigger i-layout-header-trigger-min"
>
<Dropdown
transfer
trigger=
"hover"
@
on-click=
"handleClickUserDropdown"
>
<Dropdown
transfer
trigger=
"hover"
@
on-click=
"handleClickUserDropdown"
>
<span
@
click=
"openModelBugAdd"
>
<span
@
click=
"openModelBugAdd"
>
<Badge
:count=
"bugCount === 0 ? null : bugCount"
:overflow-count=
"99"
:offset=
"[
2
0, 0]"
>
<Badge
:count=
"bugCount === 0 ? null : bugCount"
:overflow-count=
"99"
:offset=
"[
1
0, 0]"
>
<Icon
type=
"ios-bug"
size=
"18"
/>
<Icon
type=
"ios-bug"
size=
"18"
/>
</Badge>
</Badge>
</span>
</span>
...
...
layouts/basic-layout/header-log/index.vue
View file @
f61bff97
<
template
>
<
template
>
<Tooltip
:content=
"tooltipContent"
transfer
>
<Tooltip
:content=
"tooltipContent"
transfer
>
<span
class=
"i-layout-header-trigger i-layout-header-trigger-min"
@
click=
"handleOpenLog"
>
<span
class=
"i-layout-header-trigger i-layout-header-trigger-min"
@
click=
"handleOpenLog"
>
<Badge
:count=
"lengthError === 0 ? null : lengthError"
:overflow-count=
"99"
:dot=
"showDot"
:offset=
"showDot ? [
26, 2] : [20, 0
]"
>
<Badge
:count=
"lengthError === 0 ? null : lengthError"
:overflow-count=
"99"
:dot=
"showDot"
:offset=
"showDot ? [
10, 2] : [10, 2
]"
>
<Icon
custom=
"i-icon i-icon-record"
/>
<Icon
custom=
"i-icon i-icon-record"
/>
</Badge>
</Badge>
</span>
</span>
...
...
layouts/basic-layout/header-notice/index.vue
View file @
f61bff97
<
template
>
<
template
>
<span
<span
class=
"i-layout-header-trigger i-layout-header-trigger-min i-layout-header-trigger-in i-con"
class=
"i-layout-header-trigger i-layout-header-trigger-min i-layout-header-trigger-in i-con
readmsg
"
>
>
<Notification
auto-count
@
on-
load-more=
"handleLoadMore"
@
on-
clear=
"handleClear"
>
<Notification
auto-count
@
on-clear=
"handleClear"
>
<NotificationTab
title=
"通知"
name=
"message"
:count=
"unreadMessage"
:loading=
"messageLoading"
>
<NotificationTab
title=
"通知"
name=
"message"
:count=
"unreadMessage"
>
<NotificationItem
<NotificationItem
v-for=
"(item, index) in message
s
"
v-for=
"(item, index) in message
List
"
:key=
"index"
:key=
"index"
:class=
"
item.msg?'con_bord':''
"
:class=
"
{read:item.status==1}
"
:title="item.title"
:title="item.title"
:icon="item.icon||'md-mail'"
:icon="item.icon||'md-mail'"
:icon-color=
"item.
iconC
olor||'#2680eb'"
:icon-color="item.
c
olor||'#2680eb'"
:time="item.creationTime"
:time="item.creationTime"
@click.native="clickItem(item,index)"
@click.native="clickItem(item,index)"
/>
/>
<!-- :read="item.content" -->
<div
slot=
"clear"
>
历史消息
</div>
<div
slot=
"clear"
>
历史消息
</div>
</NotificationTab>
</NotificationTab>
</Notification>
</Notification>
<Modal
v-model=
"modal1"
:title=
"msg.title"
width=
"1200"
>
<Modal
v-model=
"modal1"
:title=
"title"
width=
"1200"
>
<p
class=
"content-in"
>
发送时间:
{{
msg
.
creationTime
}}
</p>
<component
:is=
"detail"
:eid=
"eid"
/>
<p
class=
"content-in"
>
{{
msg
.
content
}}
</p>
<div
slot=
"footer"
>
<div
slot=
"footer"
>
<Button
type=
"primary"
@
click=
"modal1=false"
>
取消
</Button>
<Button
type=
"primary"
@
click=
"modal1=false"
>
取消
</Button>
</div>
</div>
...
@@ -39,8 +37,10 @@ export default {
...
@@ -39,8 +37,10 @@ export default {
badgeProps
:
{
badgeProps
:
{
offset
:
[
20
,
0
],
offset
:
[
20
,
0
],
},
},
detail
:
null
,
modal1
:
false
,
modal1
:
false
,
msg
:
{},
title
:
"消息"
,
eid
:
-
1
,
};
};
},
},
computed
:
{
computed
:
{
...
@@ -48,8 +48,8 @@ export default {
...
@@ -48,8 +48,8 @@ export default {
...
mapState
({
messages
:
"messages"
}),
...
mapState
({
messages
:
"messages"
}),
unreadMessage
()
{
unreadMessage
()
{
let
unread
=
0
;
let
unread
=
0
;
this
.
message
s
.
forEach
((
item
)
=>
{
this
.
message
List
.
forEach
((
item
)
=>
{
if
(
!
item
.
read
)
unread
++
;
if
(
item
.
status
!=
1
)
unread
++
;
});
});
return
unread
;
return
unread
;
},
},
...
@@ -60,37 +60,33 @@ export default {
...
@@ -60,37 +60,33 @@ export default {
mounted
()
{
mounted
()
{
// this.messageList = [...this.messages];
// this.messageList = [...this.messages];
// console.log(this.messages);
// console.log(this.messages);
this
.
load
();
setInterval
(
this
.
load
,
60
*
1000
);
},
},
methods
:
{
methods
:
{
handleLoadMore
(
tab
)
{
handleLoadMore
(
tab
)
{
this
.
loadMore
(
tab
.
name
);
this
.
loadMore
(
tab
.
name
);
},
},
loadMore
(
type
)
{
load
()
{
if
(
this
[
`
${
type
}
Loading`
])
return
;
this
.
$store
.
dispatch
(
"loadMessages"
);
this
[
`
${
type
}
Loading`
]
=
true
;
this
.
messageList
=
this
.
messages
.
filter
((
u
)
=>
{
setTimeout
(()
=>
{
return
true
;
this
[
`
${
type
}
List`
]
=
this
[
`
${
type
}
List`
].
concat
([
});
...
this
[
`
${
type
}
BaseList`
],
console
.
log
(
"message"
,
this
.
messageList
);
]);
this
[
`
${
type
}
Loading`
]
=
false
;
},
1000
);
},
},
handleClear
(
tab
)
{
handleClear
(
tab
)
{
this
.
$router
.
push
(
"/home/msgRecord"
);
this
.
$router
.
push
(
"/home/msgRecord"
);
},
},
clickItem
(
item
,
i
)
{
clickItem
(
item
,
i
)
{
this
.
modal1
=
true
;
this
.
modal1
=
true
;
this
.
msg
=
item
;
this
.
msg
=
item
;
item
.
iconColor
=
"#ccc"
;
item
.
color
=
"#ccc"
;
item
.
msg
=
true
;
item
.
status
=
1
;
let
url
=
`
${
systemUrl
}
/usermessage/read`
;
this
.
$set
(
this
.
messageList
,
i
,
item
);
this
.
$api
.
post
(
url
,
item
).
then
((
r
)
=>
{
this
.
title
=
item
.
title
||
" "
;
//消息转为已读
this
.
eid
=
item
.
id
;
// this.msg = r.result;
this
.
detail
=
()
=>
import
(
"./message"
);
setInterval
(()
=>
{
this
.
$store
.
dispatch
(
"loadMessages"
);
},
30
*
1000
);
});
},
},
},
},
};
};
...
@@ -99,15 +95,17 @@ export default {
...
@@ -99,15 +95,17 @@ export default {
.i-con .ivu-badge-count {
.i-con .ivu-badge-count {
top: 0 !important;
top: 0 !important;
}
}
.content-in {
.readmsg {
height: 30px;
min-height: 200px;
}
.readv {
.con_bord {
.ivu-time,
.ivu-time {
h4 {
color: #ccc;
}
color: #ccc;
color: #ccc;
}
}
h4
{
.ivu-notifications-tab-loading
{
color: #ccc
;
display: none
;
}
}
}
}
</
style
>
</
style
>
layouts/basic-layout/header-notice/message.vue
0 → 100644
View file @
f61bff97
<
template
>
<div
class=
"msg-main"
>
<p
class=
"title"
>
发送时间:
{{
msg
.
creationTime
}}
<span
class=
"fr"
>
发送人:
<User
:value=
"msg.senderId"
/></span>
</p>
<div
class=
"content"
v-html=
"msg.content"
></div>
<div
v-if=
"msg.attachment"
class=
"file"
>
附件:
</div>
</div>
</
template
>
<
script
>
export
default
{
name
:
''
,
data
()
{
return
{
msg
:{}
}
},
mounted
(){
this
.
load
();
},
methods
:{
load
(){
this
.
$api
.
get
(
`
${
systemUrl
}
/usermessage/read`
,{
id
:
this
.
eid
}).
then
(
r
=>
{
this
.
msg
=
r
.
result
;
})
}
},
props
:[
"eid"
],
watch
:{
eid
(
v
,
o
){
if
(
v
){
this
.
load
();
}
}
}
}
</
script
>
<
style
lang=
"less"
>
.msg-main{
.title{
font-size:14px;
line-height: 45px;
}
.content{
padding: 10px 20px;
}
.file{
padding: 10px 20px;
}
}
</
style
>
\ No newline at end of file
layouts/basic-layout/product.vue
View file @
f61bff97
...
@@ -72,8 +72,8 @@
...
@@ -72,8 +72,8 @@
<i-menu-head
v-if=
"headerMenu && isMobile"
/>
<i-menu-head
v-if=
"headerMenu && isMobile"
/>
<i-header-log
v-if=
"isDesktop && showLog"
/>
<i-header-log
v-if=
"isDesktop && showLog"
/>
<i-header-bug
/>
<i-header-bug
/>
<i-header-fullscreen
v-if=
"isDesktop && showFullscreen"
/>
<i-header-notice
v-if=
"showNotice"
/>
<i-header-notice
v-if=
"showNotice"
/>
<i-header-fullscreen
v-if=
"isDesktop && showFullscreen"
/>
<i-header-user
/>
<i-header-user
/>
<!--
<i-header-i18n
v-if=
"showI18n"
/>
<!--
<i-header-i18n
v-if=
"showI18n"
/>
<i-header-setting
v-if=
"enableSetting && !isMobile"
/>
-->
<i-header-setting
v-if=
"enableSetting && !isMobile"
/>
-->
...
...
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