From 42b89c3f8387447c4d426650d0c4aa4ba9c74dd6 Mon Sep 17 00:00:00 2001 From: zhangmeng <494089941@qq.com> Date: Fri, 21 May 2021 14:33:44 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20=E7=BB=BF=E5=8C=96?= =?UTF-8?q?=E7=AE=A1=E7=90=86=20=E5=8D=AB=E7=94=9F=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E8=AF=A6=E6=83=85=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../green_manage/green_manage_card.dart | 4 +- .../green_manage_details_page.dart | 15 +- .../hygience_manage/hygience_manage_card.dart | 4 +- .../hygience_manage_detail_page.dart | 151 ++++++++++++++++++ 4 files changed, 165 insertions(+), 9 deletions(-) create mode 100644 lib/ui/manage_pages/hygience_manage/hygience_manage_detail_page.dart diff --git a/lib/ui/manage_pages/green_manage/green_manage_card.dart b/lib/ui/manage_pages/green_manage/green_manage_card.dart index 90aba86..1abd0ef 100644 --- a/lib/ui/manage_pages/green_manage/green_manage_card.dart +++ b/lib/ui/manage_pages/green_manage/green_manage_card.dart @@ -1,6 +1,7 @@ // Flutter imports: import 'package:aku_community_manager/const/api.dart'; import 'package:aku_community_manager/models/manager/green_manage/green_manage_list_model.dart'; +import 'package:aku_community_manager/ui/manage_pages/green_manage/green_manage_details_page.dart'; import 'package:aku_community_manager/utils/network/base_model.dart'; import 'package:aku_community_manager/utils/network/net_util.dart'; import 'package:bot_toast/bot_toast.dart'; @@ -9,6 +10,7 @@ import 'package:flutter/material.dart'; // Package imports: import 'package:aku_ui/common_widgets/aku_button.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:get/get.dart'; import 'package:velocity_x/velocity_x.dart'; // Project imports: @@ -34,7 +36,7 @@ class _GreenManageCardState extends State { Widget build(BuildContext context) { return AkuButton( onPressed: () { - // Get.to(GreenManageDetailsPage(cardModel)); + Get.to(GreenManageDetailsPage(widget.model)); }, child: Container( width: double.infinity, diff --git a/lib/ui/manage_pages/green_manage/green_manage_details_page.dart b/lib/ui/manage_pages/green_manage/green_manage_details_page.dart index eb2f72b..c85c1cf 100644 --- a/lib/ui/manage_pages/green_manage/green_manage_details_page.dart +++ b/lib/ui/manage_pages/green_manage/green_manage_details_page.dart @@ -1,4 +1,5 @@ // Flutter imports: +import 'package:aku_community_manager/models/manager/green_manage/green_manage_list_model.dart'; import 'package:flutter/material.dart'; // Package imports: @@ -7,13 +8,13 @@ import 'package:flutter_screenutil/flutter_screenutil.dart'; // Project imports: import 'package:aku_community_manager/const/resource.dart'; -import 'package:aku_community_manager/mock_models/manage_models/manage_model.dart'; import 'package:aku_community_manager/style/app_style.dart'; import 'package:aku_community_manager/tools/widget_tool.dart'; import 'package:aku_community_manager/ui/widgets/common/aku_scaffold.dart'; class GreenManageDetailsPage extends StatelessWidget { - final GreenManageCardModel cardModel; + + final GreenManageListModel cardModel; GreenManageDetailsPage(this.cardModel); @@ -43,7 +44,7 @@ class GreenManageDetailsPage extends StatelessWidget { height: 93.w, alignment: Alignment.centerLeft, child: Text( - cardModel.title, + cardModel.greenAreaName, style: TextStyle( color: AppStyle.primaryTextColor, fontSize: 32.w, @@ -69,7 +70,7 @@ class GreenManageDetailsPage extends StatelessWidget { )), Spacer(), Text( - cardModel.task, + cardModel.content, style: AppStyle().primaryStyle, ), ], @@ -89,7 +90,7 @@ class GreenManageDetailsPage extends StatelessWidget { fontSize: 28.sp)), Spacer(), Text( - '${cardModel.timestart}至${cardModel.timeend}', + '${cardModel.createDateString}至${cardModel.endDateString}', style: AppStyle().primaryStyle, ), ], @@ -110,7 +111,7 @@ class GreenManageDetailsPage extends StatelessWidget { )), Spacer(), Text( - cardModel.name, + cardModel.directorName, style: AppStyle().primaryStyle, ), ], @@ -135,7 +136,7 @@ class GreenManageDetailsPage extends StatelessWidget { fontWeight: FontWeight.bold)), AkuBox.h(16), Text( - cardModel.body, + cardModel.content, style: TextStyle( color: AppStyle.primaryTextColor, fontSize: 28.w), ), diff --git a/lib/ui/manage_pages/hygience_manage/hygience_manage_card.dart b/lib/ui/manage_pages/hygience_manage/hygience_manage_card.dart index 5358a77..2248e0f 100644 --- a/lib/ui/manage_pages/hygience_manage/hygience_manage_card.dart +++ b/lib/ui/manage_pages/hygience_manage/hygience_manage_card.dart @@ -1,6 +1,7 @@ // Flutter imports: import 'package:aku_community_manager/const/api.dart'; import 'package:aku_community_manager/models/manager/hygience_manage/heygience_list_model.dart'; +import 'package:aku_community_manager/ui/manage_pages/hygience_manage/hygience_manage_detail_page.dart'; import 'package:aku_community_manager/utils/network/base_model.dart'; import 'package:aku_community_manager/utils/network/net_util.dart'; import 'package:bot_toast/bot_toast.dart'; @@ -8,6 +9,7 @@ import 'package:flutter/material.dart'; // Package imports: import 'package:aku_ui/common_widgets/aku_button.dart'; +import 'package:get/get.dart'; import 'package:velocity_x/velocity_x.dart'; // Project imports: @@ -33,7 +35,7 @@ class _HyginecManageCardState extends State { Widget build(BuildContext context) { return AkuButton( onPressed: () { - // Get.to(GreenManageDetailsPage(cardModel)); + Get.to(HygienceManageDetailPage(cardModel: widget.model)); }, child: Container( width: double.infinity, diff --git a/lib/ui/manage_pages/hygience_manage/hygience_manage_detail_page.dart b/lib/ui/manage_pages/hygience_manage/hygience_manage_detail_page.dart new file mode 100644 index 0000000..92a731c --- /dev/null +++ b/lib/ui/manage_pages/hygience_manage/hygience_manage_detail_page.dart @@ -0,0 +1,151 @@ +import 'package:aku_community_manager/models/manager/hygience_manage/heygience_list_model.dart'; +import 'package:aku_community_manager/style/app_style.dart'; +import 'package:aku_community_manager/tools/widget_tool.dart'; +import 'package:aku_community_manager/ui/widgets/common/aku_scaffold.dart'; +import 'package:aku_ui/common_widgets/aku_button.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:aku_community_manager/const/resource.dart'; + +class HygienceManageDetailPage extends StatefulWidget { + final HygienceListModel cardModel; + HygienceManageDetailPage({Key key, this.cardModel}) : super(key: key); + + @override + _HygienceManageDetailPageState createState() => + _HygienceManageDetailPageState(); +} + +class _HygienceManageDetailPageState extends State { + + HygienceListModel get cardModel => widget.cardModel; + @override + Widget build(BuildContext context) { + return AkuScaffold( + title: '详情', + body: Column( + children: [ + AkuBox.h(16), + AkuButton( + onPressed: () {}, + child: Container( + height: 302.w, + width: double.infinity, + padding: EdgeInsets.only( + left: 32.w, + right: 32.w, + bottom: 40.w, + ), + color: Color(0xFFFFFFFF), + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + height: 93.w, + alignment: Alignment.centerLeft, + child: Text( + cardModel.hygieneAreaName, + style: TextStyle( + color: AppStyle.primaryTextColor, + fontSize: 32.w, + fontWeight: FontWeight.bold), + ), + ), + // Divider( + // height: 1.w, + // ), + AkuBox.h(24), + Row( + children: [ + Image.asset( + R.ASSETS_MANAGE_IC_RENWU_PNG, + width: 40.w, + height: 40.w, + ), + AkuBox.w(4), + Text('任务概要', + style: TextStyle( + color: AppStyle.primaryTextColor, + fontSize: 28.sp, + )), + Spacer(), + Text( + cardModel.content, + style: AppStyle().primaryStyle, + ), + ], + ), + Spacer(), + Row( + children: [ + Image.asset( + R.ASSETS_MANAGE_IC_TIME_PNG, + width: 40.w, + height: 40.w, + ), + AkuBox.w(4), + Text('时间期限', + style: TextStyle( + color: AppStyle.primaryTextColor, + fontSize: 28.sp)), + Spacer(), + Text( + '${cardModel.createDateString}至${cardModel.endDateString}', + style: AppStyle().primaryStyle, + ), + ], + ), + Spacer(), + Row( + children: [ + Image.asset( + R.ASSETS_MESSAGE_IC_PEOPLE_PNG, + width: 40.w, + height: 40.w, + ), + AkuBox.w(4), + Text('负责人员', + style: TextStyle( + color: AppStyle.primaryTextColor, + fontSize: 28.sp, + )), + Spacer(), + Text( + cardModel.directorName, + style: AppStyle().primaryStyle, + ), + ], + ), + ], + ), + ), + ), + AkuBox.h(16), + Expanded( + child: Container( + alignment: Alignment.centerLeft, + width: double.infinity, + color: Color(0xFFFFFFFF), + padding: EdgeInsets.only(top: 16.w, left: 32.w, right: 32.w), + child: Column( + children: [ + Text('详细描述', + style: TextStyle( + color: AppStyle.primaryTextColor, + fontSize: 32.w, + fontWeight: FontWeight.bold)), + AkuBox.h(16), + Text( + cardModel.content, + style: TextStyle( + color: AppStyle.primaryTextColor, fontSize: 28.w), + ), + ], + ), + )), + ], + ), + ); + } +}