forked from ddrilling/asb_cloud_front
Добавлена использование новых полей
This commit is contained in:
parent
259e2e4be8
commit
e430cdd5b4
@ -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) => (
|
||||
<div style={{ backgroundColor: d, padding: '5px 0' }} />
|
||||
) }),
|
||||
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()
|
||||
|
Loading…
Reference in New Issue
Block a user