Showing
1 changed file
with
4 additions
and
0 deletions
... | ... | @@ -97,6 +97,7 @@ |
97 | 97 | |
98 | 98 | <script> |
99 | 99 | import fTabbar from '@/components/module/f-tabbar/f-tabbar'; |
100 | +import { mapActions } from 'vuex'; | |
100 | 101 | |
101 | 102 | export default { |
102 | 103 | components: { |
... | ... | @@ -122,6 +123,7 @@ export default { |
122 | 123 | this.getDeviceTotalData(); |
123 | 124 | }, |
124 | 125 | methods: { |
126 | + ...mapActions(['updateBadgeTotal']), | |
125 | 127 | getDeviceTotalData() { |
126 | 128 | uni.$u.http.get('/yt/homepage/app').then(res => { |
127 | 129 | if (res) { |
... | ... | @@ -131,6 +133,8 @@ export default { |
131 | 133 | this.alertData.noHandle = res.totalAlarm.activedAlarm; |
132 | 134 | this.alertData.doneHandle = res.totalAlarm.clearedAck; |
133 | 135 | this.alertData.errorReport = res.totalAlarm.clearedUnack; |
136 | + //异步实时更新告警徽标数 | |
137 | + this.updateBadgeTotal(res.totalAlarm.activedAlarm); | |
134 | 138 | } |
135 | 139 | }); |
136 | 140 | }, | ... | ... |