瀏覽代碼

事件列表页面调整

seimin 2 年之前
父節點
當前提交
a841d676e1
共有 4 個文件被更改,包括 1156 次插入6 次删除
  1. 12 3
      src/router/index.js
  2. 1141 0
      src/views/IncidentNewList.vue
  3. 1 1
      src/views/Main.vue
  4. 2 2
      src/views/indes.vue

+ 12 - 3
src/router/index.js

@@ -5,6 +5,7 @@ import Main from './../views/Main.vue'
5 5
 import Indes from './../views/indes.vue'//首页
6 6
 import My from './../views/my.vue'//我的
7 7
 import IncidentList from './../views/incidentList.vue'//事件列表
8
+import IncidentNewList from './../views/IncidentNewList.vue'//事件列表(new)
8 9
 import WorkList from './../views/workList.vue'//上下班记录查看
9 10
 import NewIncident from './../views/newIncident.vue'//新建事件
10 11
 import Inspection from './../views/inspection.vue'//巡检列表
@@ -49,11 +50,11 @@ export default new Router({
49 50
     beforeEnter:(to, from, next)=>{
50 51
       console.log(from.fullPath);
51 52
       console.log(to.fullPath);
52
-      if(to.fullPath == '/main'){
53
+      if(to.fullPath == '/main' || to.fullPath == '/main/indes'){
53 54
         let loginUser = JSON.parse(localStorage.getItem('loginUser'));
54 55
         if(loginUser){
55 56
           if(loginUser.role.some(v => v.rolecode == 'first-line support' || v.rolecode == 'second-line support')){
56
-            next('/main/incidentList/todo/0');
57
+            next('/main/incidentNewList/todo/1544');
57 58
           }else{
58 59
             next('/main/indes');
59 60
           }
@@ -66,7 +67,6 @@ export default new Router({
66 67
     },
67 68
     children: [{
68 69
       path: '/',
69
-      // redirect: '/main/incidentList/todo/0'
70 70
       redirect: '/main/indes'
71 71
     },
72 72
     {
@@ -86,6 +86,15 @@ export default new Router({
86 86
       children: []
87 87
     },
88 88
     {
89
+      path: '/main/incidentNewList/:type/:status/:isToday?',
90
+      name: 'IncidentNewList',
91
+      component: IncidentNewList,
92
+      meta: {
93
+        allowBack: false
94
+      },
95
+      children: []
96
+    },
97
+    {
89 98
       path: '/main/workList/:type/:status',
90 99
       name: 'WorkList',
91 100
       component: WorkList,

文件差異過大導致無法顯示
+ 1141 - 0
src/views/IncidentNewList.vue


+ 1 - 1
src/views/Main.vue

@@ -8,7 +8,7 @@
8 8
                 <i class="iconfont icon-shouyexian"></i>
9 9
                 <span>首页</span>
10 10
             </router-link>
11
-            <router-link to="/main/incidentList/todo/0" class="link" active-class="active">
11
+            <router-link to="/main/incidentNewList/todo/1544" class="link" active-class="active">
12 12
                 <i class="iconfont icon-baoxiuxian"></i>
13 13
                 <span>事件</span>
14 14
             </router-link>

+ 2 - 2
src/views/indes.vue

@@ -279,7 +279,7 @@ export default {
279 279
         errorCount: 0 //今日迟到
280 280
       }, //统计数据
281 281
       newStatisticsLoading: false, //统计数据Loading
282
-      isShowNewStatistics: true
282
+      isShowNewStatistics: false
283 283
     };
284 284
   },
285 285
   methods: {
@@ -391,7 +391,7 @@ export default {
391 391
       this.$router.push({ path: "/noticeList" });
392 392
     },
393 393
     toIncidentList(searchType) {
394
-      this.$router.push({ path: "/main/incidentList/" + searchType + '/0' });
394
+      this.$router.push({ path: "/main/incidentNewList/" + searchType + '/1544' });
395 395
     },
396 396
     // toKnowList() {
397 397
     //   this.$router.push({ path: "/knowList" });