行选择卡顿问题在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-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) {
|
if (permissionStore.getIsDynamicAddedRoute) {
|
||||||
next();
|
next();
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -19,11 +19,14 @@ import { useGlobSetting } from '/@/hooks/setting';
|
||||||
import { JDragConfigEnum } from '/@/enums/jeecgEnum';
|
import { JDragConfigEnum } from '/@/enums/jeecgEnum';
|
||||||
import { useSso } from '/@/hooks/web/useSso';
|
import { useSso } from '/@/hooks/web/useSso';
|
||||||
import { isOAuth2AppEnv } from "/@/views/sys/login/useLogin";
|
import { isOAuth2AppEnv } from "/@/views/sys/login/useLogin";
|
||||||
|
interface dictType {
|
||||||
|
[key: string]: any;
|
||||||
|
}
|
||||||
interface UserState {
|
interface UserState {
|
||||||
userInfo: Nullable<UserInfo>;
|
userInfo: Nullable<UserInfo>;
|
||||||
token?: string;
|
token?: string;
|
||||||
roleList: RoleEnum[];
|
roleList: RoleEnum[];
|
||||||
dictItems?: [];
|
dictItems?: dictType | null;
|
||||||
sessionTimeout?: boolean;
|
sessionTimeout?: boolean;
|
||||||
lastUpdateTime: number;
|
lastUpdateTime: number;
|
||||||
tenantid?: string | number;
|
tenantid?: string | number;
|
||||||
|
@ -41,7 +44,7 @@ export const useUserStore = defineStore({
|
||||||
// 角色列表
|
// 角色列表
|
||||||
roleList: [],
|
roleList: [],
|
||||||
// 字典
|
// 字典
|
||||||
dictItems: [],
|
dictItems: null,
|
||||||
// session过期时间
|
// session过期时间
|
||||||
sessionTimeout: false,
|
sessionTimeout: false,
|
||||||
// Last fetch time
|
// Last fetch time
|
||||||
|
@ -109,6 +112,16 @@ export const useUserStore = defineStore({
|
||||||
this.dictItems = dictItems;
|
this.dictItems = dictItems;
|
||||||
setAuthCache(DB_DICT_DATA_KEY, 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) {
|
setTenant(id) {
|
||||||
this.tenantid = id;
|
this.tenantid = id;
|
||||||
setAuthCache(TENANT_ID, id);
|
setAuthCache(TENANT_ID, id);
|
||||||
|
@ -121,7 +134,7 @@ export const useUserStore = defineStore({
|
||||||
},
|
},
|
||||||
resetState() {
|
resetState() {
|
||||||
this.userInfo = null;
|
this.userInfo = null;
|
||||||
this.dictItems = [];
|
this.dictItems = null;
|
||||||
this.token = '';
|
this.token = '';
|
||||||
this.roleList = [];
|
this.roleList = [];
|
||||||
this.sessionTimeout = false;
|
this.sessionTimeout = false;
|
||||||
|
|
Loading…
Reference in New Issue