Browse Source

角色页面同步

wyx
mk 3 months ago
parent
commit
a492b44f11
  1. 17
      src/views/system/role/index.vue

17
src/views/system/role/index.vue

@ -20,10 +20,9 @@
/> />
</el-form-item> </el-form-item>
<el-form-item label="状态" prop="status"> <el-form-item label="状态" prop="status">
<el-select <el-select clearable
v-model="queryParams.status" v-model="queryParams.status"
placeholder="角色状态" placeholder="角色状态"
clearable
style="width: 240px" style="width: 240px"
> >
<el-option <el-option
@ -185,7 +184,7 @@
<el-form-item label="菜单权限"> <el-form-item label="菜单权限">
<el-checkbox v-model="menuExpand" @change="handleCheckedTreeExpand($event, 'menu')">展开/折叠</el-checkbox> <el-checkbox v-model="menuExpand" @change="handleCheckedTreeExpand($event, 'menu')">展开/折叠</el-checkbox>
<el-checkbox v-model="menuNodeAll" @change="handleCheckedTreeNodeAll($event, 'menu')">全选/全不选</el-checkbox> <el-checkbox v-model="menuNodeAll" @change="handleCheckedTreeNodeAll($event, 'menu')">全选/全不选</el-checkbox>
<el-checkbox v-model="form.menuCheckStrictly" @change="handleCheckedTreeConnect($event, 'menu')">父子联动</el-checkbox> <el-checkbox v-model="form.menuCheckStrictly" :true-label="1" :false-label="0" @change="handleCheckedTreeConnect($event, 'menu')">父子联动</el-checkbox>
<el-tree <el-tree
class="tree-border" class="tree-border"
:data="menuOptions" :data="menuOptions"
@ -217,7 +216,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" @change="dataScopeSelectChange"> <el-select clearable 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"
@ -229,7 +228,7 @@
<el-form-item label="数据权限" v-show="form.dataScope == 2"> <el-form-item label="数据权限" v-show="form.dataScope == 2">
<el-checkbox v-model="deptExpand" @change="handleCheckedTreeExpand($event, 'dept')">展开/折叠</el-checkbox> <el-checkbox v-model="deptExpand" @change="handleCheckedTreeExpand($event, 'dept')">展开/折叠</el-checkbox>
<el-checkbox v-model="deptNodeAll" @change="handleCheckedTreeNodeAll($event, 'dept')">全选/全不选</el-checkbox> <el-checkbox v-model="deptNodeAll" @change="handleCheckedTreeNodeAll($event, 'dept')">全选/全不选</el-checkbox>
<el-checkbox v-model="form.deptCheckStrictly" @change="handleCheckedTreeConnect($event, 'dept')">父子联动</el-checkbox> <el-checkbox v-model="form.deptCheckStrictly" :true-label="1" :false-label="0" @change="handleCheckedTreeConnect($event, 'dept')">父子联动</el-checkbox>
<el-tree <el-tree
class="tree-border" class="tree-border"
:data="deptOptions" :data="deptOptions"
@ -431,8 +430,8 @@ export default {
status: "0", status: "0",
menuIds: [], menuIds: [],
deptIds: [], deptIds: [],
menuCheckStrictly: true, menuCheckStrictly: 0,
deptCheckStrictly: true, deptCheckStrictly: 0,
remark: undefined remark: undefined
}; };
this.resetForm("form"); this.resetForm("form");
@ -492,9 +491,9 @@ export default {
// //
handleCheckedTreeConnect(value, type) { handleCheckedTreeConnect(value, type) {
if (type == 'menu') { if (type == 'menu') {
this.form.menuCheckStrictly = value ? true: false; this.form.menuCheckStrictly = value;
} else if (type == 'dept') { } else if (type == 'dept') {
this.form.deptCheckStrictly = value ? true: false; this.form.deptCheckStrictly = value;
} }
}, },
/** 新增按钮操作 */ /** 新增按钮操作 */

Loading…
Cancel
Save