fix: 1672 库管员配置中未绑定的设备亦可解绑,建议未绑定时隐藏“解绑”按钮

This commit is contained in:
binbin_pan 2024-05-24 16:35:12 +08:00
parent 7a17cccd1c
commit 5fdccef83d
1 changed files with 10 additions and 1 deletions

View File

@ -130,6 +130,7 @@
size="mini"
type="danger"
icon="el-icon-delete"
:disabled="!scope.row.userName"
@click="handleDelete(scope.row)"
>解绑</el-button>
@ -359,7 +360,15 @@ export default {
handleSelectionChange(selection) {
this.ids = selection.map(item => item.modelId);
this.single = selection.length != 1;
this.multiple = !selection.length;
if (selection.length > 0) {
selection.forEach(item => {
if (!item.userName) {
this.multiple = true
}
});
} else {
this.multiple = true
}
},
/** 新增按钮操作 */
handleSave() {