Showing
1 changed file
with
12 additions
and
8 deletions
| @@ -176,6 +176,7 @@ | @@ -176,6 +176,7 @@ | ||
| 176 | </view> | 176 | </view> |
| 177 | </view> | 177 | </view> |
| 178 | </u-popup> | 178 | </u-popup> |
| 179 | + <!-- 告警筛选 --> | ||
| 179 | <u-calendar | 180 | <u-calendar |
| 180 | :show="showCalendar" | 181 | :show="showCalendar" |
| 181 | mode="range" | 182 | mode="range" |
| @@ -245,20 +246,20 @@ export default { | @@ -245,20 +246,20 @@ export default { | ||
| 245 | if (this.detailStatus) { | 246 | if (this.detailStatus) { |
| 246 | this.loadData(1, null, null, null, null, null, null); | 247 | this.loadData(1, null, null, null, null, null, null); |
| 247 | } | 248 | } |
| 248 | - if (this.ordId == '') { | ||
| 249 | - } else { | 249 | + if (this.ordId) { |
| 250 | this.loadData(1, null, null, null, null, null, this.ordId); | 250 | this.loadData(1, null, null, null, null, null, this.ordId); |
| 251 | } | 251 | } |
| 252 | }, | 252 | }, |
| 253 | onHide() { | 253 | onHide() { |
| 254 | this.ordId = ''; | 254 | this.ordId = ''; |
| 255 | this.detailStatus = false; | 255 | this.detailStatus = false; |
| 256 | - this.loadData(1, null, null, null, null, null, null); | ||
| 257 | }, | 256 | }, |
| 258 | onLoad(e) { | 257 | onLoad(e) { |
| 259 | // 隐藏原生的tabbar | 258 | // 隐藏原生的tabbar |
| 260 | uni.hideTabBar(); | 259 | uni.hideTabBar(); |
| 261 | - if (e.type !== undefined) { | 260 | + if (e.type == undefined) { |
| 261 | + this.loadData(1, null, null, null, null, null, null); | ||
| 262 | + } else { | ||
| 262 | let params = JSON.parse(e.type); | 263 | let params = JSON.parse(e.type); |
| 263 | let type; | 264 | let type; |
| 264 | if (Array.isArray(params)) { | 265 | if (Array.isArray(params)) { |
| @@ -267,8 +268,6 @@ export default { | @@ -267,8 +268,6 @@ export default { | ||
| 267 | type = params; | 268 | type = params; |
| 268 | } | 269 | } |
| 269 | this.loadData(1, type, null, null, null, null, null); | 270 | this.loadData(1, type, null, null, null, null, null); |
| 270 | - } else { | ||
| 271 | - this.loadData(1, null, null, null, null, null, null); | ||
| 272 | } | 271 | } |
| 273 | }, | 272 | }, |
| 274 | methods: { | 273 | methods: { |
| @@ -365,13 +364,19 @@ export default { | @@ -365,13 +364,19 @@ export default { | ||
| 365 | organizationId: organizationV, | 364 | organizationId: organizationV, |
| 366 | alarmType: alarmName | 365 | alarmType: alarmName |
| 367 | }; | 366 | }; |
| 367 | + if (statusV == '') { | ||
| 368 | + delete httpData.status; | ||
| 369 | + } | ||
| 370 | + if (severityV == '') { | ||
| 371 | + delete httpData.severity; | ||
| 372 | + } | ||
| 368 | uni.$u.http | 373 | uni.$u.http |
| 369 | .get('/yt/alarm', { params: httpData, custom: { load: false } }) | 374 | .get('/yt/alarm', { params: httpData, custom: { load: false } }) |
| 370 | .then(res => { | 375 | .then(res => { |
| 371 | uni.stopPullDownRefresh(); | 376 | uni.stopPullDownRefresh(); |
| 372 | this.mescroll.endByPage(res.items.length, res.total); | 377 | this.mescroll.endByPage(res.items.length, res.total); |
| 373 | //异步实时更新告警徽标数 | 378 | //异步实时更新告警徽标数 |
| 374 | - this.updateBadgeTotal(httpData); | 379 | + this.updateBadgeTotal(res.total); |
| 375 | this.alertTotal = res.total; | 380 | this.alertTotal = res.total; |
| 376 | if (pageNo == 1) { | 381 | if (pageNo == 1) { |
| 377 | this.list = res.items; | 382 | this.list = res.items; |
| @@ -390,7 +395,6 @@ export default { | @@ -390,7 +395,6 @@ export default { | ||
| 390 | url: './org/org' | 395 | url: './org/org' |
| 391 | }); | 396 | }); |
| 392 | }, | 397 | }, |
| 393 | - open() {}, | ||
| 394 | close() { | 398 | close() { |
| 395 | this.show = false; | 399 | this.show = false; |
| 396 | }, | 400 | }, |