|
|
@ -1,4 +1,7 @@
|
|
|
|
import 'package:aku_community_manager/const/resource.dart';
|
|
|
|
import 'package:aku_community_manager/const/resource.dart';
|
|
|
|
|
|
|
|
import 'package:aku_community_manager/mock_models/all_model.dart';
|
|
|
|
|
|
|
|
import 'package:aku_community_manager/mock_models/decoration/decoration_model.dart';
|
|
|
|
|
|
|
|
import 'package:aku_community_manager/mock_models/fix/fix_model.dart';
|
|
|
|
import 'package:aku_community_manager/provider/app_provider.dart';
|
|
|
|
import 'package:aku_community_manager/provider/app_provider.dart';
|
|
|
|
import 'package:aku_community_manager/provider/user_provider.dart';
|
|
|
|
import 'package:aku_community_manager/provider/user_provider.dart';
|
|
|
|
import 'package:aku_community_manager/style/app_style.dart';
|
|
|
|
import 'package:aku_community_manager/style/app_style.dart';
|
|
|
@ -10,6 +13,8 @@ import 'package:aku_community_manager/ui/home/messages/message.dart';
|
|
|
|
import 'package:aku_community_manager/ui/home/application/applications_page.dart';
|
|
|
|
import 'package:aku_community_manager/ui/home/application/applications_page.dart';
|
|
|
|
import 'package:aku_community_manager/ui/home/personal_draw.dart';
|
|
|
|
import 'package:aku_community_manager/ui/home/personal_draw.dart';
|
|
|
|
import 'package:aku_community_manager/ui/login/login_page.dart';
|
|
|
|
import 'package:aku_community_manager/ui/login/login_page.dart';
|
|
|
|
|
|
|
|
import 'package:aku_community_manager/ui/sub_pages/business_and_fix/business_fix_card.dart';
|
|
|
|
|
|
|
|
import 'package:aku_community_manager/ui/sub_pages/decoration_manager/decoration_manager_card.dart';
|
|
|
|
import 'package:aku_community_manager/ui/sub_pages/visitor_manager/visitor_manager_page.dart';
|
|
|
|
import 'package:aku_community_manager/ui/sub_pages/visitor_manager/visitor_manager_page.dart';
|
|
|
|
import 'package:aku_community_manager/ui/sub_pages/business_and_fix/business_and_fix_page.dart';
|
|
|
|
import 'package:aku_community_manager/ui/sub_pages/business_and_fix/business_and_fix_page.dart';
|
|
|
|
import 'package:aku_community_manager/ui/tool_pages/scan_page.dart';
|
|
|
|
import 'package:aku_community_manager/ui/tool_pages/scan_page.dart';
|
|
|
@ -42,7 +47,8 @@ class _HomePageState extends State<HomePage> {
|
|
|
|
Provider.of<UserProvider>(context, listen: false);
|
|
|
|
Provider.of<UserProvider>(context, listen: false);
|
|
|
|
if (userProvider.isSigned) {
|
|
|
|
if (userProvider.isSigned) {
|
|
|
|
Get.to(page);
|
|
|
|
Get.to(page);
|
|
|
|
appProvider.addRecentApp(AppApplication(text, assetPath, page));
|
|
|
|
if (text != '全部应用')
|
|
|
|
|
|
|
|
appProvider.addRecentApp(AppApplication(text, assetPath, page));
|
|
|
|
} else
|
|
|
|
} else
|
|
|
|
Get.to(LoginPage());
|
|
|
|
Get.to(LoginPage());
|
|
|
|
},
|
|
|
|
},
|
|
|
@ -71,7 +77,7 @@ class _HomePageState extends State<HomePage> {
|
|
|
|
|
|
|
|
|
|
|
|
///底部信息栏卡片
|
|
|
|
///底部信息栏卡片
|
|
|
|
Widget _card(
|
|
|
|
Widget _card(
|
|
|
|
String number,
|
|
|
|
int number,
|
|
|
|
String text,
|
|
|
|
String text,
|
|
|
|
Color color,
|
|
|
|
Color color,
|
|
|
|
int index,
|
|
|
|
int index,
|
|
|
@ -92,7 +98,7 @@ class _HomePageState extends State<HomePage> {
|
|
|
|
height: 32.w,
|
|
|
|
height: 32.w,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Text(
|
|
|
|
Text(
|
|
|
|
number,
|
|
|
|
number == null ? '0' : number.toString(),
|
|
|
|
style: TextStyle(
|
|
|
|
style: TextStyle(
|
|
|
|
color: color,
|
|
|
|
color: color,
|
|
|
|
fontSize: 40.sp,
|
|
|
|
fontSize: 40.sp,
|
|
|
@ -257,7 +263,10 @@ class _HomePageState extends State<HomePage> {
|
|
|
|
//消息按钮
|
|
|
|
//消息按钮
|
|
|
|
height: double.infinity,
|
|
|
|
height: double.infinity,
|
|
|
|
onPressed: () {
|
|
|
|
onPressed: () {
|
|
|
|
Get.to(Message());
|
|
|
|
if (userProvider.isSigned)
|
|
|
|
|
|
|
|
Get.to(Message());
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
Get.to(LoginPage());
|
|
|
|
},
|
|
|
|
},
|
|
|
|
child: Column(children: [
|
|
|
|
child: Column(children: [
|
|
|
|
Image.asset(
|
|
|
|
Image.asset(
|
|
|
@ -389,81 +398,114 @@ class _HomePageState extends State<HomePage> {
|
|
|
|
),
|
|
|
|
),
|
|
|
|
SizedBox(height: 16.w),
|
|
|
|
SizedBox(height: 16.w),
|
|
|
|
//待办事项标题行
|
|
|
|
//待办事项标题行
|
|
|
|
Row(
|
|
|
|
!userProvider.isSigned
|
|
|
|
children: [
|
|
|
|
? SizedBox()
|
|
|
|
Text(
|
|
|
|
: Row(
|
|
|
|
'待办事项',
|
|
|
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
|
|
|
color: Color(0xFF4A4B51),
|
|
|
|
|
|
|
|
fontSize: 32.sp,
|
|
|
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
Spacer(),
|
|
|
|
|
|
|
|
AkuButton(
|
|
|
|
|
|
|
|
padding: EdgeInsets.symmetric(vertical: 16.w),
|
|
|
|
|
|
|
|
onPressed: () {
|
|
|
|
|
|
|
|
Get.to(BusinessPage(initIndex: 3));
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
child: Row(
|
|
|
|
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
Text(
|
|
|
|
Text(
|
|
|
|
'全部事项',
|
|
|
|
'待办事项',
|
|
|
|
style: TextStyle(
|
|
|
|
style: TextStyle(
|
|
|
|
color: AppStyle.minorTextColor,
|
|
|
|
color: Color(0xFF4A4B51),
|
|
|
|
fontSize: 24.sp,
|
|
|
|
fontSize: 32.sp,
|
|
|
|
fontWeight: FontWeight.bold),
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Icon(
|
|
|
|
Spacer(),
|
|
|
|
Icons.arrow_forward_ios,
|
|
|
|
AkuButton(
|
|
|
|
size: 22.w,
|
|
|
|
padding: EdgeInsets.symmetric(vertical: 16.w),
|
|
|
|
color: AppStyle.minorTextColor,
|
|
|
|
onPressed: () {
|
|
|
|
|
|
|
|
Get.to(BusinessPage(initIndex: 3));
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
child: Row(
|
|
|
|
|
|
|
|
children: [
|
|
|
|
|
|
|
|
Text(
|
|
|
|
|
|
|
|
'全部事项',
|
|
|
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
|
|
|
color: AppStyle.minorTextColor,
|
|
|
|
|
|
|
|
fontSize: 24.sp,
|
|
|
|
|
|
|
|
fontWeight: FontWeight.bold),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
Icon(
|
|
|
|
|
|
|
|
Icons.arrow_forward_ios,
|
|
|
|
|
|
|
|
size: 22.w,
|
|
|
|
|
|
|
|
color: AppStyle.minorTextColor,
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
SizedBox(height: 16.w),
|
|
|
|
SizedBox(height: 16.w),
|
|
|
|
//待办事项栏
|
|
|
|
//待办事项栏
|
|
|
|
Container(
|
|
|
|
!userProvider.isSigned
|
|
|
|
width: double.infinity,
|
|
|
|
? SizedBox()
|
|
|
|
height: 449.w,
|
|
|
|
: Container(
|
|
|
|
//TODO listview
|
|
|
|
height: 480.w,
|
|
|
|
),
|
|
|
|
child: ListView.separated(
|
|
|
|
|
|
|
|
separatorBuilder: (context, index) {
|
|
|
|
|
|
|
|
return AkuBox.w(16);
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
scrollDirection: Axis.horizontal,
|
|
|
|
|
|
|
|
itemBuilder: (context, index) {
|
|
|
|
|
|
|
|
return Container(
|
|
|
|
|
|
|
|
width: 526.w,
|
|
|
|
|
|
|
|
child: Builder(
|
|
|
|
|
|
|
|
builder: (context) {
|
|
|
|
|
|
|
|
final item = AllModel(context).waitThings[index];
|
|
|
|
|
|
|
|
if (item is DecorationModel) {
|
|
|
|
|
|
|
|
return DecorationManagerCard(model: item);
|
|
|
|
|
|
|
|
} else if (item is FixModel) {
|
|
|
|
|
|
|
|
return BusinessFixCard(
|
|
|
|
|
|
|
|
model: item, homeDisplay: true);
|
|
|
|
|
|
|
|
} else
|
|
|
|
|
|
|
|
return SizedBox();
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
itemCount: AllModel(context).waitThings.length,
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
//TODO listview
|
|
|
|
|
|
|
|
),
|
|
|
|
SizedBox(height: 24.w),
|
|
|
|
SizedBox(height: 24.w),
|
|
|
|
//底部信息栏
|
|
|
|
//底部信息栏
|
|
|
|
Container(
|
|
|
|
!userProvider.isSigned
|
|
|
|
width: double.infinity,
|
|
|
|
? SizedBox()
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
: Container(
|
|
|
|
borderRadius: BorderRadius.circular(8.w),
|
|
|
|
width: double.infinity,
|
|
|
|
color: Colors.white,
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
),
|
|
|
|
borderRadius: BorderRadius.circular(8.w),
|
|
|
|
child: Column(
|
|
|
|
color: Colors.white,
|
|
|
|
children: [
|
|
|
|
),
|
|
|
|
Row(
|
|
|
|
child: Column(
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
_card('25', '未处理事项', Color(0xFFFF4E0D), 0),
|
|
|
|
Row(
|
|
|
|
AkuDiveder().verticalDivider(166.5.w),
|
|
|
|
children: [
|
|
|
|
_card('22', '处理中事项', Color(0xFFFFC40C), 1),
|
|
|
|
_card(AllModel(context).waitThings?.length, '未处理事项',
|
|
|
|
],
|
|
|
|
Color(0xFFFF4E0D), 0),
|
|
|
|
),
|
|
|
|
AkuDiveder().verticalDivider(166.5.w),
|
|
|
|
Row(children: [
|
|
|
|
_card(AllModel(context).processingThings?.length,
|
|
|
|
AkuDiveder().horizontalDivider(343.w),
|
|
|
|
'处理中事项', Color(0xFFFFC40C), 1),
|
|
|
|
AkuDiveder(isReverse: true).horizontalDivider(343.w)
|
|
|
|
],
|
|
|
|
]),
|
|
|
|
),
|
|
|
|
Row(
|
|
|
|
Row(children: [
|
|
|
|
children: [
|
|
|
|
AkuDiveder().horizontalDivider(343.w),
|
|
|
|
_card('25', '已处理事项', Color(0xFF3F8FFE), 2),
|
|
|
|
AkuDiveder(isReverse: true).horizontalDivider(343.w)
|
|
|
|
AkuDiveder(isReverse: true).verticalDivider(
|
|
|
|
]),
|
|
|
|
166.5.w,
|
|
|
|
Row(
|
|
|
|
),
|
|
|
|
children: [
|
|
|
|
_card('72', '全部事项', Color(0xFF333333), 3),
|
|
|
|
_card(AllModel(context).doneThings?.length, '已处理事项',
|
|
|
|
],
|
|
|
|
Color(0xFF3F8FFE), 2),
|
|
|
|
|
|
|
|
AkuDiveder(isReverse: true).verticalDivider(
|
|
|
|
|
|
|
|
166.5.w,
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
_card(AllModel(context).allThings?.length, '全部事项',
|
|
|
|
|
|
|
|
Color(0xFF333333), 3),
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|