添加设施检查,设施检查报告页面

hmxc
张萌 4 years ago
parent 314faba546
commit 26dcc28925

@ -0,0 +1,13 @@
{
// 使 IntelliSense
//
// 访: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "aku_community_manager",
"request": "launch",
"type": "dart"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

@ -1,6 +1,8 @@
import 'package:aku_community_manager/models/manager/facilities/facilities_inspect_report_page.dart';
import 'package:aku_community_manager/models/manager/facilities/facilities_map.dart';
import 'package:aku_community_manager/style/app_style.dart';
import 'package:aku_community_manager/tools/aku_divider.dart';
import 'package:aku_ui/common_widgets/aku_material_button.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
@ -25,12 +27,39 @@ class _FacilitiesCardState extends State<FacilitiesCard> {
Spacer(),
'待检查'
.text
.color(FacilitiesMap.insepectColor[0])
.color(FacilitiesMap.insepectColor[1])
.size(28.sp)
.bold
.make(),
],
),
16.w.heightBox,
AkuDivider.horizontal(),
24.w.heightBox,
_buildTile(R.ASSETS_MANAGE_ADDRESS_PNG, '场地地址', '1号楼4单元门口'),
15.w.heightBox,
_buildTile(
R.ASSETS_MANAGE_CLOCK_PNG, '规定任务时间', '2020-10-1 19:00-20:300'),
40.w.heightBox,
Row(
children: [
Spacer(),
AkuMaterialButton(
radius: 74.w,
height: 52.w,
padding: EdgeInsets.symmetric(vertical: 8.w, horizontal: 24.w),
color: Color(0xFFFFC40C),
onPressed: () {
Get.to(() => FacilitiesInspectReportPage());
},
child: '扫码报告'
.text
.size(26.sp)
.color(kTextPrimaryColor)
.bold
.make())
],
),
],
)
.box
@ -43,4 +72,21 @@ class _FacilitiesCardState extends State<FacilitiesCard> {
Get.to(() => FacilitiesInspectReportPage());
});
}
Widget _buildTile(String icon, String title, String text,
{Color color = kTextSubColor}) {
return Row(
children: [
Image.asset(
icon,
width: 40.w,
height: 40.w,
),
20.w.widthBox,
title.text.size(24.sp).color(kTextSubColor).make(),
Spacer(),
text.text.size(24.sp).color(color).make(),
],
);
}
}

@ -1,5 +1,13 @@
import 'dart:io';
import 'package:aku_community_manager/models/manager/facilities/facilities_map.dart';
import 'package:aku_community_manager/style/app_style.dart';
import 'package:aku_community_manager/ui/widgets/app_widgets/aku_pick_image_widget.dart';
import 'package:aku_community_manager/ui/widgets/app_widgets/aku_single_check_button.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:velocity_x/velocity_x.dart';
class FacilitiesInspectReportPage extends StatefulWidget {
FacilitiesInspectReportPage({Key key}) : super(key: key);
@ -11,11 +19,189 @@ class FacilitiesInspectReportPage extends StatefulWidget {
class _FacilitiesInspectReportPageState
extends State<FacilitiesInspectReportPage> {
List<File> _selfPhotos;
List<File> _scenePhotos;
@override
Widget build(BuildContext context) {
return AkuScaffold(
title: '检查报告',
body: ListView(),
body: ListView(
children: [
_basicMessageCard(),
_descriptionCard('title', 0),
_scenePhotoCard(),
_selfPhotoCard(),
],
),
);
}
Widget _basicMessageCard() {
return Column(
children: [
Row(
children: [
'基础信息'.text.size(32.sp).color(kTextPrimaryColor).bold.make(),
Spacer(),
'检查中'
.text
.size(30.sp)
.color(FacilitiesMap.insepectColor[2])
.bold
.make()
],
),
16.w.heightBox,
_buildTile(R.ASSETS_MESSAGE_IC_PEOPLE_PNG, '检查人', '杨建'),
12.w.heightBox,
_buildTile(R.ASSETS_MESSAGE_IC_PHONE_PNG, '联系电话', '15013103152'),
12.w.heightBox,
_buildTile(R.ASSETS_MANAGE_ADDRESS_PNG, '检查场地', '户外3号篮球场'),
12.w.heightBox,
_buildTile(R.ASSETS_MANAGE_CLOCK_PNG, '规定任务时间', '20200202020202020'),
],
)
.box
.width(double.infinity)
.padding(EdgeInsets.symmetric(vertical: 34.w, horizontal: 32.w))
.color(Colors.white)
.make();
}
Widget _buildTile(String icon, String title, String text,
{Color color = kTextSubColor}) {
return Row(
children: [
Image.asset(
icon,
width: 40.w,
height: 40.w,
),
20.w.widthBox,
title.text.size(24.sp).color(kTextSubColor).make(),
Spacer(),
text.text.size(24.sp).color(color).make(),
],
);
}
Widget _descriptionCard(
String title,
int index,
) {
return Column(
children: [
Row(
children: [
'2.$title'.text.color(kTextPrimaryColor).size(32.sp).make()
],
),
32.w.heightBox,
Row(
children: [
AkuSingleCheckButton(
text: '正常',
value: 0,
gropValue: 1,
onPressed: () {
setState(() {});
},
),
80.w.widthBox,
AkuSingleCheckButton(
text: '异常',
value: 1,
gropValue: 2,
onPressed: () {
setState(() {});
},
),
],
),
32.w.heightBox,
Container(
width: 686.w,
height: 120.w,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(8.w),
border: Border.all(
width: 2.w,
color: Color(0xFFE8E8E8),
),
),
child: TextField(
minLines: 5,
maxLines: 10,
autofocus: false,
onChanged: (value) {},
decoration: InputDecoration(
hintText: '请详细描述异常情况',
hintStyle: TextStyle(
fontSize: 28.sp,
color: kTextSubColor,
),
contentPadding:
EdgeInsets.symmetric(vertical: 16.w, horizontal: 24.w),
border: InputBorder.none,
isDense: true,
),
),
),
],
)
.box
.padding(EdgeInsets.symmetric(vertical: 24.w, horizontal: 32.w))
.color(Colors.white)
.make();
}
Widget _selfPhotoCard() {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [
'3.巡更人员自拍人脸'.text.color(kTextPrimaryColor).size(32.sp).bold.make()
],
),
32.w.heightBox,
AkuPickImageWidget(
description: '上传自拍',
onChanged: (files) {
_selfPhotos = files;
setState(() {});
},
),
],
)
.box
.color(Colors.white)
.padding(EdgeInsets.symmetric(vertical: 24.w, horizontal: 32.w))
.make();
}
Widget _scenePhotoCard() {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
// Row(
// children: [
// '3.巡更人员拍摄现场'.text.color(kTextPrimaryColor).size(32.sp).bold.make()
// ],
// ),
32.w.heightBox,
AkuPickImageWidget(
description: '上传现场照片',
onChanged: (files) {
_scenePhotos = files;
setState(() {});
},
)
],
)
.box
.color(Colors.white)
.padding(EdgeInsets.symmetric(vertical: 24.w, horizontal: 32.w))
.make();
}
}

@ -45,7 +45,7 @@ class _FacilitiesPageState extends State<FacilitiesPage>
),
body: TabBarView(
controller: _tabController,
children: List.generate(_tabs.length, (index) => FacilitiesView()),
children: List.generate(_tabs.length, (index) => FacilitiesView(index: index,)),
),
);
}

@ -1,8 +1,10 @@
import 'package:aku_community_manager/models/manager/facilities/facilities_card.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
class FacilitiesView extends StatefulWidget {
FacilitiesView({Key key}) : super(key: key);
final int index;
FacilitiesView({Key key, this.index}) : super(key: key);
@override
_FacilitiesViewState createState() => _FacilitiesViewState();
@ -12,8 +14,9 @@ class _FacilitiesViewState extends State<FacilitiesView> {
@override
Widget build(BuildContext context) {
return ListView(
padding: EdgeInsets.symmetric(vertical: 16.w, horizontal: 32.w),
children: [
// FacilitiesCard(),
FacilitiesCard(),
],
);
}

@ -114,7 +114,7 @@ class _InspectionPointInputPageState extends State<InspectionPointInputPage> {
);
}
Widget _scenePhotoCard() {
Widget _selfPhotoCard() {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
@ -138,13 +138,13 @@ class _InspectionPointInputPageState extends State<InspectionPointInputPage> {
.make();
}
Widget _selfPhotoCard() {
Widget _scenePhotoCard() {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [
'3.巡更人员自拍人脸'.text.color(kTextPrimaryColor).size(32.sp).bold.make()
'3.巡更人员拍摄现场'.text.color(kTextPrimaryColor).size(32.sp).bold.make()
],
),
32.w.heightBox,

@ -13,7 +13,10 @@ import 'package:aku_community_manager/utils/extension/list_extension.dart';
class AkuPickImageWidget extends StatefulWidget {
final double size;
final Function(List<File> files) onChanged;
AkuPickImageWidget({Key key, this.size, this.onChanged}) : super(key: key);
final String description;
AkuPickImageWidget(
{Key key, this.size, this.onChanged, this.description = '上传照片'})
: super(key: key);
@override
_AkuPickImageWidgetState createState() => _AkuPickImageWidgetState();
@ -56,7 +59,11 @@ class _AkuPickImageWidgetState extends State<AkuPickImageWidget> {
color: Color(0xFF999999),
),
4.w.heightBox,
'上传图片'.text.color(kTextSubColor).size(22.sp).bold.make(),
widget.description.text
.color(kTextSubColor)
.size(22.sp)
.bold
.make(),
],
),
),

Loading…
Cancel
Save