diff --git a/src/pages/AdminPanel/Telemetry/index.jsx b/src/pages/AdminPanel/Telemetry/index.jsx index ec42dec..aae4cb9 100755 --- a/src/pages/AdminPanel/Telemetry/index.jsx +++ b/src/pages/AdminPanel/Telemetry/index.jsx @@ -1,9 +1,7 @@ -import { Layout } from 'antd' import { memo, useMemo } from 'react' import { Navigate, Route, Routes } from 'react-router-dom' import { RootPathContext, useRootPath } from '@asb/context' -import { PrivateMenu } from '@components/Private' import { NoAccessComponent, wrapPrivateComponent } from '@utils' import TelemetryViewer from './TelemetryViewer' @@ -15,23 +13,12 @@ const Telemetry = memo(() => { return ( - - - - - - - - - - } /> - } /> - } /> - } /> - - - - + + } /> + } /> + } /> + } /> + ) }) diff --git a/src/pages/Analytics/WellCompositeEditor/index.jsx b/src/pages/Analytics/WellCompositeEditor/index.jsx index c0cc5b9..2b35e4d 100755 --- a/src/pages/Analytics/WellCompositeEditor/index.jsx +++ b/src/pages/Analytics/WellCompositeEditor/index.jsx @@ -1,9 +1,8 @@ -import { useState, useEffect, memo, useMemo } from 'react' import { Navigate, Route, Routes } from 'react-router-dom' -import { Col, Layout, Row } from 'antd' +import { useState, useEffect, memo } from 'react' +import { Row } from 'antd' -import { useWell, useRootPath } from '@asb/context' -import { PrivateMenu } from '@components/Private' +import { useWell } from '@asb/context' import LoaderPortal from '@components/LoaderPortal' import WellSelector from '@components/selectors/WellSelector' import { invokeWebApiWrapperAsync } from '@components/factory' @@ -13,8 +12,6 @@ import { OperationStatService, WellCompositeService } from '@api' import ClusterWells from '@pages/Cluster/ClusterWells' import WellCompositeSections from './WellCompositeSections' -const { Content } = Layout - const properties = { requirements: ['OperationStat.get', 'WellComposite.get'], title: 'Композитная скважина', @@ -24,12 +21,9 @@ const properties = { const WellCompositeEditor = memo(() => { const [well] = useWell() - const root = useRootPath() - const rootPath = useMemo(() => `${root}/${properties.key}`, [root]) const [statsWells, setStatsWells] = useState([]) const [showLoader, setShowLoader] = useState(false) - const [showTabLoader, setShowTabLoader] = useState(false) const [selectedIdWells, setSelectedIdWells] = useState([]) const [selectedSections, setSelectedSections] = useState([]) @@ -61,7 +55,7 @@ const WellCompositeEditor = memo(() => { const stats = arrayOrDefault(await OperationStatService.getWellsStat(selectedIdWells)) setStatsWells(stats) }, - setShowTabLoader, + setShowLoader, 'Не удалось загрузить статистику по скважинам/секциям', { actionName: 'Получение статистики по скважинам/секциям' } ) @@ -70,29 +64,15 @@ const WellCompositeEditor = memo(() => { return ( - - - - - - - - - + - - - - - } /> - } /> + + } /> + } /> - } /> - } /> - - - - + } /> + } /> + ) }) diff --git a/src/pages/Analytics/index.jsx b/src/pages/Analytics/index.jsx index c5203ed..df5be22 100755 --- a/src/pages/Analytics/index.jsx +++ b/src/pages/Analytics/index.jsx @@ -1,9 +1,7 @@ import { memo, useMemo } from 'react' import { Navigate, Route, Routes } from 'react-router-dom' -import { Layout } from 'antd' import { RootPathContext, useRootPath } from '@asb/context' -import { PrivateMenu } from '@components/Private' import { NoAccessComponent, wrapPrivateComponent } from '@utils' import Statistics from './Statistics' @@ -15,23 +13,13 @@ const Analytics = memo(() => { return ( - - - - - - - - - } /> - } /> + + } /> + } /> - } /> - } /> - - - - + } /> + } /> + ) }) diff --git a/src/pages/Cluster/CompaniesTable.jsx b/src/pages/Cluster/CompaniesTable.jsx index 7520c23..390e2bb 100644 --- a/src/pages/Cluster/CompaniesTable.jsx +++ b/src/pages/Cluster/CompaniesTable.jsx @@ -1,4 +1,4 @@ -import React, { memo, useMemo } from 'react' +import { memo, useMemo } from 'react' import { BankOutlined } from '@ant-design/icons' import { makeTextColumn, Table } from '@components/Table' @@ -9,7 +9,7 @@ const columns = [ makeTextColumn('Тип компании', 'companyTypeCaption'), ] -const CompaniesTable = memo(({companies}) => { +const CompaniesTable = memo(({ companies }) => { const dataCompanies = useMemo(() => companies?.map((company) => ({ key: company.id, logo: company?.logo ? : , @@ -30,4 +30,4 @@ const CompaniesTable = memo(({companies}) => { ) }) -export default CompaniesTable \ No newline at end of file +export default CompaniesTable diff --git a/src/pages/Documents/index.jsx b/src/pages/Documents/index.jsx index d3882fb..1b4c293 100755 --- a/src/pages/Documents/index.jsx +++ b/src/pages/Documents/index.jsx @@ -1,16 +1,11 @@ import { Navigate, Route, Routes } from 'react-router-dom' import { memo, useMemo } from 'react' -import { FolderOutlined } from '@ant-design/icons' -import { Layout } from 'antd' import { RootPathContext, useRootPath } from '@asb/context' -import { PrivateMenu } from '@components/Private' -import { getTabname, wrapPrivateComponent, NoAccessComponent, hasPermission } from '@utils' +import { wrapPrivateComponent, NoAccessComponent, hasPermission } from '@utils' import DocumentsTemplate from './DocumentsTemplate' -const { Content } = Layout - const makeDocCat = (id, key, title, permissions = ['File.get']) => ({ id, key, title, permissions }) export const documentCategories = [ @@ -27,7 +22,6 @@ export const documentCategories = [ ] const MenuDocuments = memo(() => { - const category = getTabname() const root = useRootPath() const rootPath = useMemo(() => `${root}/document`, [root]) @@ -35,34 +29,21 @@ const MenuDocuments = memo(() => { return ( - - {categories.map(category => ( - } - title={category.title} - /> - ))} - - - - - {categories.length > 0 && ( - } /> - )} - } /> + + {categories.length > 0 && ( + } /> + )} + } /> - {categories.map(category => ( - - )} /> - ))} - - - + {categories.map(category => ( + + )} /> + ))} + ) }) diff --git a/src/pages/Reports/index.jsx b/src/pages/Reports/index.jsx index d28275c..d6d7d04 100644 --- a/src/pages/Reports/index.jsx +++ b/src/pages/Reports/index.jsx @@ -1,41 +1,25 @@ import { Navigate, Route, Routes } from 'react-router-dom' import { memo, useMemo } from 'react' -import { FilePdfOutlined } from '@ant-design/icons' -import { Layout } from 'antd' import { RootPathContext, useRootPath } from '@asb/context' -import { PrivateMenu } from '@components/Private' import { NoAccessComponent, wrapPrivateComponent } from '@utils' import DailyReport from './DailyReport' import DiagramReport from './DiagramReport' -const { Content } = Layout - const Reports = memo(() => { const root = useRootPath() const rootPath = useMemo(() => `${root}/reports`, [root]) return ( - - - } /> - - + + } /> + } /> - - - - } /> - } /> - - } /> - } /> - - - - + } /> + } /> + ) }) diff --git a/src/pages/Telemetry/index.jsx b/src/pages/Telemetry/index.jsx index d85f7e8..0420819 100755 --- a/src/pages/Telemetry/index.jsx +++ b/src/pages/Telemetry/index.jsx @@ -1,10 +1,8 @@ import { Navigate, Route, Routes } from 'react-router-dom' import { memo, useMemo } from 'react' -import { Layout } from 'antd' -import { AlertOutlined, FundViewOutlined, DatabaseOutlined } from '@ant-design/icons' +import { FundViewOutlined } from '@ant-design/icons' import { RootPathContext, useRootPath } from '@asb/context' -import { PrivateMenu } from '@components/Private' import { NoAccessComponent, wrapPrivateComponent } from '@utils' import Archive from './Archive' @@ -16,40 +14,23 @@ import OperationTime from './OperationTime' import '@styles/index.css' -const { Content } = Layout - const Telemetry = memo(() => { const root = useRootPath() const rootPath = useMemo(() => `${root}/telemetry`, [root]) return ( - - - } /> - } /> - } /> - - - - + + } /> + } /> - - - - } /> - } /> - - } /> - } /> - } /> - } /> - } /> - } /> - - - - + } /> + } /> + } /> + } /> + } /> + } /> + ) }) diff --git a/src/pages/WellOperations/index.jsx b/src/pages/WellOperations/index.jsx index 2f59865..f34f41d 100755 --- a/src/pages/WellOperations/index.jsx +++ b/src/pages/WellOperations/index.jsx @@ -1,17 +1,8 @@ import { useNavigate, useLocation, Route, Routes, Navigate } from 'react-router-dom' import { memo, useCallback, useMemo } from 'react' -import { Layout } from 'antd' -import { - BarChartOutlined, - BuildOutlined, - ControlOutlined, - LineChartOutlined, - TableOutlined, -} from '@ant-design/icons' import { RootPathContext, useRootPath } from '@asb/context' import { Flex } from '@components/Grid' -import { PrivateMenu } from '@components/Private' import { getTabname, NoAccessComponent, wrapPrivateComponent } from '@utils' import Tvd from './Tvd' @@ -21,8 +12,6 @@ import { DrillProcessFlow } from './DrillProcessFlow' import { WellSectionsStat } from './WellSectionsStat' import { WellOperationsEditorPlan, WellOperationsEditorFact } from './WellOperationsEditor' -const { Content } = Layout - const properties = { requirements: [], title: 'Операции по скважине', @@ -46,31 +35,19 @@ const WellOperations = memo(() => { return( - - } /> - } key={'sections'} title={'Секции'} /> - } /> - } /> - } key={'drillProcessFlow'} title={'РТК'} /> - } key={'params'} title={'Режимы'} /> - - - - - } /> - } /> + + } /> + } /> - } /> - } /> - } /> - } /> - } /> - } /> - - - + } /> + } /> + } /> + } /> + } /> + } /> + ) })