This commit is contained in:
mmc
2026-05-25 17:27:40 +08:00
parent 2471479b9c
commit 6a8ea3ba1e
2 changed files with 7 additions and 7 deletions

View File

@@ -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();

View File

@@ -112,7 +112,7 @@ export default function DeviceOverviewPage({ devices, planedevices, devicesAll,
};
return (
<Content style={{ maxWidth: 1800, margin: '0 8', }}>
<Content style={{ margin: '0 8', }}>
<Row gutter={[8, 8]} style={{ marginBottom: 12, flexWrap: 'wrap' }}>
{dynamicTopCards.map((card, idx) => (
<Col key={idx} style={{ minWidth: '160px', flex: '1 0 auto' }}>