From 9b825939b7f0a7439d704b379812362dd95697fc Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期一, 11 七月 2022 17:49:26 +0800
Subject: [PATCH] 1.优化代码2.修改实施部提出的bug3.生产开报工外协列表自动弹窗实现部分
---
src/store/modules/user.js | 13 +++++++++----
1 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/src/store/modules/user.js b/src/store/modules/user.js
index 3f0f241..7f65049 100644
--- a/src/store/modules/user.js
+++ b/src/store/modules/user.js
@@ -90,7 +90,7 @@
},
// user logout
- logout({ commit, state }) {
+ logout({ commit, state, dispatch }) {
return new Promise((resolve, reject) => {
const usercode = getCookie('navTabId')
const username = getCookie('admin')
@@ -112,10 +112,15 @@
removeCookie('navTabId')
removeCookie('usertype')
removeCookie('userid')
- }
- commit('RESET_STATE')
- resolve()
+ // reset visited views and cached views
+ dispatch('tagsView/delAllViews', null, { root: true })
+ sessionStorage.removeItem('tabViews')
+
+ commit('RESET_STATE')
+
+ resolve()
+ }
}).catch(error => {
reject(error)
})
--
Gitblit v1.9.3