From e430cdd5b45059f82635f019cd83a31e09146f93 Mon Sep 17 00:00:00 2001 From: goodmice Date: Tue, 29 Nov 2022 12:11:33 +0500 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D0=B0=20=D0=B8=D1=81=D0=BF=D0=BE=D0=BB=D1=8C=D0=B7=D0=BE?= =?UTF-8?q?=D0=B2=D0=B0=D0=BD=D0=B8=D0=B5=20=D0=BD=D0=BE=D0=B2=D1=8B=D1=85?= =?UTF-8?q?=20=D0=BF=D0=BE=D0=BB=D0=B5=D0=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../LimitingParameterStatistics/index.jsx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/pages/Well/Telemetry/TelemetryView/LimitingParameterStatistics/index.jsx b/src/pages/Well/Telemetry/TelemetryView/LimitingParameterStatistics/index.jsx index 50a9328..34ab336 100644 --- a/src/pages/Well/Telemetry/TelemetryView/LimitingParameterStatistics/index.jsx +++ b/src/pages/Well/Telemetry/TelemetryView/LimitingParameterStatistics/index.jsx @@ -1,14 +1,13 @@ -import { Button, Card, Input, Modal, Radio, Table } from 'antd' +import { Button, Input, Modal, Radio, Table } from 'antd' import { memo, useCallback, useEffect, useMemo, useState } from 'react' import { useElementSize } from 'usehooks-ts' import moment from 'moment' import * as d3 from 'd3' import { useWell } from '@asb/context' -import { Grid, GridItem } from '@components/Grid' import LoaderPortal from '@components/LoaderPortal' import { invokeWebApiWrapperAsync } from '@components/factory' -import { DateRangeWrapper, makeColumn, makeNumericColumn } from '@components/Table' +import { DateRangeWrapper, makeColumn, makeNumericColumn, makeNumericRender, makeTextColumn } from '@components/Table' import { LimitingParameterService } from '@api' import { unique } from '@utils/filters' @@ -20,8 +19,9 @@ const columns = [ makeColumn('Цвет', 'color', { width: 50, render: (d) => (
) }), - makeNumericColumn('Уставка', 'idFeedRegulator', undefined, undefined, (value) => `Регулятор: ${value}`), + makeTextColumn('Уставка', 'nameFeedRegulator'), makeNumericColumn('Проходка, м', 'depth'), + makeNumericColumn('Кол-во включений', 'numberInclusions', undefined, undefined, makeNumericRender(0)), makeNumericColumn('Общее время работы, мин', 'totalMinutes'), ] @@ -138,7 +138,7 @@ export const LimitingParameterStatistics = memo(() => { const lines = d3.select(svgRef) .select('.lines') .selectAll('polyline') - .data(pieData, (d) => `Регулятор №${d.data.idFeedRegulator}`) + .data(pieData, (d) => d.data.nameFeedRegulator) lines.exit().remove() const newLines = lines.enter() @@ -157,7 +157,7 @@ export const LimitingParameterStatistics = memo(() => { const lables = d3.select(svgRef) .select('.labels') .selectAll('text') - .data(pieData, (d) => `Регулятор №${d.data.idFeedRegulator}`) + .data(pieData, (d) => d.data.nameFeedRegulator) lables.exit().remove() const newLabels = lables.enter()