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; }