Merge branch 'master' into dev

* master:
  巡检详情页完成
  页面分类更改
  巡检管理页完成,命名规范化
  绿化管理页和管理详情页完成
hmxc
小赖 4 years ago
commit c463a0d2f7

Binary file not shown.

After

Width:  |  Height:  |  Size: 256 KiB

@ -1,5 +1,6 @@
import 'package:aku_community_manager/provider/app_provider.dart';
import 'package:aku_community_manager/provider/fix_provider.dart';
import 'package:aku_community_manager/provider/manage_provider.dart';
import 'package:aku_community_manager/provider/user_provider.dart';
import 'package:aku_community_manager/ui/home/home_page.dart';
import 'package:bot_toast/bot_toast.dart';
@ -20,6 +21,8 @@ class MyApp extends StatelessWidget {
ChangeNotifierProvider(create: (context) => UserProvider()),
ChangeNotifierProvider(create: (context) => AppProvider()),
ChangeNotifierProvider(create: (context) => FixProvider()),
ChangeNotifierProvider(create: (context)=> GreenManageProvider()),
ChangeNotifierProvider(create: (context)=>InspectionManageProvider()),
],
child: GetMaterialApp(
title: '小蜜蜂管家',

@ -0,0 +1,57 @@
import 'package:flutter/material.dart';
class GreenManageCardModel {
String title;
String task;
String timestart;
String timeend;
String name;
String body;
GreenManageCardModel(
this.title, this.task, this.timestart, this.timeend, this.name,
this.body);
static List<GreenManageCardModel> initList() {
return [
GreenManageCardModel(
'中部广场周围绿化调整', '除杂草、松土、培土', '2020-10-08', '2020-10-18', '陈晖洁',
'''详细描述
1.
使
2.绿
绿'''),
GreenManageCardModel(
'东区周围绿化调整', '修剪、造型', '2020-10-08', '2020-10-18', '刘小青',''),
GreenManageCardModel(
'西区周围绿化调整', '修剪、造型', '2020-10-10', '2020-10-20', '张空间',''),
GreenManageCardModel(
'北区周围绿化调整', '修剪造型', '2020-10-15', '2020-10-25', '凯尔希',''),
];
}
}
class InspectionManageCardModel{
String title;
String date;
String cycle;
String time;
List<String> persons;
List<String> stations;
InspectionManageCardModel(this.title,this.date,this.cycle,this.time,this.persons,this.stations);
static List<InspectionManageCardModel> initList(){
return [
InspectionManageCardModel('1号巡检任务', '2020.1-2020.12', '每周一、三、五', '8:00-12:00', ['王珂','陈晖洁','凯尔希','王铁锤','李狗蛋','尼古拉斯'], [
'小区东门入口','1号南门','3号门站','3号闸门','4号门站'
]),
InspectionManageCardModel('2号巡检任务', '2020.1-2020.12', '每周二', '8:00-12:00',['史尔特尔'] , []),
InspectionManageCardModel('3号巡检任务', '2020.1-2020.12', '每周二、四、六', '8:00-12:00', ['叶莲娜'], []),
];
}
}

@ -0,0 +1,14 @@
import 'package:aku_community_manager/mock_models/manage_models/manage_model.dart';
import 'package:flutter/material.dart';
class GreenManageProvider extends ChangeNotifier{
List<GreenManageCardModel> _greenManageModel =GreenManageCardModel.initList();
List<GreenManageCardModel> get greenManageModels => _greenManageModel;
notifyListeners();
}
class InspectionManageProvider extends ChangeNotifier{
List<InspectionManageCardModel> _inspectionManageModel=InspectionManageCardModel.initList();
List<InspectionManageCardModel> get inspectionManageModels => _inspectionManageModel;
notifyListeners();
}

@ -1,4 +1,5 @@
import 'package:aku_community_manager/ui/manage_pages/green_manage_page.dart';
import 'package:aku_community_manager/ui/manage_pages/green_manage/green_manage_page.dart';
import 'package:aku_community_manager/ui/manage_pages/inspection_manage/inspection_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/decoration_manager/decoration_manager_page.dart';
import 'package:aku_community_manager/ui/sub_pages/visitor_manager/visitor_manager_page.dart';
@ -52,9 +53,11 @@ class _ApplicationPageState extends State<ApplicationPage>
];
List<AppApplication> _wisdomApplications = [
AppApplication('绿化管理', R.ASSETS_HOME_IC_GREENING_PNG, GreenManagePage()),
AppApplication('巡检管理', R.ASSETS_HOME_IC_PATROL_PNG, InspectionManagePage()),
AppApplication(
'装修管理', R.ASSETS_HOME_IC_DECORATION_PNG, DecorationManagerPage()),
];
@override
Widget build(BuildContext context) {
final appProvider = Provider.of<AppProvider>(context);

@ -0,0 +1,140 @@
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';
import 'package:aku_ui/aku_ui.dart';
import 'package:flutter/material.dart';
import 'package:aku_community_manager/const/resource.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
class GreenManageDetailsPage extends StatelessWidget {
final GreenManageCardModel cardModel;
GreenManageDetailsPage(this.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.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(
cardModel.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(
'${cardModel.timestart}${cardModel.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(
cardModel.name,
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.body,style: TextStyle(color:AppStyle.primaryTextColor,fontSize: 28.w),),
],
),
)),
],
),
);
}
}

@ -1,19 +1,15 @@
import 'package:aku_community_manager/mock_models/manage_models/manage_model.dart';
import 'package:aku_community_manager/provider/manage_provider.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/manage_pages/green_manage/green_manage_details_page.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);
}
import 'package:get/get.dart';
import 'package:provider/provider.dart';
class GreenManagePage extends StatefulWidget {
GreenManagePage({Key key}) : super(key: key);
@ -23,33 +19,32 @@ class GreenManagePage extends StatefulWidget {
}
class _GreenManagePageState extends State<GreenManagePage> {
List<GreenManageCardModel> _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) {
final greenManageProvider = Provider.of<GreenManageProvider>(context);
return AkuScaffold(
title: '绿化管理',
body: ListView(
body: ListView.builder(
itemBuilder: (context, index) {
return _greenManageCard(greenManageProvider.greenManageModels[index]);
},
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(),
itemCount: greenManageProvider.greenManageModels.length,
),
);
}
///绿
Widget _greenManageCard(String title, String task, String timestart,
String timeend, String name) {
///绿
Widget _greenManageCard(GreenManageCardModel cardModel) {
return Column(
children: [
AkuBox.h(16),
//
AkuButton(
onPressed: () {},
onPressed: () {
Get.to(GreenManageDetailsPage(cardModel)
);
},
child: Container(
height: 302.w,
width: 686.w,
@ -67,7 +62,7 @@ class _GreenManagePageState extends State<GreenManagePage> {
height: 93.w,
alignment: Alignment.centerLeft,
child: Text(
title,
cardModel.title,
style: TextStyle(
color: AppStyle.primaryTextColor,
fontSize: 32.w,
@ -93,7 +88,7 @@ class _GreenManagePageState extends State<GreenManagePage> {
)),
Spacer(),
Text(
task,
cardModel.task,
style: AppStyle().primaryStyle,
),
],
@ -112,7 +107,7 @@ class _GreenManagePageState extends State<GreenManagePage> {
color: AppStyle.primaryTextColor, fontSize: 28.sp)),
Spacer(),
Text(
'$timestart$timeend',
'${cardModel.timestart}${cardModel.timeend}',
style: AppStyle().primaryStyle,
),
],
@ -133,7 +128,7 @@ class _GreenManagePageState extends State<GreenManagePage> {
)),
Spacer(),
Text(
name,
cardModel.name,
style: AppStyle().primaryStyle,
),
],

@ -0,0 +1,138 @@
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/manage_pages/inspection_manage/inspection_manage_details_page.dart';
import 'package:aku_ui/common_widgets/aku_common_widgets.dart';
import 'package:flutter/material.dart';
import 'package:aku_community_manager/const/resource.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/instance_manager.dart';
import 'package:get/get.dart';
class InspectionManageCard {
final InspectionManageCardModel cardModel;
final bool extra;
InspectionManageCard(this.cardModel, {this.extra = true});
Widget inspectionManageCard() {
TextStyle _textstyle =
TextStyle(color: AppStyle.minorTextColor, fontSize: 28.sp);
return Column(
mainAxisSize: MainAxisSize.min,
children: [
AkuBox.h(16),
AkuButton(
onPressed: extra? () {
Get.to(InspectionManageDetailsPage(cardModel: cardModel,));
}:(){},
child: Container(
alignment: Alignment.centerLeft,
padding: EdgeInsets.only(left: 24.w, right: 24.w, bottom: extra? 48.w:40.w),
width: double.infinity,
height:extra? 362.w:270.w,
decoration: BoxDecoration(borderRadius:BorderRadius.circular(8.w),color: Color(0xFFFFFFFF)),
child: Column(children: [
Container(
height:extra? 93.w :86.w,
width: double.infinity,
alignment: Alignment.centerLeft,
child: Text(
cardModel.title,
style: TextStyle(
color: AppStyle.primaryTextColor,
fontSize: extra? 32.sp:36.sp,
fontWeight: FontWeight.bold),
)),
extra
? Divider(
height: 1.w,
)
: SizedBox(),
extra? AkuBox.h(24):SizedBox(),
Row(
children: [
Image.asset(
R.ASSETS_MANAGE_IC_RENWU_PNG,
width: 40.w,
height: 40.w,
),
AkuBox.w(4),
Text(
'巡检日期',
style: _textstyle,
),
Spacer(),
Text(
cardModel.date,
style: AppStyle().primaryStyle,
)
],
),
Spacer(),
Row(
children: [
Image.asset(
R.ASSETS_HOME_IC_NEWS_PNG,
width: 40.w,
height: 40.w,
),
AkuBox.w(4),
Text('巡检周期', style: _textstyle),
Spacer(),
Text(
cardModel.cycle,
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,
),
Spacer(),
Text(
cardModel.time,
style: AppStyle().primaryStyle,
),
],
),
extra ? Spacer() : SizedBox(),
extra
? Row(
children: [
Image.asset(
R.ASSETS_MESSAGE_IC_PEOPLE_PNG,
width: 40.w,
height: 40.w,
),
AkuBox.w(4),
Text(
'巡检人员',
style: _textstyle,
),
Spacer(),
Text(
cardModel.persons.length > 2
? '${cardModel.persons[0]}${cardModel.persons[1]}'
: cardModel.persons[0],
style: AppStyle().primaryStyle,
),
],
)
: SizedBox(),
]),
),
),
],
);
}
}

@ -0,0 +1,138 @@
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/manage_pages/inspection_manage/inspection_manage_card.dart';
import 'package:aku_community_manager/ui/widgets/common/aku_scaffold.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:aku_community_manager/const/resource.dart';
class InspectionManageDetailsPage extends StatelessWidget {
final InspectionManageCardModel cardModel;
InspectionManageDetailsPage({Key key, this.cardModel}) : super(key: key);
@override
Widget build(BuildContext context) {
return AkuScaffold(
title: '巡检详情',
body: Column(
children: [
InspectionManageCard(cardModel, extra: false).inspectionManageCard(),
Container(
width: double.infinity,
color: Color(0xFFFFFFFF),
margin: EdgeInsets.only(top: 16.w),
padding: EdgeInsets.only(
top: 24.w, left: 32.w, right: 86.w, bottom: 40.w),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
'巡检人员',
style: TextStyle(
color: AppStyle.primaryTextColor,
fontSize: 32.sp,
fontWeight: FontWeight.bold),
),
AkuBox.h(16),
GridView(
shrinkWrap: true,
physics: NeverScrollableScrollPhysics(),
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount: 3,
childAspectRatio: 250 / 40,
mainAxisSpacing: 16.w),
children: cardModel.persons
.map((e) => _person(cardModel.persons.indexOf(e)))
.toList(),
),
],
),
),
AkuBox.h(16),
Container(
color: Color(0xFFFFFFFF),
padding: EdgeInsets.only(top: 24.w, left: 32.w, right: 32.w),
width: double.infinity,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text('巡检站点',
style: TextStyle(
color: AppStyle.primaryTextColor,
fontSize: 32.sp,
fontWeight: FontWeight.bold)),
AkuBox.h(16),
Wrap(
runSpacing: 16.w,
children: cardModel.stations
.map((e) => _station(cardModel.stations.indexOf(e)))
.toList(),
),
AkuBox.h(24),
Image.asset(
R.ASSETS_INSPECTION_INSPECTION_STATION_PNG,
width: 686.w,
height: 343.w,
),
]),
),
],
),
);
}
Widget _station(index) {
return Row(
mainAxisSize: MainAxisSize.min,
children: [
Container(
padding:
EdgeInsets.only(top: 16.w, left: 24.w, bottom: 15.w, right: 24.w),
color: Color(0xFFF9F9F9),
height: 64.w,
alignment: Alignment.center,
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
Text(
cardModel.stations[index],
style: TextStyle(
color: AppStyle.primaryTextColor, fontSize: 24.sp),
),
],
),
),
AkuBox.w(8),
(cardModel.stations.length - 1) != index
? Container(
width: 56.w,
height: 3.w,
color: Color(0xFFE8E8E8),
)
: SizedBox(),
],
);
}
Widget _person(index) {
return Container(
height: 40.w,
child: Row(mainAxisSize: MainAxisSize.min, children: [
Image.asset(
R.ASSETS_MESSAGE_IC_PEOPLE_PNG,
width: 40.w,
height: 40.w,
),
AkuBox.w(8),
Text(
cardModel.persons[index],
style: TextStyle(
color: AppStyle.primaryTextColor,
fontSize: 28.sp,
),
),
]),
);
}
}

@ -0,0 +1,150 @@
import 'package:aku_community_manager/mock_models/manage_models/manage_model.dart';
import 'package:aku_community_manager/provider/manage_provider.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/manage_pages/inspection_manage/inspection_manage_card.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:provider/provider.dart';
import 'package:aku_community_manager/const/resource.dart';
class InspectionManagePage extends StatefulWidget {
InspectionManagePage({Key key}) : super(key: key);
@override
_InspectionManagePageState createState() => _InspectionManagePageState();
}
class _InspectionManagePageState extends State<InspectionManagePage> {
@override
Widget build(BuildContext context) {
final _inspectionManageModel =
Provider.of<InspectionManageProvider>(context);
return AkuScaffold(
title: '巡检管理',
body: ListView(
padding: EdgeInsets.only(left: 32.w, right: 32.w),
children: _inspectionManageModel.inspectionManageModels
.map((e) => InspectionManageCard(e).inspectionManageCard())
.toList(),
),
);
}
// Widget _inspectionManageCard(InspectionManageCardModel cardModel) {
// TextStyle _textstyle =
// TextStyle(color: AppStyle.minorTextColor, fontSize: 28.sp);
// return Column(
// children: [
// AkuBox.h(16),
// AkuButton(
// onPressed: () {},
// child: Container(
// alignment: Alignment.centerLeft,
// padding: EdgeInsets.only(left: 24.w, right: 24.w, bottom: 48.w),
// width: 686.w,
// height: 362.w,
// color: Color(0xFFFFFFFF),
// child: Column(children: [
// Container(
// height: 93.w,
// width: double.infinity,
// alignment: Alignment.centerLeft,
// child: Text(
// cardModel.title,
// style: TextStyle(
// color: AppStyle.primaryTextColor,
// fontSize: 32.sp,
// 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,
// ),
// Spacer(),
// Text(
// cardModel.date,
// style: AppStyle().primaryStyle,
// )
// ],
// ),
// Spacer(),
// Row(
// children: [
// Image.asset(
// R.ASSETS_HOME_IC_NEWS_PNG,
// width: 40.w,
// height: 40.w,
// ),
// AkuBox.w(4),
// Text('巡检周期', style: _textstyle),
// Spacer(),
// Text(
// cardModel.cycle,
// 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,
// ),
// Spacer(),
// Text(
// cardModel.time,
// 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,
// ),
// Spacer(),
// Text(
// cardModel.persons.length > 2
// ? '${cardModel.persons[0]}${cardModel.persons[1]}'
// : cardModel.persons[0],
// style: AppStyle().primaryStyle,
// ),
// ],
// ),
// ]),
// ),
// ),
// ],
// );
// }
}

@ -77,6 +77,7 @@ flutter:
- assets/user/
- assets/message/
- assets/manage/
- assets/inspection/
- assets/static_temp/
- assets/static_fix/

Loading…
Cancel
Save