diff --git a/src/pages/TelemetryView/Column.jsx b/src/pages/TelemetryView/Column.jsx index 7d20ebb..b15042f 100644 --- a/src/pages/TelemetryView/Column.jsx +++ b/src/pages/TelemetryView/Column.jsx @@ -9,7 +9,7 @@ export const Column = ({lineGroup, data, interval, showBorder, style, headerHeig let pv = null if (data?.length > 0) { dataLast = data[data.length - 1]; - pv = lineGroup.filter(line => line.showValue).map(line => ({ + pv = lineGroup.filter(line => line.showGraph).map(line => ({ color: line.color, label: line.label, unit: line.units, diff --git a/src/pages/TelemetryView/index.jsx b/src/pages/TelemetryView/index.jsx index 9bf1fa2..b61ac66 100644 --- a/src/pages/TelemetryView/index.jsx +++ b/src/pages/TelemetryView/index.jsx @@ -4,7 +4,7 @@ import { Select } from 'antd' import { Column } from './Column' import { CustomColumn } from './CustomColumn' import ActiveMessagesOnline from './ActiveMessagesOnline' -import { ModeDisplay } from "./ModeDisplay" +import { ModeDisplay } from './ModeDisplay' import { UserOfWell } from './UserOfWells' import LoaderPortal from '../../components/LoaderPortal' @@ -13,10 +13,10 @@ import { Subscribe } from '../../services/signalr' import { TelemetryDataSaubService, TelemetryDataSpinService } from '../../services/api' import { invokeWebApiWrapperAsync } from '../../components/factory' -import MomentStabPicEnabled from "../../images/DempherOn.png" -import MomentStabPicDisabled from "../../images/DempherOff.png" -import SpinPicEnabled from "../../images/SpinEnabled.png" -import SpinPicDisabled from "../../images/SpinDisabled.png" +import MomentStabPicEnabled from '../../images/DempherOn.png' +import MomentStabPicDisabled from '../../images/DempherOff.png' +import SpinPicEnabled from '../../images/SpinEnabled.png' +import SpinPicDisabled from '../../images/SpinDisabled.png' import '../../styles/message.css' @@ -26,17 +26,17 @@ const dash = [7, 3] const blockHeightGroup = [ { - label: "Высота блока", + label: 'Высота блока', units: 'м', - xAccessorName: "blockPosition", - yAccessorName: "date", + xAccessorName: 'blockPosition', + yAccessorName: 'date', color: '#333', - showValue: true + showGraph: true }, { - label: "wellDepth", + label: 'wellDepth', units: 'м', - xAccessorName: "wellDepth", - yAccessorName: "date", + xAccessorName: 'wellDepth', + yAccessorName: 'date', color: '#333', showLine: false, xConstValue: 30, @@ -47,23 +47,23 @@ const blockHeightGroup = [ xAccessorName: 'flow', yAccessorName: 'date', color: '#077', - showValue: true + showGraph: true } ] const blockSpeedGroup = [ { - label: "Скорость блока", + label: 'Скорость блока', units: 'м/ч', - xAccessorName: "blockSpeed", - yAccessorName: "date", + xAccessorName: 'blockSpeed', + yAccessorName: 'date', color: '#0a0', - showValue: true + showGraph: true }, { - label: "blockSpeedSp", + label: 'blockSpeedSp', units: 'м/ч', - xAccessorName: "blockSpeedSp", - yAccessorName: "date", + xAccessorName: 'blockSpeedSp', + yAccessorName: 'date', color: '#0a0', footer: 'SP', dash @@ -72,33 +72,33 @@ const blockSpeedGroup = [ const pressureGroup = [ { - label: "Давление", + label: 'Давление', units: 'атм', - xAccessorName: "pressure", - yAccessorName: "date", + xAccessorName: 'pressure', + yAccessorName: 'date', color: '#c00', - showValue: true + showGraph: true }, { - label: "pressureSp", + label: 'pressureSp', units: 'атм', - xAccessorName: "pressureSp", - yAccessorName: "date", + xAccessorName: 'pressureSp', + yAccessorName: 'date', color: '#c00', footer: 'SP', dash }, { - label: "pressureIdle", + label: 'pressureIdle', units: 'атм', - xAccessorName: "pressureIdle", - yAccessorName: "date", + xAccessorName: 'pressureIdle', + yAccessorName: 'date', color: '#c00', footer: 'IDLE', dash }, { - label: "pressureDeltaLimitMax", + label: 'pressureDeltaLimitMax', units: 'атм', - xAccessorName: "pressureDeltaLimitMax", - yAccessorName: "date", + xAccessorName: 'pressureDeltaLimitMax', + yAccessorName: 'date', color: '#c00', footer: true, dash @@ -107,25 +107,25 @@ const pressureGroup = [ const axialLoadGroup = [ { - label: "Осевая нагрузка", + label: 'Осевая нагрузка', units: 'т', - xAccessorName: "axialLoad", - yAccessorName: "date", + xAccessorName: 'axialLoad', + yAccessorName: 'date', color: '#00a', - showValue: true + showGraph: true }, { - label: "axialLoadSp", + label: 'axialLoadSp', units: 'т', - xAccessorName: "axialLoadSp", - yAccessorName: "date", + xAccessorName: 'axialLoadSp', + yAccessorName: 'date', color: '#00a', footer: 'SP', dash }, { - label: "axialLoadLimitMax", + label: 'axialLoadLimitMax', units: 'т', - xAccessorName: "axialLoadLimitMax", - yAccessorName: "date", + xAccessorName: 'axialLoadLimitMax', + yAccessorName: 'date', color: '#00a', footer: true, dash @@ -134,33 +134,33 @@ const axialLoadGroup = [ const hookWeightGroup = [ { - label: "Вес на крюке", + label: 'Вес на крюке', units: 'т', - xAccessorName: "hookWeight", - yAccessorName: "date", + xAccessorName: 'hookWeight', + yAccessorName: 'date', color: '#0aa', - showValue: true + showGraph: true }, { - label: "hookWeightIdle", + label: 'hookWeightIdle', units: 'т', - xAccessorName: "hookWeightIdle", - yAccessorName: "date", + xAccessorName: 'hookWeightIdle', + yAccessorName: 'date', color: '#0aa', footer: 'IDLE', dash }, { - label: "hookWeightLimitMin", + label: 'hookWeightLimitMin', units: 'т', - xAccessorName: "hookWeightLimitMin", - yAccessorName: "date", + xAccessorName: 'hookWeightLimitMin', + yAccessorName: 'date', color: '#0aa', footer: true, dash }, { - label: "hookWeightLimitMax", + label: 'hookWeightLimitMax', units: 'т', - xAccessorName: "hookWeightLimitMax", - yAccessorName: "date", + xAccessorName: 'hookWeightLimitMax', + yAccessorName: 'date', color: '#0aa', footer: true, dash @@ -171,39 +171,39 @@ const hookWeightGroup = [ xAccessorName: 'rotorSpeed', yAccessorName: 'date', color: '#aa0', - showValue: true + showGraph: true } ] const rotorTorqueGroup = [ { - label: "Момент на роторе", + label: 'Момент на роторе', units: 'кН·м', - xAccessorName: "rotorTorque", - yAccessorName: "date", + xAccessorName: 'rotorTorque', + yAccessorName: 'date', color: '#a0a', - showValue: true + showGraph: true }, { - label: "План. Момент на роторе", + label: 'План. Момент на роторе', units: 'кН·м', - xAccessorName: "rotorTorqueSp", - yAccessorName: "date", + xAccessorName: 'rotorTorqueSp', + yAccessorName: 'date', color: '#a0a', footer: 'SP', dash }, { - label: "Момент на роторе х.х.", + label: 'Момент на роторе х.х.', units: 'кН·м', - xAccessorName: "rotorTorqueIdle", - yAccessorName: "date", + xAccessorName: 'rotorTorqueIdle', + yAccessorName: 'date', color: '#a0a', footer: 'IDLE', dash }, { - label: "rotorTorqueLimitMax", + label: 'rotorTorqueLimitMax', units: 'кН·м', - xAccessorName: "rotorTorqueLimitMax", - yAccessorName: "date", + xAccessorName: 'rotorTorqueLimitMax', + yAccessorName: 'date', color: '#a0a', footer: true, dash @@ -301,42 +301,43 @@ export default function TelemetryView({ idWell }) { } }, [idWell, chartInterval]) - return ( - - - - -
- Интервал:  - -
-   - TorqueMaster - SpinMaster -

MSE

- -
-
- - - - {paramsGroups.map((group, index) => - - + return ( + + + + + +
+ Интервал:  + +
+   + {'TorqueMaster'} + {'SpinMaster'} +

MSE

+ +
- )} - - - - -
-
) -} \ No newline at end of file + + + + {paramsGroups.map((group, index) => + + + + )} + + + +
+
+ ) +}