From 2ab34efdd635ff60d2b1edc8a1ab2cad403ffff9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A4=D1=80=D0=BE=D0=BB=D0=BE=D0=B2?= Date: Fri, 20 Aug 2021 17:49:10 +0500 Subject: [PATCH] grouping last data --- .../modalWindows/ModalChartDepthToday.jsx | 25 ------------------- src/pages/Cluster.jsx | 4 +-- .../LastData}/DrillingFluid.jsx | 6 ++--- src/pages/LastData/LastDataTable.jsx | 12 +++++++++ .../LastData}/MudDiagram.jsx | 0 .../modalWindows => pages/LastData}/Nnb.jsx | 0 .../_old_LastData.__} | 6 ++--- src/pages/LastData/index.jsx | 8 ++++++ .../api/services/WellOperationService.ts | 2 +- 9 files changed, 28 insertions(+), 35 deletions(-) delete mode 100644 src/components/modalWindows/ModalChartDepthToday.jsx rename src/{components/modalWindows => pages/LastData}/DrillingFluid.jsx (98%) create mode 100644 src/pages/LastData/LastDataTable.jsx rename src/{components/modalWindows => pages/LastData}/MudDiagram.jsx (100%) rename src/{components/modalWindows => pages/LastData}/Nnb.jsx (100%) rename src/pages/{LastData.jsx => LastData/_old_LastData.__} (90%) create mode 100644 src/pages/LastData/index.jsx diff --git a/src/components/modalWindows/ModalChartDepthToday.jsx b/src/components/modalWindows/ModalChartDepthToday.jsx deleted file mode 100644 index 2117ff3..0000000 --- a/src/components/modalWindows/ModalChartDepthToday.jsx +++ /dev/null @@ -1,25 +0,0 @@ -import { useState } from 'react' -import { AnalysisDepthToDay } from '../AnalysisDepthToDay' -import { Button, Modal } from 'antd' - -export default function ModalChartDepthToDay({idWell}) { - const [chartVisible, setChartVisible] = useState(false) - - return (<> - - setChartVisible(false)} - onCancel={() => setChartVisible(false)} - width={1800} - okText='Ок' - cancelText='Отмена' - > - - - ) -} \ No newline at end of file diff --git a/src/pages/Cluster.jsx b/src/pages/Cluster.jsx index 46cbe33..093b4e4 100644 --- a/src/pages/Cluster.jsx +++ b/src/pages/Cluster.jsx @@ -5,8 +5,6 @@ import { useState, useEffect } from "react"; import { ClusterService } from '../services/api' import { notify } from "../components/factory" import { Table, Tag, Button } from 'antd'; -import ModalChartDepthToDay from '../components/modalWindows/ModalChartDepthToday' - export default function Cluster() { let { id } = useParams() @@ -117,7 +115,7 @@ export default function Cluster() { }, { title: 'График глубина-день', - render: (_, item) => () + render: (_, item) => () }, { title: 'Таблица по операциям', diff --git a/src/components/modalWindows/DrillingFluid.jsx b/src/pages/LastData/DrillingFluid.jsx similarity index 98% rename from src/components/modalWindows/DrillingFluid.jsx rename to src/pages/LastData/DrillingFluid.jsx index bd00324..fcf3dd3 100644 --- a/src/components/modalWindows/DrillingFluid.jsx +++ b/src/pages/LastData/DrillingFluid.jsx @@ -1,10 +1,10 @@ import { useState, useEffect } from 'react'; import { useParams } from "react-router-dom"; import { InputNumber, Form, Popconfirm, Typography, Button } from 'antd' -import LoaderPortal from '../LoaderPortal' -import { makeColumn, Table } from '../Table' +import LoaderPortal from '../../components/LoaderPortal' +import { makeColumn, Table } from '../../components/Table' import { FluidService } from '../../services/api/services/FluidService'; -import { notify } from "../factory" +import { notify } from "../../components/factory" const EditableCell = ({ editing, diff --git a/src/pages/LastData/LastDataTable.jsx b/src/pages/LastData/LastDataTable.jsx new file mode 100644 index 0000000..1afe993 --- /dev/null +++ b/src/pages/LastData/LastDataTable.jsx @@ -0,0 +1,12 @@ +import { useState, useEffect } from 'react' +import { EditableTable, DatePickerWrapper, SelectFromDictionary, numericColumnOptions, makeColumn } from "../../components/Table" +import LoaderPortal from '../../components/LoaderPortal' +import { invokeWebApiWrapperAsync } from '../../components/factory' + +export default function LastDataTable({idWell}){ + const [showLoader, setShowLoader] = useState(false) + + const update = () => {} + + return
Open hystory
+} \ No newline at end of file diff --git a/src/components/modalWindows/MudDiagram.jsx b/src/pages/LastData/MudDiagram.jsx similarity index 100% rename from src/components/modalWindows/MudDiagram.jsx rename to src/pages/LastData/MudDiagram.jsx diff --git a/src/components/modalWindows/Nnb.jsx b/src/pages/LastData/Nnb.jsx similarity index 100% rename from src/components/modalWindows/Nnb.jsx rename to src/pages/LastData/Nnb.jsx diff --git a/src/pages/LastData.jsx b/src/pages/LastData/_old_LastData.__ similarity index 90% rename from src/pages/LastData.jsx rename to src/pages/LastData/_old_LastData.__ index 1d8549c..d86ba31 100644 --- a/src/pages/LastData.jsx +++ b/src/pages/LastData/_old_LastData.__ @@ -1,8 +1,8 @@ import {Button, Modal } from "antd"; -import {DrillingFluid} from "../components/modalWindows/DrillingFluid"; +import {DrillingFluid} from "../../components/modalWindows/DrillingFluid"; import {useState} from "react"; -import {SludgeDiagram} from "../components/modalWindows/MudDiagram"; -import {Nnb} from "../components/modalWindows/Nnb" +import {SludgeDiagram} from "../../components/modalWindows/MudDiagram"; +import {Nnb} from "../../components/modalWindows/Nnb" export default function LastData(/*{idWell}*/) { diff --git a/src/pages/LastData/index.jsx b/src/pages/LastData/index.jsx new file mode 100644 index 0000000..3ddee23 --- /dev/null +++ b/src/pages/LastData/index.jsx @@ -0,0 +1,8 @@ +//import { useState, useEffect } from 'react' + +export default function LastData({idWell}){ + return <> +

last data

+ + +} \ No newline at end of file diff --git a/src/services/api/services/WellOperationService.ts b/src/services/api/services/WellOperationService.ts index cf209d2..09d7004 100644 --- a/src/services/api/services/WellOperationService.ts +++ b/src/services/api/services/WellOperationService.ts @@ -44,7 +44,7 @@ sectionTypeIds?: Array, operationCategoryIds?: Array, begin?: string, end?: string, -skip: number, +skip: number = 0, take: number = 32, ): Promise { const result = await __request({