forked from ddrilling/asb_cloud_front
Экспорты TVD перенесены справа от крошек
This commit is contained in:
parent
c3d53284bd
commit
2072ac2072
@ -4,7 +4,7 @@ import { Switch, Segmented } from 'antd'
|
||||
import { Link } from 'react-router-dom'
|
||||
import * as d3 from 'd3'
|
||||
|
||||
import { useWell } from '@asb/context'
|
||||
import { useTopRightBlock, useWell } from '@asb/context'
|
||||
import { D3Chart } from '@components/d3'
|
||||
import LoaderPortal from '@components/LoaderPortal'
|
||||
import { invokeWebApiWrapperAsync } from '@components/factory'
|
||||
@ -170,6 +170,8 @@ const Tvd = memo(({ well: givenWell, title, ...other }) => {
|
||||
const [pointsEnabled, setPointsEnabled] = useState(true)
|
||||
const [selectedTab, setSelectedTab] = useState('Скрыть')
|
||||
|
||||
const setTopRightBlock = useTopRightBlock()
|
||||
|
||||
const [wellContext] = useWell()
|
||||
const well = useMemo(() => givenWell ?? wellContext, [givenWell, wellContext])
|
||||
|
||||
@ -227,11 +229,22 @@ const Tvd = memo(({ well: givenWell, title, ...other }) => {
|
||||
)
|
||||
}, [well])
|
||||
|
||||
useEffect(() => {
|
||||
setTopRightBlock(
|
||||
<div style={{ display: 'flex', gap: 15 }}>
|
||||
<StatExport well={well} />
|
||||
<NetGraphExport well={well} />
|
||||
</div>
|
||||
)
|
||||
}, [well, setTopRightBlock])
|
||||
|
||||
return (
|
||||
<div className={'container tvd-page'} {...other}>
|
||||
<div className={'tvd-top'}>
|
||||
<div className={'tvd-inputs'}>
|
||||
<h2>{title || 'График Глубина-день'}</h2>
|
||||
</div>
|
||||
<div className={'tvd-inputs'}>
|
||||
<Item label={'Ось времени'} style={{ marginLeft: 50 }}>
|
||||
<Segmented
|
||||
options={[
|
||||
@ -250,10 +263,6 @@ const Tvd = memo(({ well: givenWell, title, ...other }) => {
|
||||
title={'Нажмите для переключения видимости засечек на графиках'}
|
||||
/>
|
||||
</Item>
|
||||
</div>
|
||||
<div className={'tvd-inputs'}>
|
||||
<StatExport well={well} />
|
||||
<NetGraphExport well={well} />
|
||||
<Segmented
|
||||
options={['НПВ', 'ЕСО', 'Статистика', 'Скрыть']}
|
||||
value={selectedTab}
|
||||
|
Loading…
Reference in New Issue
Block a user