Explorar el Código

累加初版修复

yanghao hace 1 semana
padre
commit
012c56582d
Se han modificado 4 ficheros con 1555 adiciones y 93 borrados
  1. 2 2
      config/env.dev.js
  2. 1220 0
      data.txt
  3. 139 91
      pages/recordFilling/detail.vue
  4. 194 0
      store/modules/fillingData.js

+ 2 - 2
config/env.dev.js

@@ -1,7 +1,7 @@
 // 开发环境配置
 export default {
-	apiUrl: 'http://192.168.188.16:48080',
-	// apiUrl: 'https://iot.deepoil.cc',
+	// apiUrl: 'http://192.168.188.16:48080',
+	apiUrl: 'https://iot.deepoil.cc',
 	// apiUrl: 'https://aims.deepoil.cc', //正式
 	apiUrlSuffix: '/admin-api',
 	// 其他开发环境配置...  

+ 1220 - 0
data.txt

@@ -0,0 +1,1220 @@
+[
+    {
+        "id": 141319,
+        "deviceId": "2723",
+        "deviceCode": "YF1522",
+        "createTime": [
+            2025,
+            12,
+            22
+        ],
+        "deviceCategoryId": 157,
+        "deviceName": "空压机",
+        "orgName": "HY-B3",
+        "attrsDetail": [
+            {
+                "createTime": null,
+                "updateTime": null,
+                "creator": null,
+                "updater": null,
+                "deleted": null,
+                "sumList": [
+                    {
+                        "createTime": null,
+                        "updateTime": null,
+                        "creator": null,
+                        "updater": null,
+                        "deleted": null,
+                        "id": 300,
+                        "deviceCategoryId": 157,
+                        "deviceId": null,
+                        "templateId": null,
+                        "name": "累计运行时间H",
+                        "code": null,
+                        "type": "double",
+                        "requiredFlag": null,
+                        "defaultValue": "301",
+                        "unit": null,
+                        "description": "",
+                        "status": null,
+                        "remark": null,
+                        "sort": null,
+                        "selectOptions": null,
+                        "version": null,
+                        "isCollection": 0,
+                        "isSum": 1,
+                        "modelAttr": null,
+                        "fillContent": "",
+                        "totalRunTime": 705,
+                        "threshold": 0,
+                        "sumId": 1,
+                        "dailyReport": 0
+                    }
+                ],
+                "nonSumList": [
+                    {
+                        "createTime": null,
+                        "updateTime": null,
+                        "creator": null,
+                        "updater": null,
+                        "deleted": null,
+                        "id": 301,
+                        "deviceCategoryId": 157,
+                        "deviceId": null,
+                        "templateId": null,
+                        "name": "当日运转时间H",
+                        "code": null,
+                        "type": "double",
+                        "requiredFlag": null,
+                        "defaultValue": "",
+                        "unit": null,
+                        "description": "",
+                        "status": null,
+                        "remark": null,
+                        "sort": null,
+                        "selectOptions": null,
+                        "version": null,
+                        "isCollection": 0,
+                        "isSum": 0,
+                        "modelAttr": null,
+                        "fillContent": "",
+                        "totalRunTime": 0,
+                        "threshold": 24,
+                        "sumId": null,
+                        "dailyReport": 0
+                    }
+                ]
+            }
+        ]
+    },
+    {
+        "id": 141320,
+        "deviceId": "2724",
+        "deviceCode": "YF1523",
+        "createTime": [
+            2025,
+            12,
+            22
+        ],
+        "deviceCategoryId": 157,
+        "deviceName": "空压机",
+        "orgName": "HY-B3",
+        "attrsDetail": [
+            {
+                "createTime": null,
+                "updateTime": null,
+                "creator": null,
+                "updater": null,
+                "deleted": null,
+                "sumList": [
+                    {
+                        "createTime": null,
+                        "updateTime": null,
+                        "creator": null,
+                        "updater": null,
+                        "deleted": null,
+                        "id": 300,
+                        "deviceCategoryId": 157,
+                        "deviceId": null,
+                        "templateId": null,
+                        "name": "累计运行时间H",
+                        "code": null,
+                        "type": "double",
+                        "requiredFlag": null,
+                        "defaultValue": "301",
+                        "unit": null,
+                        "description": "",
+                        "status": null,
+                        "remark": null,
+                        "sort": null,
+                        "selectOptions": null,
+                        "version": null,
+                        "isCollection": 0,
+                        "isSum": 1,
+                        "modelAttr": null,
+                        "fillContent": "",
+                        "totalRunTime": 733,
+                        "threshold": 0,
+                        "sumId": 1,
+                        "dailyReport": 0
+                    }
+                ],
+                "nonSumList": [
+                    {
+                        "createTime": null,
+                        "updateTime": null,
+                        "creator": null,
+                        "updater": null,
+                        "deleted": null,
+                        "id": 301,
+                        "deviceCategoryId": 157,
+                        "deviceId": null,
+                        "templateId": null,
+                        "name": "当日运转时间H",
+                        "code": null,
+                        "type": "double",
+                        "requiredFlag": null,
+                        "defaultValue": "",
+                        "unit": null,
+                        "description": "",
+                        "status": null,
+                        "remark": null,
+                        "sort": null,
+                        "selectOptions": null,
+                        "version": null,
+                        "isCollection": 0,
+                        "isSum": 0,
+                        "modelAttr": null,
+                        "fillContent": "",
+                        "totalRunTime": 0,
+                        "threshold": 24,
+                        "sumId": null,
+                        "dailyReport": 0
+                    }
+                ]
+            }
+        ]
+    },
+    {
+        "id": 141321,
+        "deviceId": "2725",
+        "deviceCode": "YF1524",
+        "createTime": [
+            2025,
+            12,
+            22
+        ],
+        "deviceCategoryId": 157,
+        "deviceName": "空压机",
+        "orgName": "HY-B3",
+        "attrsDetail": [
+            {
+                "createTime": null,
+                "updateTime": null,
+                "creator": null,
+                "updater": null,
+                "deleted": null,
+                "sumList": [
+                    {
+                        "createTime": null,
+                        "updateTime": null,
+                        "creator": null,
+                        "updater": null,
+                        "deleted": null,
+                        "id": 300,
+                        "deviceCategoryId": 157,
+                        "deviceId": null,
+                        "templateId": null,
+                        "name": "累计运行时间H",
+                        "code": null,
+                        "type": "double",
+                        "requiredFlag": null,
+                        "defaultValue": "301",
+                        "unit": null,
+                        "description": "",
+                        "status": null,
+                        "remark": null,
+                        "sort": null,
+                        "selectOptions": null,
+                        "version": null,
+                        "isCollection": 0,
+                        "isSum": 1,
+                        "modelAttr": null,
+                        "fillContent": "",
+                        "totalRunTime": 360,
+                        "threshold": 0,
+                        "sumId": 1,
+                        "dailyReport": 0
+                    }
+                ],
+                "nonSumList": [
+                    {
+                        "createTime": null,
+                        "updateTime": null,
+                        "creator": null,
+                        "updater": null,
+                        "deleted": null,
+                        "id": 301,
+                        "deviceCategoryId": 157,
+                        "deviceId": null,
+                        "templateId": null,
+                        "name": "当日运转时间H",
+                        "code": null,
+                        "type": "double",
+                        "requiredFlag": null,
+                        "defaultValue": "",
+                        "unit": null,
+                        "description": "",
+                        "status": null,
+                        "remark": null,
+                        "sort": null,
+                        "selectOptions": null,
+                        "version": null,
+                        "isCollection": 0,
+                        "isSum": 0,
+                        "modelAttr": null,
+                        "fillContent": "",
+                        "totalRunTime": 0,
+                        "threshold": 24,
+                        "sumId": null,
+                        "dailyReport": 0
+                    }
+                ]
+            }
+        ]
+    },
+    {
+        "id": 141322,
+        "deviceId": "2726",
+        "deviceCode": "YF1525",
+        "createTime": [
+            2025,
+            12,
+            22
+        ],
+        "deviceCategoryId": 157,
+        "deviceName": "空压机",
+        "orgName": "HY-B3",
+        "attrsDetail": [
+            {
+                "createTime": null,
+                "updateTime": null,
+                "creator": null,
+                "updater": null,
+                "deleted": null,
+                "sumList": [
+                    {
+                        "createTime": null,
+                        "updateTime": null,
+                        "creator": null,
+                        "updater": null,
+                        "deleted": null,
+                        "id": 300,
+                        "deviceCategoryId": 157,
+                        "deviceId": null,
+                        "templateId": null,
+                        "name": "累计运行时间H",
+                        "code": null,
+                        "type": "double",
+                        "requiredFlag": null,
+                        "defaultValue": "301",
+                        "unit": null,
+                        "description": "",
+                        "status": null,
+                        "remark": null,
+                        "sort": null,
+                        "selectOptions": null,
+                        "version": null,
+                        "isCollection": 0,
+                        "isSum": 1,
+                        "modelAttr": null,
+                        "fillContent": "",
+                        "totalRunTime": 369,
+                        "threshold": 0,
+                        "sumId": 1,
+                        "dailyReport": 0
+                    }
+                ],
+                "nonSumList": [
+                    {
+                        "createTime": null,
+                        "updateTime": null,
+                        "creator": null,
+                        "updater": null,
+                        "deleted": null,
+                        "id": 301,
+                        "deviceCategoryId": 157,
+                        "deviceId": null,
+                        "templateId": null,
+                        "name": "当日运转时间H",
+                        "code": null,
+                        "type": "double",
+                        "requiredFlag": null,
+                        "defaultValue": "",
+                        "unit": null,
+                        "description": "",
+                        "status": null,
+                        "remark": null,
+                        "sort": null,
+                        "selectOptions": null,
+                        "version": null,
+                        "isCollection": 0,
+                        "isSum": 0,
+                        "modelAttr": null,
+                        "fillContent": "",
+                        "totalRunTime": 0,
+                        "threshold": 24,
+                        "sumId": null,
+                        "dailyReport": 0
+                    }
+                ]
+            }
+        ]
+    },
+    {
+        "id": 141323,
+        "deviceId": "2727",
+        "deviceCode": "YF1526",
+        "createTime": [
+            2025,
+            12,
+            22
+        ],
+        "deviceCategoryId": 157,
+        "deviceName": "空压机",
+        "orgName": "HY-B3",
+        "attrsDetail": [
+            {
+                "createTime": null,
+                "updateTime": null,
+                "creator": null,
+                "updater": null,
+                "deleted": null,
+                "sumList": [
+                    {
+                        "createTime": null,
+                        "updateTime": null,
+                        "creator": null,
+                        "updater": null,
+                        "deleted": null,
+                        "id": 300,
+                        "deviceCategoryId": 157,
+                        "deviceId": null,
+                        "templateId": null,
+                        "name": "累计运行时间H",
+                        "code": null,
+                        "type": "double",
+                        "requiredFlag": null,
+                        "defaultValue": "301",
+                        "unit": null,
+                        "description": "",
+                        "status": null,
+                        "remark": null,
+                        "sort": null,
+                        "selectOptions": null,
+                        "version": null,
+                        "isCollection": 0,
+                        "isSum": 1,
+                        "modelAttr": null,
+                        "fillContent": "",
+                        "totalRunTime": 705,
+                        "threshold": 0,
+                        "sumId": 1,
+                        "dailyReport": 0
+                    }
+                ],
+                "nonSumList": [
+                    {
+                        "createTime": null,
+                        "updateTime": null,
+                        "creator": null,
+                        "updater": null,
+                        "deleted": null,
+                        "id": 301,
+                        "deviceCategoryId": 157,
+                        "deviceId": null,
+                        "templateId": null,
+                        "name": "当日运转时间H",
+                        "code": null,
+                        "type": "double",
+                        "requiredFlag": null,
+                        "defaultValue": "",
+                        "unit": null,
+                        "description": "",
+                        "status": null,
+                        "remark": null,
+                        "sort": null,
+                        "selectOptions": null,
+                        "version": null,
+                        "isCollection": 0,
+                        "isSum": 0,
+                        "modelAttr": null,
+                        "fillContent": "",
+                        "totalRunTime": 0,
+                        "threshold": 24,
+                        "sumId": null,
+                        "dailyReport": 0
+                    }
+                ]
+            }
+        ]
+    },
+    {
+        "id": 141340,
+        "deviceId": "2728",
+        "deviceCode": "YF1527",
+        "createTime": [
+            2025,
+            12,
+            22
+        ],
+        "deviceCategoryId": 119,
+        "deviceName": "空气处理撬",
+        "orgName": "HY-B3",
+        "attrsDetail": [
+            {
+                "createTime": null,
+                "updateTime": null,
+                "creator": null,
+                "updater": null,
+                "deleted": null,
+                "sumList": [
+                    {
+                        "createTime": null,
+                        "updateTime": null,
+                        "creator": null,
+                        "updater": null,
+                        "deleted": null,
+                        "id": 354,
+                        "deviceCategoryId": 119,
+                        "deviceId": null,
+                        "templateId": null,
+                        "name": "累计运行时间H",
+                        "code": null,
+                        "type": "double",
+                        "requiredFlag": null,
+                        "defaultValue": "353",
+                        "unit": null,
+                        "description": "",
+                        "status": null,
+                        "remark": null,
+                        "sort": null,
+                        "selectOptions": null,
+                        "version": null,
+                        "isCollection": 0,
+                        "isSum": 1,
+                        "modelAttr": null,
+                        "fillContent": "",
+                        "totalRunTime": 733,
+                        "threshold": 0,
+                        "sumId": 1,
+                        "dailyReport": 0
+                    }
+                ],
+                "nonSumList": [
+                    {
+                        "createTime": null,
+                        "updateTime": null,
+                        "creator": null,
+                        "updater": null,
+                        "deleted": null,
+                        "id": 353,
+                        "deviceCategoryId": 119,
+                        "deviceId": null,
+                        "templateId": null,
+                        "name": "当日运转时间H",
+                        "code": null,
+                        "type": "double",
+                        "requiredFlag": null,
+                        "defaultValue": "",
+                        "unit": null,
+                        "description": "",
+                        "status": null,
+                        "remark": null,
+                        "sort": null,
+                        "selectOptions": null,
+                        "version": null,
+                        "isCollection": 0,
+                        "isSum": 0,
+                        "modelAttr": null,
+                        "fillContent": "",
+                        "totalRunTime": 0,
+                        "threshold": 24,
+                        "sumId": null,
+                        "dailyReport": 0
+                    }
+                ]
+            }
+        ]
+    },
+    {
+        "id": 141281,
+        "deviceId": "2729",
+        "deviceCode": "YF1528",
+        "createTime": [
+            2025,
+            12,
+            22
+        ],
+        "deviceCategoryId": 107,
+        "deviceName": "提纯撬",
+        "orgName": "HY-B3",
+        "attrsDetail": [
+            {
+                "createTime": null,
+                "updateTime": null,
+                "creator": null,
+                "updater": null,
+                "deleted": null,
+                "sumList": [
+                    {
+                        "createTime": null,
+                        "updateTime": null,
+                        "creator": null,
+                        "updater": null,
+                        "deleted": null,
+                        "id": 290,
+                        "deviceCategoryId": 107,
+                        "deviceId": null,
+                        "templateId": null,
+                        "name": "累计注气量-方",
+                        "code": null,
+                        "type": "double",
+                        "requiredFlag": null,
+                        "defaultValue": "296",
+                        "unit": null,
+                        "description": "",
+                        "status": null,
+                        "remark": null,
+                        "sort": null,
+                        "selectOptions": null,
+                        "version": null,
+                        "isCollection": 0,
+                        "isSum": 1,
+                        "modelAttr": "CumulativeFlow",
+                        "fillContent": "",
+                        "totalRunTime": 1872906,
+                        "threshold": 0,
+                        "sumId": 1,
+                        "dailyReport": 0
+                    },
+                    {
+                        "createTime": null,
+                        "updateTime": null,
+                        "creator": null,
+                        "updater": null,
+                        "deleted": null,
+                        "id": 289,
+                        "deviceCategoryId": 107,
+                        "deviceId": null,
+                        "templateId": null,
+                        "name": "累计运行时间H",
+                        "code": null,
+                        "type": "double",
+                        "requiredFlag": null,
+                        "defaultValue": "295",
+                        "unit": null,
+                        "description": "",
+                        "status": null,
+                        "remark": null,
+                        "sort": null,
+                        "selectOptions": null,
+                        "version": null,
+                        "isCollection": 0,
+                        "isSum": 1,
+                        "modelAttr": "touchScreenDataAccumulatedOperatingTime",
+                        "fillContent": "",
+                        "totalRunTime": 731,
+                        "threshold": 0,
+                        "sumId": 1,
+                        "dailyReport": 0
+                    }
+                ],
+                "nonSumList": [
+                    {
+                        "createTime": null,
+                        "updateTime": null,
+                        "creator": null,
+                        "updater": null,
+                        "deleted": null,
+                        "id": 296,
+                        "deviceCategoryId": 107,
+                        "deviceId": null,
+                        "templateId": null,
+                        "name": "当日注气量-方",
+                        "code": null,
+                        "type": "double",
+                        "requiredFlag": null,
+                        "defaultValue": "",
+                        "unit": null,
+                        "description": "",
+                        "status": null,
+                        "remark": null,
+                        "sort": null,
+                        "selectOptions": null,
+                        "version": null,
+                        "isCollection": 0,
+                        "isSum": 0,
+                        "modelAttr": "CumulativeFlow",
+                        "fillContent": "",
+                        "totalRunTime": 0,
+                        "threshold": 80000,
+                        "sumId": null,
+                        "dailyReport": 0
+                    },
+                    {
+                        "createTime": null,
+                        "updateTime": null,
+                        "creator": null,
+                        "updater": null,
+                        "deleted": null,
+                        "id": 295,
+                        "deviceCategoryId": 107,
+                        "deviceId": null,
+                        "templateId": null,
+                        "name": "当日运转时间H",
+                        "code": null,
+                        "type": "double",
+                        "requiredFlag": null,
+                        "defaultValue": "",
+                        "unit": null,
+                        "description": "",
+                        "status": null,
+                        "remark": null,
+                        "sort": null,
+                        "selectOptions": null,
+                        "version": null,
+                        "isCollection": 0,
+                        "isSum": 0,
+                        "modelAttr": "touchScreenDataAccumulatedOperatingTime",
+                        "fillContent": "",
+                        "totalRunTime": 0,
+                        "threshold": 24,
+                        "sumId": null,
+                        "dailyReport": 0
+                    }
+                ]
+            }
+        ]
+    },
+    {
+        "id": 141356,
+        "deviceId": "2749",
+        "deviceCode": "YF1532",
+        "createTime": [
+            2025,
+            12,
+            22
+        ],
+        "deviceCategoryId": 111,
+        "deviceName": "箱式变电站",
+        "orgName": "HY-B3",
+        "attrsDetail": [
+            {
+                "createTime": null,
+                "updateTime": null,
+                "creator": null,
+                "updater": null,
+                "deleted": null,
+                "sumList": [
+                    {
+                        "createTime": null,
+                        "updateTime": null,
+                        "creator": null,
+                        "updater": null,
+                        "deleted": null,
+                        "id": 359,
+                        "deviceCategoryId": 111,
+                        "deviceId": null,
+                        "templateId": null,
+                        "name": "累计用电量kWh",
+                        "code": null,
+                        "type": "double",
+                        "requiredFlag": null,
+                        "defaultValue": "360",
+                        "unit": null,
+                        "description": "",
+                        "status": null,
+                        "remark": null,
+                        "sort": null,
+                        "selectOptions": null,
+                        "version": null,
+                        "isCollection": 0,
+                        "isSum": 1,
+                        "modelAttr": null,
+                        "fillContent": "",
+                        "totalRunTime": 875012,
+                        "threshold": 0,
+                        "sumId": 1,
+                        "dailyReport": 0
+                    }
+                ],
+                "nonSumList": [
+                    {
+                        "createTime": null,
+                        "updateTime": null,
+                        "creator": null,
+                        "updater": null,
+                        "deleted": null,
+                        "id": 360,
+                        "deviceCategoryId": 111,
+                        "deviceId": null,
+                        "templateId": null,
+                        "name": "当日用电量kWh",
+                        "code": null,
+                        "type": "double",
+                        "requiredFlag": null,
+                        "defaultValue": "",
+                        "unit": null,
+                        "description": "",
+                        "status": null,
+                        "remark": null,
+                        "sort": null,
+                        "selectOptions": null,
+                        "version": null,
+                        "isCollection": 0,
+                        "isSum": 0,
+                        "modelAttr": null,
+                        "fillContent": "",
+                        "totalRunTime": 0,
+                        "threshold": 5000000,
+                        "sumId": null,
+                        "dailyReport": 0
+                    }
+                ]
+            }
+        ]
+    },
+    {
+        "id": 141364,
+        "deviceId": "2819",
+        "deviceCode": "YF1557",
+        "createTime": [
+            2025,
+            12,
+            22
+        ],
+        "deviceCategoryId": 232,
+        "deviceName": "液驱机",
+        "orgName": "HY-B3",
+        "attrsDetail": [
+            {
+                "createTime": null,
+                "updateTime": null,
+                "creator": null,
+                "updater": null,
+                "deleted": null,
+                "sumList": [
+                    {
+                        "createTime": null,
+                        "updateTime": null,
+                        "creator": null,
+                        "updater": null,
+                        "deleted": null,
+                        "id": 833,
+                        "deviceCategoryId": 232,
+                        "deviceId": null,
+                        "templateId": null,
+                        "name": "累计运行时间H",
+                        "code": null,
+                        "type": "double",
+                        "requiredFlag": null,
+                        "defaultValue": "832",
+                        "unit": null,
+                        "description": "",
+                        "status": null,
+                        "remark": null,
+                        "sort": null,
+                        "selectOptions": null,
+                        "version": null,
+                        "isCollection": 0,
+                        "isSum": 1,
+                        "modelAttr": null,
+                        "fillContent": "",
+                        "totalRunTime": 144,
+                        "threshold": 0,
+                        "sumId": 1,
+                        "dailyReport": 0
+                    }
+                ],
+                "nonSumList": [
+                    {
+                        "createTime": null,
+                        "updateTime": null,
+                        "creator": null,
+                        "updater": null,
+                        "deleted": null,
+                        "id": 832,
+                        "deviceCategoryId": 232,
+                        "deviceId": null,
+                        "templateId": null,
+                        "name": "当日运转时间H",
+                        "code": null,
+                        "type": "double",
+                        "requiredFlag": null,
+                        "defaultValue": "",
+                        "unit": null,
+                        "description": "",
+                        "status": null,
+                        "remark": null,
+                        "sort": null,
+                        "selectOptions": null,
+                        "version": null,
+                        "isCollection": 0,
+                        "isSum": 0,
+                        "modelAttr": null,
+                        "fillContent": "",
+                        "totalRunTime": 0,
+                        "threshold": 24,
+                        "sumId": null,
+                        "dailyReport": 0
+                    }
+                ]
+            }
+        ]
+    },
+    {
+        "id": 141362,
+        "deviceId": "2869",
+        "deviceCode": "YF1597",
+        "createTime": [
+            2025,
+            12,
+            22
+        ],
+        "deviceCategoryId": 230,
+        "deviceName": "中压增压撬",
+        "orgName": "HY-B3",
+        "attrsDetail": [
+            {
+                "createTime": null,
+                "updateTime": null,
+                "creator": null,
+                "updater": null,
+                "deleted": null,
+                "sumList": [
+                    {
+                        "createTime": null,
+                        "updateTime": null,
+                        "creator": null,
+                        "updater": null,
+                        "deleted": null,
+                        "id": 828,
+                        "deviceCategoryId": 230,
+                        "deviceId": null,
+                        "templateId": null,
+                        "name": "累计运行时间H",
+                        "code": null,
+                        "type": "double",
+                        "requiredFlag": null,
+                        "defaultValue": "827",
+                        "unit": null,
+                        "description": "",
+                        "status": null,
+                        "remark": null,
+                        "sort": null,
+                        "selectOptions": null,
+                        "version": null,
+                        "isCollection": 0,
+                        "isSum": 1,
+                        "modelAttr": null,
+                        "fillContent": "",
+                        "totalRunTime": 144,
+                        "threshold": 0,
+                        "sumId": 1,
+                        "dailyReport": 0
+                    }
+                ],
+                "nonSumList": [
+                    {
+                        "createTime": null,
+                        "updateTime": null,
+                        "creator": null,
+                        "updater": null,
+                        "deleted": null,
+                        "id": 827,
+                        "deviceCategoryId": 230,
+                        "deviceId": null,
+                        "templateId": null,
+                        "name": "当日运转时间H",
+                        "code": null,
+                        "type": "double",
+                        "requiredFlag": null,
+                        "defaultValue": "",
+                        "unit": null,
+                        "description": "",
+                        "status": null,
+                        "remark": null,
+                        "sort": null,
+                        "selectOptions": null,
+                        "version": null,
+                        "isCollection": 0,
+                        "isSum": 0,
+                        "modelAttr": null,
+                        "fillContent": "",
+                        "totalRunTime": 0,
+                        "threshold": 24,
+                        "sumId": null,
+                        "dailyReport": 0
+                    }
+                ]
+            }
+        ]
+    }
+]
+
+[
+    {
+        "id": 141256,
+        "deviceId": "48578495",
+        "deviceCode": "",
+        "createTime": [
+            2025,
+            12,
+            22
+        ],
+        "deviceCategoryId": 226,
+        "deviceName": "生产日报",
+        "orgName": "HY-B3",
+        "attrsDetail": [
+            {
+                "createTime": null,
+                "updateTime": null,
+                "creator": null,
+                "updater": null,
+                "deleted": null,
+                "sumList": [],
+                "nonSumList": [
+                    {
+                        "createTime": null,
+                        "updateTime": null,
+                        "creator": null,
+                        "updater": null,
+                        "deleted": null,
+                        "id": 607,
+                        "deviceCategoryId": 226,
+                        "deviceId": null,
+                        "templateId": null,
+                        "name": "当日注气量-方",
+                        "code": null,
+                        "type": "double",
+                        "requiredFlag": null,
+                        "defaultValue": "",
+                        "unit": null,
+                        "description": "dailyGasInjection",
+                        "status": null,
+                        "remark": null,
+                        "sort": null,
+                        "selectOptions": null,
+                        "version": null,
+                        "isCollection": 0,
+                        "isSum": 0,
+                        "modelAttr": "",
+                        "fillContent": "",
+                        "totalRunTime": null,
+                        "threshold": 80000,
+                        "sumId": null,
+                        "dailyReport": 0
+                    },
+                    {
+                        "createTime": null,
+                        "updateTime": null,
+                        "creator": null,
+                        "updater": null,
+                        "deleted": null,
+                        "id": 608,
+                        "deviceCategoryId": 226,
+                        "deviceId": null,
+                        "templateId": null,
+                        "name": "当日注水量-方",
+                        "code": null,
+                        "type": "double",
+                        "requiredFlag": null,
+                        "defaultValue": "",
+                        "unit": null,
+                        "description": "dailyWaterInjection",
+                        "status": null,
+                        "remark": null,
+                        "sort": null,
+                        "selectOptions": null,
+                        "version": null,
+                        "isCollection": 0,
+                        "isSum": 0,
+                        "modelAttr": "",
+                        "fillContent": "",
+                        "totalRunTime": null,
+                        "threshold": 0,
+                        "sumId": null,
+                        "dailyReport": 0
+                    },
+                    {
+                        "createTime": null,
+                        "updateTime": null,
+                        "creator": null,
+                        "updater": null,
+                        "deleted": null,
+                        "id": 609,
+                        "deviceCategoryId": 226,
+                        "deviceId": null,
+                        "templateId": null,
+                        "name": "当日用电量kWh",
+                        "code": null,
+                        "type": "double",
+                        "requiredFlag": null,
+                        "defaultValue": "",
+                        "unit": null,
+                        "description": "dailyPowerUsage",
+                        "status": null,
+                        "remark": null,
+                        "sort": null,
+                        "selectOptions": null,
+                        "version": null,
+                        "isCollection": 0,
+                        "isSum": 0,
+                        "modelAttr": "",
+                        "fillContent": "",
+                        "totalRunTime": null,
+                        "threshold": 0,
+                        "sumId": null,
+                        "dailyReport": 0
+                    },
+                    {
+                        "createTime": null,
+                        "updateTime": null,
+                        "creator": null,
+                        "updater": null,
+                        "deleted": null,
+                        "id": 606,
+                        "deviceCategoryId": 226,
+                        "deviceId": null,
+                        "templateId": null,
+                        "name": "当日运转时间H",
+                        "code": null,
+                        "type": "double",
+                        "requiredFlag": null,
+                        "defaultValue": "",
+                        "unit": null,
+                        "description": "dailyInjectGasTime",
+                        "status": null,
+                        "remark": null,
+                        "sort": null,
+                        "selectOptions": null,
+                        "version": null,
+                        "isCollection": 0,
+                        "isSum": 0,
+                        "modelAttr": "",
+                        "fillContent": "",
+                        "totalRunTime": null,
+                        "threshold": 24,
+                        "sumId": null,
+                        "dailyReport": 0
+                    },
+                    {
+                        "createTime": null,
+                        "updateTime": null,
+                        "creator": null,
+                        "updater": null,
+                        "deleted": null,
+                        "id": 612,
+                        "deviceCategoryId": 226,
+                        "deviceId": null,
+                        "templateId": null,
+                        "name": "生产动态",
+                        "code": null,
+                        "type": "textarea",
+                        "requiredFlag": null,
+                        "defaultValue": "",
+                        "unit": null,
+                        "description": "productionStatus",
+                        "status": null,
+                        "remark": null,
+                        "sort": null,
+                        "selectOptions": null,
+                        "version": null,
+                        "isCollection": 0,
+                        "isSum": 0,
+                        "modelAttr": "",
+                        "fillContent": "",
+                        "totalRunTime": null,
+                        "threshold": 0,
+                        "sumId": null,
+                        "dailyReport": 0
+                    },
+                    {
+                        "createTime": null,
+                        "updateTime": null,
+                        "creator": null,
+                        "updater": null,
+                        "deleted": null,
+                        "id": 605,
+                        "deviceCategoryId": 226,
+                        "deviceId": null,
+                        "templateId": null,
+                        "name": "设备动态",
+                        "code": null,
+                        "type": "enum",
+                        "requiredFlag": null,
+                        "defaultValue": "",
+                        "unit": null,
+                        "description": "constructionStatus",
+                        "status": null,
+                        "remark": null,
+                        "sort": null,
+                        "selectOptions": null,
+                        "version": null,
+                        "isCollection": 0,
+                        "isSum": 0,
+                        "modelAttr": "",
+                        "fillContent": "",
+                        "totalRunTime": null,
+                        "threshold": 0,
+                        "sumId": null,
+                        "dailyReport": 0
+                    },
+                    {
+                        "createTime": null,
+                        "updateTime": null,
+                        "creator": null,
+                        "updater": null,
+                        "deleted": null,
+                        "id": 611,
+                        "deviceCategoryId": 226,
+                        "deviceId": null,
+                        "templateId": null,
+                        "name": "非生产原因",
+                        "code": null,
+                        "type": "enum",
+                        "requiredFlag": null,
+                        "defaultValue": "",
+                        "unit": null,
+                        "description": "nptReason",
+                        "status": null,
+                        "remark": null,
+                        "sort": null,
+                        "selectOptions": null,
+                        "version": null,
+                        "isCollection": 0,
+                        "isSum": 0,
+                        "modelAttr": "",
+                        "fillContent": "",
+                        "totalRunTime": null,
+                        "threshold": 0,
+                        "sumId": null,
+                        "dailyReport": 0
+                    },
+                    {
+                        "createTime": null,
+                        "updateTime": null,
+                        "creator": null,
+                        "updater": null,
+                        "deleted": null,
+                        "id": 610,
+                        "deviceCategoryId": 226,
+                        "deviceId": null,
+                        "templateId": null,
+                        "name": "非生产时间H",
+                        "code": null,
+                        "type": "double",
+                        "requiredFlag": null,
+                        "defaultValue": "",
+                        "unit": null,
+                        "description": "nonProductionTime",
+                        "status": null,
+                        "remark": null,
+                        "sort": null,
+                        "selectOptions": null,
+                        "version": null,
+                        "isCollection": 0,
+                        "isSum": 0,
+                        "modelAttr": "",
+                        "fillContent": "",
+                        "totalRunTime": null,
+                        "threshold": 0,
+                        "sumId": null,
+                        "dailyReport": 0
+                    }
+                ]
+            }
+        ]
+    }
+]

+ 139 - 91
pages/recordFilling/detail.vue

@@ -175,7 +175,14 @@
 </template>
 
 <script setup>
-import { ref, reactive, getCurrentInstance, watch, onMounted } from "vue";
+import {
+  ref,
+  reactive,
+  getCurrentInstance,
+  watch,
+  onMounted,
+  nextTick,
+} from "vue";
 import { onReady, onLoad } from "@dcloudio/uni-app";
 import dayjs from "dayjs";
 import {
@@ -193,6 +200,12 @@ import { useDataDictStore } from "@/store/modules/dataDict";
 const { appContext } = getCurrentInstance();
 const t = appContext.config.globalProperties.$t;
 
+// 导入 store
+import { useFillingDataStore } from "@/store/modules/fillingData";
+
+// 获取 store 实例
+const fillingDataStore = useFillingDataStore();
+
 // 获取字典项
 const { getStrDictOptions, getIntDictOptions } = useDataDictStore();
 
@@ -238,6 +251,18 @@ onLoad(async (option) => {
   // 处理是否可编辑 {0: '待填写', 1: '已完成', 2: '填写中', 3: '忽略'}
   isView.value = params.value?.orderStatus % 2 == 0;
   console.log("🚀 ~ isView.value:", isView.value);
+
+  // 清理旧的 store 数据
+  if (params.value.orderId) {
+    fillingDataStore.clearData(params.value.orderId);
+  }
+
+  // 页面加载完成后,延迟一点时间确保数据加载完成后再更新生产日报
+  setTimeout(() => {
+    nextTick(() => {
+      updateProductionReportDisplay();
+    });
+  }, 500);
 });
 const paging = ref(null);
 // v-model绑定的这个变量不要在分页请求结束中自己赋值,直接使用即可
@@ -254,32 +279,50 @@ watch(
   { deep: true }
 );
 
-// 处理fillContent变化的方法
-const handleFillContentChange = (nosum, deviceItem) => {
-  console.log("🚀 ~ nosum, deviceItem:", nosum, deviceItem);
-  // 处理增压机
-  if (
-    deviceItem.deviceName.includes("增压机") &&
-    nosum.name === "当日运转时间"
-  ) {
-    calculateTotalRunTime("增压机", "当日运转时间"); // 计算当日运转时间总和
-  }
-  // 处理提纯撬
-  if (deviceItem.deviceName.includes("提纯撬") && nosum.name === "当日注气量") {
-    calculateTotalRunTime("提纯撬", "当日注气量"); // 计算当日注气量总和
-  }
-  // 处理注水泵
-  if (deviceItem.deviceName.includes("注水泵") && nosum.name === "当日注水量") {
-    calculateTotalRunTime("注水泵", "当日注水量"); // 计算当日注水量总和
-  }
-  // 处理箱式变电站
-  if (
-    deviceItem.deviceName.includes("箱式变电站") &&
-    nosum.name === "当日用电量"
-  ) {
-    calculateTotalRunTime("箱式变电站", "当日用电量"); // 计算当日用电量总和
+// 更新生产日报显示
+// 更新生产日报显示 - 更准确的方法
+const updateProductionReportDisplay = () => {
+  // 获取最新的累计值
+  const latestTotals = fillingDataStore.getAllTotals();
+  console.log("更新生产日报显示,最新的累计值:", latestTotals);
+
+  // 在当前页面数据中查找生产日报
+  const reportItem = dataList.value.find(
+    (item) => item.deviceName === "生产日报"
+  );
+
+  if (!reportItem || !reportItem.nonSumList) {
+    console.warn("⚠️ 当前页面未找到生产日报或其 nonSumList");
+    return;
   }
+
+  // 更新生产日报中的累计字段
+  reportItem.nonSumList.forEach((item) => {
+    // 根据字段名称匹配对应的累计值
+    if (latestTotals.hasOwnProperty(item.name)) {
+      const newValue = toFixed(latestTotals[item.name]);
+      console.log(`更新生产日报字段 ${item.name}: ${newValue}`);
+
+      // 只有当值真正变化时才更新,避免不必要的响应式更新
+      if (item.fillContent !== newValue) {
+        item.fillContent = newValue;
+      }
+    }
+  });
 };
+// 监听 store 中的 totals 变化并更新生产日报
+// 监听 store 中的 totals 变化并更新生产日报显示
+watch(
+  () => fillingDataStore.totals,
+  (newTotals) => {
+    console.log("Store totals 更新:", newTotals);
+    // 使用 nextTick 确保 DOM 更新后再更新显示
+    nextTick(() => {
+      updateProductionReportDisplay();
+    });
+  },
+  { deep: true, immediate: true }
+);
 
 // 防抖函数
 function debounce(func, delay) {
@@ -293,43 +336,26 @@ function debounce(func, delay) {
 //防抖
 const debouncedCalculateTotalRunTime = debounce(calculateTotalRunTime, 100);
 
+// 修改 handleRealTimeUpdate 方法
 const handleRealTimeUpdate = (nosum, deviceItem) => {
   console.log("🚀 实时更新 ~ nosum, deviceItem:", nosum, deviceItem);
 
-  // 当日运转时间累加
-  if (
-    deviceItem.deviceName.includes("增压机") &&
-    nosum.name === "当日运转时间H"
-  ) {
-    debouncedCalculateTotalRunTime("增压机", "当日运转时间H", "当日运转时间H");
-  }
-
-  // 当日注气量累加
-  if (
-    deviceItem.deviceName.includes("提纯撬") &&
-    nosum.name === "当日注气量-方"
-  ) {
-    debouncedCalculateTotalRunTime("提纯撬", "当日注气量-方", "当日注气量-方");
-  }
+  // 检查是否需要累加到生产日报
+  if (fillingDataStore.isAccumulatedField(deviceItem.deviceName, nosum.name)) {
+    console.log(`需要累加的字段: ${deviceItem.deviceName} - ${nosum.name}`);
 
-  // 当日注水量累加
-  if (
-    deviceItem.deviceName.includes("注水泵") &&
-    nosum.name === "当日注水量-方"
-  ) {
-    debouncedCalculateTotalRunTime("注水泵", "当日注水量-方", "当日注水量-方");
-  }
-
-  // 当日用电量累加
-  if (
-    deviceItem.deviceName.includes("箱式变电站") &&
-    nosum.name === "当日用电量kWh"
-  ) {
-    debouncedCalculateTotalRunTime(
-      "箱式变电站",
-      "当日用电量kWh",
-      "当日用电量kWh"
+    // 更新到 store
+    fillingDataStore.updateFillingItem(
+      deviceItem.deviceId,
+      deviceItem.deviceName,
+      nosum.name,
+      nosum.fillContent
     );
+
+    // 立即更新生产日报显示
+    nextTick(() => {
+      updateProductionReportDisplay();
+    });
   }
 };
 
@@ -396,7 +422,6 @@ const queryList = (pageNo, pageSize) => {
     pageNo,
     pageSize,
     orderId: params.value.orderId,
-    // deviceCategoryId: 1,
   })
     .then(async (res) => {
       console.log("🚀 ~ res:", res);
@@ -404,7 +429,7 @@ const queryList = (pageNo, pageSize) => {
       const resList = [].concat(data.list);
       // 列表总数
       totalNum.value = data.total;
-      // 遍历列表,处理attrsDetail
+
       resList.map(async (item) => {
         const attrParams = {
           deviceCode: item.deviceCode,
@@ -416,12 +441,8 @@ const queryList = (pageNo, pageSize) => {
           userId: params.value.userId,
           orderId: params.value.orderId,
         };
-        // console.log(
-        //   "getRecordFillingDetailGetAttrs- attrParams",
-        //   attrParams
-        // );
+
         const resAttrs = item?.attrsDetail;
-        // console.log("resAttrs", resAttrs);
         if (resAttrs) {
           attrParams.createTime = attrParams.createTime
             ? dayjs(attrParams.createTime).format("YYYY-MM-DD")
@@ -429,17 +450,12 @@ const queryList = (pageNo, pageSize) => {
           attrParams.id = attrParams.orderId;
           delete attrParams.orderId;
           delete attrParams.deviceName;
-          resAttrs.map((rtem) => {
-            // 将rtem中sumList和nonSumList两个数组中的
-            // fillContent字段判断是否为null, 如果为null,则赋值为0 不为null则保留两位小数
-            // 将attrParams合并到两个数组的每个对象中
-            // 然后将sumList和nonSumList分别赋值给item的sumList和nonSumList
 
+          resAttrs.map((rtem) => {
             if (rtem.sumList) {
               rtem.sumList.map((sumItem) => {
                 if (sumItem.fillContent == null || sumItem.fillContent == "") {
-                  // console.log("🚀 ~ rtem.sumList.map ~ sumItem:", sumItem);
-                  // sumItem.fillContent = 0;
+                  // 保留原逻辑
                 } else {
                   // 如果是double类型,保留两位小数
                   if (sumItem.type == "double") {
@@ -448,24 +464,19 @@ const queryList = (pageNo, pageSize) => {
                 }
                 // 将sumItem的id赋值给modelId
                 sumItem.modelId = sumItem.id;
-
                 sumItem.pointName = sumItem.name;
                 // 合并attrParams到sumItem中
-                sumItem = Object.assign(sumItem, attrParams);
+                Object.assign(sumItem, attrParams);
               });
             }
+
             if (rtem.nonSumList) {
-              //
               rtem.nonSumList.map((nonSumItem) => {
                 if (
                   nonSumItem.fillContent == null ||
                   nonSumItem.fillContent == ""
                 ) {
-                  // console.log(
-                  //   "🚀 ~ rtem.nonSumList.map ~ nonSumItem:",
-                  //   nonSumItem
-                  // );
-                  // nonSumItem.fillContent = 0;
+                  // 保留原逻辑
                 } else {
                   // 如果是double类型,保留两位小数
                   if (nonSumItem.type == "double") {
@@ -476,10 +487,10 @@ const queryList = (pageNo, pageSize) => {
                 // 将nonSumItem的id赋值给modelId
                 nonSumItem.modelId = nonSumItem.id;
                 // 合并attrParams到nonSumItem中
-                nonSumItem = Object.assign(nonSumItem, attrParams);
+                Object.assign(nonSumItem, attrParams);
+
                 // 如果是enum类型,且description不为null,则根据description获取对应字典项数组,赋值给enumList
                 if (nonSumItem.type == "enum" && nonSumItem.description) {
-                  console.log("🚀 ~ onSumItem.description:");
                   const dictOptions =
                     nonSumItem.name === "非生产原因"
                       ? getIntDictOptions(nonSumItem.description)
@@ -494,7 +505,6 @@ const queryList = (pageNo, pageSize) => {
 
                   // 确保 fillContent 的类型与 enumList 中的 value 类型匹配
                   if (nonSumItem.name === "非生产原因") {
-                    // 如果是"非生产原因",将 fillContent 转换为数字类型以匹配 getIntDictOptions
                     if (
                       nonSumItem.fillContent !== null &&
                       nonSumItem.fillContent !== ""
@@ -502,32 +512,64 @@ const queryList = (pageNo, pageSize) => {
                       nonSumItem.fillContent = parseInt(nonSumItem.fillContent);
                     }
                   }
-
-                  console.log("🚀 ~ nonSumItem.enumList:", nonSumItem.enumList);
                 }
               });
             }
-            item.sumList = rtem.sumList;
 
+            item.sumList = rtem.sumList;
             item.nonSumList = rtem.nonSumList;
           });
-          console.log("resAttrs-modelId", resAttrs);
         }
+
+        // 将设备数据存储到 store(只存储需要累加的字段)
+        if (item.deviceName !== "生产日报") {
+          const storeData = {
+            deviceId: item.deviceId,
+            deviceName: item.deviceName,
+            deviceCode: item.deviceCode,
+            nonSumList: [],
+          };
+
+          // 处理 nonSumList
+          if (item.nonSumList && Array.isArray(item.nonSumList)) {
+            storeData.nonSumList = item.nonSumList.filter((nosum) =>
+              fillingDataStore.isAccumulatedField(item.deviceName, nosum.name)
+            );
+          }
+
+          // 如果有需要累加的字段,才存储到 store
+          if (storeData.nonSumList.length > 0) {
+            fillingDataStore.updateDeviceFilling(item.deviceId, storeData);
+          }
+        } else {
+          // 如果是生产日报,也存储到 store 并使用 store 中的累计值更新
+          const updatedReportData =
+            fillingDataStore.updateProductionReportFields(item);
+          fillingDataStore.updateDeviceFilling(item.deviceId, {
+            ...updatedReportData,
+            isProductionReport: true,
+          });
+        }
+
         return item;
       });
 
-      console.log("resList--", resList);
-      // 将请求结果通过complete传给z-paging处理,同时也代表请求结束,这一行必须调用
+      // 重新计算所有累计值并更新生产日报显示
+      const calculatedTotals = fillingDataStore.calculateTotals();
+      console.log("计算后的累计值:", calculatedTotals);
+
+      // 立即更新生产日报显示
+      nextTick(() => {
+        updateProductionReportDisplay();
+      });
 
+      console.log("resList--", resList);
       paging.value.completeByNoMore(
         resList,
         pageNo * pageSize >= totalNum.value
       );
     })
     .catch((res) => {
-      // 如果请求失败写paging.value.complete(false);
-      // 注意,每次都需要在catch中写这句话很麻烦,z-paging提供了方案可以全局统一处理
-      // 在底层的网络请求抛出异常时,写uni.$emit('z-paging-error-emit');即可
       paging.value.complete(false);
     });
 };
@@ -575,6 +617,12 @@ const toFixed = (num) => {
 };
 
 const onSubmit = async () => {
+  // 确保 store 中的累计值是最新的
+  const latestTotals = fillingDataStore.calculateTotals();
+  console.log("重新计算后的 totals:", latestTotals);
+
+  // 更新生产日报的数据
+  updateProductionReportDisplay();
   // console.log("onSubmit", dataList.value);
   // 校验是否所有待填写项都已加载
   if (dataList.value.length < totalNum) {

+ 194 - 0
store/modules/fillingData.js

@@ -0,0 +1,194 @@
+// 在 store/modules/fillingData.js 中更新字段映射
+
+import { defineStore } from "pinia";
+export const useFillingDataStore = defineStore("fillingData", {
+  state: () => ({
+    // 存储所有设备的填写数据
+    deviceFillings: new Map(), // key: deviceId, value: {设备数据}
+    // 存储累计值(根据 data.txt 中的生产日报字段调整)
+    totals: {
+      "当日运转时间H": 0, // 对应空压机、空气处理撬、液驱机、中压增压撬等
+      "当日注气量-方": 0, // 对应提纯撬
+      "当日注水量-方": 0, // 对应注水泵(虽然数据中没有,但保留逻辑)
+      "当日用电量kWh": 0, // 对应箱式变电站
+    },
+  }),
+
+  actions: {
+    // 更新设备数据并重新计算累计值
+    updateDeviceFilling(deviceId, deviceData) {
+      this.deviceFillings.set(deviceId, deviceData);
+      this.calculateTotals();
+    },
+
+    // 更新单个填写项
+    updateFillingItem(deviceId, deviceName, itemName, value) {
+      const deviceData = this.deviceFillings.get(deviceId) || {
+        deviceId,
+        deviceName,
+      };
+      if (!deviceData.nonSumList) deviceData.nonSumList = [];
+
+      // 查找或创建对应项
+      const itemIndex = deviceData.nonSumList.findIndex(
+        (item) => item.name === itemName
+      );
+      if (itemIndex >= 0) {
+        deviceData.nonSumList[itemIndex].fillContent = value;
+      } else {
+        deviceData.nonSumList.push({
+          name: itemName,
+          fillContent: value,
+          type: "double",
+        });
+      }
+
+      this.updateDeviceFilling(deviceId, deviceData);
+    },
+
+    // 计算所有累计值(根据 data.txt 数据调整逻辑)
+    calculateTotals() {
+      // 重置累计值
+      const newTotals = {
+        "当日运转时间H": 0,
+        "当日注气量-方": 0,
+        "当日注水量-方": 0,
+        "当日用电量kWh": 0,
+      };
+
+      // 遍历所有设备数据
+      this.deviceFillings.forEach((deviceData) => {
+        if (
+          deviceData.nonSumList &&
+          deviceData.deviceName &&
+          !deviceData.isProductionReport
+        ) {
+          const { deviceName, nonSumList } = deviceData;
+
+          // 根据设备名称和字段名判断是否需要累加
+          nonSumList.forEach((item) => {
+            // 确保 fillContent 是数字类型再进行计算
+            const value = parseFloat(item.fillContent) || 0;
+
+            // 需要累加的设备类型和字段(根据 data.txt 数据调整)
+            if (
+              (deviceName.includes("空压机") ||
+               deviceName.includes("空气处理撬") ||
+               deviceName.includes("液驱机") ||
+               deviceName.includes("中压增压撬") ||
+               deviceName.includes("增压机")) && // 包含所有运转时间的设备
+              item.name === "当日运转时间H"
+            ) {
+              newTotals["当日运转时间H"] += value;
+            } else if (
+              deviceName.includes("提纯撬") &&
+              item.name === "当日注气量-方"
+            ) {
+              newTotals["当日注气量-方"] += value;
+            } else if (
+              deviceName.includes("注水泵") &&
+              item.name === "当日注水量-方"
+            ) {
+              newTotals["当日注水量-方"] += value;
+            } else if (
+              deviceName.includes("箱式变电站") &&
+              item.name === "当日用电量kWh"
+            ) {
+              newTotals["当日用电量kWh"] += value;
+            }
+          });
+        }
+      });
+
+      this.totals = newTotals;
+      return newTotals;
+    },
+
+    // 获取指定字段的累计值
+    getTotal(fieldName) {
+      return this.totals[fieldName] || 0;
+    },
+
+    // 获取所有累计值
+    getAllTotals() {
+      return { ...this.totals };
+    },
+
+    // 检查是否是需要累加的字段
+    isAccumulatedField(deviceName, fieldName) {
+      return (
+        // 空压机等设备 -> 当日运转时间H
+        ((deviceName.includes("空压机") ||
+          deviceName.includes("空气处理撬") ||
+          deviceName.includes("液驱机") ||
+          deviceName.includes("中压增压撬") ||
+          deviceName.includes("增压机")) &&
+         fieldName === "当日运转时间H") ||
+        // 提纯撬 -> 当日注气量-方
+        (deviceName.includes("提纯撬") && fieldName === "当日注气量-方") ||
+        // 注水泵 -> 当日注水量-方
+        (deviceName.includes("注水泵") && fieldName === "当日注水量-方") ||
+        // 箱式变电站 -> 当日用电量kWh
+        (deviceName.includes("箱式变电站") && fieldName === "当日用电量kWh")
+      );
+    },
+
+    // 清理指定工单的数据
+    clearData(orderId) {
+      // 这里可以根据 orderId 清理特定工单的数据
+      // 简单实现:清理所有数据
+      this.deviceFillings.clear();
+      this.totals = {
+        "当日运转时间H": 0,
+        "当日注气量-方": 0,
+        "当日注水量-方": 0,
+        "当日用电量kWh": 0,
+      };
+    },
+
+    // 获取需要同步到生产日报的字段映射(根据 data.txt 中的生产日报字段)
+    getProductionReportMapping() {
+      return {
+        // 设备字段名: 生产日报字段名
+        "当日运转时间H": "当日运转时间H",
+        "当日注气量-方": "当日注气量-方",
+        "当日注水量-方": "当日注水量-方",
+        "当日用电量kWh": "当日用电量kWh",
+      };
+    },
+
+    // 获取生产日报字段到设备字段的反向映射
+    getReverseMapping() {
+      const mapping = this.getProductionReportMapping();
+      const reverseMapping = {};
+      for (const [deviceField, reportField] of Object.entries(mapping)) {
+        reverseMapping[reportField] = deviceField;
+      }
+      return reverseMapping;
+    },
+
+    // 更新生产日报字段
+    updateProductionReportFields(reportData) {
+      // 获取反向映射,从生产日报字段到设备字段
+      const reverseMapping = this.getReverseMapping();
+      const newReportData = { ...reportData };
+
+      if (newReportData.nonSumList && Array.isArray(newReportData.nonSumList)) {
+        newReportData.nonSumList = newReportData.nonSumList.map(item => {
+          // 检查这个字段是否是生产日报字段
+          const deviceField = reverseMapping[item.name];
+          if (deviceField && this.totals.hasOwnProperty(deviceField)) {
+            // 如果是累计字段,使用 store 中的累计值
+            return {
+              ...item,
+              fillContent: this.totals[deviceField].toString()
+            };
+          }
+          return item;
+        });
+      }
+
+      return newReportData;
+    }
+  },
+});