Commit 65774b63 authored by pengyunqian's avatar pengyunqian

Merge branch 'pyq' into dev

parents acdba7f3 1e3147e0
......@@ -328,15 +328,45 @@ export default {
TABS,
};
},
created() {
created() {
this.getApplyList();
},
async mounted() {
const res = await this.getPermissionsAll()
console.log(res)
if(!res) {
this.$router.push({name: 'Forbidden'})
return
}
let withdrawlPermission = res.filter(
({name}) => name === "withdrawal_audit"
)
if(withdrawlPermission.length === 0) {
// push to forbidden
this.$router.push({name: 'Forbidden'})
return
}
console.log("withdrawlPermission", withdrawlPermission)
withdrawlPermission = withdrawlPermission[0]
// judge subpermission
let subpermissions = withdrawlPermission.sub_permissions.filter(
({name}) =>name ==="show"
)
if(subpermissions.length === 0) {
this.$router.push({name: 'Forbidden'})
}
},
methods: {
async getPermissionsAll() {
let { email } = this.$store.state.userInfo;
const res = await getAll_role_list(email);
this.permissions = res;
return res;
},
// tab切换
handleTabChange() {
this.searchProps.page = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment