2022-02-07 14:58:38 +05:00
|
|
|
import { memo } from 'react'
|
2021-08-27 14:21:48 +05:00
|
|
|
import {
|
|
|
|
FolderOutlined,
|
|
|
|
FundViewOutlined,
|
|
|
|
AlertOutlined,
|
|
|
|
FilePdfOutlined,
|
|
|
|
DatabaseOutlined,
|
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-02-07 14:58:38 +05:00
|
|
|
import { Layout, Menu } from 'antd'
|
|
|
|
import { Switch, useParams } from 'react-router-dom'
|
2022-01-25 02:00:07 +05:00
|
|
|
|
2022-02-07 14:58:38 +05:00
|
|
|
import { PrivateRoute, PrivateDefaultRoute, PrivateMenuItem } from '@components/Private'
|
2022-01-25 02:00:07 +05:00
|
|
|
|
2021-12-20 12:44:07 +05:00
|
|
|
import Report from './Report'
|
|
|
|
import Archive from './Archive'
|
|
|
|
import Measure from './Measure'
|
2022-01-25 02:00:07 +05:00
|
|
|
import Messages from './Messages'
|
2022-03-13 22:11:58 +05:00
|
|
|
import Analytics from './Analytics'
|
2022-01-25 02:00:07 +05:00
|
|
|
import Documents from './Documents'
|
|
|
|
import TelemetryView from './TelemetryView'
|
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()
|
|
|
|
const rootPath = `/well/${idWell}`
|
2021-05-25 12:02:39 +05:00
|
|
|
|
2021-12-20 12:44:07 +05:00
|
|
|
return (
|
|
|
|
<Layout>
|
2022-02-07 14:58:38 +05:00
|
|
|
<Menu mode={'horizontal'} selectable={true} selectedKeys={[tab]} className={'well_menu'}>
|
|
|
|
<PrivateMenuItem.Link root={rootPath} key={'telemetry'} path={'telemetry'} icon={<FundViewOutlined />} title={'Мониторинг'}/>
|
|
|
|
<PrivateMenuItem.Link root={rootPath} key={'message'} path={'message'} icon={<AlertOutlined/>} title={'Сообщения'} />
|
|
|
|
<PrivateMenuItem.Link root={rootPath} key={'report'} path={'report'} icon={<FilePdfOutlined />} title={'Рапорт'} />
|
2022-03-13 22:11:58 +05:00
|
|
|
<PrivateMenuItem.Link root={rootPath} key={'analytics'} path={'analytics'} icon={<DeploymentUnitOutlined />} title={'Аналитика'} />
|
2022-02-08 16:40:22 +05:00
|
|
|
<PrivateMenuItem.Link root={rootPath} key={'operations'} path={'operations'} icon={<FolderOutlined />} title={'Операции по скважине'} />
|
2022-02-07 14:58:38 +05:00
|
|
|
<PrivateMenuItem.Link root={rootPath} key={'archive'} path={'archive'} icon={<DatabaseOutlined />} title={'Архив'} />
|
2022-02-08 16:40:22 +05:00
|
|
|
{/* <PrivateMenuItem.Link root={rootPath} key={'telemetryAnalysis'} path={'telemetryAnalysis'} icon={<FundProjectionScreenOutlined />} title={'Операции по телеметрии'} /> */}
|
2022-02-07 14:58:38 +05:00
|
|
|
<PrivateMenuItem.Link root={rootPath} key={'document'} path={'document'} icon={<FolderOutlined />} title={'Документы'} />
|
|
|
|
<PrivateMenuItem.Link root={rootPath} key={'measure'} path={'measure'} icon={<ExperimentOutlined />} title={'Измерения'} />
|
|
|
|
<PrivateMenuItem.Link root={rootPath} key={'drillingProgram'} path={'drillingProgram'} icon={<FolderOutlined />} title={'Программа бурения'} />
|
2021-12-20 12:44:07 +05:00
|
|
|
</Menu>
|
2021-05-25 12:02:39 +05:00
|
|
|
|
2021-12-20 12:44:07 +05:00
|
|
|
<Layout>
|
|
|
|
<Content className={'site-layout-background'}>
|
|
|
|
<Switch>
|
2022-02-07 14:58:38 +05:00
|
|
|
<PrivateRoute path={`${rootPath}/telemetry`}>
|
2021-12-20 12:44:07 +05:00
|
|
|
<TelemetryView idWell={idWell} />
|
2022-02-07 14:58:38 +05:00
|
|
|
</PrivateRoute>
|
|
|
|
<PrivateRoute path={`${rootPath}/message`}>
|
2021-12-20 12:44:07 +05:00
|
|
|
<Messages 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>
|
|
|
|
<PrivateRoute path={`${rootPath}/archive`}>
|
2021-12-20 12:44:07 +05:00
|
|
|
<Archive 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}/message`,
|
|
|
|
`${rootPath}/report`,
|
2022-03-13 22:11:58 +05:00
|
|
|
`${rootPath}/analytics`,
|
2022-02-07 14:58:38 +05:00
|
|
|
`${rootPath}/operations`,
|
|
|
|
`${rootPath}/archive`,
|
|
|
|
`${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
|