权限

# 说明

judgePrivileges用来做权限判断。比如判断用户是否具有查看某个页面的权限,或者判断用户是否具有某个按钮的权限。

# 代码示例

<script>
import { judgePrivileges } from '@/utils'
export default {
  name: 'privilegeUtils',
  methods: {
    judgePrivileges,
    nodeContextmenu() {
      if (
        this.$route.meta.filePath === 'project/BIM/BIMFloder/index' &&
        judgePrivileges('P_dbs_show_plan')
      ) {
        this.isDisablePrivilege = false
        this.menuList.push({
          code: 'dbs_category_plan',
          name: '取消在计划中显示',
          click: this.changeShowInPlan,
          param: data
        })
      }
    }
  }
}
</script>