From d75d83bd2a1f4e13634f84f8a4de1f7457187b2b Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Thu, 05 Mar 2026 14:56:13 +0800
Subject: [PATCH] feat:部门管理,删除相关处理
---
applications/task-work-order/src/store/modules/user.js | 14 +++++++++++---
1 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/applications/task-work-order/src/store/modules/user.js b/applications/task-work-order/src/store/modules/user.js
index 969c21a..6c4c7a1 100644
--- a/applications/task-work-order/src/store/modules/user.js
+++ b/applications/task-work-order/src/store/modules/user.js
@@ -33,6 +33,7 @@
token: getStore({ name: 'token' }) || '',
refreshToken: getStore({ name: 'refreshToken' }) || '',
parentDeptInfo: getStore({ name: 'parentDeptInfo' }) || '',
+ xtToken: getStore({ name: 'xtToken' }) || '',
},
actions: {
//根据用户名登录
@@ -227,6 +228,7 @@
removeToken()
removeRefreshToken()
resolve()
+ localStorage.clear()
})
.catch(error => {
reject(error)
@@ -246,6 +248,7 @@
removeRefreshToken()
removeToken()
resolve()
+ localStorage.clear()
})
},
GetTopMenu() {
@@ -261,9 +264,10 @@
dispatch('LogOut').then(() => {
const env = import.meta.env.VITE_APP_ENV
const adminUrl = import.meta.env.VITE_APP_DASHBOARD_URL
- env === 'development'
- ? (window.location.href = '/task-work-order/login')
- : window.location.replace(`${adminUrl}#/login`)
+ (window.location.href = '/task-work-order/login')
+ // env === 'development'
+ // ? (window.location.href = '/task-work-order/login')
+ // : window.location.replace(`${adminUrl}#/login`)
})
}
return new Promise(resolve => {
@@ -297,6 +301,10 @@
},
},
mutations: {
+ setXtToken:(state,token) =>{
+ state.xtToken = token
+ setStore({ name: 'xtToken', content: token })
+ },
SET_PARENT_DEPT_INFO(state, deptId) {
getParentDeptInfo({ deptId: deptId }).then(res => {
const data = res.data.data
--
Gitblit v1.9.3