Исправлено оповещение об ошибке в TelemetryView. Испарвлены стили.

This commit is contained in:
Alexey 2021-05-27 13:46:46 +05:00
parent 6f12d57805
commit dd46525c89
5 changed files with 107 additions and 69 deletions

View File

@ -32,7 +32,7 @@ export const ChartTimeOnlineFooter = (props) =>{
if(popContent) if(popContent)
spField = <Popover content={popContent}> spField = <Popover content={popContent}>
<div className="menu_title"> <div className="chart-footer">
<ControlOutlined className='display_label'/> <ControlOutlined className='display_label'/>
{spField} {spField}
</div> </div>

View File

@ -41,7 +41,7 @@ export default function Well() {
</Menu> </Menu>
<Layout> <Layout>
<Content className="site-layout-background sheet"> <Content className="site-layout-background">
<Switch> <Switch>
<Route path="/well/:id/file"> <Route path="/well/:id/file">
<Files/> <Files/>

View File

@ -13,7 +13,7 @@ export default function Main() {
<Content> <Content>
<PageHeader/> <PageHeader/>
<Layout> <Layout>
<Content className="site-layout-background sheet well_menu"> <Content className="site-layout-background sheet">
<Switch> <Switch>
<Route path="/well/:id/"> <Route path="/well/:id/">
<Well/> <Well/>

View File

@ -39,7 +39,13 @@ const pressureGroup = {
lineSp: {label: "pressureSp", units: 'атм', xAccessorName: "pressureSp", yAccessorName: "date", color: '#c00'}, lineSp: {label: "pressureSp", units: 'атм', xAccessorName: "pressureSp", yAccessorName: "date", color: '#c00'},
lineIdle: {label: "pressureIdle", units: 'атм', xAccessorName: "pressureIdle", yAccessorName: "date", color: '#c00'}, lineIdle: {label: "pressureIdle", units: 'атм', xAccessorName: "pressureIdle", yAccessorName: "date", color: '#c00'},
linesOther: [ linesOther: [
{ label: "мекс. перепад", units: 'атм', xAccessorName: "pressureDeltaLimitMax", yAccessorName: "date", color: '#c00' }, {
label: "мекс. перепад",
units: 'атм',
xAccessorName: "pressureDeltaLimitMax",
yAccessorName: "date",
color: '#c00'
},
], ],
} }
@ -57,10 +63,29 @@ const hookWeightGroup = {
label: "Ввес на крюке", label: "Ввес на крюке",
yDisplay: false, yDisplay: false,
linePv: {label: "hookWeight", units: 'т', xAccessorName: "hookWeight", yAccessorName: "date", color: '#0aa'}, linePv: {label: "hookWeight", units: 'т', xAccessorName: "hookWeight", yAccessorName: "date", color: '#0aa'},
lineIdle: { label: "hookWeightIdle", units: 'т', xAccessorName: "hookWeightIdle", yAccessorName: "date", color: '#0aa', dash }, lineIdle: {
label: "hookWeightIdle",
units: 'т',
xAccessorName: "hookWeightIdle",
yAccessorName: "date",
color: '#0aa',
dash
},
linesOther: [ linesOther: [
{ label: "hookWeightLimitMin", units: 'т', xAccessorName: "hookWeightLimitMin", yAccessorName: "date", color: '#0aa' }, {
{ label: "hookWeightLimitMax", units: 'т', xAccessorName: "hookWeightLimitMax", yAccessorName: "date", color: '#0aa' }, label: "hookWeightLimitMin",
units: 'т',
xAccessorName: "hookWeightLimitMin",
yAccessorName: "date",
color: '#0aa'
},
{
label: "hookWeightLimitMax",
units: 'т',
xAccessorName: "hookWeightLimitMax",
yAccessorName: "date",
color: '#0aa'
},
], ],
} }
@ -69,9 +94,21 @@ const rotorTorqueGroup = {
yDisplay: false, yDisplay: false,
linePv: {label: "rotorTorque", units: 'кН·м', xAccessorName: "rotorTorque", yAccessorName: "date", color: '#a0a'}, linePv: {label: "rotorTorque", units: 'кН·м', xAccessorName: "rotorTorque", yAccessorName: "date", color: '#a0a'},
lineSp: {label: "rotorTorqueSp", units: 'кН·м', xAccessorName: "rotorTorqueSp", yAccessorName: "date", color: '#a0a'}, lineSp: {label: "rotorTorqueSp", units: 'кН·м', xAccessorName: "rotorTorqueSp", yAccessorName: "date", color: '#a0a'},
lineIdle: { label: "rotorTorqueIdle", units: 'кН·м', xAccessorName: "rotorTorqueIdle", yAccessorName: "date", color: '#a0a' }, lineIdle: {
label: "rotorTorqueIdle",
units: 'кН·м',
xAccessorName: "rotorTorqueIdle",
yAccessorName: "date",
color: '#a0a'
},
linesOther: [ linesOther: [
{ label: "rotorTorqueLimitMax", units: 'кН·м', xAccessorName: "rotorTorqueLimitMax", yAccessorName: "date", color: '#a0a' }, {
label: "rotorTorqueLimitMax",
units: 'кН·м',
xAccessorName: "rotorTorqueLimitMax",
yAccessorName: "date",
color: '#a0a'
},
], ],
} }
@ -164,20 +201,19 @@ export default function TelemetryView(props) {
} }
useEffect(() => { useEffect(() => {
try {
DataService.getData(id) DataService.getData(id)
.then(handleReceiveDataSaub) .then(handleReceiveDataSaub)
} catch (ex) { .catch((ex) => {
Notification(`Не удалось загрузить данные по скважине ${id}`, 'error') Notification(`Не удалось загрузить данные по скважине "${id}"`, 'error')
} console.log(ex)
})
try {
MessageService.getMessage(id) MessageService.getMessage(id)
.then(handleReceiveMessages) .then(handleReceiveMessages)
} catch (ex) { .catch((ex) => {
Notification(`Не удалось загрузить сообщения по скважине ${id}`, 'error') Notification(`Не удалось загрузить сообщения по скважине "${id}"`, 'error')
console.log(ex) console.log(ex)
} })
let unSubscribeDataSaubHub = Subscribe('ReceiveDataSaub', `well_${id}`, handleReceiveDataSaub) let unSubscribeDataSaubHub = Subscribe('ReceiveDataSaub', `well_${id}`, handleReceiveDataSaub)
let unSubscribeMessagesHub = Subscribe('ReceiveMessages', `well_${id}`, handleReceiveMessages) let unSubscribeMessagesHub = Subscribe('ReceiveMessages', `well_${id}`, handleReceiveMessages)

View File

@ -61,6 +61,7 @@ html {
.sheet{ .sheet{
padding: 5px 24px; padding: 5px 24px;
min-height: 280px; min-height: 280px;
margin: 0 15px;
} }
.site-layout-background { .site-layout-background {
@ -117,7 +118,8 @@ html {
flex: auto; flex: auto;
} }
.menu_title { .menu_title,
.chart-footer {
display: flex; display: flex;
} }