Browse Source

消防功能完善

master
peng.peng 1 year ago
parent
commit
8b311649e4
  1. 10
      super-screen/client/src/sections/community-safty/components/infrastructure.js
  2. 4
      super-screen/client/src/sections/community-safty/containers/homePage.js
  3. 7
      super-screen/client/src/sections/fire-control/components/alarm-add.js
  4. 4
      super-screen/client/src/sections/fire-control/constants/index.js
  5. 5
      super-screen/client/src/sections/fire-control/containers/gis.js
  6. 4
      super-screen/client/src/sections/fire-control/containers/homePage.js
  7. 2
      super-screen/client/src/sections/water-prevention/containers/homePage.js

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

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

4
super-screen/client/src/sections/community-safty/containers/homePage.js

@ -60,9 +60,7 @@ function homePage(props) {
<div className='homepage'> <div className='homepage'>
<div className='_title'> <div className='_title'>
<div className='_title_text'> <div className='_title_text'>
<span>社区安全</span> <span>房屋租赁安全</span>
<div className='_title_dot'></div>
<span>流动人口</span>
</div> </div>
<Weather /> <Weather />
<div onClick={() => { dispatch(push('/homepage')) }} className='_exit' >返回平台</div> <div onClick={() => { dispatch(push('/homepage')) }} className='_exit' >返回平台</div>

7
super-screen/client/src/sections/fire-control/components/alarm-add.js

@ -57,7 +57,12 @@ function FireAddForm(props) {
: '请选择事件地点'}</div> : '请选择事件地点'}</div>
</Form.Item> </Form.Item>
<Form.Item name="type" label="警情类型" rules={[{ required: true, message: '请选择警情类型!' }]}> <Form.Item name="type" label="警情类型" rules={[{ required: true, message: '请选择警情类型!' }]}>
<Select placeholder="请选择警情类型"> <Select
onChange={(s) => {
form.setFieldValue('typeParam', null)
form.setFieldValue('scene', null)
}}
placeholder="请选择警情类型">
{eventType_Data.map(s => <Option value={s}>{s}</Option>)} {eventType_Data.map(s => <Option value={s}>{s}</Option>)}
</Select> </Select>
</Form.Item> </Form.Item>

4
super-screen/client/src/sections/fire-control/constants/index.js

@ -1,7 +1,7 @@
const typeParam_data = { const typeParam_data = {
'火灾扑救': { '火灾扑救': {
name: '着火物质', name: '着火物质',
options: ['固体物质', '液体或可熔物质', '气体', '带电物体和精密仪器等物质', '烹饪器具内的烹饪物',] options: ['固体物质', '液体或可熔物质', '金属', '气体', '带电物体和精密仪器等物质', '烹饪器具内的烹饪物',]
}, },
'救援抢险': { '救援抢险': {
name: '事件类型', name: '事件类型',
@ -10,7 +10,7 @@ const typeParam_data = {
}, },
'自然灾害': { '自然灾害': {
name: '灾害类型', name: '灾害类型',
options: ['水旱', '气象', '地质灾害', '等自然灾害', '森林、草原火灾'] options: ['水旱', '气象', '地质灾害', '森林、草原火灾']
}, },
'灾难事故': { '灾难事故': {
name: '事故类型', name: '事故类型',

5
super-screen/client/src/sections/fire-control/containers/gis.js

@ -300,7 +300,8 @@ function Map (props) {
</div> </div>
</div> </div>
<div className='alarm_confirm'> {
propTab == 'overview' && <div className='alarm_confirm'>
<div className='hande_button' <div className='hande_button'
onClick={() => { onClick={() => {
map.clearInfoWindow(); map.clearInfoWindow();
@ -317,7 +318,7 @@ function Map (props) {
} }
}} }}
>一键护航</div> >一键护航</div>
</div> </div>}
</div>, </div>,
document.getElementById(`alarmcontentid${x.location}`)); document.getElementById(`alarmcontentid${x.location}`));
} }

4
super-screen/client/src/sections/fire-control/containers/homePage.js

@ -53,9 +53,7 @@ function homePage (props) {
<div className='homepage'> <div className='homepage'>
<div className='_title'> <div className='_title'>
<div className='_title_text'> <div className='_title_text'>
<span>智慧消防</span> <span>消防一键护航</span>
<div className='_title_dot'></div>
<span>一键护航</span>
</div> </div>
<Weather /> <Weather />
<div onClick={() => { dispatch(push('/homepage')) }} className='_exit' >返回平台</div> <div onClick={() => { dispatch(push('/homepage')) }} className='_exit' >返回平台</div>

2
super-screen/client/src/sections/water-prevention/containers/homePage.js

@ -176,7 +176,7 @@ function homePage(props) {
<div className='homepage'> <div className='homepage'>
<div className='_title'> <div className='_title'>
<div className='water_title_text'> <div className='water_title_text'>
水务防汛实时监测预警系统 防汛提前知
</div> </div>
<Weather /> <Weather />
<div onClick={() => { dispatch(push('/homepage')) }} className='_exit' >返回平台</div> <div onClick={() => { dispatch(push('/homepage')) }} className='_exit' >返回平台</div>

Loading…
Cancel
Save