zhuguifei
2025-04-28 442928123f63ee497d766f9a7a14f0a6ee067e25
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
import { ENHANCE_PRE, USER_INFO } from "@/store/mutation-types";
import Vue from 'vue';
const getters = {
  device: state => state.app.device,
  theme: state => state.app.theme,
  color: state => state.app.color,
  token: state => state.user.token,
  avatar: state => { state.user.avatar = Vue.ls.get(USER_INFO).avatar; return state.user.avatar },
  username: state => state.user.info.username,
  nickname: state => { state.user.info.realname = Vue.ls.get(USER_INFO).realname; return state.user.info.realname },
  welcome: state => state.user.welcome,
  permissionList: state => state.user.permissionList,
  userInfo: state => { state.user.info = Vue.ls.get(USER_INFO); return state.user.info },
  addRouters: state => state.permission.addRouters,
  onlAuthFields: state => { return state.online.authFields },
  enhanceJs: (state) => (code) => {
    state.enhance.enhanceJs[code] = Vue.ls.get(ENHANCE_PRE + code);
    return state.enhance.enhanceJs[code]
  },
  sysSafeMode: state => state.user.sysSafeMode,
  // 文件查看模式
  fileModel: (state) =>
    state.fileList.fileModel === null ? 0 : Number(state.fileList.fileModel),
  // 网格模式 & 时间线模式下 文件图标大小
  gridSize: (state) => state.fileList.gridSize,
  filePath: (state) => state.fileList.filePath,  // 当前文件路径
  fileType: (state) => state.fileList.fileType ? Number(state.fileList.fileType) : 0, // 文件类型, 0:常规文件; 6:回收站文件;8:分享文件;10
  downloadPrem: (state) => state.fileList.downloadPrem, // 下载权限
  managePrem: (state) => state.fileList.managePrem, // 管理权限 
  create: (state) => state.fileList.create, // 是否可以新建
  upload: (state) => state.fileList.upload, // 是否可以上传
  pathId: state => state.fileList.pathId,
  flow: state => state.fileList.flow, // 日下载总限额
  surplusFlow: state => state.fileList.surplusFlow, // 已用限额
  compareModal: state => state.fileList.compareModal, // 对比框显示状态
  compareList: state => state.fileList.compareList, // 文件对比结果列表
  compareLoading: state => state.fileList.compareLoading, // 文件对比加载状态
 
}
 
export default getters