修复 所有应用-应用列表无法滑动的问题

修复 设施检查页tab显示顺序的问题
修复 设施检查首页 标题显示错误的问题
修复 归还钥匙 接口类型错误的问题
hmxc
张萌 4 years ago
parent 73887ca25c
commit 4a2158d48c

@ -232,6 +232,7 @@ class _ApplicationPageState extends State<ApplicationPage>
child: Material( child: Material(
color: Colors.white, color: Colors.white,
child: PageView( child: PageView(
physics: NeverScrollableScrollPhysics(),
controller: _pageController, controller: _pageController,
scrollDirection: Axis.vertical, scrollDirection: Axis.vertical,
onPageChanged: (index) { onPageChanged: (index) {
@ -244,7 +245,7 @@ class _ApplicationPageState extends State<ApplicationPage>
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount: 3, crossAxisCount: 3,
), ),
physics: NeverScrollableScrollPhysics(), // physics: NeverScrollableScrollPhysics(),
itemBuilder: (context, index) { itemBuilder: (context, index) {
final application = _recommandApplications[index]; final application = _recommandApplications[index];
return _buildBottomAppCard(application); return _buildBottomAppCard(application);
@ -255,7 +256,7 @@ class _ApplicationPageState extends State<ApplicationPage>
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount: 3, crossAxisCount: 3,
), ),
physics: NeverScrollableScrollPhysics(), // physics: NeverScrollableScrollPhysics(),
itemBuilder: (context, index) { itemBuilder: (context, index) {
final application = _wisdomApplications[index]; final application = _wisdomApplications[index];
return _buildBottomAppCard(application); return _buildBottomAppCard(application);

@ -109,16 +109,8 @@ class _FacilitiesCardState extends State<FacilitiesCard> {
_buildTile(R.ASSETS_MANAGE_CLOCK_PNG, '任务时间', _buildTile(R.ASSETS_MANAGE_CLOCK_PNG, '任务时间',
'${DateUtil.formatDateStr(widget.model.beginDate, format: 'yyyy-MM-dd HH:mm')}-${DateUtil.formatDateStr(widget.model.endDate, format: 'HH;mm')}'), '${DateUtil.formatDateStr(widget.model.beginDate, format: 'yyyy-MM-dd HH:mm')}-${DateUtil.formatDateStr(widget.model.endDate, format: 'HH;mm')}'),
]; ];
case 1: case 1:
return [
15.w.heightBox,
_buildTile(R.ASSETS_MANAGE_CLOCK_PNG, '未完成原因', widget.model.detail,
color: Colors.red),
15.w.heightBox,
_buildTile(R.ASSETS_MANAGE_CLOCK_PNG, '规定任务时间',
'${DateUtil.formatDateStr(widget.model.beginDate, format: 'yyyy-MM-dd HH:mm')}-${DateUtil.formatDateStr(widget.model.endDate, format: 'HH;mm')}'),
];
case 2:
return [ return [
15.w.heightBox, 15.w.heightBox,
_buildTile( _buildTile(
@ -134,6 +126,15 @@ class _FacilitiesCardState extends State<FacilitiesCard> {
DateUtil.formatDateStr(widget.model.checkDate, DateUtil.formatDateStr(widget.model.checkDate,
format: 'yyyy-MM-dd HH:mm')), format: 'yyyy-MM-dd HH:mm')),
]; ];
case 2:
return [
15.w.heightBox,
_buildTile(R.ASSETS_MANAGE_CLOCK_PNG, '未完成原因', widget.model.detail,
color: Colors.red),
15.w.heightBox,
_buildTile(R.ASSETS_MANAGE_CLOCK_PNG, '规定任务时间',
'${DateUtil.formatDateStr(widget.model.beginDate, format: 'yyyy-MM-dd HH:mm')}-${DateUtil.formatDateStr(widget.model.endDate, format: 'HH;mm')}'),
];
default: default:
return []; return [];
} }

@ -20,7 +20,7 @@ class FacilitiesPage extends StatefulWidget {
class _FacilitiesPageState extends State<FacilitiesPage> class _FacilitiesPageState extends State<FacilitiesPage>
with TickerProviderStateMixin { with TickerProviderStateMixin {
List<String> get _tabs { List<String> get _tabs {
return ['待检查', '未完成', '完成']; return ['待检查', '已完成', '完成'];
} }
TabController _tabController; TabController _tabController;

@ -19,7 +19,7 @@ class _FacilitiesSelectPageState extends State<FacilitiesSelectPage> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return AkuScaffold( return AkuScaffold(
title: '借还管理', title: '设施检查',
body: ListView( body: ListView(
padding: EdgeInsets.symmetric(vertical: 40.w, horizontal: 36.w), padding: EdgeInsets.symmetric(vertical: 40.w, horizontal: 36.w),
children: [ children: [

@ -101,7 +101,7 @@ class _KeyManageCardState extends State<KeyManageCard> {
case 2: case 2:
button = _bottomButton('归还钥匙', () async { button = _bottomButton('归还钥匙', () async {
BaseModel baseModel = await NetUtil() BaseModel baseModel = await NetUtil()
.post(API.manage.returnKey, params: {"keyId": widget.model.id}); .get(API.manage.returnKey, params: {"keyId": widget.model.id});
BotToast.showText(text: baseModel.message); BotToast.showText(text: baseModel.message);
widget.callRefresh(); widget.callRefresh();
}, Color(0xFFFFC40C), Colors.black); }, Color(0xFFFFC40C), Colors.black);

Loading…
Cancel
Save