diff --git a/src/components/SystemSetting/DeviceAccessPage.tsx b/src/components/SystemSetting/DeviceAccessPage.tsx index 0cec04f..42caee6 100644 --- a/src/components/SystemSetting/DeviceAccessPage.tsx +++ b/src/components/SystemSetting/DeviceAccessPage.tsx @@ -228,9 +228,9 @@ export default function DeviceAccessPage() { setPropertyList(targetModel?.supportProperties || []); form.setFieldsValue({ ...record, - modelId, + modelId: Number(modelId), limitConfig, - actionConfig, // 👈 回显 + actionConfig, }); } else { form.setFieldsValue(record); @@ -416,11 +416,11 @@ export default function DeviceAccessPage() { messageApi.success('删除成功'); }; - const getAlarmProps = () => modelDetail?.props?.filter(item => item.isAlarm) || []; + const getAlarmProps = () => { + + return modelDetail?.props?.filter(item => item.isAlarm) || []; + }; - // ====================== - // 【优化】切换 tab 才加载对应数据,不一次性请求所有 - // ====================== useEffect(() => { if (activeTab === 'product') { fetchProtocolList(); diff --git a/src/components/devices/DeviceOverviewPage.tsx b/src/components/devices/DeviceOverviewPage.tsx index 7a74d53..ffe9f8b 100644 --- a/src/components/devices/DeviceOverviewPage.tsx +++ b/src/components/devices/DeviceOverviewPage.tsx @@ -112,7 +112,7 @@ export default function DeviceOverviewPage({ devices, planedevices, devicesAll, }; return ( - + {dynamicTopCards.map((card, idx) => (