瀏覽代碼

fixed: 0018806: 【web客户端&一体机】提交基础检查后,在web客户端中选中记录查看右侧的数据,单位后多一列

loki.wu 10 月之前
父節點
當前提交
7256b00f4a
共有 1 個文件被更改,包括 20 次插入17 次删除
  1. 20 17
      lib/pages/patient/detail/widgets/last_record.dart

+ 20 - 17
lib/pages/patient/detail/widgets/last_record.dart

@@ -75,8 +75,26 @@ class LastRecordTable extends StatelessWidget {
     // var controller = Get.find<HealthCheckListController>();
     var tableRows = <TableRow>[];
     for (var i = 0; i < tableData.length; i++) {
-      final rowData = tableData[i];
+      final List<String> rowData = tableData[i];
       final label = rowData[0];
+      List<Widget> children = [];
+      for (String child in rowData) {
+        if (rowData.indexOf(child) == 3) {
+          continue;
+        }
+        if (checkKey == "HEITCMC") {
+          children.add(_buildConstitutionDataCell(child));
+        }
+        if (label == '心电测量') {
+          children.add(_buildImageDataCell(child));
+        } else if (label == '十二导心电(30秒)') {
+          children.add(_buildImageDataCell(child));
+        } else if (label == '十二导分析结果') {
+          children.add(_buildEcg12DataCell(child));
+        } else {
+          children.add(_buildDataCell(child));
+        }
+      }
       tableRows.add(
         TableRow(
           decoration: i % 2 == 0
@@ -84,22 +102,7 @@ class LastRecordTable extends StatelessWidget {
               : const BoxDecoration(
                   color: Color.fromRGBO(233, 244, 255, 1),
                 ),
-          children: tableData[i].map(
-            (cellData) {
-              if (checkKey == "HEITCMC") {
-                return _buildConstitutionDataCell(cellData);
-              }
-              if (label == '心电测量') {
-                return _buildImageDataCell(cellData);
-              } else if (label == '十二导心电(30秒)') {
-                return _buildImageDataCell(cellData);
-              } else if (label == '十二导分析结果') {
-                return _buildEcg12DataCell(cellData);
-              }
-
-              return _buildDataCell(cellData);
-            },
-          ).toList(),
+          children: children,
         ),
       );
     }