Browse Source

(*)消防一键护航 显示完善

master
peng.peng 1 year ago
parent
commit
1f47a9a2cd
  1. 8
      super-screen/client/src/sections/fire-control/components/item-left.js
  2. 5
      super-screen/client/src/sections/fire-control/containers/homePage.js

8
super-screen/client/src/sections/fire-control/components/item-left.js

@ -6,11 +6,11 @@ import TimeComponent, { formatSeconds } from './time';
import { typeParam_data } from '../constants/index'
import './style.less'
function BasicInfo(props) {
const { info: { alarmInfo, rescueInfo } } = props;
const { info: { alarmInfo, rescueInfo }, routes: { routes } } = props;
const getContent = () => {
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>
})}</div>
}
@ -75,10 +75,10 @@ function BasicInfo(props) {
<div className='left_third_bg' style={{ height: 160, paddingTop: 20 }}>
<div className='left_item_left3' />
<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
key={alarmInfo?.id}
canScroll={alarmInfo?.routes?.steps?.length > 3}
canScroll={routes?.steps?.length > 3}
content={getContent()}
divHeight={100}
divId={`fire-left-bottom${alarmInfo?.id}`}

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

@ -24,6 +24,7 @@ function homePage(props) {
const [tab, setTab] = useState('overview')
const [emengencyTab, setEmengencyTab] = useState('xfyjwz');
const [alarmInfo, setAlarmInfo] = useState({})
const [routes, setRoutes] = useState({})
const [longitudeLatitude, setLongitudeLatitude] = useState({})
const [fireDevice, setFireDevice] = useState([])
@ -83,6 +84,7 @@ function homePage(props) {
:
<div className='child' style={{ height: '100%' }} >
<Left
routes={routes}
info={alarmInfo}
endEvent={() => { endEvent() }}
cardContentHeight={document.body.clientHeight * 0.896} />
@ -104,6 +106,9 @@ function homePage(props) {
changeEmengencyTab={(e) => {
setEmengencyTab(e)
}}
routeCallback={(e) => {
setRoutes(e);
}}
/>
</div>
<div className='homepage-left homepage-left-right'>

Loading…
Cancel
Save