diff --git a/apps/web/src/app/main/devicepage/select/Device-select.tsx b/apps/web/src/app/main/devicepage/select/Device-select.tsx index f124ffe..ce206e0 100755 --- a/apps/web/src/app/main/devicepage/select/Device-select.tsx +++ b/apps/web/src/app/main/devicepage/select/Device-select.tsx @@ -11,7 +11,6 @@ interface DeviceTypeSelectProps { style?: React.CSSProperties; systemTypeId?: string; // 添加网系类别ID作为过滤条件 } - export default function DeviceTypeSelect({ value, onChange, @@ -25,7 +24,6 @@ export default function DeviceTypeSelect({ [] ); const [loading, setLoading] = useState(false); - // 获取所有故障类型数据(包括子项) const { data: allDeviceTypes, isLoading, refetch: refetchDeviceType } = api.term.findMany.useQuery({ where: { @@ -44,7 +42,6 @@ export default function DeviceTypeSelect({ }, orderBy: { order: "asc" }, }); - // 获取网系类别下的所有故障 const { data: systemTypeTerms, refetch: refetchSystemType } = api.term.findMany.useQuery( { @@ -61,10 +58,8 @@ export default function DeviceTypeSelect({ enabled: !!systemTypeId, } ); - // 处理数据显示 useEffect(() => { - setLoading(isLoading); if (allDeviceTypes) { // 有选中的网系类别 diff --git a/apps/web/src/app/main/devicepage/select/Fix-select.tsx b/apps/web/src/app/main/devicepage/select/Fix-select.tsx index 8e1c49a..c7d625d 100644 --- a/apps/web/src/app/main/devicepage/select/Fix-select.tsx +++ b/apps/web/src/app/main/devicepage/select/Fix-select.tsx @@ -19,7 +19,6 @@ export default function FixTypeSelect({ value,onChange,placeholder = "选择故 { label: "维修中", value: "maintenance" }, { label: "未修复", value: "broken" }, ]; - return (