From e852ede73c0cef6cfbad3b057ddb5d199cb8701f Mon Sep 17 00:00:00 2001 From: goodmice Date: Mon, 24 Oct 2022 07:12:36 +0500 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=20=D0=B3=D0=BE=D1=80=D0=B8=D0=B7=D0=BE=D0=BD=D1=82=D0=B0?= =?UTF-8?q?=D0=BB=D1=8C=D0=BD=D1=8B=D0=B9=20=D1=81=D0=BA=D1=80=D0=BE=D0=BB?= =?UTF-8?q?=D0=BB=20=D0=B4=D0=BB=D1=8F=20=D1=82=D0=B0=D0=B1=D0=BB=D0=B8?= =?UTF-8?q?=D1=86=20(+=D0=B0=D0=B4=D0=B0=D0=BF=D1=82=D0=B8=D0=B2=D0=BD?= =?UTF-8?q?=D0=BE=D1=81=D1=82=D0=B8=20=D0=BD=D0=B0=20=D0=BC=D0=B0=D0=BB?= =?UTF-8?q?=D1=8B=D1=85=20=D0=BC=D0=BE=D0=BD=D0=B8=D1=82=D0=BE=D1=80=D0=B0?= =?UTF-8?q?=D1=85)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/AdminPanel/AdminNavigationMenu.jsx | 5 ++- src/pages/AdminPanel/ClusterController.jsx | 1 + src/pages/AdminPanel/CompanyController.jsx | 1 + .../AdminPanel/CompanyTypeController.jsx | 1 + src/pages/AdminPanel/DepositController.jsx | 1 + src/pages/AdminPanel/PermissionController.jsx | 1 + src/pages/AdminPanel/RoleController.jsx | 1 + .../AdminPanel/Telemetry/TelemetryViewer.jsx | 1 + src/pages/AdminPanel/UserController/index.jsx | 1 + src/pages/AdminPanel/VisitLog.jsx | 1 + src/pages/Cluster/ClusterWells.jsx | 1 + .../Well/Documents/DocumentsTemplate.jsx | 1 + .../Well/Reports/DiagramReport/Reports.jsx | 39 +++++-------------- src/pages/Well/Telemetry/Messages.jsx | 16 ++++---- .../Telemetry/Operations/OperationsTable.jsx | 2 +- src/pages/Well/Telemetry/Operations/index.jsx | 13 ++----- src/pages/Well/WellCase/index.jsx | 7 +++- src/pages/Well/index.jsx | 2 +- 18 files changed, 43 insertions(+), 52 deletions(-) diff --git a/src/pages/AdminPanel/AdminNavigationMenu.jsx b/src/pages/AdminPanel/AdminNavigationMenu.jsx index 7005099..1925703 100644 --- a/src/pages/AdminPanel/AdminNavigationMenu.jsx +++ b/src/pages/AdminPanel/AdminNavigationMenu.jsx @@ -13,6 +13,7 @@ import { } from '@ant-design/icons' import { makeItem, PrivateWellMenu } from '@components/PrivateWellMenu' +import { isDev } from '@asb/utils' const menuItems = [ makeItem('Месторождения', 'deposit', [], ), @@ -28,8 +29,8 @@ const menuItems = [ makeItem('Объединение', 'merger', [], ), ]), makeItem('Журнал посещений', 'visit_log', [], ), - makeItem('API', '/swagger/index.html', [], ), -] + isDev() && makeItem('API', '/swagger/index.html', [], ), +].filter(Boolean) export const AdminNavigationMenu = memo((props) => ( { onRowEdit={tableHandlers.edit} onRowDelete={tableHandlers.delete} tableName={'admin_cluster_controller'} + scroll={{ x: true }} /> ) diff --git a/src/pages/AdminPanel/CompanyController.jsx b/src/pages/AdminPanel/CompanyController.jsx index 9a70d85..e7a31d8 100755 --- a/src/pages/AdminPanel/CompanyController.jsx +++ b/src/pages/AdminPanel/CompanyController.jsx @@ -97,6 +97,7 @@ const CompanyController = memo(() => { onRowEdit={tableHandlers.edit} onRowDelete={tableHandlers.delete} tableName={'admin_company_controller'} + scroll={{ x: true }} /> ) diff --git a/src/pages/AdminPanel/CompanyTypeController.jsx b/src/pages/AdminPanel/CompanyTypeController.jsx index 1ce4932..eeab683 100755 --- a/src/pages/AdminPanel/CompanyTypeController.jsx +++ b/src/pages/AdminPanel/CompanyTypeController.jsx @@ -75,6 +75,7 @@ const CompanyTypeController = memo(() => { onRowEdit={tableHandlers.edit} onRowDelete={tableHandlers.delete} tableName={'admin_company_type_controller'} + scroll={{ x: true }} /> ) diff --git a/src/pages/AdminPanel/DepositController.jsx b/src/pages/AdminPanel/DepositController.jsx index 3c17df4..edf3b46 100755 --- a/src/pages/AdminPanel/DepositController.jsx +++ b/src/pages/AdminPanel/DepositController.jsx @@ -75,6 +75,7 @@ const DepositController = memo(() => { onRowEdit={tableHandlers.edit} onRowDelete={tableHandlers.delete} tableName={'admin_deposit_controller'} + scroll={{ x: true }} /> ) diff --git a/src/pages/AdminPanel/PermissionController.jsx b/src/pages/AdminPanel/PermissionController.jsx index 6add2ea..b4d1314 100755 --- a/src/pages/AdminPanel/PermissionController.jsx +++ b/src/pages/AdminPanel/PermissionController.jsx @@ -82,6 +82,7 @@ const PermissionController = memo(() => { onRowEdit={tableHandlers.edit} onRowDelete={tableHandlers.delete} tableName={'admin_permission_controller'} + scroll={{ x: true }} /> ) diff --git a/src/pages/AdminPanel/RoleController.jsx b/src/pages/AdminPanel/RoleController.jsx index 8f80a9a..d87a586 100755 --- a/src/pages/AdminPanel/RoleController.jsx +++ b/src/pages/AdminPanel/RoleController.jsx @@ -89,6 +89,7 @@ const RoleController = memo(() => { onRowEdit={tableHandlers.edit} onRowDelete={tableHandlers.delete} tableName={'admin_role_controller'} + scroll={{ x: true }} /> ) diff --git a/src/pages/AdminPanel/Telemetry/TelemetryViewer.jsx b/src/pages/AdminPanel/Telemetry/TelemetryViewer.jsx index 111d930..1f040a4 100755 --- a/src/pages/AdminPanel/Telemetry/TelemetryViewer.jsx +++ b/src/pages/AdminPanel/Telemetry/TelemetryViewer.jsx @@ -115,6 +115,7 @@ const TelemetryController = memo(() => { pagination={defaultPagination} dataSource={filteredTelemetryData} tableName={'admin_telemetry_controller'} + scroll={{ x: true }} /> ) diff --git a/src/pages/AdminPanel/UserController/index.jsx b/src/pages/AdminPanel/UserController/index.jsx index fc22c7f..2581082 100755 --- a/src/pages/AdminPanel/UserController/index.jsx +++ b/src/pages/AdminPanel/UserController/index.jsx @@ -214,6 +214,7 @@ const UserController = memo(() => { buttonsWidth={120} pagination={defaultPagination} tableName={'admin_user_controller'} + scroll={{ x: true }} /> { dataSource={filteredLogData} pagination={defaultPagination} tableName={'visit_log'} + scroll={{ x: true }} /> ) diff --git a/src/pages/Cluster/ClusterWells.jsx b/src/pages/Cluster/ClusterWells.jsx index 91f877c..7538ec4 100755 --- a/src/pages/Cluster/ClusterWells.jsx +++ b/src/pages/Cluster/ClusterWells.jsx @@ -174,6 +174,7 @@ const ClusterWells = memo(({ statsWells }) => { pagination={false} rowKey={(record) => record.caption} tableName={'cluster'} + scroll={{ x: true }} /> record.id} tableName={tableName ?? `file_${idCategory}`} + scroll={{ x: true }} /> ) diff --git a/src/pages/Well/Reports/DiagramReport/Reports.jsx b/src/pages/Well/Reports/DiagramReport/Reports.jsx index cacdf1d..91fa620 100644 --- a/src/pages/Well/Reports/DiagramReport/Reports.jsx +++ b/src/pages/Well/Reports/DiagramReport/Reports.jsx @@ -4,9 +4,9 @@ import { FilePdfOutlined, FileTextOutlined } from '@ant-design/icons' import { useWell } from '@asb/context' import LoaderPortal from '@components/LoaderPortal' -import { Table, makeDateSorter, makeNumericSorter } from '@components/Table' +import { Table, makeNumericSorter, makeColumn, makeDateColumn } from '@components/Table' import { invokeWebApiWrapperAsync, downloadFile } from '@components/factory' -import { formatDate, periodToString } from '@utils' +import { periodToString } from '@utils' import { ReportService } from '@api' const imgPaths = { @@ -15,10 +15,7 @@ const imgPaths = { } const columns = [ - { - title: 'Название', - dataIndex: 'name', - key: 'name', + makeColumn('Название', 'name', { render: (name, report) => (