Browse Source

(*)城市安全计算完善

master
peng.peng 1 year ago
parent
commit
1d44e4d9fc
  1. 8
      super-screen/client/src/sections/community-safty/components/infrastructure.js

8
super-screen/client/src/sections/community-safty/components/infrastructure.js

@ -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 },

Loading…
Cancel
Save