Семантические исправления

This commit is contained in:
goodmice 2021-10-19 14:49:53 +05:00
parent fa0fc2d0d6
commit f79c96f3c0
2 changed files with 110 additions and 109 deletions

View File

@ -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,

View File

@ -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 (<LoaderPortal show={showLoader}>
<Grid style={{ gridTemplateColumns: 'auto repeat(6, 1fr)' }}>
<GridItem col='1' row='1' colSpan='8' style={{ marginBottom: '0.5rem' }}>
<Flex>
<ModeDisplay data={dataSaub} />
<div style={{ marginLeft: '1rem' }}>
Интервал:&nbsp;
<Select defaultValue={defaultChartInterval} onChange={setChartInterval}>
{options}
</Select>
</div>
<span style={{ flexGrow: 20 }}>&nbsp;</span>
<img src={isTorqueStabEnabled(dataSpin) ? MomentStabPicEnabled : MomentStabPicDisabled} style={{ marginRight: "15px" }} alt="TorqueMaster" />
<img src={isSpinEnabled(dataSpin) ? SpinPicEnabled : SpinPicDisabled} style={{ marginRight: "15px" }} alt="SpinMaster" />
<h2 style={{ marginBottom: 0, marginRight: "15px", fontWeight: "bold", color: isMseEnabled(dataSaub) ? "green" : "lightgrey" }}>MSE</h2>
<UserOfWell data={dataSaub} />
</Flex>
</GridItem>
<GridItem col='1' row='2' rowSpan='3' style={{ minWidth: '260px', width: '0.142fr' }}>
<CustomColumn data={dataSaub} />
</GridItem>
{paramsGroups.map((group, index) =>
<GridItem col={2 + index} row='2' className='border_small' key={`${group.label}${index}`}>
<Column
style={{ width: '13vw' }}
data={dataSaub}
lineGroup={group}
interval={chartInterval}
headerHeight={'60px'}
showBorder={getIndexOfDrillingBy(dataSaub) === index} />
return (
<LoaderPortal show={showLoader}>
<Grid style={{ gridTemplateColumns: 'auto repeat(6, 1fr)' }}>
<GridItem col={'1'} row={'1'} colSpan={'8'} style={{ marginBottom: '0.5rem' }}>
<Flex>
<ModeDisplay data={dataSaub} />
<div style={{ marginLeft: '1rem' }}>
Интервал:&nbsp;
<Select defaultValue={defaultChartInterval} onChange={setChartInterval}>
{options}
</Select>
</div>
<span style={{ flexGrow: 20 }}>&nbsp;</span>
<img src={isTorqueStabEnabled(dataSpin) ? MomentStabPicEnabled : MomentStabPicDisabled} style={{ marginRight: '15px' }} alt={'TorqueMaster'} />
<img src={isSpinEnabled(dataSpin) ? SpinPicEnabled : SpinPicDisabled} style={{ marginRight: '15px' }} alt={'SpinMaster'} />
<h2 style={{ marginBottom: 0, marginRight: '15px', fontWeight: 'bold', color: isMseEnabled(dataSaub) ? 'green' : 'lightgrey' }}>MSE</h2>
<UserOfWell data={dataSaub} />
</Flex>
</GridItem>
)}
<GridItem col='2' row='3' colSpan='7'>
<ActiveMessagesOnline idWell={idWell} />
</GridItem>
</Grid>
</LoaderPortal>)
}
<GridItem col={'1'} row={'2'} rowSpan={'3'} style={{ minWidth: '260px', width: '0.142fr' }}>
<CustomColumn data={dataSaub} />
</GridItem>
{paramsGroups.map((group, index) =>
<GridItem col={2 + index} row={'2'} className={'border_small'} key={`${group.label}${index}`}>
<Column
style={{ width: '13vw' }}
data={dataSaub}
lineGroup={group}
interval={chartInterval}
headerHeight={'60px'}
showBorder={getIndexOfDrillingBy(dataSaub) === index} />
</GridItem>
)}
<GridItem col={'2'} row={'3'} colSpan={'7'}>
<ActiveMessagesOnline idWell={idWell} />
</GridItem>
</Grid>
</LoaderPortal>
)
}