Browse Source

reactor:首页条数BUG;

zhangchong 6 months ago
parent
commit
82f1b8b86f
1 changed files with 43 additions and 12 deletions
  1. 43 12
      src/layout/navBars/breadcrumb/user.vue

+ 43 - 12
src/layout/navBars/breadcrumb/user.vue

@@ -77,8 +77,8 @@
 						><span class="user-info-box-content-item-content">{{ userInfos.orgName }}</span>
 					</div>
 					<div class="mt5 flex-between">
-						<el-button link type="primary" @click="onChangePwd"> <SvgIcon name="ele-Lock" class="mr3"/>修改密码</el-button>
-						<el-button link type="primary" @click="onLogOut"><SvgIcon name="iconfont icon-tuichu" class="mr3"/>退出登录</el-button>
+						<el-button link type="primary" @click="onChangePwd"> <SvgIcon name="ele-Lock" class="mr3" />修改密码</el-button>
+						<el-button link type="primary" @click="onLogOut"><SvgIcon name="iconfont icon-tuichu" class="mr3" />退出登录</el-button>
 					</div>
 				</div>
 			</el-popover>
@@ -341,10 +341,35 @@ const onLogOut = () => {
 			},
 		})
 			.then(() => {
-				callCenterLogout().then(()=>{
-					console.log('呼叫中心ws退出成功');
-					signalR.leaveAllGroupAndStop().then(()=>{
-						console.log('业务中心ws退出成功');
+				callCenterLogout()
+					.then(() => {
+						console.log('呼叫中心ws退出成功');
+						signalR
+							.leaveAllGroupAndStop()
+							.then(() => {
+								// 退出所有组
+								console.log('业务中心ws退出成功');
+								setTimeout(() => {
+									// 清除缓存/token等
+									Local.clear();
+									Session.clear();
+									Cookie.clear();
+									// 使用 reload 时,不需要调用 resetRoute() 重置路由
+									window.location.reload();
+								}, 300);
+							})
+							.catch(() => {
+								setTimeout(() => {
+									// 清除缓存/token等
+									Local.clear();
+									Session.clear();
+									Cookie.clear();
+									// 使用 reload 时,不需要调用 resetRoute() 重置路由
+									window.location.reload();
+								}, 300);
+							});
+					})
+					.catch(() => {
 						setTimeout(() => {
 							// 清除缓存/token等
 							Local.clear();
@@ -353,10 +378,7 @@ const onLogOut = () => {
 							// 使用 reload 时,不需要调用 resetRoute() 重置路由
 							window.location.reload();
 						}, 300);
-					}) // 退出所有组
-				}).catch(()=>{
-
-				})
+					});
 			})
 			.catch(() => {});
 		return;
@@ -391,7 +413,7 @@ const onLogOut = () => {
 		},
 	})
 		.then(async () => {
-			signalR.leaveAllGroupAndStop().then(()=>{
+			signalR.leaveAllGroupAndStop().then(() => { // 退出所有组
 				console.log('业务中心ws退出成功');
 				setTimeout(() => {
 					// 清除缓存/token等
@@ -401,7 +423,16 @@ const onLogOut = () => {
 					// 使用 reload 时,不需要调用 resetRoute() 重置路由
 					window.location.reload();
 				}, 300);
-			}) // 退出所有组
+			}).catch(()=>{
+				setTimeout(() => {
+					// 清除缓存/token等
+					Local.clear();
+					Session.clear();
+					Cookie.clear();
+					// 使用 reload 时,不需要调用 resetRoute() 重置路由
+					window.location.reload();
+				}, 300);
+			})
 		})
 		.catch(() => {});
 };