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