2022-03-18 19:40:52 +05:00
|
|
|
import { memo, useMemo } from 'react'
|
2021-08-27 14:21:48 +05:00
|
|
|
import {
|
|
|
|
FolderOutlined,
|
|
|
|
FundViewOutlined,
|
|
|
|
FilePdfOutlined,
|
2021-09-01 15:55:23 +05:00
|
|
|
ExperimentOutlined,
|
2022-02-14 17:47:03 +05:00
|
|
|
DeploymentUnitOutlined,
|
2021-12-20 12:44:07 +05:00
|
|
|
} from '@ant-design/icons'
|
2022-04-19 12:51:30 +05:00
|
|
|
import { Layout } from 'antd'
|
2022-02-07 14:58:38 +05:00
|
|
|
import { Switch, useParams } from 'react-router-dom'
|
2022-01-25 02:00:07 +05:00
|
|
|
|
2022-04-19 12:51:30 +05:00
|
|
|
import { PrivateRoute, PrivateDefaultRoute, PrivateMenu } from '@components/Private'
|
2022-01-25 02:00:07 +05:00
|
|
|
|
2021-12-20 12:44:07 +05:00
|
|
|
import Report from './Report'
|
|
|
|
import Measure from './Measure'
|
2022-03-13 22:11:58 +05:00
|
|
|
import Analytics from './Analytics'
|
2022-01-25 02:00:07 +05:00
|
|
|
import Documents from './Documents'
|
2022-03-28 16:15:43 +05:00
|
|
|
import Telemetry from './Telemetry'
|
2021-12-20 12:44:07 +05:00
|
|
|
import WellOperations from './WellOperations'
|
2022-01-25 02:00:07 +05:00
|
|
|
import DrillingProgram from './DrillingProgram'
|
2021-12-20 12:44:07 +05:00
|
|
|
import TelemetryAnalysis from './TelemetryAnalysis'
|
2021-04-16 15:50:01 +05:00
|
|
|
|
2022-03-10 20:46:02 +05:00
|
|
|
import '@styles/index.css'
|
|
|
|
|
2021-12-20 12:44:07 +05:00
|
|
|
const { Content } = Layout
|
2021-04-16 15:50:01 +05:00
|
|
|
|
2022-02-07 14:58:38 +05:00
|
|
|
export const Well = memo(() => {
|
2021-12-20 12:44:07 +05:00
|
|
|
const { idWell, tab } = useParams()
|
2022-03-18 19:40:52 +05:00
|
|
|
const rootPath = useMemo(() => `/well/${idWell}`, [idWell])
|
2021-05-25 12:02:39 +05:00
|
|
|
|
2021-12-20 12:44:07 +05:00
|
|
|
return (
|
|
|
|
<Layout>
|
2022-04-19 12:51:30 +05:00
|
|
|
<PrivateMenu root={rootPath} mode={'horizontal'} selectable={true} selectedKeys={[tab]} className={'well_menu'}>
|
|
|
|
<PrivateMenu.Link key={'telemetry'} icon={<FundViewOutlined />} title={'Телеметрия'}/>
|
|
|
|
<PrivateMenu.Link key={'report'} icon={<FilePdfOutlined />} title={'Рапорт'} />
|
|
|
|
<PrivateMenu.Link key={'analytics'} icon={<DeploymentUnitOutlined />} title={'Аналитика'} />
|
|
|
|
<PrivateMenu.Link key={'operations'} icon={<FolderOutlined />} title={'Операции по скважине'} />
|
|
|
|
{/* <PrivateMenu.Link key={'telemetryAnalysis'} icon={<FundProjectionScreenOutlined />} title={'Операции по телеметрии'} /> */}
|
|
|
|
<PrivateMenu.Link key={'document'} icon={<FolderOutlined />} title={'Документы'} />
|
|
|
|
<PrivateMenu.Link key={'measure'} icon={<ExperimentOutlined />} title={'Измерения'} />
|
|
|
|
<PrivateMenu.Link key={'drillingProgram'} icon={<FolderOutlined />} title={'Программа бурения'} />
|
|
|
|
</PrivateMenu>
|
2021-05-25 12:02:39 +05:00
|
|
|
|
2021-12-20 12:44:07 +05:00
|
|
|
<Layout>
|
|
|
|
<Content className={'site-layout-background'}>
|
|
|
|
<Switch>
|
2022-03-28 16:15:43 +05:00
|
|
|
<PrivateRoute path={`${rootPath}/telemetry/:tab?`}>
|
|
|
|
<Telemetry idWell={idWell} />
|
2022-02-07 14:58:38 +05:00
|
|
|
</PrivateRoute>
|
|
|
|
<PrivateRoute path={`${rootPath}/report`}>
|
2021-12-20 12:44:07 +05:00
|
|
|
<Report idWell={idWell} />
|
2022-02-07 14:58:38 +05:00
|
|
|
</PrivateRoute>
|
2022-03-13 22:11:58 +05:00
|
|
|
<PrivateRoute path={`${rootPath}/analytics/:tab?`}>
|
|
|
|
<Analytics idWell={idWell} rootPath={`${rootPath}/analytics`}/>
|
2022-02-14 17:47:03 +05:00
|
|
|
</PrivateRoute>
|
2022-02-07 14:58:38 +05:00
|
|
|
<PrivateRoute path={`${rootPath}/operations/:tab?`}>
|
2021-12-20 12:44:07 +05:00
|
|
|
<WellOperations idWell={idWell} />
|
2022-02-07 14:58:38 +05:00
|
|
|
</PrivateRoute>
|
2022-02-07 15:18:19 +05:00
|
|
|
<PrivateRoute path={`${rootPath}/telemetryAnalysis/:tab?`}>
|
2021-12-20 12:44:07 +05:00
|
|
|
<TelemetryAnalysis idWell={idWell} />
|
2022-02-07 14:58:38 +05:00
|
|
|
</PrivateRoute>
|
2022-02-07 15:18:19 +05:00
|
|
|
<PrivateRoute path={`${rootPath}/document/:category?`}>
|
2021-12-20 12:44:07 +05:00
|
|
|
<Documents idWell={idWell} />
|
2022-02-07 14:58:38 +05:00
|
|
|
</PrivateRoute>
|
|
|
|
<PrivateRoute path={`${rootPath}/measure`}>
|
2021-12-20 12:44:07 +05:00
|
|
|
<Measure idWell={idWell}/>
|
2022-02-07 14:58:38 +05:00
|
|
|
</PrivateRoute>
|
|
|
|
<PrivateRoute path={`${rootPath}/drillingProgram`}>
|
2021-12-20 12:44:07 +05:00
|
|
|
<DrillingProgram idWell={idWell}/>
|
2022-02-07 14:58:38 +05:00
|
|
|
</PrivateRoute>
|
|
|
|
<PrivateDefaultRoute urls={[
|
|
|
|
`${rootPath}/telemetry`,
|
|
|
|
`${rootPath}/report`,
|
2022-03-13 22:11:58 +05:00
|
|
|
`${rootPath}/analytics`,
|
2022-02-07 14:58:38 +05:00
|
|
|
`${rootPath}/operations`,
|
|
|
|
`${rootPath}/telemetryAnalysis`,
|
|
|
|
`${rootPath}/document`,
|
|
|
|
`${rootPath}/measure`,
|
|
|
|
`${rootPath}/drillingProgram`,
|
|
|
|
]}/>
|
2021-12-20 12:44:07 +05:00
|
|
|
</Switch>
|
|
|
|
</Content>
|
2021-05-25 12:02:39 +05:00
|
|
|
</Layout>
|
2021-12-20 12:44:07 +05:00
|
|
|
</Layout>
|
|
|
|
)
|
2022-02-07 14:58:38 +05:00
|
|
|
})
|
2022-01-25 02:00:07 +05:00
|
|
|
|
|
|
|
export default Well
|