|
|
@@ -562,6 +562,7 @@
|
|
|
:titles="['可选设备', '已选设备']"
|
|
|
:props="{ key: 'id', label: 'deviceCode' }"
|
|
|
filterable
|
|
|
+ :filter-method="filterDeviceMethod"
|
|
|
class="transfer-component"
|
|
|
@change="handleTransferChange"
|
|
|
>
|
|
|
@@ -1708,6 +1709,18 @@ const handleRowClick = (row, index) => {
|
|
|
}
|
|
|
};
|
|
|
|
|
|
+// 设备过滤方法
|
|
|
+const filterDeviceMethod = (query: string, item: IotDeviceVO) => {
|
|
|
+ if (!query) return true;
|
|
|
+
|
|
|
+ const searchText = query.toLowerCase();
|
|
|
+ const deviceCode = (item.deviceCode || '').toLowerCase();
|
|
|
+ const deviceName = (item.deviceName || '').toLowerCase();
|
|
|
+
|
|
|
+ // 同时匹配设备编码和设备名称
|
|
|
+ return deviceCode.includes(searchText) || deviceName.includes(searchText);
|
|
|
+};
|
|
|
+
|
|
|
// 根据责任人ID获取责任人名称
|
|
|
const getResponsiblePersonNames = (responsiblePersonIds: number[]) => {
|
|
|
if (!responsiblePersonIds || responsiblePersonIds.length === 0) return '';
|