From 613b5b232ac29b55b500fc9555c186c7a0c0405f Mon Sep 17 00:00:00 2001 From: goodm2ice Date: Tue, 28 Dec 2021 14:41:23 +0500 Subject: [PATCH] =?UTF-8?q?CompanyView=20=D0=B8=D1=81=D0=BF=D0=BE=D0=BB?= =?UTF-8?q?=D1=8C=D0=B7=D1=83=D0=B5=D1=82=D1=81=D1=8F=20=D0=B2=20=D0=BC?= =?UTF-8?q?=D0=B5=D1=81=D1=82=D0=B0=D1=85=20=D1=83=D0=BF=D0=BE=D0=BC=D0=B8?= =?UTF-8?q?=D0=BD=D0=B0=D0=BD=D0=B8=D1=8F=20=D0=BA=D0=BE=D0=BC=D0=BF=D0=B0?= =?UTF-8?q?=D0=BD=D0=B8=D0=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/Cluster/ClusterWells.jsx | 25 +++++++++++++----- .../WellCompositeSections.jsx | 26 ++++++++++++------- 2 files changed, 34 insertions(+), 17 deletions(-) diff --git a/src/pages/Cluster/ClusterWells.jsx b/src/pages/Cluster/ClusterWells.jsx index 87e868d..56db96d 100644 --- a/src/pages/Cluster/ClusterWells.jsx +++ b/src/pages/Cluster/ClusterWells.jsx @@ -1,21 +1,28 @@ import { Link } from 'react-router-dom' import { useState, useEffect } from 'react' import { Tag, Button, Modal } from 'antd' -import { Table } from '../../components/Table' import { LineChartOutlined, ProfileOutlined } from '@ant-design/icons' + import { makeTextColumn, makeGroupColumn, makeColumn, makeDateSorter, - makeNumericColumnPlanFact} from '../../components/Table' -import { calcAndUpdateStatsBySections, makeFilterMinMaxFunction } from './functions' + makeNumericColumnPlanFact, + Table, +} from '../../components/Table' import { invokeWebApiWrapperAsync } from '../../components/factory' -import { Tvd } from '../WellOperations/Tvd' -import WellOperationsTable from './WellOperationsTable' -import { getOperations } from './functions' import LoaderPortal from '../../components/LoaderPortal' import PointerIcon from '../../components/icons/PointerIcon' +import { CompanyView } from '../../components/Views' + +import { Tvd } from '../WellOperations/Tvd' +import { + getOperations, + calcAndUpdateStatsBySections, + makeFilterMinMaxFunction +} from './functions' +import WellOperationsTable from './WellOperationsTable' const filtersMinMax = [ { text: 'min', value: 'min' }, @@ -147,7 +154,11 @@ export default function ClusterWells({statsWells}) { title: 'Участники', key: 'companies', dataIndex: 'companies', - render: (item) => item?.map((company) => {company.caption}) ?? '-', + render: (item) => item?.map((company) => ( + + + + )) ?? '-', }, ] diff --git a/src/pages/WellOperations/WellCompositeEditor/WellCompositeSections.jsx b/src/pages/WellOperations/WellCompositeEditor/WellCompositeSections.jsx index bfc6923..8782669 100644 --- a/src/pages/WellOperations/WellCompositeEditor/WellCompositeSections.jsx +++ b/src/pages/WellOperations/WellCompositeEditor/WellCompositeSections.jsx @@ -2,17 +2,20 @@ import { LineChartOutlined, ProfileOutlined } from '@ant-design/icons' import { Table, Tag, Button, Badge, Divider, Modal, Row, Col, Popconfirm } from 'antd' import { Link } from 'react-router-dom' import { useState, useEffect } from 'react' + import { makeTextColumn, makeNumericColumnPlanFact } from '../../../components/Table' -import { - calcAndUpdateStatsBySections, - makeFilterMinMaxFunction, - getOperations -} from '../../Cluster/functions' -import { Tvd } from '../Tvd' import { DrillParamsService, WellCompositeService } from '../../../services/api' import LoaderPortal from '../../../components/LoaderPortal' -import WellOperationsTable from '../../Cluster/WellOperationsTable' import { invokeWebApiWrapperAsync } from '../../../components/factory' +import { CompanyView } from '../../../components/Views' + +import { + calcAndUpdateStatsBySections, + makeFilterMinMaxFunction, + getOperations +} from '../../Cluster/functions' +import { Tvd } from '../Tvd' +import WellOperationsTable from '../../Cluster/WellOperationsTable' import { columns as paramsColumns } from '../WellDrillParams' @@ -118,7 +121,7 @@ export const WellCompositeSections = ({idWell, statsWells, selectedSections}) => }, [rows, selectedSections]) const columns = [ - makeTextColumn('скв №', 'caption', null, null, + makeTextColumn('скв №', 'caption', null, null, (text, item) => {text ?? '-'} ), makeTextColumn('Секция', 'sectionType', filtersSectionsType, null, (text) => text ?? '-'), @@ -149,8 +152,11 @@ export const WellCompositeSections = ({idWell, statsWells, selectedSections}) => { title: 'Участники', dataIndex: 'companies', - render: (item) => - item?.map((company) => {company.caption}), + render: (item) => item?.map((company) => ( + + + + )) ?? '-', }, ]