From e141683553736eb2d39ff93db6f1474cd38a2b9c Mon Sep 17 00:00:00 2001 From: goodm2ice Date: Mon, 14 Feb 2022 17:47:03 +0500 Subject: [PATCH] =?UTF-8?q?=D0=90=D0=BD=D0=B0=D0=BB=D0=B8=D1=82=D0=B8?= =?UTF-8?q?=D0=BA=D0=B0=20=D0=BF=D0=B5=D1=80=D0=B5=D0=BD=D0=B5=D1=81=D0=B5?= =?UTF-8?q?=D0=BD=D0=B0=20=D0=BA=20=D0=B2=D0=BA=D0=BB=D0=B0=D0=B4=D0=BA?= =?UTF-8?q?=D0=B0=D0=BC=20=D1=81=D0=BA=D0=B2=D0=B0=D0=B6=D0=B8=D0=BD=D1=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/Well.jsx | 7 +++++++ .../WellCompositeEditor/WellCompositeSections.jsx | 6 +++--- .../{WellOperations => }/WellCompositeEditor/index.jsx | 3 +-- src/pages/WellOperations/index.jsx | 9 +-------- src/utils/permissions.ts | 8 ++++---- 5 files changed, 16 insertions(+), 17 deletions(-) rename src/pages/{WellOperations => }/WellCompositeEditor/WellCompositeSections.jsx (98%) rename src/pages/{WellOperations => }/WellCompositeEditor/index.jsx (98%) diff --git a/src/pages/Well.jsx b/src/pages/Well.jsx index c16b00c..e4b4442 100644 --- a/src/pages/Well.jsx +++ b/src/pages/Well.jsx @@ -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(() => { } title={'Мониторинг'}/> } title={'Сообщения'} /> } title={'Рапорт'} /> + } title={'Аналитика'} /> } title={'Операции по скважине'} /> } title={'Архив'} /> {/* } title={'Операции по телеметрии'} /> */} @@ -54,6 +57,9 @@ export const Well = memo(() => { + + + @@ -76,6 +82,7 @@ export const Well = memo(() => { `${rootPath}/telemetry`, `${rootPath}/message`, `${rootPath}/report`, + `${rootPath}/composite`, `${rootPath}/operations`, `${rootPath}/archive`, `${rootPath}/telemetryAnalysis`, diff --git a/src/pages/WellOperations/WellCompositeEditor/WellCompositeSections.jsx b/src/pages/WellCompositeEditor/WellCompositeSections.jsx similarity index 98% rename from src/pages/WellOperations/WellCompositeEditor/WellCompositeSections.jsx rename to src/pages/WellCompositeEditor/WellCompositeSections.jsx index 44927da..141d0ce 100644 --- a/src/pages/WellOperations/WellCompositeEditor/WellCompositeSections.jsx +++ b/src/pages/WellCompositeEditor/WellCompositeSections.jsx @@ -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 = [ diff --git a/src/pages/WellOperations/WellCompositeEditor/index.jsx b/src/pages/WellCompositeEditor/index.jsx similarity index 98% rename from src/pages/WellOperations/WellCompositeEditor/index.jsx rename to src/pages/WellCompositeEditor/index.jsx index de82d50..5fba617 100644 --- a/src/pages/WellOperations/WellCompositeEditor/index.jsx +++ b/src/pages/WellCompositeEditor/index.jsx @@ -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([]) diff --git a/src/pages/WellOperations/index.jsx b/src/pages/WellOperations/index.jsx index 5ded5dc..5bfd6fb 100644 --- a/src/pages/WellOperations/index.jsx +++ b/src/pages/WellOperations/index.jsx @@ -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 }) => { } key={'fact'} path={'fact'} title={'Факт'} /> } key={'drillProcessFlow'} path={'drillProcessFlow'} title={'РТК'} /> } key={'params'} path={'params'} title={'Режимы'} /> - } key={'composite'} path={'composite'} title={'Аналитика'} /> @@ -64,17 +61,13 @@ export const WellOperations = memo(({ idWell }) => { - - - diff --git a/src/utils/permissions.ts b/src/utils/permissions.ts index 20d56f4..a080a23 100644 --- a/src/utils/permissions.ts +++ b/src/utils/permissions.ts @@ -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'],