code format

hmxc
张萌 4 years ago
parent 8f68226fe2
commit dce67e28f3

@ -52,6 +52,7 @@ Map<CHECK_TYPE, String> checkAssetMap = {
CHECK_TYPE.DOOR_AND_WINDOWS: R.ASSETS_MANAGE_WINDOW_PNG, CHECK_TYPE.DOOR_AND_WINDOWS: R.ASSETS_MANAGE_WINDOW_PNG,
CHECK_TYPE.SECURITY: R.ASSETS_MANAGE_SECURITY_PNG, CHECK_TYPE.SECURITY: R.ASSETS_MANAGE_SECURITY_PNG,
}; };
@Deprecated('under should be removed') @Deprecated('under should be removed')
class DecorationModel { class DecorationModel {
DecorationType type; DecorationType type;
@ -81,7 +82,9 @@ class DecorationModel {
this.checkInfomations, this.checkInfomations,
}); });
} }
@Deprecated('under should be removed') @Deprecated('under should be removed')
/// ///
class UserHomeModel { class UserHomeModel {
String plot; String plot;
@ -95,7 +98,9 @@ class UserHomeModel {
this.phone, this.phone,
}); });
} }
@Deprecated('under should be removed') @Deprecated('under should be removed')
/// ///
class DecorationTeamModel { class DecorationTeamModel {
String name; String name;
@ -107,7 +112,9 @@ class DecorationTeamModel {
this.phone, this.phone,
}); });
} }
@Deprecated('under should be removed') @Deprecated('under should be removed')
/// ///
class CycleCheck { class CycleCheck {
FixerModel authPerson; FixerModel authPerson;
@ -129,6 +136,7 @@ class CycleCheck {
this.checkDetails, this.checkDetails,
}); });
} }
@Deprecated('under should be removed') @Deprecated('under should be removed')
class WorkFinishCheck { class WorkFinishCheck {
FixerModel authPerson; FixerModel authPerson;
@ -140,7 +148,9 @@ class WorkFinishCheck {
this.checkDetails, this.checkDetails,
}); });
} }
@Deprecated('under should be removed') @Deprecated('under should be removed')
/// ///
class CheckInfomation { class CheckInfomation {
DateTime checkDate; DateTime checkDate;
@ -162,6 +172,7 @@ class CheckInfomation {
return true; return true;
} }
} }
@Deprecated('under should be removed') @Deprecated('under should be removed')
class CheckDetail { class CheckDetail {
CHECK_TYPE type; CHECK_TYPE type;

@ -86,7 +86,8 @@ class _ApplicationPageState extends State<ApplicationPage>
'包裹管理', R.ASSETS_HOME_PACKAGE_PNG, () => PackagesManagePage()), '包裹管理', R.ASSETS_HOME_PACKAGE_PNG, () => PackagesManagePage()),
AppApplication('钥匙管理', R.ASSETS_HOME_KEY_PNG, () => KeyManagePage()), AppApplication('钥匙管理', R.ASSETS_HOME_KEY_PNG, () => KeyManagePage()),
AppApplication('规程管理', R.ASSETS_HOME_RULES_PNG, () => RulesManagePage()), AppApplication('规程管理', R.ASSETS_HOME_RULES_PNG, () => RulesManagePage()),
AppApplication('卫生管理', R.ASSETS_PLACEHOLDER_WEBP, () => HygienceManagePage()) AppApplication(
'卫生管理', R.ASSETS_PLACEHOLDER_WEBP, () => HygienceManagePage())
]; ];
@override @override

@ -127,7 +127,7 @@ class _GreenManageCardState extends State<GreenManageCard> {
); );
} }
List<Widget> _buttomButtons() { List<Widget> _buttomButtons() {
return widget.index != 0 return widget.index != 0
? [SizedBox()] ? [SizedBox()]
: [ : [

@ -17,14 +17,15 @@ class GreenManagePage extends StatefulWidget {
_GreenManagePageState createState() => _GreenManagePageState(); _GreenManagePageState createState() => _GreenManagePageState();
} }
class _GreenManagePageState extends State<GreenManagePage> with TickerProviderStateMixin { class _GreenManagePageState extends State<GreenManagePage>
List<String> _tabs=['待处理','未完成','已完成']; with TickerProviderStateMixin {
List<String> _tabs = ['待处理', '未完成', '已完成'];
TabController _tabController; TabController _tabController;
@override @override
void initState() { void initState() {
super.initState(); super.initState();
_tabController=TabController(length: _tabs.length, vsync: this); _tabController = TabController(length: _tabs.length, vsync: this);
} }
@override @override
@ -32,14 +33,23 @@ class _GreenManagePageState extends State<GreenManagePage> with TickerProviderSt
_tabController.dispose(); _tabController.dispose();
super.dispose(); super.dispose();
} }
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return AkuScaffold( return AkuScaffold(
title: '绿化管理', title: '绿化管理',
appBarBottom: PreferredSize(preferredSize: Size.fromHeight(88.w), child: AkuTabBar(controller: _tabController, tabs: _tabs)), appBarBottom: PreferredSize(
body: TabBarView(controller: _tabController, children: List.generate(_tabs.length, (index) => GreenManageView( preferredSize: Size.fromHeight(88.w),
index:index, child: AkuTabBar(controller: _tabController, tabs: _tabs)),
),),), body: TabBarView(
controller: _tabController,
children: List.generate(
_tabs.length,
(index) => GreenManageView(
index: index,
),
),
),
); );
} }
} }

@ -16,7 +16,11 @@ class _GreenManageViewState extends State<GreenManageView> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return ListView( return ListView(
children: [GreenManageCard(index: widget.index,)], children: [
GreenManageCard(
index: widget.index,
)
],
); );
} }
} }

@ -17,7 +17,9 @@ class _HygienceManageViewState extends State<HygienceManageView> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return ListView( return ListView(
children: [ children: [
HyginecManageCard(index: widget.index,) HyginecManageCard(
index: widget.index,
)
], ],
); );
} }

@ -84,7 +84,8 @@ class _DecorationManagerCardState extends State<DecorationManagerCard> {
alignment: Alignment.centerRight, alignment: Alignment.centerRight,
child: AkuMaterialButton( child: AkuMaterialButton(
onPressed: () { onPressed: () {
Get.to(DecorationManagerDetailPage(decorationModel: widget.model)); Get.to(
DecorationManagerDetailPage(decorationModel: widget.model));
}, },
height: 64.w, height: 64.w,
minWidth: 160.w, minWidth: 160.w,

@ -48,7 +48,7 @@ class _DecorationManagerDetailStatePage
padding: EdgeInsets.symmetric(vertical: 16.w), padding: EdgeInsets.symmetric(vertical: 16.w),
children: [ children: [
_buildInfo(), _buildInfo(),
widget.decorationModel.status>3 widget.decorationModel.status > 3
? SizedBox() ? SizedBox()
: _buildFinishWorkCheck(), : _buildFinishWorkCheck(),
_buildCycleCheck(), _buildCycleCheck(),
@ -61,11 +61,7 @@ class _DecorationManagerDetailStatePage
if (UserTool.userProvider.infoModel.canOperation) { if (UserTool.userProvider.infoModel.canOperation) {
switch (widget.decorationModel.operationStatus) { switch (widget.decorationModel.operationStatus) {
case 1: case 1:
return AkuBottomButton( return AkuBottomButton(title: '立即安排', onTap: () {});
title: '立即安排',
onTap:() {
}
);
break; break;
default: default:
return SizedBox(); return SizedBox();
@ -111,7 +107,7 @@ class _DecorationManagerDetailStatePage
phone: UserTool.userProvider.profileModel.tel, phone: UserTool.userProvider.profileModel.tel,
rightTopWidget: Transform.rotate( rightTopWidget: Transform.rotate(
angle: pi / 4, angle: pi / 4,
child: widget.decorationModel.operationStatus==3 child: widget.decorationModel.operationStatus == 3
? Image.asset(R.ASSETS_MANAGE_IC_WANCHENG_PNG) ? Image.asset(R.ASSETS_MANAGE_IC_WANCHENG_PNG)
: Image.asset(R.ASSETS_MANAGE_IC_ZHUANGXIU_PNG), : Image.asset(R.ASSETS_MANAGE_IC_ZHUANGXIU_PNG),
), ),
@ -244,7 +240,8 @@ class _DecorationManagerDetailStatePage
], ],
); );
} }
///
///
_buildFinishWorkCheck() { _buildFinishWorkCheck() {
return AkuTitleBox( return AkuTitleBox(
title: '完工检查', title: '完工检查',
@ -293,7 +290,8 @@ class _DecorationManagerDetailStatePage
], ],
); );
} }
///
///
_buildCycleCheck() { _buildCycleCheck() {
return AkuTitleBox( return AkuTitleBox(
title: '周期检查', title: '周期检查',
@ -362,9 +360,7 @@ class _DecorationManagerDetailStatePage
Container( Container(
height: 500.w, height: 500.w,
child: CupertinoDatePicker( child: CupertinoDatePicker(
onDateTimeChanged: (dateTime) { onDateTimeChanged: (dateTime) {},
},
), ),
), ),
], ],
@ -453,7 +449,6 @@ class _DecorationManagerDetailStatePage
realValue = 30; realValue = 30;
break; break;
} }
}, },
), ),
), ),
@ -485,15 +480,14 @@ class _DecorationManagerDetailStatePage
CHECK_TYPE.DOOR_AND_WINDOWS, CHECK_TYPE.DOOR_AND_WINDOWS,
CHECK_TYPE.SECURITY, CHECK_TYPE.SECURITY,
], ],
onChange: (details) { onChange: (details) {},
},
canTap: UserTool.userProvider.infoModel.canOperation, canTap: UserTool.userProvider.infoModel.canOperation,
) )
], ],
); );
} }
///
///
_buildCheckDetail() { _buildCheckDetail() {
return AkuTitleBox( return AkuTitleBox(
title: '执行信息', title: '执行信息',
@ -530,7 +524,7 @@ class _DecorationManagerDetailStatePage
), ),
Spacer(), Spacer(),
Text( Text(
3>2? '正常' : '异常', 3 > 2 ? '正常' : '异常',
style: TextStyle( style: TextStyle(
color: e.checkAllResult color: e.checkAllResult
? Color(0xFF32B814) ? Color(0xFF32B814)

Loading…
Cancel
Save