| | |
| | | // 获取所有角色 |
| | | getAllRole() { |
| | | const user = this.$store.getters.userInfo |
| | | if (user.lv == 1) { |
| | | this.data_scope = 1 |
| | | } |
| | | if (user.lv == 2) { |
| | | this.data_scope = 2 |
| | | } |
| | | if (user.lv == 3) { |
| | | this.data_scope = 3 |
| | | } |
| | | role.listRoleByDataScope({dataScope: this.data_scope}).then(response => { |
| | | // debugger |
| | | // if (user == undefined){ |
| | | // this.data_scope = 1 |
| | | // } else { |
| | | // if (user.lv==null|| user.lv== 1) { |
| | | // this.data_scope = 1 |
| | | // } |
| | | // if (user.lv && user.lv== 2) { |
| | | // this.data_scope = 2 |
| | | // } |
| | | // if (user.lv && user.lv== 3) { |
| | | // this.data_scope = 3 |
| | | // } |
| | | // } |
| | | this.data_scope = 1 |
| | | role.listRole({dataScope: this.data_scope}).then(response => { |
| | | if (response) { |
| | | this.roleOptions = response; |
| | | } else { |