diff --git a/src/components/CementFluid.jsx b/src/components/CementFluid.jsx
index bd3e5fe..b6f77f1 100644
--- a/src/components/CementFluid.jsx
+++ b/src/components/CementFluid.jsx
@@ -15,15 +15,15 @@ const originData = [
];
const EditableCell = ({
- editing,
- dataIndex,
- title,
- inputType,
- record,
- index,
- children,
- ...restProps
-}) => {
+ editing,
+ dataIndex,
+ title,
+ inputType,
+ record,
+ index,
+ children,
+ ...restProps
+ }) => {
return (
@@ -35,7 +35,7 @@ const EditableCell = ({
{
required: true,
message: '',
- pattern: '(-?[1-9]+\d*([.,]\d+)?)$|^(-?0[.,]\d*[1-9]+)$|^0$|^0.0$'
+ pattern: /(-?[1-9]+\d*([.,]\d+)?)$|^(-?0[.,]\d*[1-9]+)$|^0$|^0.0$/
},
]}
>
@@ -59,19 +59,19 @@ export function CementFluid() {
const columns = [
{
- title: 'Наименование',
- key: 'name',
- dataIndex: 'name',
- align: 'center',
- className: 'small-font'
+ title: 'Наименование',
+ key: 'name',
+ dataIndex: 'name',
+ align: 'center',
+ className: 'small-font'
},
{
- title: 'Температура, °C',
- key: 'temperature',
- dataIndex: 'temperature',
- align: 'center',
- className: 'small-font',
- editable: true
+ title: 'Температура, °C',
+ key: 'temperature',
+ dataIndex: 'temperature',
+ align: 'center',
+ className: 'small-font',
+ editable: true
},
{
title: 'Плотность, г/см³',
@@ -292,7 +292,7 @@ export function CementFluid() {
return editable ? (
save(row.key)}
style={{ marginRight: 8 }}
>
@@ -343,7 +343,7 @@ export function CementFluid() {
const row = await form.validateFields();
const newData = [...data];
const index = newData.findIndex((item) => key === item.key);
-
+
if (index > -1) {
const item = newData[index];
newData.splice(index, 1, { ...item, ...row });
@@ -360,20 +360,20 @@ export function CementFluid() {
};
return (<>
-
- >
+
+ >
)
}
\ No newline at end of file
diff --git a/src/components/MessageFilter.jsx b/src/components/MessageFilter.jsx
new file mode 100644
index 0000000..7b326d8
--- /dev/null
+++ b/src/components/MessageFilter.jsx
@@ -0,0 +1,35 @@
+import React, { useMemo, useState } from "react";
+
+export default function MessageFilter() {
+ return (
+
+
+
+ )
+}
+
+function List({ words }) {
+ const [searchString, setSearchString] = useState("")
+
+ function handleChange(e) {
+ setSearchString(e.target.value)
+ }
+
+ const filteredWords = useMemo(() => {
+ if (!searchString) {
+ return words
+ }
+ return words.filter((w) => w.includes(searchString))
+ }, [searchString, words])
+
+ return (
+ <>
+
+
+ {filteredWords.map((word, i) => (
+ - {word}
+ ))}
+
+ >
+ )
+}
\ No newline at end of file
diff --git a/src/components/Nnb.jsx b/src/components/Nnb.jsx
index d2c36f0..f3affdd 100644
--- a/src/components/Nnb.jsx
+++ b/src/components/Nnb.jsx
@@ -30,7 +30,7 @@ const EditableCell = ({
{
required: true,
message: '',
- pattern: '(-?[1-9]+\d*([.,]\d+)?)$|^(-?0[.,]\d*[1-9]+)$|^0$|^0.0$'
+ pattern: /(-?[1-9]+\d*([.,]\d+)?)$|^(-?0[.,]\d*[1-9]+)$|^0$|^0.0$/
},
]}
>
diff --git a/src/components/SludgeDiagram.jsx b/src/components/SludgeDiagram.jsx
index 70e0c1c..f423d83 100644
--- a/src/components/SludgeDiagram.jsx
+++ b/src/components/SludgeDiagram.jsx
@@ -4,7 +4,7 @@ import {Table, Input, Form, Popconfirm, Typography } from 'antd'
const originData = [
{
key: '1', probeNumber: '', probeExtractionDepth: '', sandstone: '', siltstone: '', argillit: '', brokenArgillit: '', coal: '', sand: '', clay: '',
- camstone: '', cement: '', summary: '', drillingMud: '', sludge: '', sludge: '', maxSum: '', methan: '', ethan: '', propan: '', butan: '', pentan: ''
+ camstone: '', cement: '', summary: '', drillingMud: '', sludge: '', maxSum: '', methan: '', ethan: '', propan: '', butan: '', pentan: ''
}
]
@@ -29,7 +29,7 @@ const EditableCell = ({
{
required: true,
message: '',
- pattern: '(-?[1-9]+\d*([.,]\d+)?)$|^(-?0[.,]\d*[1-9]+)$|^0$|^0.0$'
+ pattern: /(-?[1-9]+\d*([.,]\d+)?)$|^(-?0[.,]\d*[1-9]+)$|^0$|^0.0$/
},
]}
>
diff --git a/src/pages/Messages.jsx b/src/pages/Messages.jsx
index 9a37f56..7007b49 100644
--- a/src/pages/Messages.jsx
+++ b/src/pages/Messages.jsx
@@ -5,6 +5,7 @@ import {useParams} from 'react-router-dom'
import LoaderPortal from '../components/LoaderPortal'
import '../styles/message.css'
import notify from '../components/notify'
+import MessageFilter from "../components/MessageFilter";
import locale from "antd/lib/locale/ru_RU";
import moment from 'moment'
@@ -133,6 +134,7 @@ export default function Messages() {
onChange={onChangeRange}
/>
+
{
- const placeholder = placeholderIdDictionary[placeholderId]
- return {
- gridColumnStart: placeholder.col,
- gridRowStart: placeholder.row
- }
-}
+const plates = []
-const SmboPlates = platesData.map((items,) => (
-
-
+for (let i = 1; i < 21; i++) {
+ const item = platesData.filter(item => item.placeHolderId === i)[0]
+ const plate = item ? (
+
+
+ id={item.id}
+ title={item.title}
+ placeHolderId={item.placeHolderId}
+ equipmentTimers={item.equipmentTimers}
+ equipmentSensors={item.equipmentSensors}
+ state={item.state}
+ captionValue={item.captionValue}
+ />
+ ) : (
+ {i}
)
-)
+ plates.push(plate)
+}
export default function Smbo() {
return (<>
- {SmboPlates}
+ {plates}
+ {/* */}
+ {/* */}
+ {/* */}
diff --git a/src/styles/smbo.css b/src/styles/smbo.css
index c764e81..5f6e5aa 100644
--- a/src/styles/smbo.css
+++ b/src/styles/smbo.css
@@ -111,4 +111,13 @@
.block__example {
width: 250px;
height: 120px;
+}
+
+.empty_place {
+ background-color: #505050;
+ text-align: center;
+ color: silver;
+ font-size: 75px;
+ margin-top: 5px;
+ align-items: center;
}
\ No newline at end of file
|