优化角色禁用不允许分配
This commit is contained in:
parent
84fef1f675
commit
c6b0efcdc2
@ -23,7 +23,7 @@
|
|||||||
<span>{{ (pageNum - 1) * pageSize + scope.$index + 1 }}</span>
|
<span>{{ (pageNum - 1) * pageSize + scope.$index + 1 }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column type="selection" :reserve-selection="true" width="55"></el-table-column>
|
<el-table-column type="selection" :reserve-selection="true" :selectable="checkSelectable" width="55" />
|
||||||
<el-table-column label="角色编号" align="center" prop="roleId" />
|
<el-table-column label="角色编号" align="center" prop="roleId" />
|
||||||
<el-table-column label="角色名称" align="center" prop="roleName" />
|
<el-table-column label="角色名称" align="center" prop="roleName" />
|
||||||
<el-table-column label="权限字符" align="center" prop="roleKey" />
|
<el-table-column label="权限字符" align="center" prop="roleKey" />
|
||||||
@ -88,7 +88,9 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
/** 单击选中行数据 */
|
/** 单击选中行数据 */
|
||||||
clickRow(row) {
|
clickRow(row) {
|
||||||
|
if (this.checkSelectable(row)) {
|
||||||
this.$refs.table.toggleRowSelection(row);
|
this.$refs.table.toggleRowSelection(row);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
// 多选框选中数据
|
// 多选框选中数据
|
||||||
handleSelectionChange(selection) {
|
handleSelectionChange(selection) {
|
||||||
@ -98,6 +100,10 @@ export default {
|
|||||||
getRowKey(row) {
|
getRowKey(row) {
|
||||||
return row.roleId;
|
return row.roleId;
|
||||||
},
|
},
|
||||||
|
// 检查角色状态
|
||||||
|
checkSelectable(row) {
|
||||||
|
return row.status === "0" ? true : false;
|
||||||
|
},
|
||||||
/** 提交按钮 */
|
/** 提交按钮 */
|
||||||
submitForm() {
|
submitForm() {
|
||||||
const userId = this.form.userId;
|
const userId = this.form.userId;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user