feat:设备管理不能删除已经绑定的设备
This commit is contained in:
@@ -4,6 +4,7 @@ import type { PageParam } from '@/api';
|
||||
* 设备
|
||||
*/
|
||||
export interface Equipment {
|
||||
userId?:number;
|
||||
equipmentType?: number;
|
||||
equipmentId?: number;
|
||||
equipmentName?: string;
|
||||
|
||||
@@ -345,6 +345,11 @@
|
||||
message.error('请至少选择一条数据');
|
||||
return;
|
||||
}
|
||||
|
||||
if (selection.value.filter(item=>item.userId!==0).length>0){
|
||||
message.error('不能删除绑定的设备,请重新选择');
|
||||
return;
|
||||
}
|
||||
Modal.confirm({
|
||||
title: '提示',
|
||||
content: '确定要删除选中的记录吗?',
|
||||
|
||||
Reference in New Issue
Block a user