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-05-25 12:02:39 +05:00
|
|
|
import Messages from "../pages/Messages";
|
|
|
|
import Report from "../pages/Report";
|
2021-08-13 11:37:54 +05:00
|
|
|
import Archive from "../pages/Archive";
|
2021-05-25 12:02:39 +05:00
|
|
|
import Analysis from "../pages/Analysis";
|
2021-07-21 16:53:33 +05:00
|
|
|
import WellAnalysis from "../pages/WellAnalysis";
|
2021-08-17 10:46:28 +05:00
|
|
|
import Documents from "../pages/Documents";
|
|
|
|
import LastData from '../pages/LastData'
|
|
|
|
import { makeMenuItems } from "./Documents/menuItems";
|
|
|
|
import WellStat from "./WellStat";
|
|
|
|
import Smbo from "./Smbo";
|
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 />}>
|
|
|
|
<Link to={{ pathname: `${rootPath}/telemetry` }}>Мониторинг</Link>
|
|
|
|
</Menu.Item>
|
|
|
|
<Menu.Item key="2" icon={<FolderOutlined />}>
|
|
|
|
<Link to={{ pathname: `${rootPath}/message` }}>Сообщения</Link>
|
|
|
|
</Menu.Item>
|
|
|
|
<Menu.Item key="3" icon={<FolderOutlined />}>
|
|
|
|
<Link to={{ pathname: `${rootPath}/report` }}>Рапорт</Link>
|
|
|
|
</Menu.Item>
|
|
|
|
<Menu.Item key="4" icon={<FolderOutlined />}>
|
|
|
|
<Link to={{ pathname: `${rootPath}/analysis` }}>Анализ</Link>
|
|
|
|
</Menu.Item>
|
|
|
|
<Menu.Item key="5" icon={<FolderOutlined />}>
|
|
|
|
<Link to={{ pathname: `${rootPath}/wellAnalysis` }}>
|
|
|
|
Операции по скважине
|
|
|
|
</Link>
|
|
|
|
</Menu.Item>
|
|
|
|
<Menu.Item key="6" icon={<FolderOutlined />}>
|
|
|
|
<Link to="stat">Статистика</Link>
|
|
|
|
</Menu.Item>
|
|
|
|
<Menu.Item key="7" icon={<FolderOutlined />}>
|
|
|
|
<Link to={{ pathname: `${rootPath}/archive` }}>Архив</Link>
|
|
|
|
</Menu.Item>
|
|
|
|
<SubMenu
|
2021-07-22 14:53:30 +05:00
|
|
|
key="documentsSub"
|
2021-08-17 10:46:28 +05:00
|
|
|
title={
|
|
|
|
<Link
|
|
|
|
to={{ pathname: `${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="8" icon={<FolderOutlined />}>
|
|
|
|
<Link to={{ pathname: `${rootPath}/smbo` }}>СМБО</Link>
|
|
|
|
</Menu.Item>
|
|
|
|
<Menu.Item key="9" icon={<FolderOutlined />}>
|
|
|
|
<Link to={{ pathname: `${rootPath}/lastData` }}>Последние данные</Link>
|
|
|
|
</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>
|
|
|
|
<Route path="/well/:idWell/analysis">
|
|
|
|
<Analysis idWell={idWell} />
|
|
|
|
</Route>
|
|
|
|
<Route path="/well/:idWell/stat">
|
|
|
|
<WellStat idWell={idWell} />
|
|
|
|
</Route>
|
|
|
|
<Route path="/well/:idWell/wellAnalysis">
|
|
|
|
<WellAnalysis idWell={idWell} />
|
|
|
|
</Route>
|
|
|
|
<Route path="/well/:idWell/archive">
|
|
|
|
<Archive idWell={idWell} />
|
|
|
|
</Route>
|
|
|
|
<Route path="/well/:idWell/document/:category">
|
|
|
|
<Documents idWell={idWell} />
|
|
|
|
</Route>
|
|
|
|
<Route path="/well/:idWell/smbo">
|
|
|
|
<Smbo idWell={idWell} />
|
|
|
|
</Route>
|
|
|
|
<Route path="/well/:id/lastData">
|
|
|
|
<LastData/>
|
|
|
|
</Route>
|
|
|
|
<Route path="/">
|
|
|
|
<Redirect to={{ pathname: `${rootPath}/telemetry` }} />
|
|
|
|
</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
|
|
|
}
|