doum
2025-09-26 9057e04efad1b7d61c77a72e5c37a504d0aee935
admin/src/components/base/BasePage.vue
@@ -9,14 +9,25 @@
    }
  },
  computed: {
    ...mapState(['userInfo']),
    ...mapState(['userInfo','tableHeightNew']),
    // 是否为超级管理员
    isAdmin () {
      return this.userInfo.roles.findIndex(code => code === this.adminCode) > -1
    }
  },
  methods: {
    // 是否包含指定角色
    /**
     * 判断是否为DEBUG模式
     */
    isDebug () {
      return process.env.VUE_APP_DEBUG === 'on'
    },
    /**
     * 是否包含指定角色
     *
     * @param roles 目标角色数组
     * @returns {boolean}
     */
    containRoles (roles) {
      if (roles == null) {
        return true
@@ -34,7 +45,12 @@
      }
      return false
    },
    // 是否包含指定权限
    /**
     * 是否包含指定权限
     *
     * @param permissions 目标权限数组
     * @returns {boolean}
     */
    containPermissions (permissions) {
      if (permissions == null) {
        return true