Аналитика перенесена к вкладкам скважины

This commit is contained in:
Александр Сироткин 2022-02-14 17:47:03 +05:00
parent 0a018315bb
commit e141683553
5 changed files with 16 additions and 17 deletions

View File

@ -6,6 +6,7 @@ import {
FilePdfOutlined,
DatabaseOutlined,
ExperimentOutlined,
DeploymentUnitOutlined,
} from '@ant-design/icons'
import { Layout, Menu } from 'antd'
import { Switch, useParams } from 'react-router-dom'
@ -21,6 +22,7 @@ import TelemetryView from './TelemetryView'
import WellOperations from './WellOperations'
import DrillingProgram from './DrillingProgram'
import TelemetryAnalysis from './TelemetryAnalysis'
import WellCompositeEditor from './WellCompositeEditor'
const { Content } = Layout
@ -34,6 +36,7 @@ export const Well = memo(() => {
<PrivateMenuItem.Link root={rootPath} key={'telemetry'} path={'telemetry'} icon={<FundViewOutlined />} title={'Мониторинг'}/>
<PrivateMenuItem.Link root={rootPath} key={'message'} path={'message'} icon={<AlertOutlined/>} title={'Сообщения'} />
<PrivateMenuItem.Link root={rootPath} key={'report'} path={'report'} icon={<FilePdfOutlined />} title={'Рапорт'} />
<PrivateMenuItem.Link root={rootPath} key={'composite'} path={'composite'} icon={<DeploymentUnitOutlined />} title={'Аналитика'} />
<PrivateMenuItem.Link root={rootPath} key={'operations'} path={'operations'} icon={<FolderOutlined />} title={'Операции по скважине'} />
<PrivateMenuItem.Link root={rootPath} key={'archive'} path={'archive'} icon={<DatabaseOutlined />} title={'Архив'} />
{/* <PrivateMenuItem.Link root={rootPath} key={'telemetryAnalysis'} path={'telemetryAnalysis'} icon={<FundProjectionScreenOutlined />} title={'Операции по телеметрии'} /> */}
@ -54,6 +57,9 @@ export const Well = memo(() => {
<PrivateRoute path={`${rootPath}/report`}>
<Report idWell={idWell} />
</PrivateRoute>
<PrivateRoute path={`${rootPath}/composite/:tab?`}>
<WellCompositeEditor idWell={idWell} rootPath={`${rootPath}/composite`}/>
</PrivateRoute>
<PrivateRoute path={`${rootPath}/operations/:tab?`}>
<WellOperations idWell={idWell} />
</PrivateRoute>
@ -76,6 +82,7 @@ export const Well = memo(() => {
`${rootPath}/telemetry`,
`${rootPath}/message`,
`${rootPath}/report`,
`${rootPath}/composite`,
`${rootPath}/operations`,
`${rootPath}/archive`,
`${rootPath}/telemetryAnalysis`,

View File

@ -9,15 +9,15 @@ import { invokeWebApiWrapperAsync } from '@components/factory'
import { makeTextColumn, makeNumericColumnPlanFact } from '@components/Table'
import { DrillParamsService, WellCompositeService } from '@api'
import { hasPermission } from '@utils/permissions'
import {
calcAndUpdateStatsBySections,
makeFilterMinMaxFunction,
getOperations
} from '@utils/functions'
import { Tvd } from '@pages/WellOperations/Tvd'
import { getColumns } from '@pages/WellOperations/WellDrillParams'
import WellOperationsTable from '@pages/Cluster/WellOperationsTable'
import { Tvd } from '../Tvd'
import { getColumns } from '../WellDrillParams'
const filtersMinMax = [

View File

@ -18,8 +18,7 @@ import { WellCompositeSections } from './WellCompositeSections'
const { Content } = Layout
export const WellCompositeEditor = memo(({ idWell }) => {
const rootPath = `/well/${idWell}/operations/composite`
export const WellCompositeEditor = memo(({ idWell, rootPath }) => {
const { tab } = useParams()
const [wellsTree, setWellsTree] = useState([])

View File

@ -5,7 +5,6 @@ import {
BarChartOutlined,
BuildOutlined,
ControlOutlined,
DeploymentUnitOutlined,
LineChartOutlined,
TableOutlined,
} from '@ant-design/icons'
@ -17,7 +16,6 @@ import { ImportExportBar } from './ImportExportBar'
import { WellDrillParams } from './WellDrillParams'
import { DrillProcessFlow } from './DrillProcessFlow'
import { WellSectionsStat } from './WellSectionsStat'
import { WellCompositeEditor } from './WellCompositeEditor'
import { WellOperationsEditor } from './WellOperationsEditor'
const { Content } = Layout
@ -40,7 +38,6 @@ export const WellOperations = memo(({ idWell }) => {
<PrivateMenuItemLink root={rootPath} icon={<TableOutlined />} key={'fact'} path={'fact'} title={'Факт'} />
<PrivateMenuItemLink root={rootPath} icon={<BarChartOutlined />} key={'drillProcessFlow'} path={'drillProcessFlow'} title={'РТК'} />
<PrivateMenuItemLink root={rootPath} icon={<ControlOutlined />} key={'params'} path={'params'} title={'Режимы'} />
<PrivateMenuItemLink root={rootPath} icon={<DeploymentUnitOutlined />} key={'composite'} path={'composite'} title={'Аналитика'} />
<ImportExportBar idWell={idWell} disabled={isIEBarDisabled} onImported={onImported}/>
</Menu>
<Layout>
@ -64,17 +61,13 @@ export const WellOperations = memo(({ idWell }) => {
<PrivateRoute path={`${rootPath}/params`}>
<WellDrillParams idWell={idWell}/>
</PrivateRoute>
<PrivateRoute path={`${rootPath}/composite/:tab?`}>
<WellCompositeEditor idWell={idWell}/>
</PrivateRoute>
<PrivateDefaultRoute urls={[
`${rootPath}/plan`,
`${rootPath}/fact`,
`${rootPath}/tvd`,
`${rootPath}/sections`,
`${rootPath}/drillProcessFlow`,
`${rootPath}/params`,
`${rootPath}/composite`
`${rootPath}/params`
]}/>
</Switch>
</Content>

View File

@ -93,6 +93,10 @@ export const requirements: PermissionRecord = {
telemetry: ['Deposit.get', 'DrillFlowChart.get', 'TelemetryDataSaub.get', 'TelemetryDataSpin.get'],
message: ['Deposit.get', 'TelemetryDataSaub.get'],
report: ['Deposit.get', 'Report.get'],
composite: {
wells: ['Deposit.get', 'OperationStat.get', 'WellComposite.get'],
sections: ['Deposit.get', 'OperationStat.get', 'WellComposite.get', 'DrillParams.get'],
},
operations: {
tvd: ['Deposit.get', 'OperationStat.get'],
sections: ['Deposit.get', 'OperationStat.get'],
@ -100,10 +104,6 @@ export const requirements: PermissionRecord = {
fact: ['Deposit.get', 'WellOperation.get'],
drillProcessFlow: ['Deposit.get', 'DrillFlowChart.get'],
params: ['Deposit.get', 'WellOperation.get', 'DrillParams.get'],
composite: {
wells: ['Deposit.get', 'OperationStat.get', 'WellComposite.get'],
sections: ['Deposit.get', 'OperationStat.get', 'WellComposite.get', 'DrillParams.get'],
}
},
telemetryAnalysis: {
depthToDay: ['Deposit.get', 'TelemetryAnalytics.get'],