|
@ -6,11 +6,11 @@ import TimeComponent, { formatSeconds } from './time'; |
|
|
import { typeParam_data } from '../constants/index' |
|
|
import { typeParam_data } from '../constants/index' |
|
|
import './style.less' |
|
|
import './style.less' |
|
|
function BasicInfo(props) { |
|
|
function BasicInfo(props) { |
|
|
const { info: { alarmInfo, rescueInfo } } = props; |
|
|
const { info: { alarmInfo, rescueInfo }, routes: { routes } } = props; |
|
|
|
|
|
|
|
|
const getContent = () => { |
|
|
const getContent = () => { |
|
|
return <div style={{ color: "#8FCBFF", marginTop: 9, paddingTop: 10 }}> |
|
|
return <div style={{ color: "#8FCBFF", marginTop: 9, paddingTop: 10 }}> |
|
|
{alarmInfo?.routes?.steps?.map((s, index) => (index + 1) + '.' + s?.instruction).map(x => { |
|
|
{routes?.steps?.map((s, index) => (index + 1) + '.' + s?.instruction).map(x => { |
|
|
return <div style={{ marginBottom: 10 }}>{x}</div> |
|
|
return <div style={{ marginBottom: 10 }}>{x}</div> |
|
|
})}</div> |
|
|
})}</div> |
|
|
} |
|
|
} |
|
@ -75,10 +75,10 @@ function BasicInfo(props) { |
|
|
<div className='left_third_bg' style={{ height: 160, paddingTop: 20 }}> |
|
|
<div className='left_third_bg' style={{ height: 160, paddingTop: 20 }}> |
|
|
<div className='left_item_left3' /> |
|
|
<div className='left_item_left3' /> |
|
|
<div className='left_item_right1' style={{ textAlign: 'left' }}> |
|
|
<div className='left_item_right1' style={{ textAlign: 'left' }}> |
|
|
<div><span style={{ marginRight: 30, marginBottom: 15 }}>路线规划 {alarmInfo?.routes?.time && `(${formatSeconds(alarmInfo?.routes?.time, true)})`}</span></div> |
|
|
<div><span style={{ marginRight: 30, marginBottom: 15 }}>路线规划 {routes?.time && `(${formatSeconds(routes?.time, true)})`}</span></div> |
|
|
<AutoRollComponent |
|
|
<AutoRollComponent |
|
|
key={alarmInfo?.id} |
|
|
key={alarmInfo?.id} |
|
|
canScroll={alarmInfo?.routes?.steps?.length > 3} |
|
|
canScroll={routes?.steps?.length > 3} |
|
|
content={getContent()} |
|
|
content={getContent()} |
|
|
divHeight={100} |
|
|
divHeight={100} |
|
|
divId={`fire-left-bottom${alarmInfo?.id}`} |
|
|
divId={`fire-left-bottom${alarmInfo?.id}`} |
|
|