瀏覽代碼

事件列表页面调整

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

File diff suppressed because it is too large
+ 1141 - 0
src/views/IncidentNewList.vue


+ 1 - 1
src/views/Main.vue

@@ -8,7 +8,7 @@
8
                 <i class="iconfont icon-shouyexian"></i>
8
                 <i class="iconfont icon-shouyexian"></i>
9
                 <span>首页</span>
9
                 <span>首页</span>
10
             </router-link>
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
                 <i class="iconfont icon-baoxiuxian"></i>
12
                 <i class="iconfont icon-baoxiuxian"></i>
13
                 <span>事件</span>
13
                 <span>事件</span>
14
             </router-link>
14
             </router-link>

+ 2 - 2
src/views/indes.vue

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