diff --git a/src/App.js b/src/App.js index 032c0f8..92c83ef 100644 --- a/src/App.js +++ b/src/App.js @@ -3,6 +3,8 @@ import { BrowserRouter as Router, Switch, Route} from "react-router-dom" +import {ConfigProvider} from 'antd' +import locale from "antd/lib/locale/ru_RU" import Login from './pages/Login' import Main from './pages/Main' import { OpenAPI } from './services/api' @@ -13,7 +15,8 @@ OpenAPI.TOKEN = localStorage['token'] export default function App() { return ( - + + @@ -22,6 +25,7 @@ export default function App() {
- - ) + + + ); } \ No newline at end of file diff --git a/src/components/AnalysisOperationTime.jsx b/src/components/AnalysisOperationTime.jsx index c4d5790..c58d211 100644 --- a/src/components/AnalysisOperationTime.jsx +++ b/src/components/AnalysisOperationTime.jsx @@ -1,10 +1,9 @@ import { useParams } from "react-router-dom" -import { DatePicker, ConfigProvider } from 'antd'; +import { DatePicker } from 'antd'; import notify from "../components/notify" import { useState, useEffect } from 'react' import { TelemetryAnalyticsService } 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' @@ -46,12 +45,10 @@ export function AnalysisOperationTime() { return ( - - - + { + values.file.fileList.forEach((val) => { formData.append("files", val.originFileObj); }); await upload(url, formData) diff --git a/src/pages/Archive.jsx b/src/pages/Archive.jsx index 16af5f2..d7d178f 100644 --- a/src/pages/Archive.jsx +++ b/src/pages/Archive.jsx @@ -2,13 +2,11 @@ import { useRef, useLayoutEffect, useState, useEffect } from 'react' import { Button, DatePicker, - ConfigProvider, Row, Col, Tooltip} from 'antd' import { useParams } from 'react-router-dom' import { DataService } from '../services/api' -import locale from 'antd/lib/locale/ru_RU' import {generateUUID} from '../services/UidGenerator' import { ArchiveColumn } from '../components/ArchiveColumn' import moment from 'moment' @@ -133,14 +131,12 @@ export default function Archive() { + - - - + {charts} diff --git a/src/pages/Documents/DocumentsTemplate.jsx b/src/pages/Documents/DocumentsTemplate.jsx index 793d29e..79d02bf 100644 --- a/src/pages/Documents/DocumentsTemplate.jsx +++ b/src/pages/Documents/DocumentsTemplate.jsx @@ -1,10 +1,9 @@ import {useState, useEffect} from "react" -import {Table, DatePicker, Button, ConfigProvider} from 'antd' -import locale from "antd/lib/locale/ru_RU" +import {Table, DatePicker, Button, Form} from 'antd' import moment from 'moment' import { FileService } from '../../services/api' import { updateFromWebApiWrapperAsync, download, makePaginationObject} from '../../components/factory' -import UploadFileForm from '../../components/UploadFileForm' +import UploadForm from '../../components/UploadForm' import LoaderPortal from '../../components/LoaderPortal' const pageSize = 12 @@ -17,7 +16,7 @@ export default function DocumentsTemplate({idCategory, idWell}) { const [files, setFiles] = useState([]) const [showLoader, setShowLoader] = useState(false) - const uploadUrl = `/api/well/${idWell}/files/` + const uploadUrl = `/api/well/${idWell}/files/?idCategory=${idCategory}` const handleFileNameCLick = async (_, row) => { updateFromWebApiWrapperAsync(async ()=>{ @@ -83,20 +82,25 @@ export default function DocumentsTemplate({idCategory, idWell}) { return ( - setShowLoader(true)} - onUploadComplete={()=>setShowLoader(false)} - /> -
-

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

- - - -
+
+
+ + + + + setShowLoader(true)} + onUploadComplete={()=>setShowLoader(false)}/> + +
+
+ {children} - - - + {children} - - - +