kimi
2020-01-22 6e54d54febe9f52f302761a1aef0ef926811b1f3
src/views/Home.vue
@@ -65,37 +65,26 @@
      return {
         breadcrumbItems:[],
         defaultActive: "",
         navList:[
            {
               title:"首页", path:"mine",children:[]
            },
           {
             title:"项目管理", path:"0_1",children:[
               {title:"信息广场", path:"project2",children:[]},
               {title:"项目总览", path:"Overview",children:[]},
               {title:"项目分析", path:"project3",children:[]},
               {title:"归档报告", path:"project4",children:[]},
             ]
           },
           {
             title:"任务管理", path:"0_2",children:[
               {title:"任务列表", path:"calendarTask",children:[]},
             ]
           }
         ],
         navList:[],
      }
  },
   created() {
      let userId_ = localStorage.getItem('userId');
      let userType = localStorage.getItem('userType');
      if (!userId_) {
      let departId = localStorage.getItem('departId');
      if (!userId_ || !departId) {
         this.$router.push('/login');
      }
      else {
         this.defaultActive = "mine";
         this.$router.push('/mine');
         let type;
         if(departId == "100" || departId == "500") {
            type = departId;
         }else {
            type = "all";
         }
         
         this.getMenu(userType);
         this.getMenu(type);
      }
   },
   
@@ -106,21 +95,18 @@
               {'id': "110", 'title': "首页", 'path': "mine"}, //返回的数组字段
               {'id': "111", 'title': "项目管理", 'path': "0_111"}, //返回的数组字段
               {'id': "112", 'title': "任务管理", 'path': "0_112"},
               {'id': "111_1", 'title': "信息广场", 'path': 'project2', 'parentId': "111"}, //
               {'id': "111_2", 'title': "项目总览", 'path': 'Overview', 'parentId': "111"}, //
               {'id': "111_3", 'title': "项目分析", 'path': 'project3', 'parentId': "111"}, //
               {'id': "111_1", 'title': "信息广场", 'path': 'square', 'parentId': "111"}, //
               {'id': "111_2", 'title': "项目总览", 'path': 'list', 'parentId': "111"}, //
               {'id': "111_3", 'title': "项目分析", 'path': 'Overview', 'parentId': "111"}, //
               {'id': "111_4", 'title': "归档报告", 'path': 'project4', 'parentId': "111"}, //
               {'id': "112_1", 'title': "任务列表", 'path': 'calendarTask', 'parentId': "112"}, //
            ],
            role1: [
               {'id': "110", 'title': "首页", 'path': "mine"}, //返回的数组字段
               {'id': "111", 'title': "项目管理", 'path': "0_111"}, //返回的数组字段
               {'id': "111_1", 'title': "信息广场", 'path': 'project2', 'parentId': "111"}, //
               {'id': "111_2", 'title': "项目总览", 'path': 'Overview', 'parentId': "111"}, //
               {'id': "111_3", 'title': "项目分析", 'path': 'project3', 'parentId': "111"}, //
               {'id': "111_4", 'title': "归档报告", 'path': 'project4', 'parentId': "111"}, //
            ],
            role2: [
            100: [
                  {'id': "110", 'title': "首页", 'path': "mine"}, //返回的数组字段
                  {'id': "112", 'title': "任务管理", 'path': "0_112"},
                  {'id': "112_1", 'title': "任务列表", 'path': 'calendarTask', 'parentId': "112"}, //
               ],
            500: [
               {'id': "110", 'title': "首页", 'path': "mine"}, //返回的数组字段
               {'id': "112", 'title': "任务管理", 'path': "0_112"},
               {'id': "112_1", 'title': "任务列表", 'path': 'calendarTask', 'parentId': "112"}, //
@@ -128,7 +114,7 @@
         };
         
         let list = [];
         if (!userType) {
         if (!userType || userType=='undefined') {
            list = DayDatas['all'];
         }
         else {