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
Show 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 @@
>
<div
class=
"itemTitle"
>
<!--
<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>
</div>
<div
v-else
class=
"message-keep-px read"
>
...
...
@@ -62,6 +62,8 @@
import
HeaderNavBar
from
'../../components/headerNavBar/index.vue'
import
DeeForm
from
'../../components/form/form'
import
moment
from
'moment'
import
{
Dialog
}
from
'vant'
import
{
get
}
from
'@/utils/http'
import
{
searchMsg
}
from
'@/api/home'
export
default
{
...
...
@@ -188,10 +190,11 @@ export default {
}
searchMsg
(
params
).
then
(
res
=>
{
const
items
=
res
.
items
// this.list = []
// this.list = [...this.list, ...items.content]
// 将数据排序未读的放在前面
const
unRead
=
items
.
content
.
filter
(
item
=>
item
.
state
===
1
)
const
read
=
items
.
content
.
filter
(
item
=>
item
.
state
===
0
)
const
unRead
=
items
.
content
.
filter
(
item
=>
item
.
state
===
0
)
const
read
=
items
.
content
.
filter
(
item
=>
item
.
state
===
1
)
this
.
list
.
unshift
(...
unRead
)
this
.
list
.
push
(...
read
)
this
.
loading
=
false
...
...
@@ -215,18 +218,23 @@ export default {
this
.
iconButton
=
'arrow-down'
},
goDetailsInfo
(
item
)
{
console
.
log
(
item
,
JSON
.
parse
(
item
.
businessObject
))
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'
}
Dialog
.
alert
({
title
:
item
.
title
,
message
:
item
.
content
}).
then
(()
=>
{
get
(
'Notify/'
+
item
.
id
)
})
// 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