2021-08-17 10:46:28 +05:00
|
|
|
import { Layout, Menu } from "antd";
|
2021-08-27 14:21:48 +05:00
|
|
|
import {
|
|
|
|
FolderOutlined,
|
|
|
|
FundViewOutlined,
|
|
|
|
AlertOutlined,
|
|
|
|
FilePdfOutlined,
|
|
|
|
DatabaseOutlined,
|
|
|
|
} from "@ant-design/icons";
|
2021-08-17 10:46:28 +05:00
|
|
|
import { Link, Redirect, Route, Switch, useParams } from "react-router-dom";
|
2021-08-13 11:37:54 +05:00
|
|
|
import TelemetryView from "./TelemetryView";
|
2021-08-18 18:01:46 +05:00
|
|
|
import Messages from "./Messages";
|
2021-08-17 17:42:42 +05:00
|
|
|
import Report from "./Report";
|
2021-08-18 18:01:46 +05:00
|
|
|
import Archive from "./Archive";
|
|
|
|
import Documents from "./Documents";
|
2021-08-28 22:32:13 +05:00
|
|
|
import Measure from "./Measure";
|
2021-08-17 10:46:28 +05:00
|
|
|
import { makeMenuItems } from "./Documents/menuItems";
|
2021-08-18 18:01:46 +05:00
|
|
|
import WellOperations from "./WellOperations";
|
2021-08-29 17:32:31 +05:00
|
|
|
import DrillingProgram from "./DrillingProgram";
|
2021-04-16 15:50:01 +05:00
|
|
|
|
2021-08-17 10:46:28 +05:00
|
|
|
const { Content } = Layout;
|
2021-04-16 15:50:01 +05:00
|
|
|
|
2021-05-25 12:02:39 +05:00
|
|
|
export default function Well() {
|
2021-08-27 14:21:48 +05:00
|
|
|
let { idWell, tab } = useParams();
|
2021-08-17 10:46:28 +05:00
|
|
|
const rootPath = `/well/${idWell}`;
|
2021-05-25 12:02:39 +05:00
|
|
|
|
2021-08-17 10:46:28 +05:00
|
|
|
const { SubMenu } = Menu;
|
2021-07-22 14:53:30 +05:00
|
|
|
|
2021-08-17 10:46:28 +05:00
|
|
|
return (
|
|
|
|
<>
|
|
|
|
<Layout>
|
2021-08-27 14:21:48 +05:00
|
|
|
<Menu
|
|
|
|
mode="horizontal"
|
|
|
|
selectable={true}
|
|
|
|
selectedKeys={[tab]}
|
|
|
|
className="well_menu"
|
|
|
|
>
|
|
|
|
<Menu.Item key="telemetry" icon={<FundViewOutlined />}>
|
2021-08-18 18:01:46 +05:00
|
|
|
<Link to={`${rootPath}/telemetry`}>Мониторинг</Link>
|
2021-08-17 10:46:28 +05:00
|
|
|
</Menu.Item>
|
2021-08-27 14:21:48 +05:00
|
|
|
<Menu.Item key="message" icon={<AlertOutlined />}>
|
2021-08-18 18:01:46 +05:00
|
|
|
<Link to={`${rootPath}/message`}>Сообщения</Link>
|
2021-08-17 10:46:28 +05:00
|
|
|
</Menu.Item>
|
2021-08-27 14:21:48 +05:00
|
|
|
<Menu.Item key="report" icon={<FilePdfOutlined />}>
|
2021-08-18 18:01:46 +05:00
|
|
|
<Link to={`${rootPath}/report`}>Рапорт</Link>
|
2021-08-17 10:46:28 +05:00
|
|
|
</Menu.Item>
|
2021-08-27 14:21:48 +05:00
|
|
|
<Menu.Item key="operations" icon={<FolderOutlined />}>
|
|
|
|
<Link to={`${rootPath}/operations/plan`}>Операции по скважине</Link>
|
2021-08-17 10:46:28 +05:00
|
|
|
</Menu.Item>
|
2021-08-27 14:21:48 +05:00
|
|
|
<Menu.Item key="archive" icon={<DatabaseOutlined />}>
|
2021-08-18 18:01:46 +05:00
|
|
|
<Link to={`${rootPath}/archive`}>Архив</Link>
|
2021-08-17 10:46:28 +05:00
|
|
|
</Menu.Item>
|
|
|
|
<SubMenu
|
2021-08-27 14:21:48 +05:00
|
|
|
key="document"
|
2021-08-17 10:46:28 +05:00
|
|
|
title={
|
|
|
|
<Link
|
2021-08-27 14:21:48 +05:00
|
|
|
to={`${rootPath}/document/fluidService`}
|
|
|
|
className="linkDocuments"
|
|
|
|
>
|
2021-08-17 10:46:28 +05:00
|
|
|
Документы
|
|
|
|
</Link>
|
|
|
|
}
|
|
|
|
icon={<FolderOutlined />}
|
2021-07-22 14:53:30 +05:00
|
|
|
selectable={true}
|
|
|
|
>
|
2021-08-17 16:46:46 +05:00
|
|
|
{makeMenuItems(rootPath)}
|
2021-07-22 14:53:30 +05:00
|
|
|
</SubMenu>
|
2021-08-28 22:32:13 +05:00
|
|
|
<Menu.Item key="measure" icon={<FolderOutlined />}>
|
|
|
|
<Link to={`${rootPath}/measure`}>Измерения</Link>
|
2021-08-17 10:46:28 +05:00
|
|
|
</Menu.Item>
|
2021-08-29 17:32:31 +05:00
|
|
|
<Menu.Item key="drillingProgram" icon={<FolderOutlined />}>
|
|
|
|
<Link to={`${rootPath}/drillingProgram`}>Программа бурения</Link>
|
|
|
|
</Menu.Item>
|
2021-08-17 10:46:28 +05:00
|
|
|
</Menu>
|
2021-05-25 12:02:39 +05:00
|
|
|
|
2021-08-17 10:46:28 +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>
|
2021-08-18 18:01:46 +05:00
|
|
|
<Route path="/well/:idWell/operations/:tab">
|
|
|
|
<WellOperations idWell={idWell} />
|
2021-08-17 10:46:28 +05:00
|
|
|
</Route>
|
|
|
|
<Route path="/well/:idWell/archive">
|
|
|
|
<Archive idWell={idWell} />
|
|
|
|
</Route>
|
|
|
|
<Route path="/well/:idWell/document/:category">
|
|
|
|
<Documents idWell={idWell} />
|
|
|
|
</Route>
|
2021-08-28 22:32:13 +05:00
|
|
|
<Route path="/well/:id/measure">
|
|
|
|
<Measure idWell={idWell}/>
|
2021-08-17 10:46:28 +05:00
|
|
|
</Route>
|
2021-08-29 17:32:31 +05:00
|
|
|
<Route path="/well/:id/drillingProgram">
|
|
|
|
<DrillingProgram idWell={idWell}/>
|
|
|
|
</Route>
|
2021-08-17 10:46:28 +05:00
|
|
|
<Route path="/">
|
2021-08-18 18:01:46 +05:00
|
|
|
<Redirect to={`${rootPath}/telemetry`} />
|
2021-08-17 10:46:28 +05:00
|
|
|
</Route>
|
|
|
|
</Switch>
|
|
|
|
</Content>
|
|
|
|
</Layout>
|
2021-05-25 12:02:39 +05:00
|
|
|
</Layout>
|
2021-08-17 10:46:28 +05:00
|
|
|
</>
|
|
|
|
);
|
2021-05-25 12:02:39 +05:00
|
|
|
}
|