Commit b5cd5623 authored by xioln's avatar xioln

消息通知修改

parent 7dd92652
......@@ -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'
// }
// })
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment