|
|
@ -3,30 +3,33 @@ import 'dart:io';
|
|
|
|
|
|
|
|
|
|
|
|
// Flutter imports:
|
|
|
|
// Flutter imports:
|
|
|
|
import 'package:aku_community_manager/const/api.dart';
|
|
|
|
import 'package:aku_community_manager/const/api.dart';
|
|
|
|
|
|
|
|
import 'package:aku_community_manager/models/manager/facilities/facilities_check_list_model.dart';
|
|
|
|
|
|
|
|
// Project imports:
|
|
|
|
|
|
|
|
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/app_widgets/bee_grid_image_view.dart';
|
|
|
|
import 'package:aku_community_manager/ui/widgets/common/aku_button.dart';
|
|
|
|
import 'package:aku_community_manager/ui/widgets/common/aku_button.dart';
|
|
|
|
|
|
|
|
import 'package:aku_community_manager/ui/widgets/common/aku_scaffold.dart';
|
|
|
|
import 'package:aku_community_manager/utils/network/base_model.dart';
|
|
|
|
import 'package:aku_community_manager/utils/network/base_model.dart';
|
|
|
|
import 'package:aku_community_manager/utils/network/net_util.dart';
|
|
|
|
import 'package:aku_community_manager/utils/network/net_util.dart';
|
|
|
|
import 'package:bot_toast/bot_toast.dart';
|
|
|
|
import 'package:bot_toast/bot_toast.dart';
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
|
|
|
|
|
|
|
// Package imports:
|
|
|
|
// Package imports:
|
|
|
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
|
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
|
|
import 'package:get/get.dart';
|
|
|
|
import 'package:get/get.dart';
|
|
|
|
import 'package:velocity_x/velocity_x.dart';
|
|
|
|
import 'package:velocity_x/velocity_x.dart';
|
|
|
|
|
|
|
|
|
|
|
|
// Project imports:
|
|
|
|
|
|
|
|
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';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class FacilitiesInspectReportPage extends StatefulWidget {
|
|
|
|
class FacilitiesInspectReportPage extends StatefulWidget {
|
|
|
|
final int facilitiesType;
|
|
|
|
final int facilitiesType;
|
|
|
|
final int id;
|
|
|
|
final int id;
|
|
|
|
|
|
|
|
final FacilitiesCheckListModel? model;
|
|
|
|
|
|
|
|
|
|
|
|
FacilitiesInspectReportPage({
|
|
|
|
FacilitiesInspectReportPage({
|
|
|
|
Key? key,
|
|
|
|
Key? key,
|
|
|
|
/*required*/ required this.facilitiesType,
|
|
|
|
/*required*/ required this.facilitiesType,
|
|
|
|
/*required*/ required this.id,
|
|
|
|
/*required*/ required this.id,
|
|
|
|
|
|
|
|
this.model,
|
|
|
|
}) : super(key: key);
|
|
|
|
}) : super(key: key);
|
|
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
@override
|
|
|
@ -40,6 +43,8 @@ class _FacilitiesInspectReportPageState
|
|
|
|
late List<File> _scenePhotos;
|
|
|
|
late List<File> _scenePhotos;
|
|
|
|
String? _describtion;
|
|
|
|
String? _describtion;
|
|
|
|
int _scene = 1; //设施设备状况 1为正常 2为异常
|
|
|
|
int _scene = 1; //设施设备状况 1为正常 2为异常
|
|
|
|
|
|
|
|
bool get editEnable => widget.model == null;
|
|
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
return AkuScaffold(
|
|
|
|
return AkuScaffold(
|
|
|
@ -142,9 +147,7 @@ class _FacilitiesInspectReportPageState
|
|
|
|
return Column(
|
|
|
|
return Column(
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
Row(
|
|
|
|
Row(
|
|
|
|
children: [
|
|
|
|
children: ['$title'.text.color(kTextPrimaryColor).size(32.sp).make()],
|
|
|
|
'$title'.text.color(kTextPrimaryColor).size(32.sp).make()
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
),
|
|
|
|
),
|
|
|
|
32.w.heightBox,
|
|
|
|
32.w.heightBox,
|
|
|
|
Row(
|
|
|
|
Row(
|
|
|
@ -153,7 +156,9 @@ class _FacilitiesInspectReportPageState
|
|
|
|
text: '正常',
|
|
|
|
text: '正常',
|
|
|
|
value: 1,
|
|
|
|
value: 1,
|
|
|
|
gropValue: _scene,
|
|
|
|
gropValue: _scene,
|
|
|
|
onPressed: () {
|
|
|
|
onPressed: !editEnable
|
|
|
|
|
|
|
|
? () {}
|
|
|
|
|
|
|
|
: () {
|
|
|
|
_scene = 1;
|
|
|
|
_scene = 1;
|
|
|
|
setState(() {});
|
|
|
|
setState(() {});
|
|
|
|
},
|
|
|
|
},
|
|
|
@ -163,7 +168,9 @@ class _FacilitiesInspectReportPageState
|
|
|
|
text: '异常',
|
|
|
|
text: '异常',
|
|
|
|
value: 2,
|
|
|
|
value: 2,
|
|
|
|
gropValue: _scene,
|
|
|
|
gropValue: _scene,
|
|
|
|
onPressed: () {
|
|
|
|
onPressed: !editEnable
|
|
|
|
|
|
|
|
? () {}
|
|
|
|
|
|
|
|
: () {
|
|
|
|
_scene = 2;
|
|
|
|
_scene = 2;
|
|
|
|
setState(() {});
|
|
|
|
setState(() {});
|
|
|
|
},
|
|
|
|
},
|
|
|
@ -181,7 +188,9 @@ class _FacilitiesInspectReportPageState
|
|
|
|
color: Color(0xFFE8E8E8),
|
|
|
|
color: Color(0xFFE8E8E8),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
child: TextField(
|
|
|
|
child: !editEnable
|
|
|
|
|
|
|
|
? (widget.model!.detail ?? '').text.size(28.sp).black.make()
|
|
|
|
|
|
|
|
: TextField(
|
|
|
|
minLines: 5,
|
|
|
|
minLines: 5,
|
|
|
|
maxLines: 10,
|
|
|
|
maxLines: 10,
|
|
|
|
autofocus: false,
|
|
|
|
autofocus: false,
|
|
|
@ -244,7 +253,13 @@ class _FacilitiesInspectReportPageState
|
|
|
|
// ],
|
|
|
|
// ],
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
32.w.heightBox,
|
|
|
|
32.w.heightBox,
|
|
|
|
AkuPickImageWidget(
|
|
|
|
!editEnable
|
|
|
|
|
|
|
|
? BeeGridImageView(
|
|
|
|
|
|
|
|
urls: (widget.model!.imgList ?? [])
|
|
|
|
|
|
|
|
.map((e) => API.image(e.url ?? ''))
|
|
|
|
|
|
|
|
.toList(),
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
: AkuPickImageWidget(
|
|
|
|
description: '上传现场照片',
|
|
|
|
description: '上传现场照片',
|
|
|
|
onChanged: (files) {
|
|
|
|
onChanged: (files) {
|
|
|
|
_scenePhotos = files;
|
|
|
|
_scenePhotos = files;
|
|
|
|