角色非自定义权限范围清空选择值

This commit is contained in:
RuoYi 2021-02-06 10:34:12 +08:00
parent df504c5c14
commit 3a51c53823

View File

@ -213,7 +213,7 @@
<el-input v-model="form.roleKey" :disabled="true" /> <el-input v-model="form.roleKey" :disabled="true" />
</el-form-item> </el-form-item>
<el-form-item label="权限范围"> <el-form-item label="权限范围">
<el-select v-model="form.dataScope"> <el-select v-model="form.dataScope" @change="dataScopeSelectChange">
<el-option <el-option
v-for="item in dataScopeOptions" v-for="item in dataScopeOptions"
:key="item.value" :key="item.value"
@ -524,6 +524,12 @@ export default {
this.title = "修改角色"; this.title = "修改角色";
}); });
}, },
/** 选择角色权限范围触发 */
dataScopeSelectChange(value) {
if(value !== '2') {
this.$refs.dept.setCheckedKeys([]);
}
},
/** 分配数据权限操作 */ /** 分配数据权限操作 */
handleDataScope(row) { handleDataScope(row) {
this.reset(); this.reset();