更新設備選擇組件,新增獲客場景選項,調整篩選邏輯以支持多種篩選條件,並修正路由以符合新結構。

This commit is contained in:
2025-08-13 16:16:05 +08:00
parent 140c0ed7e0
commit 2c509d5aa1
11 changed files with 241 additions and 145 deletions

View File

@@ -46,6 +46,12 @@ const DeviceSelection: React.FC<DeviceSelectionProps> = ({
onSelect(selectedOptions.filter(v => v.id !== id));
};
// 清除所有已选设备
const handleClearAll = () => {
if (readonly) return;
onSelect([]);
};
return (
<>
{/* mode=input 显示输入框mode=dialog不显示 */}
@@ -57,6 +63,7 @@ const DeviceSelection: React.FC<DeviceSelectionProps> = ({
onClick={openPopup}
prefix={<SearchOutlined />}
allowClear={!readonly}
onClear={handleClearAll}
size="large"
readOnly={readonly}
disabled={readonly}