巡检接口更改

修复巡检模式显示不正确的问题
hmxc
张萌 4 years ago
parent 649aec297e
commit 4386da807b

@ -169,6 +169,10 @@ class _Manage {
String get inspectionPointCheckDetail => String get inspectionPointCheckDetail =>
'/user/inspection/findCheckDetailById'; '/user/inspection/findCheckDetailById';
///1.4.
String get inspectionPointCheckDetailUnbegin =>
'/user/inspection/findCheckDetailById2';
/// ///
String get findItemNum => '/user/backlog/findItemNum'; String get findItemNum => '/user/backlog/findItemNum';

@ -70,6 +70,16 @@ class InspectionCheckDetialModel {
} }
return data; return data;
} }
String get inspectionPattern {
switch (this.type) {
case 1:
return '巡检模式1';
break;
default:
return '未知';
}
}
} }
class CheckFBIVoList { class CheckFBIVoList {
@ -123,4 +133,6 @@ class FaceImg {
data['sort'] = this.sort; data['sort'] = this.sort;
return data; return data;
} }
} }

@ -32,6 +32,15 @@ class InspectionQRCodeModel {
} }
return data; return data;
} }
String get inspectionPattern {
switch (this.type) {
case 1:
return '巡检模式1';
break;
default:
return '未知';
}
}
} }
class CheckVoList { class CheckVoList {

@ -527,7 +527,7 @@ class _InspectionManageDetailsPageState
BotToast.showText(text: baseModel.message); BotToast.showText(text: baseModel.message);
} else { } else {
_canUploadLocation = false; _canUploadLocation = false;
//TODO:线 //线
_points.add(argument.latLng); _points.add(argument.latLng);
if (_points.length % 5 == 0) { if (_points.length % 5 == 0) {
if (_polylines.isEmpty) { if (_polylines.isEmpty) {

@ -46,15 +46,7 @@ class _InspectionPointDetailPageState extends State<InspectionPointDetailPage> {
_easyRefreshController = EasyRefreshController(); _easyRefreshController = EasyRefreshController();
} }
String inspectionPattern(int type) {
switch (type) {
case 1:
return '巡检模式1';
break;
default:
return '';
}
}
@override @override
void dispose() { void dispose() {
@ -72,8 +64,7 @@ class _InspectionPointDetailPageState extends State<InspectionPointDetailPage> {
MaterialHeader(valueColor: AlwaysStoppedAnimation(kPrimaryColor)), MaterialHeader(valueColor: AlwaysStoppedAnimation(kPrimaryColor)),
firstRefresh: true, firstRefresh: true,
onRefresh: () async { onRefresh: () async {
BaseModel baseModel = await ManageFunc.getInspectionPointCheckDetail( BaseModel baseModel = await _getModels;
widget.executePointId);
if (baseModel.data != null) { if (baseModel.data != null) {
_detialModel = InspectionCheckDetialModel.fromJson(baseModel.data); _detialModel = InspectionCheckDetialModel.fromJson(baseModel.data);
_onload = false; _onload = false;
@ -100,6 +91,22 @@ class _InspectionPointDetailPageState extends State<InspectionPointDetailPage> {
); );
} }
Future get _getModels async {
switch (widget.status) {
case 1:
return ManageFunc.getInspectionPointCheckDetailUnbegin(
widget.executePointId);
case 2:
case 3:
return ManageFunc.getInspectionPointCheckDetail(widget.executePointId);
case 4:
return ManageFunc.getInspectionPointCheckDetailUnbegin(
widget.executePointId);
default:
return ManageFunc.getInspectionPointCheckDetail(widget.executePointId);
}
}
Widget _selfPhotoCard() { Widget _selfPhotoCard() {
return Column( return Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
@ -430,7 +437,7 @@ class _InspectionPointDetailPageState extends State<InspectionPointDetailPage> {
), ),
Spacer(), Spacer(),
Text( Text(
'${inspectionPattern(model.type)}', '${model.inspectionPattern}',
style: AppStyle().primaryStyle, style: AppStyle().primaryStyle,
), ),
], ],

@ -101,7 +101,6 @@ class _InspectionPointInputPageState extends State<InspectionPointInputPage> {
if (baseModel.status) { if (baseModel.status) {
BotToast.showText(text: baseModel.message); BotToast.showText(text: baseModel.message);
Get.to(() => InspectionPointSubmitPage()); Get.to(() => InspectionPointSubmitPage());
} else { } else {
BotToast.showText(text: baseModel.message); BotToast.showText(text: baseModel.message);
} }
@ -385,7 +384,7 @@ class _InspectionPointInputPageState extends State<InspectionPointInputPage> {
), ),
Spacer(), Spacer(),
Text( Text(
'${widget.qrModel.type}', '${widget.qrModel.inspectionPattern}',
style: AppStyle().primaryStyle, style: AppStyle().primaryStyle,
), ),
], ],

@ -95,4 +95,12 @@ class ManageFunc {
}); });
return baseModel; return baseModel;
} }
static Future getInspectionPointCheckDetailUnbegin(int planPointId) async{
BaseModel baseModel =
await NetUtil().get(API.manage.inspectionPointCheckDetailUnbegin, params: {
"planPointId": planPointId,
});
return baseModel;
}
} }

@ -82,6 +82,7 @@ dev_dependencies:
#json序列化 #json序列化
json_serializable: ^4.1.1 json_serializable: ^4.1.1
build_runner: ^2.0.3 build_runner: ^2.0.3
json_model:
flutter: flutter:
uses-material-design: true uses-material-design: true

Loading…
Cancel
Save