|
@@ -59,7 +59,7 @@
|
|
|
align="center"
|
|
|
label="是否已读">
|
|
|
<template slot-scope="scope">
|
|
|
- <span v-if="scope.row.isRead === 0">未读</span>
|
|
|
+ <span v-if="Number(scope.row.isRead) === 0" style="color: red">未读</span>
|
|
|
<span v-else>已读</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
@@ -91,7 +91,7 @@
|
|
|
width="150"
|
|
|
label="操作">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-button type="text" size="small" @click="addOrUpdateHandle(scope.row.noticeId, false)">查看</el-button>
|
|
|
+ <el-button type="text" size="small" @click="detailHandle(scope.row)">查看</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
@@ -105,7 +105,7 @@
|
|
|
layout="total, sizes, prev, pager, next, jumper">
|
|
|
</el-pagination>
|
|
|
<!-- 弹窗,详情 -->
|
|
|
- <detail v-if="addOrUpdateVisible" ref="addOrUpdate"></detail>
|
|
|
+ <detail v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getAnnouncementList"></detail>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -114,6 +114,7 @@
|
|
|
import { getAnnouncementList } from '@/api/msg'
|
|
|
import { getCusList } from '@/api/cus'
|
|
|
import { downloadUrl } from '@/api/file'
|
|
|
+ import {readNotice} from '@/utils/msg'
|
|
|
export default {
|
|
|
name: 'announcement',
|
|
|
components: {
|
|
@@ -131,6 +132,7 @@
|
|
|
},
|
|
|
watch: {
|
|
|
listenNotice: function (notice) {
|
|
|
+ console.log('notice = ' + JSON.stringify(notice))
|
|
|
if (!notice) return
|
|
|
this.dataForm.noticeId = notice.noticeId
|
|
|
this.dataForm.businessId = notice.businessId
|
|
@@ -160,6 +162,7 @@
|
|
|
},
|
|
|
// 获取数据列表
|
|
|
getAnnouncementList () {
|
|
|
+ this.dataList = []
|
|
|
this.dataListLoading = true
|
|
|
let params = {
|
|
|
'current': this.pageIndex,
|
|
@@ -211,12 +214,13 @@
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
- // 新增 / 修改
|
|
|
- addOrUpdateHandle (id, disable) {
|
|
|
+ // 详情
|
|
|
+ detailHandle (row) {
|
|
|
this.addOrUpdateVisible = true
|
|
|
this.$nextTick(() => {
|
|
|
- this.$refs.addOrUpdate.init(id)
|
|
|
+ this.$refs.addOrUpdate.init(row.noticeId)
|
|
|
})
|
|
|
+ readNotice(this, row.noticeId)
|
|
|
}
|
|
|
}
|
|
|
}
|