64 lines
2.3 KiB
JavaScript
64 lines
2.3 KiB
JavaScript
import React from 'react';
|
|
|
|
import Dialog from '@material-ui/core/Dialog';
|
|
import DialogContent from '@material-ui/core/DialogContent';
|
|
import DpPaperComponent from '../../../../layouts/mui/DpPaperCompanent';
|
|
import { AppBar, Tab, Tabs } from '@material-ui/core';
|
|
import DrpSearch from '../../components/DrpSearch';
|
|
import DpTabs from '../../../../layouts/mui/DpTabs';
|
|
import DpTab from '../../../../layouts/mui/DpTab';
|
|
import RzSearch from '../../components/RzSearch';
|
|
import SkImgSearch from '../../components/SkImgSearch';
|
|
import DpAppBar from '../../../../layouts/mui/DpAppBar';
|
|
import SkInfo from '../../components/SkInfo';
|
|
import SkPlan from '../../components/SkInfo/SkPlan';
|
|
import DpBackgroundDrop from '../../../../layouts/mui/DpBackdrop';
|
|
import DpCloseButton from '../../../../layouts/mui/DpCloseButton';
|
|
import ZrrPlan from './zrrPlan'
|
|
import Sjjg from '../../components/Sksjjg';
|
|
|
|
|
|
function SkDlg({ record, onClose }) {
|
|
const [value, setValue] = React.useState(0);
|
|
|
|
return (
|
|
<Dialog
|
|
open={true}
|
|
onClose={onClose}
|
|
maxWidth="xl"
|
|
style={{ borderRadius: 0 }}
|
|
PaperComponent={DpPaperComponent}
|
|
BackdropComponent={DpBackgroundDrop}
|
|
>
|
|
<div className="boxhead"></div>
|
|
<DialogContent style={{ padding: 0, width: '80rem', overflowX: 'hidden' }}>
|
|
<DpAppBar position="sticky">
|
|
<DpTabs value={value} indicatorColor="primary" onChange={(_, v) => setValue(v)}>
|
|
<DpTab label="雨量查询" />
|
|
<DpTab label="水位查询" />
|
|
<DpTab label="图像查询" />
|
|
<DpTab label="基础信息" />
|
|
<DpTab label="责任人" />
|
|
<DpTab label="水库预案" />
|
|
{record.events && <DpTab label="事件经过" />}
|
|
</DpTabs>
|
|
<DpCloseButton onClick={onClose} />
|
|
</DpAppBar>
|
|
<div style={{ padding: '2rem', height: '50rem' }}>
|
|
{value === 0 && <DrpSearch record={record} />}
|
|
{value === 1 && <RzSearch record={record} />}
|
|
{value === 2 && <SkImgSearch record={record} />}
|
|
{value === 3 && <SkInfo record={record} />}
|
|
{value === 4 && <ZrrPlan />}
|
|
{value === 5 && <SkPlan record={record} />}
|
|
{value === 6 && <Sjjg record={record} />}
|
|
</div>
|
|
|
|
</DialogContent>
|
|
<div className="boxfoot"></div>
|
|
</Dialog>
|
|
)
|
|
}
|
|
|
|
export default React.memo(SkDlg);
|