diff --git a/assets/manage/ic_renwu.png b/assets/manage/ic_renwu.png new file mode 100644 index 0000000..acc9c3f Binary files /dev/null and b/assets/manage/ic_renwu.png differ diff --git a/assets/manage/ic_time.png b/assets/manage/ic_time.png new file mode 100644 index 0000000..65ff2e1 Binary files /dev/null and b/assets/manage/ic_time.png differ diff --git a/lib/ui/home/announcement/All_anouncement.dart b/lib/ui/home/announcement/All_anouncement.dart index a5c85e0..bf33c14 100644 --- a/lib/ui/home/announcement/All_anouncement.dart +++ b/lib/ui/home/announcement/All_anouncement.dart @@ -9,10 +9,10 @@ import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:aku_community_manager/const/resource.dart'; import 'package:get/get.dart'; -class AnouncementCard { +class AnouncementCardModel { String title; String date; - AnouncementCard( + AnouncementCardModel( this.title, this.date, ); @@ -107,7 +107,7 @@ class _AllAnouncementState extends State { Widget _anouncementList( String date, - List cards, + List cards, ) { return Column( children: [ @@ -136,18 +136,18 @@ class _AllAnouncementState extends State { padding: EdgeInsets.only(left: 32.w, right: 32.w), children: [ _anouncementList('2020-10-22', [ - AnouncementCard( + AnouncementCardModel( '关于国庆放假的通知和安排', '2020-10-22 10:00', ), - AnouncementCard( + AnouncementCardModel( '关于绿化组人员调动通知', '2020-10-22 11:00', ), ]), _anouncementList('2020-10-20', [ - AnouncementCard('关于中秋放假通知与工作安排', '2020-10-22 10:00'), - AnouncementCard('疫情期间对大家的表扬和鼓励', '2020-10-22 11:00'), + AnouncementCardModel('关于中秋放假通知与工作安排', '2020-10-22 10:00'), + AnouncementCardModel('疫情期间对大家的表扬和鼓励', '2020-10-22 11:00'), ]), ], ), diff --git a/lib/ui/home/application/applications_page.dart b/lib/ui/home/application/applications_page.dart index 93e8eff..d651a54 100644 --- a/lib/ui/home/application/applications_page.dart +++ b/lib/ui/home/application/applications_page.dart @@ -1,4 +1,6 @@ +import 'package:aku_community_manager/ui/manage_pages/green_manage_page.dart'; import 'package:aku_community_manager/ui/sub_pages/activity_manager/activity_manager_page.dart'; +import 'package:aku_community_manager/ui/sub_pages/visitor_manager/visitor_manager_page.dart'; import 'package:aku_ui/common_widgets/aku_material_button.dart'; import 'package:flutter/material.dart'; import 'package:get/get.dart'; @@ -39,7 +41,7 @@ class _ApplicationPageState extends State List _recommandApplications = [ AppApplication( '活动管理', R.ASSETS_HOME_IC_ACTIVITY_PNG, ActivityManagerPage()), - AppApplication('访客管理', R.ASSETS_HOME_IC_VISITORS_PNG, Scaffold()), + AppApplication('访客管理', R.ASSETS_HOME_IC_VISITORS_PNG, VisitorManagerPage()), AppApplication('便民电话', '', Scaffold()), AppApplication('借还管理', R.ASSETS_HOME_IC_BORROW_PNG, Scaffold()), AppApplication('工单管理', '', Scaffold()), @@ -47,7 +49,9 @@ class _ApplicationPageState extends State AppApplication('一键报警', R.ASSETS_HOME_IC_POLICE_PNG, Scaffold()), AppApplication('问卷调查', '', Scaffold()), ]; - +List _wisdomApplications=[ + AppApplication('绿化管理', R.ASSETS_HOME_IC_GREENING_PNG, GreenManagePage()), +]; @override Widget build(BuildContext context) { final appProvider = Provider.of(context); @@ -198,7 +202,17 @@ class _ApplicationPageState extends State }, itemCount: _recommandApplications.length, ), - Text('23'), + GridView.builder( + gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( + crossAxisCount: 3, + ), + physics: NeverScrollableScrollPhysics(), + itemBuilder: (context, index) { + final application = _wisdomApplications[index]; + return _buildBottomAppCard(application); + }, + itemCount: _wisdomApplications.length, + ), ], ), ), diff --git a/lib/ui/manage_pages/green_manage_page.dart b/lib/ui/manage_pages/green_manage_page.dart new file mode 100644 index 0000000..b691f2d --- /dev/null +++ b/lib/ui/manage_pages/green_manage_page.dart @@ -0,0 +1,148 @@ +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_common_widgets.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:aku_community_manager/const/resource.dart'; + +class GreenManageCardModel { + String title; + String task; + String timestart; + String timeend; + String name; + GreenManageCardModel(this.title,this.task,this.timestart,this.timeend,this.name); +} + +class GreenManagePage extends StatefulWidget { + GreenManagePage({Key key}) : super(key: key); + + @override + _GreenManagePageState createState() => _GreenManagePageState(); +} + +class _GreenManagePageState extends State { + + List _cards=[ + GreenManageCardModel('中部广场周围绿化调整', '除杂草、松土、培土', '2020-10-08','2020-10-18', '杨雄会', ), + GreenManageCardModel('东区周围绿化调整', '修剪、造型', '2020-10-08', '2020-10-18', '刘小青'), + GreenManageCardModel('西区周围绿化调整', '修剪、造型', '2020-10-10', '2020-10-20', '张空间'), + GreenManageCardModel('北区周围绿化调整', '修剪造型', '2020-10-15', '2020-10-25', '凯尔希'), + ]; + + @override + Widget build(BuildContext context) { + return AkuScaffold( + title: '绿化管理', + body: ListView( + padding: EdgeInsets.only(left: 32.w, right: 32.w), + children: _cards.map((e) => _greenManageCard(e.title, e.task, e.timestart, e.timeend, e.name),).toList(), + ), + ); + } +///绿化管理页面卡片 + Widget _greenManageCard(String title, String task, String timestart, + String timeend, String name) { + return Column( + children: [ + AkuBox.h(16), + //跳转管理详情按钮 + AkuButton( + onPressed: () {}, + child: Container( + height: 302.w, + width: 686.w, + padding: EdgeInsets.only( + left: 24.w, + right: 24.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( + title, + 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( + task, + 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( + '$timestart至$timeend', + 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( + name, + style: AppStyle().primaryStyle, + ), + ], + ), + ], + ), + ), + ), + ], + ); + } +} diff --git a/pubspec.yaml b/pubspec.yaml index 1d99d92..cd22008 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -74,6 +74,7 @@ flutter: - assets/home/ - assets/user/ - assets/message/ + - assets/manage/ - assets/static_temp/ - assets/static_fix/