Commit 2dc70eb11479265eed1a0a8654e299ab7e8206bb

Authored by fengtao
1 parent d33a1a5d

fix:DEFECT-355 修改告警筛选传时间问题

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