From 7ff65e063cc8023f469b511e7a002b7ba49b714b Mon Sep 17 00:00:00 2001 From: goodmice Date: Mon, 18 Oct 2021 11:49:53 +0500 Subject: [PATCH] =?UTF-8?q?=D0=BD=D0=B0=D0=BF=D0=B8=D1=81=D0=B0=D0=BD?= =?UTF-8?q?=D0=B8=D0=B5=20=D0=92=D0=A1=D0=9F=20=D0=B8=D1=81=D0=BF=D1=80?= =?UTF-8?q?=D0=B0=D0=B2=D0=BB=D0=B5=D0=BD=D0=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/WellOperations/WellCompositeEditor/index.jsx | 4 ++-- src/pages/WellOperations/WellDrillParams.jsx | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/pages/WellOperations/WellCompositeEditor/index.jsx b/src/pages/WellOperations/WellCompositeEditor/index.jsx index 37bb544..2b35175 100644 --- a/src/pages/WellOperations/WellCompositeEditor/index.jsx +++ b/src/pages/WellOperations/WellCompositeEditor/index.jsx @@ -51,7 +51,7 @@ export const WellCompositeEditor = ({idWell}) => { try { const selected = await WellCompositeService.get(idWell) - setSelectedSections(selected) + setSelectedSections(Array.isArray(selected) ? selected : []) } catch(e) { setSelectedSections([]) } @@ -69,7 +69,7 @@ export const WellCompositeEditor = ({idWell}) => { useEffect(() => invokeWebApiWrapperAsync( async () => { const stats = await WellOperationStatService.getWellsStat(selectedIdWells) - setStatsWells(stats) + setStatsWells(Array.isArray(stats) ? stats : []) }, setShowTabLoader, 'Не удалось загрузить статистику по скважинам/секциям' diff --git a/src/pages/WellOperations/WellDrillParams.jsx b/src/pages/WellOperations/WellDrillParams.jsx index 189f5d4..1ac1efc 100644 --- a/src/pages/WellOperations/WellDrillParams.jsx +++ b/src/pages/WellOperations/WellDrillParams.jsx @@ -20,8 +20,8 @@ export const columns = [ // makeNumericStartEnd('Глубина', 'depth'), makeNumericAvgRange('Нагрузка', 'axialLoad'), makeNumericAvgRange('Давление', 'pressure'), - makeNumericAvgRange('Момент на ВПС', 'rotorTorque'), - makeNumericAvgRange('Обороты на ВПС', 'rotorSpeed'), + makeNumericAvgRange('Момент на ВСП', 'rotorTorque'), + makeNumericAvgRange('Обороты на ВСП', 'rotorSpeed'), makeNumericAvgRange('Расход', 'flow') ] @@ -32,7 +32,7 @@ export const WellDrillParams = ({idWell}) => { const updateParams = () => invokeWebApiWrapperAsync( async () => { const params = await DrillParamsService.getAll(idWell) - setParams(params) + setParams(Array.isArray(params) ? params : []) }, setShowLoader, 'Не удалось загрузить список режимов бурения скважины'