|
|
@ -1,4 +1,4 @@ |
|
|
|
import React from 'react' |
|
|
|
import React, { useEffect } from 'react' |
|
|
|
import { Box, NoData } from '$components'; |
|
|
|
import { useMockRequest, ApiTable } from '$utils'; |
|
|
|
|
|
|
@ -7,10 +7,14 @@ function Infrastructure(props) { |
|
|
|
url: 'https://superchangnan.anxinyun.cn/api/xiaofang/devices', |
|
|
|
method: 'mockGet', |
|
|
|
}); |
|
|
|
const datas = devices?.map(s => { |
|
|
|
|
|
|
|
let datas = [] |
|
|
|
useEffect(() => { |
|
|
|
devices?.map(s => { |
|
|
|
s.data = JSON.parse(s.data) |
|
|
|
return s; |
|
|
|
}) |
|
|
|
}, [devices]) |
|
|
|
|
|
|
|
const data = [ |
|
|
|
{ name: '烟感设备', number: datas?.find(s => s.type == 3)?.data?.length || 0 }, |
|
|
|