From e75d75cb5f08a054262c392dbec1714cfa3b6a14 Mon Sep 17 00:00:00 2001 From: goodmice Date: Thu, 5 May 2022 17:47:15 +0500 Subject: [PATCH] =?UTF-8?q?=D0=A1=D1=82=D0=B8=D0=BB=D0=B8=D1=81=D1=82?= =?UTF-8?q?=D0=B8=D1=87=D0=B5=D1=81=D0=BA=D0=B8=D0=B5=20=D0=B8=D1=81=D0=BF?= =?UTF-8?q?=D1=80=D0=B0=D0=B2=D0=BB=D0=B5=D0=BD=D0=B8=D1=8F=20=D1=81=D1=82?= =?UTF-8?q?=D1=80=D0=B0=D0=BD=D0=B8=D1=86=D0=B0=20=D0=9E=D0=BF=D0=B5=D1=80?= =?UTF-8?q?=D0=B0=D1=86=D0=B8=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Telemetry/Operations/OperationsChart.jsx | 24 +++++++++---------- .../Telemetry/Operations/OperationsTable.jsx | 6 ++--- src/pages/Telemetry/Operations/index.jsx | 10 ++++---- src/pages/Telemetry/index.jsx | 2 +- 4 files changed, 20 insertions(+), 22 deletions(-) diff --git a/src/pages/Telemetry/Operations/OperationsChart.jsx b/src/pages/Telemetry/Operations/OperationsChart.jsx index 864b1fb..7eaf0ef 100644 --- a/src/pages/Telemetry/Operations/OperationsChart.jsx +++ b/src/pages/Telemetry/Operations/OperationsChart.jsx @@ -33,19 +33,17 @@ export const OperationsChart = memo(({ data, yDomain, width, height, bottom = 30 useEffect(() => d3.select(axisY.current).call(d3.axisLeft(y)), [axisY, y]) // Рисуем ось Y return ( - <> -
- - - - - {lines.map(({ x, y }, i) => ( - - ))} - - -
- +
+ + + + + {lines.map(({ x, y }, i) => ( + + ))} + + +
) }) diff --git a/src/pages/Telemetry/Operations/OperationsTable.jsx b/src/pages/Telemetry/Operations/OperationsTable.jsx index 8d78ab6..dfee059 100644 --- a/src/pages/Telemetry/Operations/OperationsTable.jsx +++ b/src/pages/Telemetry/Operations/OperationsTable.jsx @@ -1,14 +1,14 @@ import { memo } from 'react' -import { Table, makeTextColumn, makeNumericColumn, makeDateColumn } from '@components/Table' +import { Table, makeTextColumn, makeNumericColumn, makeDateColumn, makeNumericRender } from '@components/Table' import '@styles/detected_operations.less' export const columns = [ makeTextColumn('Пользователь', 'telemetryUserName', null, null, null, { width: 200 }), makeDateColumn('Дата начала', 'dateStart', null, undefined, { width: 150 }), - makeNumericColumn('Продолжительность (мин)', 'durationMinutes', null, null, null, 150), - makeNumericColumn('Глубина (м)', 'depthStart', null, null, null, 100), + makeNumericColumn('Продолжительность (мин)', 'durationMinutes', null, null, makeNumericRender(2), 150), + makeNumericColumn('Глубина (м)', 'depthStart', null, null, makeNumericRender(1), 100), ] export const OperationsTable = memo(({ data, height, ...other }) => ( diff --git a/src/pages/Telemetry/Operations/index.jsx b/src/pages/Telemetry/Operations/index.jsx index 10baf3f..1af6816 100644 --- a/src/pages/Telemetry/Operations/index.jsx +++ b/src/pages/Telemetry/Operations/index.jsx @@ -1,6 +1,6 @@ -import moment from 'moment' -import { InputNumber } from 'antd' import { memo, useCallback, useContext, useEffect, useState } from 'react' +import { InputNumber } from 'antd' +import moment from 'moment' import { IdWellContext } from '@asb/context' import LoaderPortal from '@components/LoaderPortal' @@ -17,7 +17,7 @@ import '@styles/detected_operations.less' export const Operations = memo(() => { const [isLoading, setIsLoading] = useState(false) const [dateRange, setDateRange] = useState([]) - const [yDomain, setYDomain] = useState(10) + const [yDomain, setYDomain] = useState(20) const [dates, setDates] = useState() const [data, setData] = useState([]) @@ -62,11 +62,11 @@ export const Operations = memo(() => { {
- +
diff --git a/src/pages/Telemetry/index.jsx b/src/pages/Telemetry/index.jsx index 789f0e1..8207810 100755 --- a/src/pages/Telemetry/index.jsx +++ b/src/pages/Telemetry/index.jsx @@ -29,7 +29,7 @@ export const Telemetry = memo(() => { } title={'Сообщения'} /> } title={'Архив'} /> - +