ソースを参照

[modify]修改待办列表界面并隐藏搜索功能

zk 1 年間 前
コミット
5f405313fe
2 ファイル変更70 行追加68 行削除
  1. 2 0
      lib/module/agenda/controller.dart
  2. 68 68
      lib/module/agenda/view.dart

+ 2 - 0
lib/module/agenda/controller.dart

@@ -21,6 +21,7 @@ class AgendaController extends BaseController {
   final RxList<Agenda> agendaTodoList = <Agenda>[].obs;
   final RxList<Agenda> agendaDoneList = <Agenda>[].obs;
 
+  final doneSize = 0.obs;
   final int limit = 10;
 
   @override
@@ -37,6 +38,7 @@ class AgendaController extends BaseController {
     agendaRepository
         .agendaPage(offset, limit, completeStatus: TaskStatus.DONE)
         .then((response) {
+      doneSize.value = response.count;
       if (isClearAll == true) {
         agendaDoneList.clear();
       }

+ 68 - 68
lib/module/agenda/view.dart

@@ -52,73 +52,73 @@ class AgendaPage extends BasePage<AgendaController> {
                       color: ColorName.primaryTextColor)),
               centerTitle: true,
             ),
-            Row(
-              children: [
-                Expanded(
-                    child: Padding(
-                  padding: EdgeInsets.only(left: 12.w),
-                  child: CupertinoSearchTextField(
-                    enabled: false,
-                    onTap: () {
-                      Get.toNamed(RoutePath.taskSearch);
-                    },
-                    placeholder: StringName.searchHint.tr,
-                    prefixIcon: ImageIcon(Assets.images.iconSearch.provider(),
-                        size: 20.w),
-                    backgroundColor: Colors.white,
-                    style: TextStyle(
-                        fontSize: 14.w, color: ColorName.primaryTextColor),
-                    placeholderStyle: TextStyle(
-                        fontSize: 14.w, color: const Color(0xFFAFAFAF)),
-                  ),
-                )),
-                GestureDetector(
-                  onTap: () {},
-                  child: Column(
-                    mainAxisAlignment: MainAxisAlignment.center,
-                    children: [
-                      Container(
-                          margin: EdgeInsets.symmetric(horizontal: 16.w),
-                          width: 20.w,
-                          height: 20.w,
-                          child: Assets.images.iconSift.image()),
-                      // Replace with your image asset
-                      SizedBox(height: 2.h),
-                      // Add some space between the image and text
-                      Text(
-                        StringName.agendaSift.tr,
-                        style: TextStyle(
-                            fontSize: 10.sp, color: ColorName.primaryTextColor),
-                      ),
-                    ],
-                  ),
-                )
-              ],
-            ),
-            SizedBox(height: 12.h),
-            Container(
-              margin: EdgeInsets.only(left: 12.w),
-              padding: EdgeInsets.symmetric(horizontal: 8.w, vertical: 4.h),
-              decoration: BoxDecoration(
-                  color: const Color(0xFFE9E9E9),
-                  borderRadius: BorderRadius.circular(8.w)),
-              child: IntrinsicWidth(
-                child: Row(
-                  children: [
-                    Text(controller.filterTxt,
-                        style: TextStyle(
-                            fontSize: 13.sp,
-                            color: ColorName.secondaryTextColor)),
-                    SizedBox(width: 6.w),
-                    Opacity(
-                        opacity: 0.7,
-                        child: ImageIcon(
-                            Assets.images.iconTaskFilterClose.provider(),
-                            size: 16.w))
-                  ],
-                ),
-              ),
-            ),
+            // Row(
+            //   children: [
+            //     Expanded(
+            //         child: Padding(
+            //       padding: EdgeInsets.only(left: 12.w),
+            //       child: CupertinoSearchTextField(
+            //         enabled: false,
+            //         onTap: () {
+            //           Get.toNamed(RoutePath.taskSearch);
+            //         },
+            //         placeholder: StringName.searchHint.tr,
+            //         prefixIcon: ImageIcon(Assets.images.iconSearch.provider(),
+            //             size: 20.w),
+            //         backgroundColor: Colors.white,
+            //         style: TextStyle(
+            //             fontSize: 14.w, color: ColorName.primaryTextColor),
+            //         placeholderStyle: TextStyle(
+            //             fontSize: 14.w, color: const Color(0xFFAFAFAF)),
+            //       ),
+            //     )),
+            //     GestureDetector(
+            //       onTap: () {},
+            //       child: Column(
+            //         mainAxisAlignment: MainAxisAlignment.center,
+            //         children: [
+            //           Container(
+            //               margin: EdgeInsets.symmetric(horizontal: 16.w),
+            //               width: 20.w,
+            //               height: 20.w,
+            //               child: Assets.images.iconSift.image()),
+            //           // Replace with your image asset
+            //           SizedBox(height: 2.h),
+            //           // Add some space between the image and text
+            //           Text(
+            //             StringName.agendaSift.tr,
+            //             style: TextStyle(
+            //                 fontSize: 10.sp, color: ColorName.primaryTextColor),
+            //           ),
+            //         ],
+            //       ),
+            //     )
+            //   ],
+            // ),
+            // SizedBox(height: 12.h),
+            // Container(
+            //   margin: EdgeInsets.only(left: 12.w),
+            //   padding: EdgeInsets.symmetric(horizontal: 8.w, vertical: 4.h),
+            //   decoration: BoxDecoration(
+            //       color: const Color(0xFFE9E9E9),
+            //       borderRadius: BorderRadius.circular(8.w)),
+            //   child: IntrinsicWidth(
+            //     child: Row(
+            //       children: [
+            //         Text(controller.filterTxt,
+            //             style: TextStyle(
+            //                 fontSize: 13.sp,
+            //                 color: ColorName.secondaryTextColor)),
+            //         SizedBox(width: 6.w),
+            //         Opacity(
+            //             opacity: 0.7,
+            //             child: ImageIcon(
+            //                 Assets.images.iconTaskFilterClose.provider(),
+            //                 size: 16.w))
+            //       ],
+            //     ),
+            //   ),
+            // ),
             SizedBox(width: 7.h),
             Expanded(
                 child: SmartRefresher(
@@ -151,7 +151,7 @@ class AgendaPage extends BasePage<AgendaController> {
                   child: Obx(() {
                     return taskGroupItem(
                         StringName.taskItemDone.tr,
-                        controller.agendaDoneList.length,
+                        controller.doneSize.value,
                         controller.doneIsExpanded.value, itemClick: () {
                       controller.onClickDoneGroup();
                     });