From 6a81db11b6901f025aa61e0c83d807fc38ad04d8 Mon Sep 17 00:00:00 2001 From: goodmice Date: Wed, 28 Dec 2022 18:21:31 +0500 Subject: [PATCH] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D1=8B=20=D1=81=D1=82=D0=B8=D0=BB=D0=B8=20=D1=81=D1=82?= =?UTF-8?q?=D1=80=D0=B0=D0=BD=D0=B8=D1=86=D1=8B=20"=D0=A1=D1=82=D0=B0?= =?UTF-8?q?=D1=82=D0=B8=D1=81=D1=82=D0=B8=D0=BA=D0=B0=20=D0=B8=D1=81=D0=BF?= =?UTF-8?q?=D0=BE=D0=BB=D1=8C=D0=B7=D0=BE=D0=B2=D0=B0=D0=BD=D0=B8=D1=8F=20?= =?UTF-8?q?=D1=83=D1=81=D1=82=D0=B0=D0=B2=D0=BE=D0=BA"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../LimitingParameterStatistics/index.jsx | 30 +++++------ src/styles/limiting_parameter_statistics.less | 29 ---------- .../pages/limiting_parameter_statistics.less | 54 +++++++++++++++++++ 3 files changed, 69 insertions(+), 44 deletions(-) delete mode 100644 src/styles/limiting_parameter_statistics.less create mode 100644 src/styles/pages/limiting_parameter_statistics.less diff --git a/src/pages/Well/Telemetry/TelemetryView/LimitingParameterStatistics/index.jsx b/src/pages/Well/Telemetry/TelemetryView/LimitingParameterStatistics/index.jsx index ff22ba5..d7081f4 100644 --- a/src/pages/Well/Telemetry/TelemetryView/LimitingParameterStatistics/index.jsx +++ b/src/pages/Well/Telemetry/TelemetryView/LimitingParameterStatistics/index.jsx @@ -13,15 +13,15 @@ import { useElementSize } from '@utils' import { makeGetColor } from '@pages/Well/WellOperations/Tvd' -import '@styles/limiting_parameter_statistics.less' +import '@styles/pages/limiting_parameter_statistics.less' const columns = [ makeColumn('Цвет', 'color', { width: 50, render: (d) => (
) }), makeTextColumn('Уставка', 'nameFeedRegulator'), - makeNumericColumn('Проходка, м', 'depth'), - makeNumericColumn('Кол-во включений', 'numberInclusions', undefined, undefined, makeNumericRender(0)), + makeNumericColumn('Проходка, м', 'depth', undefined, undefined, 140), + makeNumericColumn('Кол-во включений', 'numberInclusions', makeNumericRender(0), undefined, 150), ] export const LimitingParameterStatistics = memo(() => { @@ -59,16 +59,16 @@ export const LimitingParameterStatistics = memo(() => { } } if (record.idFeedRegulator === selectedRegulator) - out.style = { background: '#FAFAFA', fontSize: '16px', fontWeight: '600' } + out.className = 'dd-selected-row' return out }, [selectedRegulator]) - const onPieOver = useCallback(function (e, d) { + const onPieOver = useCallback(function (_, d) { // Стрелочная функция не подойдёт из-за использования `this` setSelectedRegulator(d.data.idFeedRegulator) d3.select(this).attr('transform', 'scale(1.05)') }, []) - const onPieOut = useCallback(function (e, d) { + const onPieOut = useCallback(function () { // Стрелочная функция не подойдёт из-за использования `this` setSelectedRegulator(null) d3.select(this).attr('transform', 'scale(1)') }, []) @@ -181,15 +181,15 @@ export const LimitingParameterStatistics = memo(() => { setIsOpen(false)} open={isOpen} > - +
- + { disabled={mode !== 'depth'} prefix={'От'} suffix={'м'} - style={{ width: 'calc(50% + 113px / 2)', textAlign: 'right' }} + style={{ width: 'calc(50% + 128px / 2)', textAlign: 'right' }} onChange={(e) => onDepthChanged(e, 'from')} value={depthFilter.from} /> @@ -212,12 +212,12 @@ export const LimitingParameterStatistics = memo(() => { disabled={mode !== 'depth'} prefix={'До'} suffix={'м'} - style={{ width: 'calc(50% - 113px / 2)', textAlign: 'right' }} + style={{ width: 'calc(50% - 128px / 2)', textAlign: 'right' }} onChange={(e) => onDepthChanged(e, 'to')} value={depthFilter.to} /> - + { {data ? ( - - - + + + ) : ( diff --git a/src/styles/limiting_parameter_statistics.less b/src/styles/limiting_parameter_statistics.less deleted file mode 100644 index 104a2d4..0000000 --- a/src/styles/limiting_parameter_statistics.less +++ /dev/null @@ -1,29 +0,0 @@ -.filter-groups { - display: flex; - gap: 10px; - - & .filter-label { - display: flex; - align-items: center; - } - - & .date-filter { - display: flex; - width: 100%; - height: 100%; - justify-content: center; - align-items: center; - } -} - -.modal-label { - width: 100%; - margin: 20px 0; - font-size: 1rem; - text-align: center; -} - -.lps-pie-chart { - min-height: 30vh; - max-height: 50vh; -} \ No newline at end of file diff --git a/src/styles/pages/limiting_parameter_statistics.less b/src/styles/pages/limiting_parameter_statistics.less new file mode 100644 index 0000000..8b4e8e4 --- /dev/null +++ b/src/styles/pages/limiting_parameter_statistics.less @@ -0,0 +1,54 @@ +@import '../include/antd_theme'; +@import '../mixins'; + +.limit-parameter-stats-page { + & .filter-groups { + display: flex; + gap: 10px; + + & .filter-label { + display: flex; + align-items: center; + } + + & .date-filter { + display: flex; + width: 100%; + height: 100%; + justify-content: center; + align-items: center; + } + } + + & .modal-label { + width: 100%; + margin: 20px 0; + font-size: 1rem; + text-align: center; + } + + .dd-selected-row { + background: @primary; + font-size: 16px; + font-weight: 600; + } + + & .lps-pie-chart { + min-height: 30vh; + max-height: 50vh; + + & .slices { + stroke: #0005; + } + + & .labels { + fill: white; + } + + & .lines { + fill: none; + stroke: white; + .no-events(); + } + } +}