|
|
@ -1,6 +1,7 @@ |
|
|
|
import React, { useEffect, useState } from 'react' |
|
|
|
import { Box, AutoRollComponent } from '$components'; |
|
|
|
import { Tooltip } from 'antd'; |
|
|
|
import moment from 'moment'; |
|
|
|
import './style.less'; |
|
|
|
|
|
|
|
function CitySafty(props) { |
|
|
@ -12,7 +13,7 @@ function CitySafty(props) { |
|
|
|
<div className={`_rank_item1`}> |
|
|
|
<Tooltip placement="topLeft" title={s.name}>{s.name}</Tooltip> |
|
|
|
</div> |
|
|
|
<div className='_rank_item2'>{s.currentTime}</div> |
|
|
|
<div className='_rank_item2'>{s.currentTime ? moment(s.currentTime).format('HH:mm:ss') : '--'}</div> |
|
|
|
<div className='_rank_item3'>{s.waterLevel}{s.waterLevel && <div className={s.waterLevel - s.lastWaterLevel > 0 ? '_upicon' : '_downicon'} />}</div> |
|
|
|
<div className='_rank_item4'> |
|
|
|
<div className={s.futureState === '正常' ? 'normalbg' : 'warningbg'} > |
|
|
@ -24,7 +25,16 @@ function CitySafty(props) { |
|
|
|
</div> |
|
|
|
|
|
|
|
} |
|
|
|
return <Box title={"水位趋势预测图"} > |
|
|
|
const renderDate = () => { |
|
|
|
let renderTime = '' |
|
|
|
const time = trendData?.find(t => t.currentTime)?.currentTime |
|
|
|
if (time) { |
|
|
|
renderTime = moment(time).format('YYYY-MM-DD') |
|
|
|
} |
|
|
|
return <div>{renderTime}</div> |
|
|
|
} |
|
|
|
|
|
|
|
return <Box title={"水位趋势预测图"} subtitleSelect={renderDate()} > |
|
|
|
<div className='water_traffic_ranking'> |
|
|
|
<div className='_rank_title'> |
|
|
|
<div className='_rank_item1'>点位名称</div> |
|
|
|