Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
6
608-pdm-web-5g
Project
Project
Details
Activity
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
pdm
608-pdm-web-5g
Commits
b5cd5623
Commit
b5cd5623
authored
Sep 03, 2024
by
xioln
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
消息通知修改
parent
7dd92652
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
14 deletions
+22
-14
index.vue
src/views/MsgList/index.vue
+22
-14
No files found.
src/views/MsgList/index.vue
View file @
b5cd5623
...
@@ -36,7 +36,7 @@
...
@@ -36,7 +36,7 @@
>
>
<div
class=
"itemTitle"
>
<div
class=
"itemTitle"
>
<!--
<van-image
:src=
"require('@/assets/home/new@2x.png')"
/>
-->
<!--
<van-image
:src=
"require('@/assets/home/new@2x.png')"
/>
-->
<div
v-if=
"item.state ===
1
"
class=
"message-keep-px unread"
>
<div
v-if=
"item.state ===
0
"
class=
"message-keep-px unread"
>
<span>
未读
</span>
<span>
未读
</span>
</div>
</div>
<div
v-else
class=
"message-keep-px read"
>
<div
v-else
class=
"message-keep-px read"
>
...
@@ -62,6 +62,8 @@
...
@@ -62,6 +62,8 @@
import
HeaderNavBar
from
'../../components/headerNavBar/index.vue'
import
HeaderNavBar
from
'../../components/headerNavBar/index.vue'
import
DeeForm
from
'../../components/form/form'
import
DeeForm
from
'../../components/form/form'
import
moment
from
'moment'
import
moment
from
'moment'
import
{
Dialog
}
from
'vant'
import
{
get
}
from
'@/utils/http'
import
{
searchMsg
}
from
'@/api/home'
import
{
searchMsg
}
from
'@/api/home'
export
default
{
export
default
{
...
@@ -188,10 +190,11 @@ export default {
...
@@ -188,10 +190,11 @@ export default {
}
}
searchMsg
(
params
).
then
(
res
=>
{
searchMsg
(
params
).
then
(
res
=>
{
const
items
=
res
.
items
const
items
=
res
.
items
// this.list = []
// this.list = [...this.list, ...items.content]
// this.list = [...this.list, ...items.content]
// 将数据排序未读的放在前面
// 将数据排序未读的放在前面
const
unRead
=
items
.
content
.
filter
(
item
=>
item
.
state
===
1
)
const
unRead
=
items
.
content
.
filter
(
item
=>
item
.
state
===
0
)
const
read
=
items
.
content
.
filter
(
item
=>
item
.
state
===
0
)
const
read
=
items
.
content
.
filter
(
item
=>
item
.
state
===
1
)
this
.
list
.
unshift
(...
unRead
)
this
.
list
.
unshift
(...
unRead
)
this
.
list
.
push
(...
read
)
this
.
list
.
push
(...
read
)
this
.
loading
=
false
this
.
loading
=
false
...
@@ -215,18 +218,23 @@ export default {
...
@@ -215,18 +218,23 @@ export default {
this
.
iconButton
=
'arrow-down'
this
.
iconButton
=
'arrow-down'
},
},
goDetailsInfo
(
item
)
{
goDetailsInfo
(
item
)
{
console
.
log
(
item
,
JSON
.
parse
(
item
.
businessObject
))
Dialog
.
alert
({
const
itemObj
=
JSON
.
parse
(
item
.
businessObject
)
title
:
item
.
title
,
const
dxClassname
=
itemObj
?.
dxClassname
.
split
(
'vo.'
)[
1
]?.
slice
(
0
,
-
2
)
message
:
item
.
content
this
.
$router
.
push
({
}).
then
(()
=>
{
path
:
`/InfoDetail-
${
itemObj
.
id
}
`
,
get
(
'Notify/'
+
item
.
id
)
query
:
{
oid
:
itemObj
.
id
,
title
:
itemObj
.
name
||
itemObj
.
materialGrade
,
dxClassname
:
dxClassname
,
type
:
'MESSAGE'
}
})
})
// const itemObj = JSON.parse(item.businessObject)
// const dxClassname = itemObj?.dxClassname.split('vo.')[1]?.slice(0, -2)
// this.$router.push({
// path: `/InfoDetail-${itemObj.id}`,
// query: {
// oid: itemObj.id,
// title: itemObj.name || itemObj.materialGrade,
// dxClassname: dxClassname,
// type: 'MESSAGE'
// }
// })
}
}
}
}
}
}
...
...
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