2 次代码提交 8df2821650 ... 2133b7519f

作者 SHA1 备注 提交日期
  xujunjie 2133b7519f Merge branch 'master' of http://120.55.44.4:10080/xujunjie/gt_client_pad 1 年之前
  xujunjie 08fe5533bb 修复设备总数异常的问题 1 年之前
共有 1 个文件被更改,包括 5 次插入5 次删除
  1. 5 5
      src/pages/DeviceManager/index.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');
             },
           })}
         />