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, 'Не удалось загрузить список режимов бурения скважины'