Lius
2025-07-05 f9fc61cf75c418bd183a8dbe6116ea120d69dee2
src/utils/authFilter.js
@@ -274,4 +274,29 @@
function substrPre(str,pre) {
  return str.substr(pre.length);
}
/**
 * 显示权限
 * @param {*} code
 * @returns
 */
export function buttonShowAuthFilter(code) {
  if(code){
    if(nodeShowAuth(code)){
      return true;
    }else{
      return false;
    }
  }else{
    return false;
  }
}
function nodeShowAuth(code){
  let authList = JSON.parse(sessionStorage.getItem(USER_AUTH) || "[]");
  for (let auth of authList) {
    if(auth.action == code) {
      return true;
    }
  }
  return false;
}