Commit b5cd5623 authored by xioln's avatar xioln

消息通知修改

parent 7dd92652
...@@ -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'
// }
// })
} }
} }
} }
......
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