From e743c5554148f237f9d28aa84f6b20025cd5c2e3 Mon Sep 17 00:00:00 2001 From: zhangmeng <494089941@qq.com> Date: Sun, 28 Mar 2021 18:23:38 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20=E5=B7=A1=E6=A3=80?= =?UTF-8?q?=E7=82=B9=E4=BF=A1=E6=81=AF=E5=A1=AB=E5=86=99=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=20=E6=B7=BB=E5=8A=A0=20=E5=B7=A1=E6=A3=80=E7=82=B9=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E6=8F=90=E4=BA=A4=E6=88=90=E5=8A=9F=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=20=E6=B7=BB=E5=8A=A0=20=E5=B7=A1=E6=A3=80=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E9=80=9A=E7=94=A8=E7=BB=84=E4=BB=B6=20=E6=B7=BB=E5=8A=A0=20?= =?UTF-8?q?=E7=85=A7=E7=89=87=E9=80=89=E6=8B=A9=E7=BB=84=E4=BB=B6=20?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20=E6=96=B9=E5=BD=A2=E5=8D=95=E9=80=89?= =?UTF-8?q?=E6=8C=89=E9=92=AE=E7=BB=84=E4=BB=B6=20=E6=B7=BB=E5=8A=A0=20?= =?UTF-8?q?=E8=99=9A=E7=BA=BF=E8=BE=B9=E6=A1=86=E4=BE=9D=E8=B5=96=E5=BA=93?= =?UTF-8?q?=20=E6=B7=BB=E5=8A=A0=20=E9=83=A8=E5=88=86icon?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/inspection/ic_date.png | Bin 0 -> 530 bytes assets/inspection/ic_inspection_name.png | Bin 0 -> 764 bytes assets/inspection/ic_station.png | Bin 0 -> 1078 bytes assets/inspection/ic_way.png | Bin 0 -> 663 bytes assets/manage/ic_image.png | Bin 0 -> 2132 bytes .../inspection_point_input_page.dart | 419 ++++++++++++++++++ .../inspection_point_submit_page.dart | 58 +++ .../inspection_manage/inspection_utils.dart | 24 + .../app_widgets/aku_pick_image_widget.dart | 53 +++ .../app_widgets/aku_single_check_button.dart | 41 ++ pubspec.lock | 21 + pubspec.yaml | 2 +- 12 files changed, 617 insertions(+), 1 deletion(-) create mode 100644 assets/inspection/ic_date.png create mode 100644 assets/inspection/ic_inspection_name.png create mode 100644 assets/inspection/ic_station.png create mode 100644 assets/inspection/ic_way.png create mode 100644 assets/manage/ic_image.png create mode 100644 lib/ui/manage_pages/inspection_manage/inspection_point_input_page.dart create mode 100644 lib/ui/manage_pages/inspection_manage/inspection_point_submit_page.dart create mode 100644 lib/ui/manage_pages/inspection_manage/inspection_utils.dart create mode 100644 lib/ui/widgets/app_widgets/aku_pick_image_widget.dart create mode 100644 lib/ui/widgets/app_widgets/aku_single_check_button.dart diff --git a/assets/inspection/ic_date.png b/assets/inspection/ic_date.png new file mode 100644 index 0000000000000000000000000000000000000000..c27d6290e95e44a8049d4596e265d00cbe88ab86 GIT binary patch literal 530 zcmeAS@N?(olHy`uVBq!ia0vp^0U*r51|<6gKdoh8V7%$+;uum9_xAQd-@^tHZ4dVg z7o;((ls#bTxm2OHd@+M~nL`ruIUfcs)=;h9C%=5JSkzkn_I|xQUTC-K>JR*!YXWW+ zaBz4lENBQ|IF^fxe6W+D_+0#lt?8ovnxRuyYHgXjvtjr7_yhMpA7DGg-PFL%SkvDT zZZUo3<8r~m;vY)InF;fQyn?wWJbpf>*rkLiOp7am^Sik4hag7t*=LhoVh;bDe$4*b z>#vtL9z1Ji@cfUA;P<6W1$Vr?UOFDAa%Ft|wr&y=SB1g@(+~D1Hoj+OFITF)f8Xth zXiiw>pUtm#ZFjxv;+1aqbw}EC!{EbHzoZ`|@5NRls zu2|Xdt~Hi@Ub*ZGzawn74y<+9T%PEkSiyDpe(PQC!%uH#d`$Cyc#-8nBa4Ut*MS|p zF%}E>Z%wH?V7GSXWU1fg6NCQW?45mjaopx+&01%s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IfGh(GWz?sKy>DU%Rb z2nnN76t_m21)s>17FY-!uf1uhgotfKo|M3XB7EdyU3I5~i2M%?1fJRy4kh6;sXM8U)!d-i|lTfSIcZw{OG!%JCRrDtN>W%6Gg}=I}ojL4~sXz`K- z{*)4b7*$VAF=qf|fj_4tER50&K;$g&c1lcj?fa1pjR~U;NR%wF8|kF*&Ga*?>~G9O zrOA;6_M`EOES~kBBq*{7Yzqw(nHo)47$qVUW$$xRhSSeKn;%Uw7oCa|Esk<##GCN;}{o}eP5rrYMZ27@mE0000< KMNUMnLSTYHs_V)C literal 0 HcmV?d00001 diff --git a/lib/ui/manage_pages/inspection_manage/inspection_point_input_page.dart b/lib/ui/manage_pages/inspection_manage/inspection_point_input_page.dart new file mode 100644 index 0000000..22d60da --- /dev/null +++ b/lib/ui/manage_pages/inspection_manage/inspection_point_input_page.dart @@ -0,0 +1,419 @@ +import 'dart:io'; + +import 'package:aku_community_manager/models/manager/inspection/inspection_detail_model.dart'; +import 'package:aku_community_manager/models/manager/inspection/inspection_point_model.dart'; +import 'package:aku_community_manager/style/app_style.dart'; +import 'package:aku_community_manager/ui/manage_pages/inspection_manage/inspection_utils.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:common_utils/common_utils.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:velocity_x/velocity_x.dart'; + +class InspectionPointInputPage extends StatefulWidget { + final bool hasScan; + final InspectionDetailModel detailModel; + final int inspectionStatus; + final InspectionPointModel pointModel; + InspectionPointInputPage( + {Key key, + this.hasScan, + this.detailModel, + this.inspectionStatus, + this.pointModel}) + : super(key: key); + + @override + _InspectionPointInputPageState createState() => + _InspectionPointInputPageState(); +} + +class _InspectionPointInputPageState extends State { + TextEditingController _cleaningExtraController; + TextEditingController _meterExtraController; + TextEditingController _meterCountContrlller; + int _cleaningStatus; + int _meterStatus; + File _selfPhoto; + File _scenePhoto; + @override + void initState() { + super.initState(); + _cleaningExtraController = TextEditingController(); + _meterExtraController = TextEditingController(); + _meterCountContrlller = TextEditingController(); + } + + @override + void dispose() { + _cleaningExtraController?.dispose(); + _meterExtraController?.dispose(); + _meterCountContrlller?.dispose(); + super.dispose(); + } + + @override + Widget build(BuildContext context) { + return AkuScaffold( + title: '巡检点', + body: ListView( + children: [ + 16.w.heightBox, + _inspectionHeadCard(), + 16.w.heightBox, + _cleaningCard(), + _meterCard(), + _selfPhotoCard(), + _scenePhotoCard(), + ], + ), + ); + } + + Widget _scenePhotoCard() { + return Column( + children: [ + Row( + children: [ + '3.巡更人员自拍人脸'.text.color(kTextPrimaryColor).size(32.sp).bold.make() + ], + ), + 32.w.heightBox, + AkuPickImageWidget( + onChanged: (file) { + _scenePhoto = file; + }, + ), + ], + ).box.color(Colors.white).make(); + } + + Widget _selfPhotoCard() { + return Column( + children: [ + Row( + children: [ + '3.巡更人员自拍人脸'.text.color(kTextPrimaryColor).size(32.sp).bold.make() + ], + ), + 32.w.heightBox, + AkuPickImageWidget( + onChanged: (file) { + _selfPhoto = file; + }, + ), + ], + ).box.color(Colors.white).make(); + } + + Widget _meterCard() { + return Column( + children: [ + Row( + children: [ + '2.检查小区南门抄表数据'.text.color(kTextPrimaryColor).size(32.sp).make() + ], + ), + 32.w.heightBox, + Row( + children: [ + AkuSingleCheckButton( + text: '正常', + value: 0, + gropValue: _meterStatus, + onPressed: () { + _cleaningStatus = 0; + }, + ), + 80.w.widthBox, + AkuSingleCheckButton( + text: '异常', + value: 0, + gropValue: _meterStatus, + onPressed: () { + _cleaningStatus = 1; + }, + ), + ], + ), + 36.w.heightBox, + Row( + children: [ + '抄表值'.text.color(kTextPrimaryColor).size(28.sp).make(), + Spacer(), + TextField( + controller: _meterCountContrlller, + textAlign: TextAlign.end, + inputFormatters: [ + FilteringTextInputFormatter.allow(RegExp('[0-9]*')) + ], + decoration: InputDecoration( + border: InputBorder.none, + hintText: '请输入抄表值', + hintStyle: TextStyle( + fontSize: 28.sp, + color: kTextSubColor, + ), + contentPadding: EdgeInsets.zero, + isDense: true, + ), + ) + ], + ), + 28.w.heightBox, + Divider(), + 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, + controller: _meterExtraController, + decoration: InputDecoration( + hintText: '请输入备注信息', + hintStyle: TextStyle( + fontSize: 28.sp, + color: kTextSubColor, + ), + contentPadding: EdgeInsets.zero, + border: InputBorder.none, + isDense: true, + ), + ), + ), + ], + ) + .box + .padding(EdgeInsets.symmetric(vertical: 24.w, horizontal: 32.w)) + .color(Colors.white) + .make(); + } + + Widget _cleaningCard() { + return Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + children: [ + '1.${widget.pointModel.name}'.text.black.size(32.sp).bold.make() + ], + ), + 32.w.heightBox, + Row( + children: [ + AkuSingleCheckButton( + text: '正常', + value: 0, + gropValue: _cleaningStatus, + onPressed: () { + _cleaningStatus = 0; + }, + ), + 80.w.widthBox, + AkuSingleCheckButton( + text: '异常', + value: 0, + gropValue: _cleaningStatus, + onPressed: () { + _cleaningStatus = 1; + }, + ), + ], + ), + 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, + controller: _cleaningExtraController, + decoration: InputDecoration( + hintText: '请输入备注信息', + hintStyle: TextStyle( + fontSize: 28.sp, + color: kTextSubColor, + ), + contentPadding: EdgeInsets.zero, + border: InputBorder.none, + isDense: true, + ), + ), + ), + ], + ) + .box + .color(Colors.white) + .padding(EdgeInsets.symmetric(vertical: 24.w, horizontal: 32.w)) + .make(); + } + + Widget _inspectionHeadCard() { + return Column( + mainAxisSize: MainAxisSize.min, + children: [ + 16.w.heightBox, + Container( + alignment: Alignment.centerLeft, + padding: EdgeInsets.only(left: 24.w, right: 24.w, bottom: 40.w), + width: double.infinity, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(8.w), + color: Color(0xFFFFFFFF)), + child: Column(children: [ + Container( + height: 86.w, + width: double.infinity, + alignment: Alignment.centerLeft, + child: Row( + children: [ + Text( + '${widget.detailModel.name}', + style: TextStyle( + color: AppStyle.primaryTextColor, + fontSize: 36.sp, + fontWeight: FontWeight.bold), + ), + Spacer(), + InspectionUtils.status[widget.inspectionStatus].text + .color(InspectionUtils.color(widget.inspectionStatus)) + .bold + .size(28.sp) + .make() + ], + ), + ), + Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Image.asset( + R.ASSETS_MANAGE_IC_RENWU_PNG, + width: 40.w, + height: 40.w, + ), + 4.w.widthBox, + Column( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Text( + '巡检名称', + style: InspectionUtils.textstyle, + ), + ], + ), + 36.w.widthBox, + Text( + widget.detailModel.name, + maxLines: 2, + textAlign: TextAlign.right, + style: AppStyle().primaryStyle, + ).expand() + ], + ), + 12.w.heightBox, + Row( + children: [ + Image.asset( + R.ASSETS_MANAGE_IC_RENWU_PNG, + width: 40.w, + height: 40.w, + ), + 4.w.widthBox, + Text( + '巡检编号', + style: InspectionUtils.textstyle, + ), + Spacer(), + Text( + widget.detailModel.code, + style: AppStyle().primaryStyle, + ) + ], + ), + 12.w.heightBox, + Row( + children: [ + Image.asset( + R.ASSETS_INSPECTION_IC_XUNJIAN_PNG, + width: 40.w, + height: 40.w, + ), + 4.w.widthBox, + Text( + '规定巡检时间', + style: InspectionUtils.textstyle, + ), + Spacer(), + Text( + '${DateUtil.formatDateStr(widget.detailModel.beginDate, format: "yyyy-MM-dd HH:mm")}~${widget.detailModel?.endDate == null ? '' : DateUtil.formatDateStr(widget.detailModel.endDate, format: "HH:mm")}', + style: AppStyle().primaryStyle, + ), + ], + ), + 12.w.heightBox, + ...widget.detailModel?.actualBeginDate == null + ? [SizedBox()] + : [ + Row( + children: [ + Image.asset( + R.ASSETS_MANAGE_IC_TIME_PNG, + width: 40.w, + height: 40.w, + ), + 4.w.widthBox, + Text( + '开始巡检时间', + style: InspectionUtils.textstyle, + ), + Spacer(), + Text( + '${DateUtil.formatDateStr(widget.detailModel.actualBeginDate, format: "yyyy-MM-dd HH:mm")}', + style: AppStyle().primaryStyle, + ), + ], + ), + 12.w.heightBox, + ], + widget.detailModel?.actualEndDate == null + ? SizedBox() + : Row( + children: [ + Image.asset( + R.ASSETS_MESSAGE_IC_PEOPLE_PNG, + width: 40.w, + height: 40.w, + ), + 4.w.widthBox, + Text( + '结束巡检时间', + style: InspectionUtils.textstyle, + ), + Spacer(), + Text( + '${DateUtil.formatDateStr(widget.detailModel.actualEndDate, format: "yyyy-MM-dd HH:mm")}', + style: AppStyle().primaryStyle, + ), + ], + ) + ]), + ), + ], + ); + } +} diff --git a/lib/ui/manage_pages/inspection_manage/inspection_point_submit_page.dart b/lib/ui/manage_pages/inspection_manage/inspection_point_submit_page.dart new file mode 100644 index 0000000..3a07af1 --- /dev/null +++ b/lib/ui/manage_pages/inspection_manage/inspection_point_submit_page.dart @@ -0,0 +1,58 @@ +import 'package:aku_community_manager/style/app_style.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:flutter_screenutil/flutter_screenutil.dart'; +import 'package:get/get.dart'; +import 'package:velocity_x/velocity_x.dart'; + +class InspectionPointSubmitPage extends StatefulWidget { + InspectionPointSubmitPage({Key key}) : super(key: key); + + @override + _InspectionPointSubmitPageState createState() => + _InspectionPointSubmitPageState(); +} + +class _InspectionPointSubmitPageState extends State { + @override + Widget build(BuildContext context) { + return AkuScaffold( + title: '巡检点', + body: Center( + child: Container( + width: double.infinity, + child: Column( + children: [ + Image.asset(R.ASSETS_MANAGE_SUBMIT_SUCCESS_PNG, + width: 587.w, height: 350.w), + '提交成功'.text.black.size(40.sp).bold.make(), + 8.w.heightBox, + '感谢您的努力工作,为小区安全做出贡献' + .text + .color(kTextSubColor) + .size(26.sp) + .bold + .make(), + 80.w.heightBox, + AkuButton( + color: kPrimaryColor, + child: '继续巡更' + .text + .color(kTextPrimaryColor) + .size(32.sp) + .bold + .make(), + radius: 8.w, + padding: EdgeInsets.symmetric(vertical: 22.w, horizontal: 76.w), + onPressed: () { + Get.back(); + }, + ), + ], + ), + ), + ), + ); + } +} diff --git a/lib/ui/manage_pages/inspection_manage/inspection_utils.dart b/lib/ui/manage_pages/inspection_manage/inspection_utils.dart new file mode 100644 index 0000000..adc1aaa --- /dev/null +++ b/lib/ui/manage_pages/inspection_manage/inspection_utils.dart @@ -0,0 +1,24 @@ +import 'package:aku_community_manager/style/app_style.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; + +class InspectionUtils { + static TextStyle textstyle = + TextStyle(color: AppStyle.minorTextColor, fontSize: 28.sp); + static Map status = {1: '待巡检', 2: '已巡检', 3: '巡检中', 4: '未巡检'}; + static Color color(int status) { + switch (status) { + case 1: + return Color(0xFFFF4501); + break; + case 2: + return Color(0xFF999999); + case 3: + return Color(0xFFFF4501); + case 4: + return Color(0xFFFF4501); + default: + return Colors.blue; + } + } +} diff --git a/lib/ui/widgets/app_widgets/aku_pick_image_widget.dart b/lib/ui/widgets/app_widgets/aku_pick_image_widget.dart new file mode 100644 index 0000000..f6b1789 --- /dev/null +++ b/lib/ui/widgets/app_widgets/aku_pick_image_widget.dart @@ -0,0 +1,53 @@ +import 'dart:io'; + +import 'package:aku_community_manager/style/app_style.dart'; +import 'package:aku_community_manager/ui/widgets/inner/pick_image.dart'; +import 'package:dotted_border/dotted_border.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:aku_community_manager/const/resource.dart'; +import 'package:velocity_x/velocity_x.dart'; + +class AkuPickImageWidget extends StatefulWidget { + final double size; + final Function(File file) onChanged; + AkuPickImageWidget({Key key, this.size, this.onChanged}) : super(key: key); + + @override + _AkuPickImageWidgetState createState() => _AkuPickImageWidgetState(); +} + +class _AkuPickImageWidgetState extends State { + File _file; + @override + Widget build(BuildContext context) { + return GestureDetector( + onTap: () async { + await akuPickImage().then((value) => _file = File(value.path)); + widget.onChanged(_file); + }, + child: DottedBorder( + color: Color(0xFF999999), + strokeWidth: 2.w, + radius: Radius.circular(8.w), + child: Container( + width: widget.size ?? 160.w, + height: widget.size ?? 160.w, + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Image.asset( + R.ASSETS_MANAGE_IC_IMAGE_PNG, + width: 60.w, + height: 60.w, + ), + 4.w.heightBox, + '上传图片'.text.color(kTextSubColor).size(22.sp).bold.make(), + ], + ), + ), + ).material(color: Colors.transparent), + ); + } +} diff --git a/lib/ui/widgets/app_widgets/aku_single_check_button.dart b/lib/ui/widgets/app_widgets/aku_single_check_button.dart new file mode 100644 index 0000000..4d709a1 --- /dev/null +++ b/lib/ui/widgets/app_widgets/aku_single_check_button.dart @@ -0,0 +1,41 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:velocity_x/velocity_x.dart'; + +class AkuSingleCheckButton extends StatefulWidget { + final String text; + final T value; + final T gropValue; + final VoidCallback onPressed; + AkuSingleCheckButton( + {Key key, this.text, this.value, this.gropValue, this.onPressed}) + : super(key: key); + + @override + _AkuSingleCheckButtonState createState() => _AkuSingleCheckButtonState(); +} + +class _AkuSingleCheckButtonState extends State { + bool get isSelect => widget.value == widget.gropValue; + @override + Widget build(BuildContext context) { + return Container( + decoration: BoxDecoration( + color: isSelect ? Color(0xFFFFF8E0) : Colors.white, + border: Border.all( + color: isSelect ? Color(0xFFFFC40C) : Color(0xFF999999), + width: 3.w), + borderRadius: BorderRadius.circular(4.w)), + width: 180.w, + height: 72.w, + child: widget.text.text + .color(isSelect ? Color(0xFF999999) : Color(0xFF333333)) + .bold + .size(32.sp) + .make(), + ).onInkTap(() { + widget.onPressed(); + setState(() {}); + }); + } +} diff --git a/pubspec.lock b/pubspec.lock index 16942ec..bf06d93 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -220,6 +220,13 @@ packages: url: "https://pub.flutter-io.cn" source: hosted version: "3.0.10" + dotted_border: + dependency: "direct main" + description: + name: dotted_border + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.0.0-nullsafety.0" expandable: dependency: "direct main" description: @@ -494,6 +501,20 @@ packages: url: "https://pub.flutter-io.cn" source: hosted version: "1.8.0" + path_drawing: + dependency: transitive + description: + name: path_drawing + url: "https://pub.flutter-io.cn" + source: hosted + version: "0.5.0-nullsafety.0" + path_parsing: + dependency: transitive + description: + name: path_parsing + url: "https://pub.flutter-io.cn" + source: hosted + version: "0.2.0-nullsafety.0" path_provider: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index 05e9c95..3d5974b 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -48,7 +48,7 @@ dependencies: permission_handler: ^5.0.1+1 velocity_x: ^2.6.0 - + dotted_border: ^2.0.0-nullsafety.0 dio: power_logger: ^0.1.3