|
|
@@ -1,10 +1,10 @@
|
|
|
<template>
|
|
|
<div class="message">
|
|
|
<div v-if="!show" class="page-container">
|
|
|
- <van-tabs v-model="query.type" @change="refreshData">
|
|
|
- <van-tab title="通知公告" name="1"></van-tab>
|
|
|
- <van-tab title="业务提醒" name="2"></van-tab>
|
|
|
- <van-tab title="消息" name="3"></van-tab>
|
|
|
+ <van-tabs v-model="query.type" @change="refreshData" color="#008cd6">
|
|
|
+ <van-tab title="通知公告" name="1" :badge="getUnReadCount(noticeUnReadCount)"></van-tab>
|
|
|
+ <van-tab title="业务提醒" name="2" :badge="getUnReadCount(businessUnReadCount)"></van-tab>
|
|
|
+ <van-tab title="消息" name="3" :badge="getUnReadCount(messageUnReadCount)"></van-tab>
|
|
|
</van-tabs>
|
|
|
<div class="card-list">
|
|
|
<Scroll
|
|
|
@@ -89,7 +89,7 @@ export default {
|
|
|
};
|
|
|
},
|
|
|
computed:{
|
|
|
- ...mapGetters(['orgId','id','roleList'])
|
|
|
+ ...mapGetters(['orgId','id','roleList','businessUnReadCount','messageUnReadCount','noticeUnReadCount'])
|
|
|
},
|
|
|
mounted(){
|
|
|
this.getDataList();
|
|
|
@@ -100,6 +100,16 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
methods:{
|
|
|
+ getUnReadCount(count)
|
|
|
+ {
|
|
|
+ if(count && count>0)
|
|
|
+ {
|
|
|
+ return count;
|
|
|
+ }
|
|
|
+ else{
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+ },
|
|
|
preview(file){
|
|
|
this.openFilePreview(file);
|
|
|
},
|
|
|
@@ -223,7 +233,9 @@ export default {
|
|
|
</style>
|
|
|
<style lang="scss" scoped>
|
|
|
.message{
|
|
|
-
|
|
|
+ ::v-deep .van-info{
|
|
|
+ border:none !important;
|
|
|
+ }
|
|
|
}
|
|
|
.card-list{
|
|
|
padding:0 20px 20px 20px;
|