Browse Source

分时诊断大列表优化

loki.wu 1 year ago
parent
commit
26b504fc94

+ 4 - 0
lib/pages/consultation_record_view/controller.dart

@@ -744,7 +744,11 @@ class ConsultationRecordViewController extends GetxController
   Future<void> searchFindRecordPages() async {
     pageIndex = 1;
     await findRecordPagesAsync();
+    openOrCloseMoreFilter();
+    scaffoldKey.currentState?.closeEndDrawer();
     isShowOperationButtonsRow = false;
+    isDrawerOpen = false;
+    update(['record_body']);
     update(["operation_buttons_row"]);
     update(["record_table_pagination", "record_data_table"]);
   }

+ 25 - 15
lib/pages/consultation_record_view/widgets/consultation_record_filter.dart

@@ -33,6 +33,7 @@ class ConsultationRecordFilter extends GetView<ConsultationRecordViewController>
                 width: 280,
                 child: SearchInput(
                   businessParent: this,
+                  margin: EdgeInsets.all(0),
                   onChanged: (value) {
                     controller.keyWord = value;
                   },
@@ -69,6 +70,14 @@ class ConsultationRecordFilter extends GetView<ConsultationRecordViewController>
                 },
               ),
               Expanded(child: FSizedBox()),
+              InkWell(
+                onTap: () {},
+                child: FIcon(
+                  Icons.outbond,
+                  color: FTheme.ins.colorScheme.primary,
+                ),
+              ),
+              const SizedBox(width: 10),
               InkWell(
                 onTap: () {
                   controller.refreshData();
@@ -80,21 +89,22 @@ class ConsultationRecordFilter extends GetView<ConsultationRecordViewController>
               ),
               const SizedBox(width: 10),
               GetBuilder<ConsultationRecordViewController>(
-                  id: "record_more_filter_icon",
-                  builder: (_) {
-                    return FIconButton(
-                      businessParent: this,
-                      name: i18nBook.common.filter.t,
-                      onPressed: () {
-                        controller.openOrCloseMoreFilter();
-                        controller.scaffoldKey.currentState?.openEndDrawer();
-                      },
-                      icon: FIcon(
-                        Icons.filter_alt_rounded,
-                        color: FTheme.ins.colorScheme.primary,
-                      ),
-                    );
-                  }),
+                id: "record_more_filter_icon",
+                builder: (_) {
+                  return FIconButton(
+                    businessParent: this,
+                    name: i18nBook.common.filter.t,
+                    onPressed: () {
+                      controller.openOrCloseMoreFilter();
+                      controller.scaffoldKey.currentState?.openEndDrawer();
+                    },
+                    icon: FIcon(
+                      Icons.filter_alt_rounded,
+                      color: FTheme.ins.colorScheme.primary,
+                    ),
+                  );
+                },
+              ),
             ],
           ),
         ],

+ 0 - 5
lib/pages/consultation_record_view/widgets/operation_buttons_row.dart

@@ -42,11 +42,6 @@ class OperationButtonsRow extends GetView<ConsultationRecordViewController>
         i18nBook.remedical.examinationDetails.t,
         () => controller.showInspectionDetailsDialog(),
       ),
-      if (controller.isShowEndScan)
-        _buildTextButton(
-          i18nBook.remedical.endScan.t,
-          () => controller.endScan(this),
-        ),
       if (controller.currentRecordData?.isCanCreateReport ?? false) ...[
         _buildTextButton(
           i18nBook.remedical.writeReport.t,

+ 6 - 1
lib/pages/consultation_record_view/widgets/record_data_table.dart

@@ -17,6 +17,7 @@ class RecordDataTable extends GetView<ConsultationRecordViewController> {
   RecordDataTable({Key? key}) : super(key: key);
   final tabelScrollController = ScrollController();
   final aiManager = Get.find<IAIManager>();
+  final List<int> _selecteds = [];
 
   @override
   Widget build(BuildContext context) {
@@ -38,10 +39,14 @@ class RecordDataTable extends GetView<ConsultationRecordViewController> {
                   columns: _buildTableColumns(),
                   source: controller.consultationsRecordDataList,
                   loading: controller.isTableLoading,
-                  onRowSelected: (value, index, idxs) {},
+                  onRowSelected: (value, index, idxs) {
+                    _selecteds.add(index);
+                  },
                   onRowTap: (index) {
                     controller.onTableRowTap(index);
                   },
+                  selecteds: _selecteds,
+                  showSelect: kDebugMode,
                   onAllRowsSelected: (value, idxs) => {},
                   scrollController: tabelScrollController,
                 ),