2021-12-20 12:44:07 +05:00
|
|
|
import { Layout, Menu } from 'antd'
|
2021-08-27 14:21:48 +05:00
|
|
|
import {
|
|
|
|
FolderOutlined,
|
|
|
|
FundViewOutlined,
|
|
|
|
AlertOutlined,
|
|
|
|
FilePdfOutlined,
|
|
|
|
DatabaseOutlined,
|
2021-09-01 15:55:23 +05:00
|
|
|
ExperimentOutlined,
|
2021-12-20 12:44:07 +05:00
|
|
|
FundProjectionScreenOutlined,
|
|
|
|
} from '@ant-design/icons'
|
|
|
|
import { Link, Redirect, Route, Switch, useParams } from 'react-router-dom'
|
2022-01-25 02:00:07 +05:00
|
|
|
|
|
|
|
import { PrivateMenuItem } from '@components/Private'
|
|
|
|
|
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'
|
|
|
|
import Documents from './Documents'
|
|
|
|
import TelemetryView from './TelemetryView'
|
|
|
|
import { makeMenuItems } from './Documents'
|
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
|
|
|
|
2021-12-20 12:44:07 +05:00
|
|
|
const { Content } = Layout
|
2022-01-25 02:00:07 +05:00
|
|
|
const { SubMenu } = Menu
|
2021-04-16 15:50:01 +05:00
|
|
|
|
2022-01-25 02:00:07 +05:00
|
|
|
export const Well = () => {
|
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>
|
|
|
|
<Menu
|
|
|
|
mode={'horizontal'}
|
|
|
|
selectable={true}
|
|
|
|
selectedKeys={[tab]}
|
|
|
|
className={'well_menu'}
|
|
|
|
>
|
|
|
|
<PrivateMenuItem key={'telemetry'} icon={<FundViewOutlined />}>
|
|
|
|
<Link to={`${rootPath}/telemetry`}>Мониторинг</Link>
|
|
|
|
</PrivateMenuItem>
|
|
|
|
<PrivateMenuItem key={'message'} icon={<AlertOutlined/>}>
|
|
|
|
<Link to={`${rootPath}/message`}>Сообщения</Link>
|
|
|
|
</PrivateMenuItem>
|
|
|
|
<PrivateMenuItem key={'report'} icon={<FilePdfOutlined />}>
|
|
|
|
<Link to={`${rootPath}/report`}>Рапорт</Link>
|
|
|
|
</PrivateMenuItem>
|
|
|
|
<PrivateMenuItem key={'operations'} icon={<FolderOutlined />}>
|
|
|
|
<Link to={`${rootPath}/operations`}>Операции по скважине</Link>
|
|
|
|
</PrivateMenuItem>
|
|
|
|
<PrivateMenuItem key={'archive'} icon={<DatabaseOutlined />}>
|
|
|
|
<Link to={`${rootPath}/archive`}>Архив</Link>
|
|
|
|
</PrivateMenuItem>
|
|
|
|
<PrivateMenuItem key={'telemetryAnalysis'} icon={<FundProjectionScreenOutlined />} roles={'admin'}>
|
|
|
|
<Link to={`${rootPath}/telemetryAnalysis/depthToDay`}>Операции по телеметрии</Link>
|
|
|
|
</PrivateMenuItem>
|
|
|
|
<SubMenu
|
|
|
|
key={'document'}
|
|
|
|
title={
|
|
|
|
<Link to={`${rootPath}/document/fluidService`} className={'linkDocuments'}>
|
|
|
|
Документы
|
|
|
|
</Link>
|
|
|
|
}
|
|
|
|
icon={<FolderOutlined />}
|
2021-08-27 14:21:48 +05:00
|
|
|
selectable={true}
|
|
|
|
>
|
2021-12-28 14:44:15 +05:00
|
|
|
{makeMenuItems(`${rootPath}/document`)}
|
2021-12-20 12:44:07 +05:00
|
|
|
</SubMenu>
|
|
|
|
<PrivateMenuItem key={'measure'} icon={<ExperimentOutlined />}>
|
|
|
|
<Link to={`${rootPath}/measure`}>Измерения</Link>
|
|
|
|
</PrivateMenuItem>
|
|
|
|
<PrivateMenuItem key={'drillingProgram'} icon={<FolderOutlined />}>
|
|
|
|
<Link to={`${rootPath}/drillingProgram`}>Программа бурения</Link>
|
|
|
|
</PrivateMenuItem>
|
|
|
|
</Menu>
|
2021-05-25 12:02:39 +05:00
|
|
|
|
2021-12-20 12:44:07 +05:00
|
|
|
<Layout>
|
|
|
|
<Content className={'site-layout-background'}>
|
|
|
|
<Switch>
|
|
|
|
<Route path={'/well/:idWell/telemetry'}>
|
|
|
|
<TelemetryView idWell={idWell} />
|
|
|
|
</Route>
|
|
|
|
<Route path={'/well/:idWell/message'}>
|
|
|
|
<Messages idWell={idWell} />
|
|
|
|
</Route>
|
|
|
|
<Route path={'/well/:idWell/report'}>
|
|
|
|
<Report idWell={idWell} />
|
|
|
|
</Route>
|
|
|
|
<Route path={'/well/:idWell/operations/:tab?'}>
|
|
|
|
<WellOperations idWell={idWell} />
|
|
|
|
</Route>
|
|
|
|
<Route path={'/well/:idWell/archive'}>
|
|
|
|
<Archive idWell={idWell} />
|
|
|
|
</Route>
|
|
|
|
<Route path={'/well/:idWell/telemetryAnalysis/:tab'}>
|
|
|
|
<TelemetryAnalysis idWell={idWell} />
|
|
|
|
</Route>
|
|
|
|
<Route path={'/well/:idWell/document/:category'}>
|
|
|
|
<Documents idWell={idWell} />
|
|
|
|
</Route>
|
|
|
|
<Route path={'/well/:id/measure'}>
|
|
|
|
<Measure idWell={idWell}/>
|
|
|
|
</Route>
|
|
|
|
<Route path={'/well/:id/drillingProgram'}>
|
|
|
|
<DrillingProgram idWell={idWell}/>
|
|
|
|
</Route>
|
|
|
|
<Route path={'/'}>
|
|
|
|
<Redirect to={`${rootPath}/telemetry`} />
|
|
|
|
</Route>
|
|
|
|
</Switch>
|
|
|
|
</Content>
|
2021-05-25 12:02:39 +05:00
|
|
|
</Layout>
|
2021-12-20 12:44:07 +05:00
|
|
|
</Layout>
|
|
|
|
)
|
2021-05-25 12:02:39 +05:00
|
|
|
}
|
2022-01-25 02:00:07 +05:00
|
|
|
|
|
|
|
export default Well
|