kimi
2020-02-12 2ef590774e2d655cdc43ee2c6fa4c674ac4d882d
src/views/Home.vue
@@ -42,7 +42,7 @@
        <el-container>
          <el-header style="text-align: right; font-size: 15px;padding-right: 40px;">
               <i class="el-icon-user-solid"></i>
               <span>admin</span>
               <span>{{userName}}</span>
               <el-button size="small" type="primary" @click="Cancel">退 出</el-button>
          </el-header>
          
@@ -70,6 +70,7 @@
  },
   created() {
      let userId_ = localStorage.getItem('userId');
      this.userName = localStorage.getItem('userName');
      let departId = localStorage.getItem('departId');
      if (!userId_ || !departId) {
         this.$router.push('/login');
@@ -80,8 +81,10 @@
         let type;
         if(departId == "100" || departId == "500") {
            type = departId;
             localStorage.setItem('assign', false);
         }else {
            type = "all";
            localStorage.setItem('assign', true);
         }
         
         this.getMenu(type);
@@ -98,7 +101,7 @@
               {'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': "111_4", 'title': "归档报告", 'path': 'project4', 'parentId': "111"}, //
               {'id': "112_1", 'title': "任务列表", 'path': 'calendarTask', 'parentId': "112"}, //
            ],
            100: [
@@ -150,6 +153,7 @@
      
      Cancel() {
         this.$router.push('/login');
         localStorage.setItem('userId', undefined);
      },
      menuSelect(index, a){
       let isPage = index.substring(0,2);