|
@@ -475,6 +475,24 @@ const menuList = reactive({
|
|
|
},
|
|
|
],
|
|
|
});
|
|
|
+
|
|
|
+ const roles = useUserStore().roles;
|
|
|
+ const permissionRoles = ['admin','dept','system','audit']
|
|
|
+ const super_admin = "admin";
|
|
|
+ const hasRole = roles.some(role => {
|
|
|
+ return super_admin === role || permissionRoles.includes(role)
|
|
|
+ })
|
|
|
+ if(hasRole){
|
|
|
+ menuList.data.push(
|
|
|
+ {
|
|
|
+ label: "系统管理",
|
|
|
+ path: "/admin",
|
|
|
+ imgs: system,
|
|
|
+ beimgs: issystem,
|
|
|
+ }
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
const clickPath = (index, items) => {
|
|
|
items = toRaw(items);
|
|
|
// toFileData.value = null
|