From e29764576c21e38d7d4d0d774bc61ab68e793bf9 Mon Sep 17 00:00:00 2001 From: Alexey Date: Mon, 28 Jun 2021 09:42:35 +0500 Subject: [PATCH] =?UTF-8?q?=D0=B8=D0=B7=D0=BC=D0=B5=D0=BD=D0=B5=D0=BD?= =?UTF-8?q?=D1=8B=20=D1=88=D0=B0=D0=B3=D0=B8=20=D0=B3=D1=80=D0=B0=D1=84?= =?UTF-8?q?=D0=B8=D0=BA=D0=BE=D0=B2=20=D0=BF=D0=BE=20=D0=B2=D1=80=D0=B5?= =?UTF-8?q?=D0=BC=D0=B5=D0=BD=D0=B8=20=D0=B4=D0=BB=D1=8F=20=D1=80=D0=B0?= =?UTF-8?q?=D0=BF=D0=BE=D1=80=D1=82=D0=BE=D0=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/Report.jsx | 32 ++++++++++++++++++++------------ 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/src/pages/Report.jsx b/src/pages/Report.jsx index f3b30c0..2b18cfa 100644 --- a/src/pages/Report.jsx +++ b/src/pages/Report.jsx @@ -26,11 +26,20 @@ let reportDatesRange = { to: moment("9999-12-31T23:59:59.9999999") } -const timePeriodNames = { - 600: '1 минута', - 86400:'1 день', - 604800:'1 неделя' -} +const timePeriodNames = [ + {label: '1 секунда', value: 1}, + {label: '10 секунд', value: 10}, + {label: '1 минута', value: 60}, + {label: '5 минут', value: 300}, + {label: '30 минут', value: 1800}, + {label: '1 час', value: 3600}, + {label: '6 часов', value: 21600}, + {label: '12 часов', value: 43200}, + {label: '1 день', value: 86400}, + {label: '1 неделя', value: 604800} +] + +const firstStep = timePeriodNames[2]["value"] const imgPaths = { '.pdf': '/images/pdf.png', @@ -42,7 +51,7 @@ const imgPaths = { export default function Report(props) { const [rangeDate, setRangeDate] = useState([moment().subtract(1,'days'), moment()]) - const [step, setStep] = useState(600) + const [step, setStep] = useState(firstStep) const [format, setFormat] = useState(0) const [approxPages, setPagesCount] = useState(0) const [suitableReports, setSuitableReports] = useState([]) @@ -51,6 +60,8 @@ export default function Report(props) { let wellId = useParams().id; + const periods = timePeriodNames.map((line) => ) + const columns = [ { title: '', @@ -244,15 +255,12 @@ export default function Report(props) { - - - - + {periods}