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