Ver código fonte

Merge branch 'develop' of http://120.55.44.4:10080/xujunjie/gt_client_pad into develop

Renxy 1 ano atrás
pai
commit
9efba3eb7a

+ 1 - 1
src/global.less

@@ -326,7 +326,7 @@ input[type='reset'] {
 .ant-table-wrapper .ant-table-thead > tr > th,
 .ant-table-wrapper .ant-table-tbody > tr > td {
   border-radius: 0;
-  padding: 0.16rem 0.18rem;
+  padding: 0.12rem 0.10rem;
   font-size: 0.28rem;
   color: rgba(97, 93, 93, 1);
   line-height: 0.32rem;

+ 6 - 0
src/models/eqSelfInspection.js

@@ -270,6 +270,12 @@ export default {
               return { ...item, history: true };
             }),
           ];
+          data.WaterInCheckList = [
+            ...data.WaterInCheckList,
+            ...recentGaugeRecord.data.WaterInCheckList.map((item) => {
+              return { ...item, history: true };
+            }),
+          ];
           data.PressureCompareList = [
             ...data.PressureCompareList,
             ...recentGaugeRecord.data.PressureCompareList.map((item) => {

+ 1 - 0
src/pages/EqSelfInspection/components/Table/DosingFlowCom.js

@@ -158,6 +158,7 @@ function DosingFlowTable(props) {
     {
       title: '状态',
       dataIndex: 'status',
+      width: 140,
       render: (status, record) => {
         switch (status) {
           case -1:

+ 1 - 0
src/pages/EqSelfInspection/components/Table/LiquidLevelCom.js

@@ -158,6 +158,7 @@ function LiquidTable(props) {
     {
       title: '状态',
       dataIndex: 'status',
+      width: 140,
       render: (status, record) => {
         switch (status) {
           case -1:

+ 1 - 1
src/pages/EqSelfInspection/components/Table/MandateBtn.js

@@ -10,7 +10,7 @@ export default function ({ relationId }) {
   if (!mandateId) return null;
   return (
     <a
-      style={{ marginLeft: 10 }}
+      style={{ marginTop: 10, display: 'block' }}
       onClick={() =>
         // task
         UnityAction.sendMsg('OpenTaskModal', `mandate_id=${mandateId}`)

+ 1 - 0
src/pages/EqSelfInspection/components/Table/PressureGaugeCom.js

@@ -60,6 +60,7 @@ function PressureGaugeTable(props) {
     {
       title: '状态',
       dataIndex: 'status',
+      width: 140,
       render: (status) => {
         switch (status) {
           case -1:

+ 1 - 0
src/pages/EqSelfInspection/components/Table/WarningTable.js

@@ -51,6 +51,7 @@ export default function WarningTable(props) {
     {
       title: '状态',
       dataIndex: 'Status',
+      width: 140,
       render: (Status, record) => {
         switch (Status) {
           case -1:

+ 4 - 3
src/pages/EqSelfInspection/components/Table/WaterInCom.js

@@ -26,7 +26,7 @@ export default function WaterInCom(props) {
     allData?.forEach((item) => {
       if (!item.history && item.status == 1 && statusCheck.includes(1)) {
         data.errorTableData.push(item);
-      } else if (item.status == 0 && statusCheck.includes(0)) {
+      } else if (item.history) {
         data.normalData.push(item);
       }
     });
@@ -43,10 +43,10 @@ export default function WaterInCom(props) {
         children: <div></div>,
       });
     }
-    if (showAllTabs || normalData.length > 0) {
+    if (showAllTabs) {
       items.push({
         key: '0',
-        label: `正常(${normalData.length || 0})`,
+        label: `历史记录(${normalData.length || 0})`,
         children: <div></div>,
       });
     }
@@ -145,6 +145,7 @@ function WaterInTable(props) {
     {
       title: '状态',
       dataIndex: 'status',
+      width: 140,
       render: (status) => {
         switch (status) {
           case -1:

+ 1 - 0
src/pages/EqSelfInspection/components/Table/WaterQualityCom.js

@@ -60,6 +60,7 @@ function WaterQualityTable(props) {
     {
       title: '状态',
       dataIndex: 'status',
+      width: 140,
       render: (status, record) => {
         switch (status) {
           case -1:

+ 21 - 3
src/pages/SmartOps/ChartPage.js

@@ -6,6 +6,7 @@ import { Button, DatePicker, Empty, Form, Spin } from 'antd';
 import dayjs from 'dayjs';
 import { useEffect, useState } from 'react';
 import styles from './index.less';
+import { ChartContent } from './predictionAnalysis/PredictionDetail';
 
 const { RangePicker } = DatePicker;
 const tabs = [
@@ -35,9 +36,8 @@ const ChartPage = (props) => {
 
   const { projectId } = useParams();
   const [searchParams, setSearchParams] = useSearchParams();
-  const type = searchParams.get('type') || 2;
   const data = searchParams.get('data');
-  const deviceCode = searchParams.get('device_code');
+  const isPredictionAnalysis = searchParams.get('title') == '跨膜压差';
 
   const [loading, setLoading] = useState(false);
   const [options, setOptions] = useState({});
@@ -215,4 +215,22 @@ const ChartPage = (props) => {
     </PageContent>
   );
 };
-export default ChartPage;
+
+export default () => {
+  const [searchParams, setSearchParams] = useSearchParams();
+  const { projectId } = useParams();
+  const isPredictionAnalysis = searchParams.get('title') == '跨膜压差';
+
+  if (isPredictionAnalysis) {
+    return (
+      <PageContent closeable={false}>
+        <ChartContent
+          deviceCode={searchParams.get('device_code')}
+          projectId={projectId}
+        />
+      </PageContent>
+    );
+  } else {
+    return <ChartPage />;
+  }
+};

+ 1 - 1
src/pages/SmartOps/predictionAnalysis/PredictionDetail.js

@@ -444,7 +444,7 @@ function getOption(data = [], active) {
   return option;
 }
 
-const ChartContent = (props) => {
+export const ChartContent = (props) => {
   const { deviceCode, projectId } = props;
 
   const [time, setTime] = useState([dayjs().subtract(10, 'minute'), dayjs()]);

+ 2 - 1
src/pages/SmartReport/index.js

@@ -10,6 +10,7 @@ import { useEffect, useRef, useState } from 'react';
 import styles from './index.less';
 
 const { RangePicker } = DatePicker;
+const project = JSON.parse(localStorage.project || '{}');
 
 const SmartReport = () => {
   const navigate = useNavigate();
@@ -305,7 +306,7 @@ const SmartReport = () => {
           </div>
         </div>
 
-        <div className={styles.title}>无锡锡山水厂</div>
+        <div className={styles.title}>{project.Name}</div>
 
         <Spin spinning={loading}>
           <div className={styles.scrollContent}>