forked from ddrilling/asb_cloud_front
Исправлена ошибка с ключами при подгрузке на комп. скв.
This commit is contained in:
parent
c44195229e
commit
54ada2298c
@ -25,6 +25,8 @@ const filtersMinMax = [
|
||||
{ text: 'max', value: 'max' },
|
||||
]
|
||||
|
||||
const sortBySectionId = (a, b) => a.sectionId - b.sectionId
|
||||
|
||||
const filtersSectionsType = []
|
||||
const DAY_IN_MS = 1000 * 60 * 60 * 24
|
||||
|
||||
@ -130,7 +132,7 @@ export const WellCompositeSections = memo(({ idWell, statsWells, selectedSection
|
||||
makeTextColumn('скв №', 'caption', null, null,
|
||||
(text, item) => <Link to={{ pathname: `/well/${item?.id}`, state: { from: location.pathname }}}>{text ?? '-'}</Link>
|
||||
),
|
||||
makeTextColumn('Секция', 'sectionType', filtersSectionsType, null, (text) => text ?? '-'),
|
||||
makeTextColumn('Секция', 'sectionType', filtersSectionsType, sortBySectionId, (text) => text ?? '-'),
|
||||
makeNumericColumnPlanFact('Глубина, м', 'sectionWellDepth', filtersMinMax, makeFilterMinMaxFunction),
|
||||
makeNumericColumnPlanFact('Продолжительность, ч', 'sectionBuildDays', filtersMinMax, makeFilterMinMaxFunction),
|
||||
makeNumericColumnPlanFact('МСП, м/ч', 'sectionRateOfPenetration', filtersMinMax, makeFilterMinMaxFunction),
|
||||
|
@ -42,13 +42,14 @@ export const WellCompositeEditor = memo(({ idWell, rootPath }) => {
|
||||
|
||||
useEffect(() => {
|
||||
const wellIds = selectedSections.map((value) => value.idWellSrc)
|
||||
.filter((id, idx, arr) => arr.lastIndexOf(id) === idx)
|
||||
setSelectedIdWells(wellIds)
|
||||
}, [selectedSections])
|
||||
|
||||
useEffect(() => invokeWebApiWrapperAsync(
|
||||
async () => {
|
||||
const stats = await OperationStatService.getWellsStat(selectedIdWells)
|
||||
setStatsWells(arrayOrDefault(stats))
|
||||
const stats = arrayOrDefault(await OperationStatService.getWellsStat(selectedIdWells))
|
||||
setStatsWells(stats)
|
||||
},
|
||||
setShowTabLoader,
|
||||
'Не удалось загрузить статистику по скважинам/секциям',
|
||||
|
Loading…
Reference in New Issue
Block a user