From c2647d1466f6c8de43a3d20a3921f005ab8b53dc Mon Sep 17 00:00:00 2001 From: goodmice Date: Wed, 20 Oct 2021 14:32:18 +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=B7=D0=BD=D0=B0=D1=87=D0=BE=D0=BA=20=D1=81=D0=B2?= =?UTF-8?q?=D0=BA=D0=B2=D0=B0=D0=B6=D0=B8=D0=BC=D0=B8=20=D0=BD=D0=B0=20?= =?UTF-8?q?=D1=82=D0=B0=D0=B1=D0=BB=D0=B8=D1=86=D1=83=20=D0=B0=D0=BD=D0=B0?= =?UTF-8?q?=D0=BB=D0=B8=D1=82=D0=B8=D0=BA=D0=B8=20=D1=81=D0=BA=D0=B2=D0=B0?= =?UTF-8?q?=D0=B6=D0=B8=D0=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/PointerIcon.jsx | 60 ++++++++++++++++++++++++++++++ src/images/pointer.svg | 14 ------- src/pages/Cluster/ClusterWells.jsx | 19 ++++++++-- 3 files changed, 76 insertions(+), 17 deletions(-) create mode 100644 src/components/PointerIcon.jsx delete mode 100644 src/images/pointer.svg diff --git a/src/components/PointerIcon.jsx b/src/components/PointerIcon.jsx new file mode 100644 index 0000000..1e0a566 --- /dev/null +++ b/src/components/PointerIcon.jsx @@ -0,0 +1,60 @@ +import PropTypes from 'prop-types' + +export const PointerIcon = ({color, size, online, onlineColor}) => ( + + {online && ( // Волны от антенны + + + + + + )} + {/* Арматурная сетка */} + + {/* Шляпы */} + + + + {/* Столб и границы почвы */} + + + + + +) + +PointerIcon.propTypes = { + color: PropTypes.string, + size: PropTypes.oneOfType([ + PropTypes.string, + PropTypes.number, + PropTypes.shape({ + width: PropTypes.oneOfType([PropTypes.string, PropTypes.number]), + height: PropTypes.oneOfType([PropTypes.string, PropTypes.number]) + }) + ]), + online: PropTypes.bool, + onlineColor: PropTypes.string +} + +PointerIcon.defaultProps = { + color: 'currentColor', + size: {width: '48', height: '59'}, + online: false, + onlineColor: 'red' +} + +export default PointerIcon diff --git a/src/images/pointer.svg b/src/images/pointer.svg deleted file mode 100644 index b9d368e..0000000 --- a/src/images/pointer.svg +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/src/pages/Cluster/ClusterWells.jsx b/src/pages/Cluster/ClusterWells.jsx index f2a0020..6cabc16 100644 --- a/src/pages/Cluster/ClusterWells.jsx +++ b/src/pages/Cluster/ClusterWells.jsx @@ -15,6 +15,7 @@ import { Tvd } from '../WellOperations/Tvd' import WellOperationsTable from './WellOperationsTable' import { getOperations } from './functions' import LoaderPortal from '../../components/LoaderPortal' +import PointerIcon from '../../components/PointerIcon' const filtersMinMax = [ { text: 'min', value: 'min' }, @@ -23,6 +24,7 @@ const filtersMinMax = [ const filtersWellsType = [] const DAY_IN_MS = 1000 * 60 * 60 * 24 +const ONLINE_DEADTIME = 600 export default function ClusterWells({statsWells}) { @@ -68,7 +70,8 @@ export default function ClusterWells({statsWells}) { routeSpeedFact: well.total?.fact?.routeSpeed, notProductiveTimePlan: well.total?.plan?.nonProductiveHours, notProductiveTimeFact: well.total?.fact?.nonProductiveHours, - companies: well.companies + companies: well.companies, + lastTelemetryDate: well.lastTelemetryDate } }) @@ -91,8 +94,18 @@ export default function ClusterWells({statsWells}) { const columns = [ makeTextColumn('скв №', 'caption', null, null, - (_, item) => ({item.caption ?? '-'} - )), + (_, item) => ( + + + {item.caption ?? '-'} + + ) + ), makeTextColumn('Тип скв.', 'wellType', filtersWellsType, null, (text) => text ?? '-'), makeGroupColumn('Фактические сроки', [ makeColumn('начало', 'factStart', { sorter: makeDateSorter('factStart'), render: getDate }),