|
@@ -93,9 +93,13 @@
|
|
|
</el-radio-group>
|
|
|
<div class="flex_asb">
|
|
|
<el-radio-group size="mini" v-model="readFlag" @change="getList">
|
|
|
- <el-radio-button label="">全部</el-radio-button>
|
|
|
- <el-radio-button label="NO">未读</el-radio-button>
|
|
|
- <el-radio-button label="YES">已读</el-radio-button>
|
|
|
+ <el-radio-button label="">全部</el-radio-button>
|
|
|
+ <el-badge :value="count" class="item" style="margin: 0 10px">
|
|
|
+ <el-radio-button label="NO">未读</el-radio-button>
|
|
|
+ </el-badge>
|
|
|
+ <el-badge :value="count" :hidden="true" class="item" >
|
|
|
+ <el-radio-button label="YES">已读</el-radio-button>
|
|
|
+ </el-badge>
|
|
|
</el-radio-group>
|
|
|
<div style="color: #409EFF;cursor: pointer;" @click="confirmRead">
|
|
|
<i class="el-icon-message-solid"></i>
|
|
@@ -104,7 +108,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<el-card class="box-card" v-for="(item,index) in messageData" style="margin-top: 10px;">
|
|
|
- <div @click="isShow = false;toDetail(item.adminNoticeType,item.paidType,(item.adminNoticeType=='NOTICE'?item.noticeId:item.orderId))">
|
|
|
+ <div @click="isShow = false;toDetail(item.adminNoticeType,item.paidType,(item.adminNoticeType=='NOTICE'?item.noticeId:item.orderId),item.id)">
|
|
|
<div class="flex_asb item">
|
|
|
<div v-if="messageType == ['NOTICE']">
|
|
|
<span>公告类型:</span>
|
|
@@ -212,6 +216,7 @@ export default {
|
|
|
listTotal: 0,
|
|
|
currentPage: 1, // 当前页码
|
|
|
pageSize: 10, // 每页数量
|
|
|
+ count: 0
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
@@ -257,7 +262,7 @@ export default {
|
|
|
CRE_ORDER: '创建工单',
|
|
|
SEND_MALL: '商城订单发货',
|
|
|
RP_MALL: '商城订单维权',
|
|
|
- CR_SALES: '支付订单'
|
|
|
+ CR_SALES: '订单支付成功'
|
|
|
}
|
|
|
return MAP[val]
|
|
|
}
|
|
@@ -358,7 +363,7 @@ export default {
|
|
|
{
|
|
|
style: 'cursor: pointer;',
|
|
|
on: {
|
|
|
- click: that.toDetail.bind(that,item.adminNoticeType,item.paidType,item.orderId)
|
|
|
+ click: that.toDetail.bind(that,item.adminNoticeType,item.paidType,item.orderId,item.id)
|
|
|
},
|
|
|
},[
|
|
|
that.$createElement(
|
|
@@ -391,6 +396,18 @@ export default {
|
|
|
})
|
|
|
})
|
|
|
},
|
|
|
+ getCount(){
|
|
|
+ request({
|
|
|
+ url: `/notice/list/count`,
|
|
|
+ method: 'get',
|
|
|
+ params: {
|
|
|
+ noticeType: this.messageType.join(','),
|
|
|
+ readFlag: 'NO'
|
|
|
+ }
|
|
|
+ }).then(res=>{
|
|
|
+ this.count = res.data
|
|
|
+ })
|
|
|
+ },
|
|
|
getUserInfo(){
|
|
|
request({
|
|
|
url: `/admin/user/detail`,
|
|
@@ -461,6 +478,7 @@ export default {
|
|
|
params: [{param: "nr.read_flag", compare: "=", value: this.readFlag},{param: 'nr.admin_notice_type', compare: "=", value: this.messageType},{param: 'nr.issue_time', compare: ">=", value: this.filterTime[0]},{param: 'nr.issue_time', compare: "<=", value: this.filterTime[1]}]
|
|
|
}
|
|
|
}).then(res=>{
|
|
|
+ this.getCount()
|
|
|
this.messageData = res.data.records
|
|
|
})
|
|
|
},
|
|
@@ -469,8 +487,9 @@ export default {
|
|
|
this.currentPage = val;
|
|
|
this.getList();
|
|
|
},
|
|
|
- toDetail(type,paidType,id){
|
|
|
+ toDetail(type,paidType,id,noticeId){
|
|
|
console.log(type,id)
|
|
|
+ this.read(noticeId)
|
|
|
this.$router.push({
|
|
|
name: this.typeFilter(type,paidType),
|
|
|
query: {
|
|
@@ -478,6 +497,17 @@ export default {
|
|
|
activeName: "workOrderInfo",
|
|
|
}
|
|
|
})
|
|
|
+ },
|
|
|
+ read(id){
|
|
|
+ request({
|
|
|
+ url: `/notice/mark/read`,
|
|
|
+ method: 'post',
|
|
|
+ params: {
|
|
|
+ noticeIds: id,
|
|
|
+ }
|
|
|
+ }).then(res=>{
|
|
|
+
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -661,4 +691,7 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+::v-deep .el-badge__content.is-fixed{
|
|
|
+ z-index: 99;
|
|
|
+}
|
|
|
</style>
|