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()