asb_cloud_front/src/pages/Well.jsx

125 lines
5.0 KiB
React
Raw Normal View History

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";
import Messages from "../pages/Messages";
import Report from "../pages/Report";
2021-08-13 11:37:54 +05:00
import Archive from "../pages/Archive";
import Analysis from "../pages/Analysis";
import WellAnalysis from "../pages/WellAnalysis";
2021-08-13 11:37:54 +05:00
import MenuDocuments from "./MenuDocuments";
2021-07-30 16:14:56 +05:00
import WellStat from "./WellStat"
2021-08-09 16:49:14 +05:00
import Smbo from "./Smbo"
2021-04-16 15:50:01 +05:00
const { Content } = Layout
2021-04-16 15:50:01 +05:00
export default function Well() {
2021-08-13 11:37:54 +05:00
let { idWell } = useParams()
2021-08-12 17:47:16 +05:00
const rootPath = `/well/${idWell}`
const {SubMenu} = Menu
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/>}>
2021-07-28 17:44:44 +05:00
<Link to='stat'>Статистика</Link>
</Menu.Item>
<Menu.Item key="7" icon={<FolderOutlined/>}>
<Link to={{pathname: `${rootPath}/archive`}}>Архив</Link>
</Menu.Item>
<SubMenu
key="documentsSub"
2021-07-28 17:59:16 +05:00
title={<Link to={{pathname: `${rootPath}/documents/fluidService`}} className="linkDocuments">Документы</Link>}
icon={<FolderOutlined/>}
selectable={true}
>
<Menu.Item key="documentsSub1" icon={<FolderOutlined/>}>
<Link to={{pathname: `${rootPath}/documents/fluidService`}}>Растворный сервис</Link>
</Menu.Item>
<Menu.Item key="documentsSub1.1" icon={<FolderOutlined/>}>
<Link to={{pathname: `${rootPath}/documents/cementing`}}>Цементирование</Link>
</Menu.Item>
<Menu.Item key="documentsSub1.2" icon={<FolderOutlined/>}>
<Link to={{pathname: `${rootPath}/documents/nnb`}}>ННБ</Link>
</Menu.Item>
<Menu.Item key="documentsSub1.3" icon={<FolderOutlined/>}>
<Link to={{pathname: `${rootPath}/documents/gti`}}>ГТИ</Link>
</Menu.Item>
<Menu.Item key="documentsSub1.4" icon={<FolderOutlined/>}>
<Link to={{pathname: `${rootPath}/documents/documentsForWell`}}>Документы по скважине</Link>
</Menu.Item>
<Menu.Item key="documentsSub1.5" icon={<FolderOutlined/>}>
<Link to={{pathname: `${rootPath}/documents/supervisor`}}>Супервайзер</Link>
</Menu.Item>
<Menu.Item key="documentsSub1.6" icon={<FolderOutlined/>}>
<Link to={{pathname: `${rootPath}/documents/master`}}>Мастер</Link>
</Menu.Item>
<Menu.Item key="documentsSub1.7" icon={<FolderOutlined/>}>
<Link to={{pathname: `${rootPath}/documents/lastData`}}>Последние данные</Link>
</Menu.Item>
</SubMenu>
<Menu.Item key="8" icon={<FolderOutlined/>}>
<Link to={{pathname: `${rootPath}/smbo`}}>СМБО</Link>
</Menu.Item>
</Menu>
<Layout>
<Content className="site-layout-background">
<Switch>
2021-08-13 11:37:54 +05:00
<Route path="/well/:id/telemetry">
<TelemetryView idWell={idWell}/>
</Route>
<Route path="/well/:id/message">
2021-08-13 10:31:42 +05:00
<Messages idWell={idWell}/>
</Route>
<Route path="/well/:id/report">
2021-08-13 10:31:42 +05:00
<Report idWell={idWell}/>
</Route>
<Route path="/well/:id/analysis">
2021-08-12 17:47:16 +05:00
<Analysis idWell={idWell}/>
</Route>
2021-08-13 11:37:54 +05:00
<Route path="/well/:id/stat">
<WellStat idWell={idWell}/>
</Route>
<Route path="/well/:id/wellAnalysis">
2021-08-13 10:31:42 +05:00
<WellAnalysis idWell={idWell}/>
</Route>
2021-08-13 11:37:54 +05:00
<Route path="/well/:id/archive">
<Archive idWell={idWell}/>
</Route>
<Route path="/well/:id/documents">
2021-08-13 10:31:42 +05:00
<MenuDocuments idWell={idWell}/>
</Route>
<Route path="/well/:id/smbo">
2021-08-13 10:31:42 +05:00
<Smbo idWell={idWell}/>
</Route>
<Route path="/">
<Redirect to={{pathname: `${rootPath}/telemetry`}}/>
</Route>
</Switch>
</Content>
</Layout>
</Layout>
</>)
}