4 次代码提交 c22ed93491 ... 2133b7519f

作者 SHA1 备注 提交日期
  xujunjie 2133b7519f Merge branch 'master' of http://120.55.44.4:10080/xujunjie/gt_client_pad 1 年之前
  xujunjie 08fe5533bb 修复设备总数异常的问题 1 年之前
  Renxy 8df2821650 Merge branch 'develop' 1 年之前
  xujunjie e4c9bc22bc 修复吨水药成本字段错误 1 年之前
共有 2 个文件被更改,包括 6 次插入6 次删除
  1. 5 5
      src/pages/DeviceManager/index.js
  2. 1 1
      src/pages/Home/ChemCostComparison.js

+ 5 - 5
src/pages/DeviceManager/index.js

@@ -148,7 +148,7 @@ const Device = ({ projectId }) => {
   });
 
   const allData = useMemo(() => {
-    const total = data?.reduce((total, item) => item.Count, 0);
+    const total = data?.reduce((total, item) => total + item.Count, 0);
     const items = data?.map((item, idx) => {
       const itemLen = item?.List?.length;
       return {
@@ -293,8 +293,8 @@ const Device = ({ projectId }) => {
           pagination={false}
           onRow={(record, index) => ({
             onClick: () => {
-              localStorage.repair = JSON.stringify(record)
-              UnityAction.sendMsg("RepairDetail")
+              localStorage.repair = JSON.stringify(record);
+              UnityAction.sendMsg('RepairDetail');
             },
           })}
         />
@@ -308,8 +308,8 @@ const Device = ({ projectId }) => {
           pagination={false}
           onRow={(record, index) => ({
             onClick: () => {
-              localStorage.maintain = JSON.stringify(record)
-              UnityAction.sendMsg("MaintainDetail")
+              localStorage.maintain = JSON.stringify(record);
+              UnityAction.sendMsg('MaintainDetail');
             },
           })}
         />

+ 1 - 1
src/pages/Home/ChemCostComparison.js

@@ -329,7 +329,7 @@ export const ChemCost = ({ open, showTip = false }) => {
           <div className={styles.curEnergyCost}>
             <div className={styles.item}>
               <div className={styles.value}>
-                {open ? getValue(snapshot?.otc_day_unit || '') : '***'}
+                {open ? getValue(snapshot?.otc_day_cost_unit || '') : '***'}
                 <span className={styles.unit}>元/m³</span>
               </div>
               <div className={styles.name}>近一天吨水药成本</div>