From abff5ad6445f36bc5a30396b8fb4e2778b6f3c57 Mon Sep 17 00:00:00 2001 From: KharchenkoVV Date: Thu, 22 Jul 2021 14:53:30 +0500 Subject: [PATCH 1/5] =?UTF-8?q?CF2-33:=20=D0=9F=D0=B5=D1=80=D0=B5=D0=B4?= =?UTF-8?q?=D0=B5=D0=BB=D0=B0=D0=BD=D1=8B=20=D1=82=D0=B0=D0=B1=D0=BB=D0=B8?= =?UTF-8?q?=D1=86=D1=8B=20=D0=94=D0=BE=D0=BA=D1=83=D0=BC=D0=B5=D0=BD=D1=82?= =?UTF-8?q?=D0=BE=D0=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/CementFluid.jsx | 106 +++++++++ src/components/Disposition.jsx | 19 ++ src/components/Documents.jsx | 170 ++++++++++++++ src/components/MenuDocuments.jsx | 40 ++++ src/components/NnbTable.jsx | 250 ++++++++++++++++++++ src/components/Sludge.jsx | 383 +++++++++++++++++++++++++++++++ src/pages/Cementing.jsx | 8 + src/pages/DocumentForWell.jsx | 8 + src/pages/FluidService.jsx | 8 + src/pages/Gti.jsx | 8 + src/pages/LastData.jsx | 94 ++++++++ src/pages/Master.jsx | 8 + src/pages/Messages.jsx | 2 +- src/pages/Nnb.jsx | 8 + src/pages/Supervisor.jsx | 8 + src/pages/Well.jsx | 68 ++++++ src/pages/WellAnalysis.jsx | 4 +- src/services/signalr/index.ts | 4 +- src/styles/index.css | 8 + src/styles/message.css | 2 +- 20 files changed, 1200 insertions(+), 6 deletions(-) create mode 100644 src/components/CementFluid.jsx create mode 100644 src/components/Disposition.jsx create mode 100644 src/components/Documents.jsx create mode 100644 src/components/MenuDocuments.jsx create mode 100644 src/components/NnbTable.jsx create mode 100644 src/components/Sludge.jsx create mode 100644 src/pages/Cementing.jsx create mode 100644 src/pages/DocumentForWell.jsx create mode 100644 src/pages/FluidService.jsx create mode 100644 src/pages/Gti.jsx create mode 100644 src/pages/LastData.jsx create mode 100644 src/pages/Master.jsx create mode 100644 src/pages/Nnb.jsx create mode 100644 src/pages/Supervisor.jsx diff --git a/src/components/CementFluid.jsx b/src/components/CementFluid.jsx new file mode 100644 index 0000000..45fa840 --- /dev/null +++ b/src/components/CementFluid.jsx @@ -0,0 +1,106 @@ +let date = new Date().toLocaleString() + +export function CementFluid() { + return (<> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ НаименованиеТемпература, °CПлотность, г/см³Усл. вязкость, секR300R600R3/R6ДНС, дПаПластич. вязкость, сПзСНС, дПаR3/R6 49СДНС 49С, дПаПластич. вязкость 49С, сПзСНС 49С, дПаМВТ, кг/м³Песок, %Фильтрация, см³/30минКорка, ммКТКрНЖесткость, мг/лХлориды, мг/лPfMfPmТвердая фаза раствора, %Смазка, %Карбонат кальция, кг/м³
План                           
Факт                           
+
 
+

{date}

+ + ) +} \ No newline at end of file diff --git a/src/components/Disposition.jsx b/src/components/Disposition.jsx new file mode 100644 index 0000000..b40e30b --- /dev/null +++ b/src/components/Disposition.jsx @@ -0,0 +1,19 @@ +let date = new Date().toLocaleString() + + +export default function Disposition() { + return ( + <> +

Распоряжение

+ +

+ Текст +

+ +

Ф.И.О.

+

Должность

+

Компания

+

{date}

+ + ) +} \ No newline at end of file diff --git a/src/components/Documents.jsx b/src/components/Documents.jsx new file mode 100644 index 0000000..db405b0 --- /dev/null +++ b/src/components/Documents.jsx @@ -0,0 +1,170 @@ +import {Table, DatePicker, Form, Button, Upload, ConfigProvider} from 'antd'; +import { UploadOutlined } from '@ant-design/icons'; +import MenuDocuments from "./MenuDocuments"; +import {useState, useEffect} from "react"; +import {useParams} from 'react-router-dom' +import notify from './notify' +import LoaderPortal from './LoaderPortal' +import locale from "antd/lib/locale/ru_RU"; +import moment from 'moment' + +const pageSize = 26 +const {RangePicker} = DatePicker; + +const columns = [ + { + title: 'Документ', + key: 'document', + dataIndex: 'name', + }, + { + title: 'Дата загрузки', + key: 'uploadDate', + dataIndex: 'uploadDate', + render: (item) => moment.utc(item).local().format('DD MMM YYYY, HH:mm:ss') + }, + { + title: 'Ф.И.О.', + key: 'name', + dataIndex: 'name', + } +]; + +export default function Documents() { + let {id} = useParams() + + const [page, setPage] = useState(1) + const [range, setRange] = useState([]) + const [pagination, setPagination] = useState(null) + const [files, setFiles] = useState([]) + + const [loader, setLoader] = useState(false) + + const submitFileFormProps = { + //action: 'https://www.mocky.io/v2/5cc8019d300000980a055e76', + onChange({ file, fileList }) { + if (file.status !== 'uploading') { + console.log(file, fileList); + } + } + } + + const onChangeRange = (range) => { + setRange(range) + } + + const onFinish = (values) => { + console.log('Success:', values); + } + + const onFinishFailed = (errorInfo) => { + console.log('Failed:', errorInfo); + } + + const fileList = [] + + useEffect(() => { + const GetDocuments = async () => { + setLoader(true) + + try { + let begin = null + let end = null + if (range?.length > 1) { + begin = range[0].toISOString() + end = range[1].toISOString() + } + // await AnalyticsService.getOperationsByWell( + // `${id}`, + // (page-1) * pageSize, + // pageSize, + // begin, + // end).then((paginatedFiles) => { + // setFiles(paginatedFiles?.items.map(f => { + // return { + // key: f.id, + // begin: f.date, + // ...f + // } + // })) + + // setPagination({ + // total: paginatedFiles?.count, + // current: Math.floor(paginatedFiles?.skip / pageSize), + // }) + // } + //) + } catch (ex) { + notify(`Не удалось загрузить файлы по скважине "${id}"`, 'error') + console.log(ex) + } + setLoader(false) + } + GetDocuments() + }, [id, range]) + + return ( +
+ +
+

Фильтр документов:

+ + + +
+ +
 
+
+
+ + {/* { + setFile(e.target.value) + files.push(e.target.value) + localStorage.setItem(e.target.value, file) + setFiles(files) + console.log(e.target.value) + } + }/> */} + + + + + + + +
+
+
 
+ setPage(page) + }} + rowKey={(record) => record.id} + /> + ); +} \ No newline at end of file diff --git a/src/components/MenuDocuments.jsx b/src/components/MenuDocuments.jsx new file mode 100644 index 0000000..d3b73ce --- /dev/null +++ b/src/components/MenuDocuments.jsx @@ -0,0 +1,40 @@ +import {Menu} from "antd"; +import {FolderOutlined} from "@ant-design/icons"; +import {Link} from "react-router-dom"; + + +export default function MenuDocuments() { + return( + <> + + }> + Растворный сервис + + }> + Цементирование + + }> + ННБ + + }> + ГТИ + + }> + Документы по скважине + + }> + Супервайзер + + }> + Мастер + + }> + Последние данные + + + ) +} diff --git a/src/components/NnbTable.jsx b/src/components/NnbTable.jsx new file mode 100644 index 0000000..978e7c6 --- /dev/null +++ b/src/components/NnbTable.jsx @@ -0,0 +1,250 @@ +let date = new Date().toLocaleString() + +export function NnbTable() { + return (<> +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Глубина по + стволу, мЗенитный + угол, градАзимут + магнитный, градАзимут + истинный, градАзимут + дирекц., градГлубина по + вертикали, мАбсолютная + отметка, мЛок. + смещение к северу, мЛок. + смещение к востоку, мОтклонение + от устья, мАзимут + смещения, градОтклонение + от устья, мПространст. + интенсивность, град/10 мУгол + установки отклон., градИнтенсив. + по зениту, град/10 мКомментарийРазница вертикальных глубин + между ХХХ (план) и ХХХ (факт)Расстояние в пространстве между + ХХХ (план) и ХХХ (факт)


















+
 
+

{date}

+ ) +} \ No newline at end of file diff --git a/src/components/Sludge.jsx b/src/components/Sludge.jsx new file mode 100644 index 0000000..4705892 --- /dev/null +++ b/src/components/Sludge.jsx @@ -0,0 +1,383 @@ +let date = new Date().toLocaleString() + +export function Sludge() { + return (<> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
N пробы + Глубина + отбора пробыЛитологияКраткое + описаниеЛБА + бурового раствора ЛБА + (шлама)Газопоказания + Мех. + скоростьПредварительное заключение о насыщении по ГК
Песчаник + (%) Алевролит + (%)Аргиллит + (%)Аргиллит + бит. (%)Уголь + (%)Песок + (%)Глина + (%)Известняк + (%)Цемент + (%)Сумма + УВ мах. (абс%) С1 + метан (отн%)С2 этан + (отн%)С3 + пропан (отн%)С4 + бутан (отн%)С5 + пентан (отн%)






















+
 
+

{date}

+ + ) +} \ No newline at end of file diff --git a/src/pages/Cementing.jsx b/src/pages/Cementing.jsx new file mode 100644 index 0000000..b46fee5 --- /dev/null +++ b/src/pages/Cementing.jsx @@ -0,0 +1,8 @@ +import Documents from "../components/Documents" + +export default function Cementing() { + + return( + + ) +} \ No newline at end of file diff --git a/src/pages/DocumentForWell.jsx b/src/pages/DocumentForWell.jsx new file mode 100644 index 0000000..cdbf72e --- /dev/null +++ b/src/pages/DocumentForWell.jsx @@ -0,0 +1,8 @@ +import Documents from "../components/Documents" + +export default function DocumentsForWell() { + + return( + + ) +} \ No newline at end of file diff --git a/src/pages/FluidService.jsx b/src/pages/FluidService.jsx new file mode 100644 index 0000000..fa8e795 --- /dev/null +++ b/src/pages/FluidService.jsx @@ -0,0 +1,8 @@ +import Documents from "../components/Documents" + +export default function FluidService() { + + return( + + ) +} \ No newline at end of file diff --git a/src/pages/Gti.jsx b/src/pages/Gti.jsx new file mode 100644 index 0000000..4f37cf5 --- /dev/null +++ b/src/pages/Gti.jsx @@ -0,0 +1,8 @@ +import Documents from "../components/Documents" + +export default function Gti() { + + return( + + ) +} \ No newline at end of file diff --git a/src/pages/LastData.jsx b/src/pages/LastData.jsx new file mode 100644 index 0000000..a331594 --- /dev/null +++ b/src/pages/LastData.jsx @@ -0,0 +1,94 @@ +import {Button, Modal, Checkbox } from "antd"; +import {CementFluid} from "../components/CementFluid"; +import React, {useState} from "react"; +import {Sludge} from "../components/Sludge"; +import {NnbTable} from "../components/NnbTable" +import Disposition from "../components/Disposition"; +import MenuDocuments from "../components/MenuDocuments"; + + +export default function LastData() { + const [tableVisible, setTableVisible] = useState(false) + const [tableSludgeVisible, setTableSludgeVisible] = useState(false) + const [tableNNBVisible, setTableNNBVisible] = useState(false) + const [dispositionVisible, setDispositionVisible] = useState(false) + + return ( + <> +
+ +
+
 
+ + setTableVisible(false)} + onCancel={() => setTableVisible(false)} + width={1800} + okText='Ок' + cancelText='Отмена' + > + + + + setTableSludgeVisible(false)} + onCancel={() => setTableSludgeVisible(false)} + width={1600} + okText='Ок' + cancelText='Отмена' + > + + + + setTableNNBVisible(false)} + onCancel={() => setTableNNBVisible(false)} + width={1400} + okText='Ок' + cancelText='Отмена' + > + + + + setDispositionVisible(false)} + onCancel={() => setDispositionVisible(false)} + width={850} + okText='Ок' + cancelText='Отмена' + footer={[ + Принять распоряжение, + , + + ]} + > + + + ) +} \ No newline at end of file diff --git a/src/pages/Master.jsx b/src/pages/Master.jsx new file mode 100644 index 0000000..56da051 --- /dev/null +++ b/src/pages/Master.jsx @@ -0,0 +1,8 @@ +import Documents from "../components/Documents" + +export default function Master() { + + return( + + ) +} \ No newline at end of file diff --git a/src/pages/Messages.jsx b/src/pages/Messages.jsx index 0b410c6..2f9e92e 100644 --- a/src/pages/Messages.jsx +++ b/src/pages/Messages.jsx @@ -110,7 +110,7 @@ export default function Messages() { <>
-

Фильтр сообщений

+

Фильтр сообщений

record.id} /> - + ) } \ No newline at end of file diff --git a/src/services/signalr/index.ts b/src/services/signalr/index.ts index 02aad65..1e4a66a 100644 --- a/src/services/signalr/index.ts +++ b/src/services/signalr/index.ts @@ -14,12 +14,12 @@ type ConnectionsDict = { const Connections: ConnectionsDict = { 'hubs/telemetry': new HubConnectionBuilder() - .withUrl(`http://192.168.1.70:5000/hubs/telemetry`, ConnectionOptions) + .withUrl(`http://localhost:5000/hubs/telemetry`, ConnectionOptions) .withAutomaticReconnect() .build(), 'hubs/reports': new HubConnectionBuilder() - .withUrl(`http://192.168.1.70:5000/hubs/reports`, ConnectionOptions) + .withUrl(`http://localhost:5000/hubs/reports`, ConnectionOptions) .withAutomaticReconnect() .build() } diff --git a/src/styles/index.css b/src/styles/index.css index 8d31ab7..9a60f46 100644 --- a/src/styles/index.css +++ b/src/styles/index.css @@ -48,3 +48,11 @@ code { monospace; } +.linkDocuments { + color: #000; +} + +.linkDocuments:hover { + color: #c32828; +} + diff --git a/src/styles/message.css b/src/styles/message.css index fb003b0..cd0e395 100644 --- a/src/styles/message.css +++ b/src/styles/message.css @@ -33,7 +33,7 @@ margin: 0 0 5px 0; } -.filter-group__heading { +.filter-group-heading { margin: 5px auto; align-items: center; } From 87a7faa17f60bb9c9fd9e0ee5f84e189a9fae39e Mon Sep 17 00:00:00 2001 From: KharchenkoVV Date: Mon, 26 Jul 2021 11:12:20 +0500 Subject: [PATCH 2/5] =?UTF-8?q?CF2-33:=20=D0=94=D0=BE=D0=B1=D0=B0=D0=B2?= =?UTF-8?q?=D0=BB=D0=B5=D0=BD=D0=B0=20=D0=BE=D1=81=D0=BD=D0=BE=D0=B2=D0=B0?= =?UTF-8?q?=20=D0=B4=D0=BB=D1=8F=20=D0=BD=D0=BE=D0=B2=D0=BE=D0=B9=20=D0=B2?= =?UTF-8?q?=D0=BA=D0=BB=D0=B0=D0=B4=D0=BA=D0=B8=20'=D0=94=D0=BE=D0=BA?= =?UTF-8?q?=D1=83=D0=BC=D0=B5=D0=BD=D1=8B'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Documents.jsx | 101 +++++++++++++---------- src/pages/Cementing.jsx | 4 +- src/pages/DocumentForWell.jsx | 4 +- src/pages/FluidService.jsx | 4 +- src/pages/Gti.jsx | 4 +- src/pages/Login.jsx | 1 + src/pages/Master.jsx | 4 +- src/pages/Nnb.jsx | 4 +- src/pages/Supervisor.jsx | 4 +- src/pages/Well.jsx | 14 ++-- src/services/api/index.ts | 3 + src/services/api/services/FileService.ts | 92 +++++++++++++++++++++ 12 files changed, 174 insertions(+), 65 deletions(-) create mode 100644 src/services/api/services/FileService.ts diff --git a/src/components/Documents.jsx b/src/components/Documents.jsx index db405b0..c758f90 100644 --- a/src/components/Documents.jsx +++ b/src/components/Documents.jsx @@ -1,11 +1,12 @@ -import {Table, DatePicker, Form, Button, Upload, ConfigProvider} from 'antd'; -import { UploadOutlined } from '@ant-design/icons'; -import MenuDocuments from "./MenuDocuments"; -import {useState, useEffect} from "react"; +import {Table, DatePicker, Form, Button, Upload, ConfigProvider} from 'antd' +import { UploadOutlined } from '@ant-design/icons' +import MenuDocuments from "./MenuDocuments" +import { FileService } from '../services/api' +import {useState, useEffect} from "react" import {useParams} from 'react-router-dom' import notify from './notify' import LoaderPortal from './LoaderPortal' -import locale from "antd/lib/locale/ru_RU"; +import locale from "antd/lib/locale/ru_RU" import moment from 'moment' const pageSize = 26 @@ -25,26 +26,26 @@ const columns = [ }, { title: 'Ф.И.О.', - key: 'name', - dataIndex: 'name', + key: 'userName', + dataIndex: 'userName', } ]; -export default function Documents() { +export default function Documents({selectedFileCategory}) { let {id} = useParams() const [page, setPage] = useState(1) const [range, setRange] = useState([]) const [pagination, setPagination] = useState(null) const [files, setFiles] = useState([]) + const [selectedFiles, setSelectedFiles] = useState([]) const [loader, setLoader] = useState(false) const submitFileFormProps = { - //action: 'https://www.mocky.io/v2/5cc8019d300000980a055e76', onChange({ file, fileList }) { if (file.status !== 'uploading') { - console.log(file, fileList); + setSelectedFiles(fileList) } } } @@ -54,15 +55,33 @@ export default function Documents() { } const onFinish = (values) => { - console.log('Success:', values); + var fileList = values.fileInput.fileList + + if (fileList.length > 0) + { + const formData = new FormData(); + + fileList.forEach(val => { + formData.append('files', val.originFileObj) + }) + + fetch(`/api/files/${id}/files?idCategory=${selectedFileCategory}&idUser=${localStorage['userId']}`, { + headers: { + Authorization: 'Bearer ' + localStorage['token'] + }, + method: 'POST', + body: formData + }) + .then(async (response) => { + // refresh component to upload new files в зависимоть useEffect какую-то переменную, чтоб дергался снова запрос на всю инфу о файлах + }); + } } const onFinishFailed = (errorInfo) => { - console.log('Failed:', errorInfo); + notify(`Не удалось отправить файлы по скважине "${id}".`, 'error') } - const fileList = [] - useEffect(() => { const GetDocuments = async () => { setLoader(true) @@ -74,26 +93,29 @@ export default function Documents() { begin = range[0].toISOString() end = range[1].toISOString() } - // await AnalyticsService.getOperationsByWell( - // `${id}`, - // (page-1) * pageSize, - // pageSize, - // begin, - // end).then((paginatedFiles) => { - // setFiles(paginatedFiles?.items.map(f => { - // return { - // key: f.id, - // begin: f.date, - // ...f - // } - // })) + console.log(id) + await FileService.getFilesInfo( + `${id}`, + (page - 1) * pageSize, + pageSize, + selectedFileCategory, + begin, + end + ).then((paginatedFiles) => { + setFiles(paginatedFiles?.items.map(f => { + return { + key: f.id, + begin: f.date, + ...f + } + })) - // setPagination({ - // total: paginatedFiles?.count, - // current: Math.floor(paginatedFiles?.skip / pageSize), - // }) - // } - //) + setPagination({ + total: paginatedFiles?.count, + current: Math.floor(paginatedFiles?.skip / pageSize), + }) + } + ) } catch (ex) { notify(`Не удалось загрузить файлы по скважине "${id}"`, 'error') console.log(ex) @@ -101,7 +123,7 @@ export default function Documents() { setLoader(false) } GetDocuments() - }, [id, range]) + }, [id, selectedFileCategory, range]) return (
@@ -127,15 +149,6 @@ export default function Documents() { name="fileInput" rules={[{ required: true, message: 'Выберите файл' }]} > - {/* { - setFile(e.target.value) - files.push(e.target.value) - localStorage.setItem(e.target.value, file) - setFiles(files) - console.log(e.target.value) - } - }/> */} @@ -144,7 +157,7 @@ export default function Documents() { - -
- + +
 
{ + setSelectedItem({ current: e.key }); + }; + return( <> }> Растворный сервис diff --git a/src/pages/Cementing.jsx b/src/pages/Cementing.jsx index 72c3f99..2f08b27 100644 --- a/src/pages/Cementing.jsx +++ b/src/pages/Cementing.jsx @@ -1,8 +1,8 @@ import Documents from "../components/Documents" -export default function Cementing(id) { +export default function Cementing({selectedFileCategory}) { return( - + ) } \ No newline at end of file diff --git a/src/pages/DocumentForWell.jsx b/src/pages/DocumentForWell.jsx index bab1b6a..62255c3 100644 --- a/src/pages/DocumentForWell.jsx +++ b/src/pages/DocumentForWell.jsx @@ -1,8 +1,8 @@ import Documents from "../components/Documents" -export default function DocumentsForWell(id) { +export default function DocumentsForWell({selectedFileCategory}) { return( - + ) } \ No newline at end of file diff --git a/src/pages/FluidService.jsx b/src/pages/FluidService.jsx index 4f2135c..2022289 100644 --- a/src/pages/FluidService.jsx +++ b/src/pages/FluidService.jsx @@ -1,8 +1,8 @@ import Documents from "../components/Documents" -export default function FluidService(id) { +export default function FluidService({selectedFileCategory}) { return( - + ) } \ No newline at end of file diff --git a/src/pages/Gti.jsx b/src/pages/Gti.jsx index a822c5f..c51aa47 100644 --- a/src/pages/Gti.jsx +++ b/src/pages/Gti.jsx @@ -1,8 +1,8 @@ import Documents from "../components/Documents" -export default function Gti(id) { +export default function Gti({selectedFileCategory}) { return( - + ) } \ No newline at end of file diff --git a/src/pages/Master.jsx b/src/pages/Master.jsx index 9ec37c7..6c15e0c 100644 --- a/src/pages/Master.jsx +++ b/src/pages/Master.jsx @@ -1,8 +1,8 @@ import Documents from "../components/Documents" -export default function Master(id) { +export default function Master({selectedFileCategory}) { return( - + ) } \ No newline at end of file diff --git a/src/pages/Nnb.jsx b/src/pages/Nnb.jsx index c3b674c..c5d1227 100644 --- a/src/pages/Nnb.jsx +++ b/src/pages/Nnb.jsx @@ -1,8 +1,8 @@ import Documents from "../components/Documents" -export default function Nnb(id) { +export default function Nnb({selectedFileCategory}) { return( - + ) } \ No newline at end of file diff --git a/src/pages/Supervisor.jsx b/src/pages/Supervisor.jsx index 5a670a4..52bf0b8 100644 --- a/src/pages/Supervisor.jsx +++ b/src/pages/Supervisor.jsx @@ -1,8 +1,8 @@ import Documents from "../components/Documents" -export default function Supervisor(id) { +export default function Supervisor({selectedFileCategory}) { return( - + ) } \ No newline at end of file diff --git a/src/pages/Well.jsx b/src/pages/Well.jsx index df55594..293b95f 100644 --- a/src/pages/Well.jsx +++ b/src/pages/Well.jsx @@ -113,22 +113,22 @@ export default function Well() { - + - + - + - + - + - + diff --git a/src/services/api/services/FileService.ts b/src/services/api/services/FileService.ts index 5ba7110..8200338 100644 --- a/src/services/api/services/FileService.ts +++ b/src/services/api/services/FileService.ts @@ -69,22 +69,17 @@ end?: string, /** * Возвращает файл с диска на сервере * @param wellId id скважины - * @param fileName * @param fileId id запрашиваемого файла * @returns string Success * @throws ApiError */ public static async getFile( wellId: number, -fileName: string, -fileId?: number, +fileId: number, ): Promise { const result = await __request({ method: 'GET', - path: `/api/files/${wellId}/${fileName}`, - query: { - 'fileId': fileId, - }, + path: `/api/files/${wellId}/${fileId}`, }); return result.body; } From b6bfce38de21e013643d337307d3a87c8c18ce5b Mon Sep 17 00:00:00 2001 From: KharchenkoVV Date: Mon, 26 Jul 2021 16:07:05 +0500 Subject: [PATCH 5/5] =?UTF-8?q?CF2-33:=20=D0=9F=D1=83=D1=81=D1=82=D1=8B?= =?UTF-8?q?=D0=B5=20=D0=BA=D0=BE=D0=BC=D0=BF=D0=BE=D0=BD=D0=B5=D0=BD=D1=82?= =?UTF-8?q?=D1=8B,=20=D0=B2=D1=8B=D0=B7=D1=8B=D0=B2=D0=B0=D1=8E=D1=89?= =?UTF-8?q?=D0=B8=D0=B5=20Documents,=20=D0=B7=D0=B0=D0=BC=D0=B5=D0=BD?= =?UTF-8?q?=D0=B5=D0=BD=D1=8B=20=D1=81=D1=80=D0=B0=D0=B7=D1=83=20=D0=BD?= =?UTF-8?q?=D0=B0=20=D0=B2=D1=8B=D0=B7=D0=BE=D0=B2=20Documents?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Documents.jsx | 2 +- src/pages/Cementing.jsx | 8 -------- src/pages/DocumentForWell.jsx | 8 -------- src/pages/Gti.jsx | 8 -------- src/pages/Master.jsx | 8 -------- src/pages/Nnb.jsx | 8 -------- src/pages/Supervisor.jsx | 8 -------- src/pages/Well.jsx | 24 +++++++++--------------- 8 files changed, 10 insertions(+), 64 deletions(-) delete mode 100644 src/pages/Cementing.jsx delete mode 100644 src/pages/DocumentForWell.jsx delete mode 100644 src/pages/Gti.jsx delete mode 100644 src/pages/Master.jsx delete mode 100644 src/pages/Nnb.jsx delete mode 100644 src/pages/Supervisor.jsx diff --git a/src/components/Documents.jsx b/src/components/Documents.jsx index e3bbda3..b7cb274 100644 --- a/src/components/Documents.jsx +++ b/src/components/Documents.jsx @@ -171,7 +171,7 @@ export default function Documents({selectedFileCategory}) { } } GetDocuments() - }, [id, range, selectedFileCategory, isTableUpdating]) + }, [id, range,page, selectedFileCategory, isTableUpdating]) return (
diff --git a/src/pages/Cementing.jsx b/src/pages/Cementing.jsx deleted file mode 100644 index 2f08b27..0000000 --- a/src/pages/Cementing.jsx +++ /dev/null @@ -1,8 +0,0 @@ -import Documents from "../components/Documents" - -export default function Cementing({selectedFileCategory}) { - - return( - - ) -} \ No newline at end of file diff --git a/src/pages/DocumentForWell.jsx b/src/pages/DocumentForWell.jsx deleted file mode 100644 index 62255c3..0000000 --- a/src/pages/DocumentForWell.jsx +++ /dev/null @@ -1,8 +0,0 @@ -import Documents from "../components/Documents" - -export default function DocumentsForWell({selectedFileCategory}) { - - return( - - ) -} \ No newline at end of file diff --git a/src/pages/Gti.jsx b/src/pages/Gti.jsx deleted file mode 100644 index c51aa47..0000000 --- a/src/pages/Gti.jsx +++ /dev/null @@ -1,8 +0,0 @@ -import Documents from "../components/Documents" - -export default function Gti({selectedFileCategory}) { - - return( - - ) -} \ No newline at end of file diff --git a/src/pages/Master.jsx b/src/pages/Master.jsx deleted file mode 100644 index 6c15e0c..0000000 --- a/src/pages/Master.jsx +++ /dev/null @@ -1,8 +0,0 @@ -import Documents from "../components/Documents" - -export default function Master({selectedFileCategory}) { - - return( - - ) -} \ No newline at end of file diff --git a/src/pages/Nnb.jsx b/src/pages/Nnb.jsx deleted file mode 100644 index c5d1227..0000000 --- a/src/pages/Nnb.jsx +++ /dev/null @@ -1,8 +0,0 @@ -import Documents from "../components/Documents" - -export default function Nnb({selectedFileCategory}) { - - return( - - ) -} \ No newline at end of file diff --git a/src/pages/Supervisor.jsx b/src/pages/Supervisor.jsx deleted file mode 100644 index 52bf0b8..0000000 --- a/src/pages/Supervisor.jsx +++ /dev/null @@ -1,8 +0,0 @@ -import Documents from "../components/Documents" - -export default function Supervisor({selectedFileCategory}) { - - return( - - ) -} \ No newline at end of file diff --git a/src/pages/Well.jsx b/src/pages/Well.jsx index 293b95f..3845f4d 100644 --- a/src/pages/Well.jsx +++ b/src/pages/Well.jsx @@ -7,13 +7,7 @@ import Messages from "../pages/Messages"; import Report from "../pages/Report"; import Analysis from "../pages/Analysis"; import WellAnalysis from "../pages/WellAnalysis"; -import FluidService from "../components/Documents"; -import Cementing from "../pages/Cementing"; -import Nnb from "../pages/Nnb"; -import Gti from "../pages/Gti"; -import DocumentForWell from "../pages/DocumentForWell"; -import Supervisor from "../pages/Supervisor"; -import Master from "../pages/Master"; +import Documents from "../components/Documents"; import LastData from '../pages/LastData' import TelemetryView from "../pages/TelemetryView"; @@ -110,31 +104,31 @@ export default function Well() { - + - + - + - + - + - + - + - +