行选择卡顿问题在3.6.3版本依然存在 #1120
parent
8d984846af
commit
c48041a2b5
|
@ -174,7 +174,11 @@ export function createPermissionGuard(router: Router) {
|
|||
// }
|
||||
// }
|
||||
//update-end---author:scott ---date::2024-02-21 for:【QQYUN-8326】刷新首页,不需要重新获获取用户信息---
|
||||
|
||||
// update-begin--author:liaozhiyang---date:20240321---for:【QQYUN-8572】表格行选择卡顿问题(customRender中字典引起的)
|
||||
if (userStore.getLastUpdateTime === 0) {
|
||||
userStore.setAllDictItemsByLocal();
|
||||
}
|
||||
// update-end--author:liaozhiyang---date:20240321---for:【QQYUN-8572】表格行选择卡顿问题(customRender中字典引起的)
|
||||
if (permissionStore.getIsDynamicAddedRoute) {
|
||||
next();
|
||||
return;
|
||||
|
|
|
@ -19,11 +19,14 @@ import { useGlobSetting } from '/@/hooks/setting';
|
|||
import { JDragConfigEnum } from '/@/enums/jeecgEnum';
|
||||
import { useSso } from '/@/hooks/web/useSso';
|
||||
import { isOAuth2AppEnv } from "/@/views/sys/login/useLogin";
|
||||
interface dictType {
|
||||
[key: string]: any;
|
||||
}
|
||||
interface UserState {
|
||||
userInfo: Nullable<UserInfo>;
|
||||
token?: string;
|
||||
roleList: RoleEnum[];
|
||||
dictItems?: [];
|
||||
dictItems?: dictType | null;
|
||||
sessionTimeout?: boolean;
|
||||
lastUpdateTime: number;
|
||||
tenantid?: string | number;
|
||||
|
@ -41,7 +44,7 @@ export const useUserStore = defineStore({
|
|||
// 角色列表
|
||||
roleList: [],
|
||||
// 字典
|
||||
dictItems: [],
|
||||
dictItems: null,
|
||||
// session过期时间
|
||||
sessionTimeout: false,
|
||||
// Last fetch time
|
||||
|
@ -109,6 +112,16 @@ export const useUserStore = defineStore({
|
|||
this.dictItems = dictItems;
|
||||
setAuthCache(DB_DICT_DATA_KEY, dictItems);
|
||||
},
|
||||
setAllDictItemsByLocal() {
|
||||
// update-begin--author:liaozhiyang---date:20240321---for:【QQYUN-8572】表格行选择卡顿问题(customRender中字典引起的)
|
||||
if (!this.dictItems) {
|
||||
const allDictItems = getAuthCache(DB_DICT_DATA_KEY);
|
||||
if (allDictItems) {
|
||||
this.dictItems = allDictItems;
|
||||
}
|
||||
}
|
||||
// update-end--author:liaozhiyang---date:20240321---for:【QQYUN-8572】表格行选择卡顿问题(customRender中字典引起的)
|
||||
},
|
||||
setTenant(id) {
|
||||
this.tenantid = id;
|
||||
setAuthCache(TENANT_ID, id);
|
||||
|
@ -121,7 +134,7 @@ export const useUserStore = defineStore({
|
|||
},
|
||||
resetState() {
|
||||
this.userInfo = null;
|
||||
this.dictItems = [];
|
||||
this.dictItems = null;
|
||||
this.token = '';
|
||||
this.roleList = [];
|
||||
this.sessionTimeout = false;
|
||||
|
|
Loading…
Reference in New Issue