xx
This commit is contained in:
@@ -228,9 +228,9 @@ export default function DeviceAccessPage() {
|
|||||||
setPropertyList(targetModel?.supportProperties || []);
|
setPropertyList(targetModel?.supportProperties || []);
|
||||||
form.setFieldsValue({
|
form.setFieldsValue({
|
||||||
...record,
|
...record,
|
||||||
modelId,
|
modelId: Number(modelId),
|
||||||
limitConfig,
|
limitConfig,
|
||||||
actionConfig, // 👈 回显
|
actionConfig,
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
form.setFieldsValue(record);
|
form.setFieldsValue(record);
|
||||||
@@ -416,11 +416,11 @@ export default function DeviceAccessPage() {
|
|||||||
messageApi.success('删除成功');
|
messageApi.success('删除成功');
|
||||||
};
|
};
|
||||||
|
|
||||||
const getAlarmProps = () => modelDetail?.props?.filter(item => item.isAlarm) || [];
|
const getAlarmProps = () => {
|
||||||
|
|
||||||
|
return modelDetail?.props?.filter(item => item.isAlarm) || [];
|
||||||
|
};
|
||||||
|
|
||||||
// ======================
|
|
||||||
// 【优化】切换 tab 才加载对应数据,不一次性请求所有
|
|
||||||
// ======================
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (activeTab === 'product') {
|
if (activeTab === 'product') {
|
||||||
fetchProtocolList();
|
fetchProtocolList();
|
||||||
|
|||||||
@@ -112,7 +112,7 @@ export default function DeviceOverviewPage({ devices, planedevices, devicesAll,
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Content style={{ maxWidth: 1800, margin: '0 8', }}>
|
<Content style={{ margin: '0 8', }}>
|
||||||
<Row gutter={[8, 8]} style={{ marginBottom: 12, flexWrap: 'wrap' }}>
|
<Row gutter={[8, 8]} style={{ marginBottom: 12, flexWrap: 'wrap' }}>
|
||||||
{dynamicTopCards.map((card, idx) => (
|
{dynamicTopCards.map((card, idx) => (
|
||||||
<Col key={idx} style={{ minWidth: '160px', flex: '1 0 auto' }}>
|
<Col key={idx} style={{ minWidth: '160px', flex: '1 0 auto' }}>
|
||||||
|
|||||||
Reference in New Issue
Block a user