|
|
@ -3,12 +3,17 @@ import { Box, AutoRollComponent } from '$components'; |
|
|
|
import moment from 'moment' |
|
|
|
import { getName, getPhone } from '$utils'; |
|
|
|
import TimeComponent from './time'; |
|
|
|
import { typeParam_data } from '../constants/index' |
|
|
|
import './style.less' |
|
|
|
function BasicInfo(props) { |
|
|
|
const { info: { |
|
|
|
alarmInfo, |
|
|
|
rescueInfo |
|
|
|
} } = props; |
|
|
|
const { info: { alarmInfo, rescueInfo } } = props; |
|
|
|
|
|
|
|
const getContent = () => { |
|
|
|
return <div style={{ color: "#8FCBFF", marginTop: 9, paddingTop: 10 }}> |
|
|
|
{alarmInfo?.routes?.steps?.map((s, index) => (index + 1) + '.' + s?.instruction).map(x => { |
|
|
|
return <div style={{ marginBottom: 10 }}>{x}</div> |
|
|
|
})}</div> |
|
|
|
} |
|
|
|
|
|
|
|
let name = '', phone = '' |
|
|
|
if (rescueInfo?.leaderContactPhone) { |
|
|
@ -27,18 +32,35 @@ function BasicInfo(props) { |
|
|
|
<div className='left_second_bg'> |
|
|
|
<div className='_second_item1'> |
|
|
|
<div className='_title'>负责人</div> |
|
|
|
<div className='_content'>{getName(name)}</div> |
|
|
|
<div className='_content' style={{ marginBottom: 9 }}>{getName(name)}</div> |
|
|
|
<div className='_title'>事件时间</div> |
|
|
|
<div className='_content'>{moment(alarmInfo?.createTime).format('YYYY-MM-DD HH:mm:ss')}</div> |
|
|
|
</div> |
|
|
|
<div className='_second_item2'> |
|
|
|
<div className='_title'>联系方式</div> |
|
|
|
<div className='_content' style={{ marginBottom: 9 }}>{getPhone(phone)}</div> |
|
|
|
<div className='_title' >危险等级</div> |
|
|
|
<div className='_content'>{alarmInfo?.level}</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div className='left_third_bg'> |
|
|
|
<div className='left_item_left1' /> |
|
|
|
<div className='left_item_right1'> |
|
|
|
<div className='flex-row '><span style={{ marginRight: 30 }}>警情类型</span><span>案件时间</span></div> |
|
|
|
<div className='flex-row ' style={{ color: "#8FCBFF", marginTop: 9 }}><span style={{ marginRight: 30 }}>{alarmInfo?.type}</span><span>{moment(alarmInfo?.createTime).format('YYYY-MM-DD HH:mm:ss')}</span></div> |
|
|
|
<div className='flex-row'> |
|
|
|
<div style={{ marginRight: 17 }}>警情类型</div> |
|
|
|
<div style={{ color: "#8FCBFF" }}>{alarmInfo?.type}</div> |
|
|
|
</div> |
|
|
|
{alarmInfo?.typeParam && <div className='flex-row' style={{ marginTop: 12, marginBottom: 12 }}> |
|
|
|
<div style={{ marginRight: 17 }}>{typeParam_data[alarmInfo?.type]?.name}</div> |
|
|
|
<div style={{ color: "#8FCBFF" }}>{alarmInfo?.typeParam}</div> |
|
|
|
</div>} |
|
|
|
{ |
|
|
|
alarmInfo?.type == '火灾扑救' && <div className='flex-row'> |
|
|
|
<div style={{ marginRight: 17 }}>着火场所</div> |
|
|
|
<div style={{ color: "#8FCBFF" }}>{alarmInfo?.scene}</div> |
|
|
|
</div> |
|
|
|
} |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
@ -54,11 +76,13 @@ function BasicInfo(props) { |
|
|
|
<div className='left_item_left3' /> |
|
|
|
<div className='left_item_right1' style={{ textAlign: 'left' }}> |
|
|
|
<div><span style={{ marginRight: 30, marginBottom: 15 }}>路线规划</span></div> |
|
|
|
<AutoRollComponent key={alarmInfo?.id} canScroll={alarmInfo?.routes?.steps?.length > 3} |
|
|
|
content={<div style={{ color: "#8FCBFF", marginTop: 9, paddingTop: 10 }}>{alarmInfo?.routes?.steps?.map((s, index) => (index + 1) + '.' + s?.instruction).map(x => { |
|
|
|
return <div style={{ marginBottom: 10 }}>{x}</div> |
|
|
|
})}</div>} |
|
|
|
divHeight={100} divId={`fire-left-bottom${alarmInfo?.id}`} /> |
|
|
|
<AutoRollComponent |
|
|
|
key={alarmInfo?.id} |
|
|
|
canScroll={alarmInfo?.routes?.steps?.length > 3} |
|
|
|
content={getContent()} |
|
|
|
divHeight={100} |
|
|
|
divId={`fire-left-bottom${alarmInfo?.id}`} |
|
|
|
/> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|