Renxy il y a 1 an
Parent
commit
c7d2cd0846
3 fichiers modifiés avec 29 ajouts et 13 suppressions
  1. 0 1
      src/pages/EqSelfInspection/List/index.js
  2. 20 12
      src/pages/Home/index.js
  3. 9 0
      src/pages/Home/index.less

+ 0 - 1
src/pages/EqSelfInspection/List/index.js

@@ -89,7 +89,6 @@ function List(props) {
 }
 
 export default connect(({ patrolArtificialRecord, loading }) => ({
-  // list: patrolArtificialRecord.list,
   routeInfoList: patrolArtificialRecord.routeInfoList,
   loading: loading.models.patrolArtificialRecord,
   processList: patrolArtificialRecord.processList,

+ 20 - 12
src/pages/Home/index.js

@@ -81,6 +81,12 @@ const RightContent = (props) => {
   );
 };
 
+const getValue = (str) => {
+  const result = str?.match(/.*?(\d+(?:\.\d+)?)\D*$/);
+  if (result && result[1]) return result[1];
+  return 0;
+};
+
 // 水厂工况
 const SmartWork = (props) => {
   const { data } = props;
@@ -117,14 +123,15 @@ const WaterAmt = (props) => {
       onClick={() => UnityAction.sendMsg('menuItem', '水量监测')}
     >
       <Title title="水量监测" />
+      <div className={styles.boxTip}>当前进水稳定,出水稳定</div>
       <ul>
         <li>
-          <div className={styles.value}>{data?.fwa}</div>
-          <div className={styles.btn1}>进水量</div>
+          <div className={styles.value}>{getValue(data?.fwa)}</div>
+          <div className={styles.btn1}>进水量(m³/h)</div>
         </li>
         <li>
-          <div className={styles.value}>{data?.dwa}</div>
-          <div className={styles.btn2}>产水量</div>
+          <div className={styles.value}>{getValue(data?.dwa)}</div>
+          <div className={styles.btn2}>产水量(m³/h)</div>
         </li>
       </ul>
     </div>
@@ -141,14 +148,15 @@ const WaterQuality = (props) => {
       onClick={() => UnityAction.sendMsg('menuItem', '水质监测')}
     >
       <Title title="水质监测" />
+      <div className={styles.boxTip}>水质监测较好</div>
       <ul>
         <li>
-          <div className={styles.valueLong}>{data?.dsan || 0}</div>
-          <div className={styles.btn1}>出水余氯</div>
+          <div className={styles.valueLong}>{getValue(data?.dsan)}</div>
+          <div className={styles.btn1}>出水余氯(ppm)</div>
         </li>
         <li>
-          <div className={styles.valueLong}>{data?.dtur || 0}</div>
-          <div className={styles.btn2}>出水浊度</div>
+          <div className={styles.valueLong}>{getValue(data?.dtur)}</div>
+          <div className={styles.btn2}>出水浊度(NTU)</div>
         </li>
       </ul>
     </div>
@@ -223,8 +231,8 @@ const Electric = (props) => {
       <Title title="能耗监测" />
       <ul>
         <li>
-          <div className={styles.value}>{data?.elec}</div>
-          <div className={styles.btn1}>用电量</div>
+          <div className={styles.value}>{getValue(data?.elec)}</div>
+          <div className={styles.btn1}>用电量(KWh/h)</div>
         </li>
       </ul>
     </div>
@@ -259,9 +267,9 @@ const Medicine = () => {
       <ul>
         <li>
           <div className={styles.valueLong}>
-            {data?.value?.toFixed(2) || '-'}
+            {data?.value?.toFixed(2) || '-'}
           </div>
-          <div className={styles.btn1}>当月吨水药成本</div>
+          <div className={styles.btn1}>当月吨水药成本(元)</div>
         </li>
       </ul>
     </div>

+ 9 - 0
src/pages/Home/index.less

@@ -110,6 +110,15 @@
   line-height: 34px;
   z-index: 1;
 }
+.boxTip {
+  float: right;
+  top: 26px;
+  right: 20px;
+  position: inherit;
+  font-size: 24px;
+  font-family: Source Han Sans, Source Han Sans;
+  color: #3b3b3b;
+}
 .line {
   position: absolute;
   bottom: 0;