Browse Source

优化tabbar

seimin 11 months ago
parent
commit
37ce9f35f6
1 changed files with 12 additions and 3 deletions
  1. 12 3
      pages/incidentList/incidentList.vue

+ 12 - 3
pages/incidentList/incidentList.vue

@@ -61,7 +61,7 @@
61 61
   import IncidentListFilter from '@/components/IncidentListFilter.vue';
62 62
   import IncidentAttachment from '@/components/IncidentAttachment.vue';
63 63
   import { ref, reactive, computed } from 'vue'
64
-  import { onLoad, onPullDownRefresh, onReachBottom } from '@dcloudio/uni-app'
64
+  import { onLoad, onPullDownRefresh, onReachBottom, onTabItemTap } from '@dcloudio/uni-app'
65 65
   import { api_getDictionary, api_incident, api_incident_count, api_incidentTask } from "@/http/api.js"
66 66
   import { filterFormatDate } from '@/filters/filterFormatDate.js'
67 67
   import { computedPriorityStyle } from '@/filters/computedPriorityStyle.js'
@@ -333,7 +333,8 @@
333 333
     })
334 334
   }
335 335
 
336
-  onLoad((option) => {
336
+  // 初始化
337
+  function onLoadFn(){
337 338
     // 我的-数量跳转
338 339
     if(incidentNumStore.incidentNum.data){
339 340
       dataInfo.evtFilter.selected = incidentNumStore.incidentNum.data.queryTask;
@@ -343,7 +344,7 @@
343 344
       // 缓存的搜索条件
344 345
       Object.assign(dataInfo, incidentListSearchStore.incidentListSearch.data);
345 346
     }
346
-
347
+    
347 348
     for (let i = 0; i < loginUserStore.loginUser.menu.length; i++) {
348 349
       if (loginUserStore.loginUser.menu[i].link == "shijianliebiao_assign") {
349 350
         assignFlag.value = true;
@@ -353,6 +354,14 @@
353 354
       }
354 355
     }
355 356
     getTabs();
357
+  }
358
+  
359
+  onLoad((option) => {
360
+    onLoadFn();
361
+  })
362
+  
363
+  onTabItemTap(e => {
364
+    onLoadFn();
356 365
   })
357 366
 
358 367
   onPullDownRefresh(() => {