From 0fcf0f9036c6ea78855486ea528924498f166c83 Mon Sep 17 00:00:00 2001
From: kimi <kimi42345@gmail.com>
Date: 星期二, 11 二月 2020 14:18:45 +0800
Subject: [PATCH] 0211

---
 src/views/Home.vue |   16 ++++++++++------
 1 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/src/views/Home.vue b/src/views/Home.vue
index be171ab..19185fa 100644
--- a/src/views/Home.vue
+++ b/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);
@@ -89,16 +92,16 @@
 	},
 	
   methods: {
-		getMenu(type) {
+		getMenu(userType) {
 			let DayDatas = {
 				 all: [
 					{'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_4", 'title': "褰掓。鎶ュ憡", 'path': 'project4', '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"}, //
 				],
 				100: [
@@ -150,6 +153,7 @@
 		
 		Cancel() {
 			this.$router.push('/login');
+			localStorage.setItem('userId', undefined);
 		},
 		menuSelect(index, a){
 		 let isPage = index.substring(0,2);

--
Gitblit v1.8.0