diff --git a/src/components/AnalysisDepthToDay.jsx b/src/components/AnalysisDepthToDay.jsx index f7f5517..9577cb0 100644 --- a/src/components/AnalysisDepthToDay.jsx +++ b/src/components/AnalysisDepthToDay.jsx @@ -3,6 +3,7 @@ import { useParams } from "react-router-dom" import notify from "../components/notify" import { useState, useEffect } from 'react' import { AnalyticsService } from "../services/api" +import LoaderPortal from '../components/LoaderPortal' const lines = [ { label: "Глубина забоя", yAccessorName: "wellDepth", color: '#f00' }, @@ -31,11 +32,11 @@ export function AnalysisDepthToDay() { }, [id]) return ( - <> + - + ) } \ No newline at end of file diff --git a/src/components/AnalysisDepthToInterval.jsx b/src/components/AnalysisDepthToInterval.jsx index 840206c..36d1531 100644 --- a/src/components/AnalysisDepthToInterval.jsx +++ b/src/components/AnalysisDepthToInterval.jsx @@ -1,10 +1,10 @@ import { useParams } from "react-router-dom" -import { DatePicker } from 'antd' import notify from "../components/notify" import { useState, useEffect } from 'react' import { AnalyticsService } from '../services/api' import { ChartDepthToInterval } from './charts/ChartDepthToInterval' import { Select } from 'antd' +import LoaderPortal from '../components/LoaderPortal' const { Option } = Select @@ -19,8 +19,6 @@ const timePeriodCollection = [ { value: '86400', label: '24 часа' } ] -const { RangePicker } = DatePicker - const lines = [{ label: 'График скорость проходки-интервал', yAccessorName: "intervalDepthProgress", xAccessorName: "intervalStartDate", color: '#00f' }] export function AnalysisDepthToInterval() { @@ -48,7 +46,7 @@ export function AnalysisDepthToInterval() { }, [id, chartInterval]) return ( - <> + @@ -56,6 +54,6 @@ export function AnalysisDepthToInterval() { data={depthToIntervalData} lines={lines} /> - + ) } \ No newline at end of file diff --git a/src/components/AnalysisOperationTime.jsx b/src/components/AnalysisOperationTime.jsx index 1bcd261..690cab6 100644 --- a/src/components/AnalysisOperationTime.jsx +++ b/src/components/AnalysisOperationTime.jsx @@ -5,6 +5,8 @@ import { useState, useEffect } from 'react' import { AnalyticsService } from '../services/api' import { ChartOperationTime } from './charts/ChartOperationTime' import locale from "antd/lib/locale/ru_RU"; +import LoaderPortal from '../components/LoaderPortal' +import moment from 'moment' const { RangePicker } = DatePicker @@ -14,10 +16,7 @@ export function AnalysisOperationTime() { let { id } = useParams() const [operationTimeData, setOperationTimeData] = useState([]) const [loader, setLoader] = useState(false) - const [range, setRange] = useState([]) - - let begin = null - let end = null + const [range, setRange] = useState([moment().subtract(1,'days'), moment()]) const onChangeRange = (range) => { setRange(range) @@ -29,6 +28,8 @@ export function AnalysisOperationTime() { useEffect(() => { setLoader(true) + let begin = null + let end = null if (range?.length > 1) { begin = range[0].toISOString() end = range[1].toISOString() @@ -44,7 +45,7 @@ export function AnalysisOperationTime() { }, [id, range]) return ( - <> + - + ) } \ No newline at end of file