2021-08-17 10:46:28 +05:00
|
|
|
import { Layout, Menu } from "antd";
|
|
|
|
import { FolderOutlined, FundViewOutlined } from "@ant-design/icons";
|
|
|
|
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";
|
|
|
|
import LastData from './LastData'
|
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-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-17 10:46:28 +05:00
|
|
|
let { idWell } = useParams();
|
|
|
|
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>
|
|
|
|
<Menu mode="horizontal" selectable={true} className="well_menu">
|
|
|
|
<Menu.Item key="1" 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>
|
|
|
|
<Menu.Item key="2" icon={<FolderOutlined />}>
|
2021-08-18 18:01:46 +05:00
|
|
|
<Link to={`${rootPath}/message`}>Сообщения</Link>
|
2021-08-17 10:46:28 +05:00
|
|
|
</Menu.Item>
|
|
|
|
<Menu.Item key="3" icon={<FolderOutlined />}>
|
2021-08-18 18:01:46 +05:00
|
|
|
<Link to={`${rootPath}/report`}>Рапорт</Link>
|
2021-08-17 10:46:28 +05:00
|
|
|
</Menu.Item>
|
|
|
|
<Menu.Item key="5" icon={<FolderOutlined />}>
|
2021-08-18 18:01:46 +05:00
|
|
|
<Link to={`${rootPath}/operations/plan`}>
|
2021-08-17 10:46:28 +05:00
|
|
|
Операции по скважине
|
|
|
|
</Link>
|
|
|
|
</Menu.Item>
|
|
|
|
<Menu.Item key="7" icon={<FolderOutlined />}>
|
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-07-22 14:53:30 +05:00
|
|
|
key="documentsSub"
|
2021-08-17 10:46:28 +05:00
|
|
|
title={
|
|
|
|
<Link
|
2021-08-18 18:01:46 +05:00
|
|
|
to={`${rootPath}/document/fluidService` }
|
2021-08-17 16:46:46 +05:00
|
|
|
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-17 10:46:28 +05:00
|
|
|
<Menu.Item key="9" icon={<FolderOutlined />}>
|
2021-08-18 18:01:46 +05:00
|
|
|
<Link to={`${rootPath}/lastData`}>Последние данные</Link>
|
2021-08-17 10:46:28 +05:00
|
|
|
</Menu.Item>
|
|
|
|
</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>
|
|
|
|
<Route path="/well/:id/lastData">
|
|
|
|
<LastData/>
|
|
|
|
</Route>
|
|
|
|
<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
|
|
|
}
|