remove mock out_door data and provider

hmxc
小赖 4 years ago
parent 79cfd651f1
commit 19c10cce68

@ -15,7 +15,6 @@ import 'package:aku_community_manager/provider/anouncement_provider.dart';
import 'package:aku_community_manager/provider/app_provider.dart';
import 'package:aku_community_manager/provider/fix_provider.dart';
import 'package:aku_community_manager/provider/manage_provider.dart';
import 'package:aku_community_manager/provider/outdoor_provider.dart';
import 'package:aku_community_manager/provider/user_provider.dart';
import 'package:aku_community_manager/ui/splash/splash_page.dart';
@ -58,7 +57,7 @@ class MyApp extends StatelessWidget {
ChangeNotifierProvider(create: (context) => FixProvider()),
ChangeNotifierProvider(create: (context) => GreenManageProvider()),
ChangeNotifierProvider(create: (context) => InspectionManageProvider()),
ChangeNotifierProvider(create: (context) => OutdoorProvider()),
ChangeNotifierProvider(create: (context) => GreenManageProvider()),
ChangeNotifierProvider(create: (context) => InspectionManageProvider()),
ChangeNotifierProvider(create: (context) => AnouncementProvider()),

@ -1,184 +0,0 @@
// Flutter imports:
import 'package:flutter/material.dart';
// Project imports:
import 'package:aku_community_manager/const/resource.dart';
enum OUTDOORSTATUS {
///
NOT_OUT,
///
OUT_DONE,
///
REJECTED,
///
CANCELLATION,
}
class ItemsOutdoorModel {
///
OUTDOORSTATUS status;
///
DateTime datetime;
///
String communityname;
///
String adress;
///
String name;
///
String identify;
///
ItemDetails items;
///
String outtime;
////
String finalOutTime;
///
String outPlace;
///
String rejectReason;
ItemsOutdoorModel({
@required this.status,
@required this.datetime,
@required this.communityname,
@required this.adress,
@required this.name,
@required this.identify,
@required this.items,
@required this.outtime,
this.finalOutTime,
this.outPlace,
this.rejectReason,
});
static List<ItemsOutdoorModel> initList() {
return [
ItemsOutdoorModel(
status: OUTDOORSTATUS.NOT_OUT,
datetime: DateTime(2020, 10, 23, 09, 28, 56),
communityname: '深圳华悦茂峰',
adress: '1幢1单元702室',
name: '马云',
identify: '业主',
items: ItemDetails(
itemname: '家具',
weight: 40,
way: '搬家公司',
imagepath: [
R.ASSETS_OUTDOOR_ITME1_PNG,
R.ASSETS_OUTDOOR_ITEM2_PNG,
R.ASSETS_OUTDOOR_ITEM3_PNG
],
),
outtime: '2020-10-24 12:00',
finalOutTime: '',
outPlace: '',
rejectReason: '',
),
ItemsOutdoorModel(
status: OUTDOORSTATUS.OUT_DONE,
datetime: DateTime(2020, 10, 23, 09, 28, 56),
communityname: '深圳华悦茂峰',
adress: '1幢1单元702室',
name: '马云',
identify: '业主',
items: ItemDetails(
itemname: '家具',
weight: 60,
way: '搬家公司',
imagepath: [
R.ASSETS_OUTDOOR_ITME1_PNG,
R.ASSETS_OUTDOOR_ITEM2_PNG,
R.ASSETS_OUTDOOR_ITEM3_PNG
],
),
outtime: '2020-10-24 12:00',
finalOutTime: '2020-10-23 11:23:56',
outPlace: '东大门',
rejectReason: ''),
ItemsOutdoorModel(
status: OUTDOORSTATUS.REJECTED,
datetime: DateTime(2020, 10, 23, 09, 28, 56),
communityname: '深圳华悦茂峰',
adress: '1幢1单元702室',
name: '马云',
identify: '业主',
items: ItemDetails(
itemname: '家具',
weight: 80,
way: '搬家公司',
imagepath: [
R.ASSETS_OUTDOOR_ITME1_PNG,
R.ASSETS_OUTDOOR_ITEM2_PNG,
R.ASSETS_OUTDOOR_ITEM3_PNG
],
),
outtime: '2020-10-24 12:00',
finalOutTime: '2020-10-24 12:22:34',
outPlace: '',
rejectReason: '申报物品与实际物品不符',
),
ItemsOutdoorModel(
status: OUTDOORSTATUS.CANCELLATION,
datetime: DateTime(2020, 10, 23, 09, 28, 56),
communityname: '深圳华悦茂峰',
adress: '1幢1单元702室',
name: '马云',
identify: '业主',
items: ItemDetails(
itemname: '家具',
weight: 120,
way: '搬家公司',
imagepath: [
R.ASSETS_OUTDOOR_ITME1_PNG,
R.ASSETS_OUTDOOR_ITEM2_PNG,
R.ASSETS_OUTDOOR_ITEM3_PNG
],
),
outtime: '2020-10-24 12:00',
finalOutTime: '',
outPlace: '',
rejectReason: '',
),
];
}
static Map<OUTDOORSTATUS, String> outdoorStatusMap = {
OUTDOORSTATUS.NOT_OUT: '待出户',
OUTDOORSTATUS.OUT_DONE: '已出户',
OUTDOORSTATUS.REJECTED: '已驳回',
OUTDOORSTATUS.CANCELLATION: '已作废',
};
static Map<String, OUTDOORSTATUS> outdoorStatusStringMap = {
'待出户': OUTDOORSTATUS.NOT_OUT,
'已出户': OUTDOORSTATUS.OUT_DONE,
'已驳回': OUTDOORSTATUS.REJECTED,
'已作废': OUTDOORSTATUS.CANCELLATION,
};
}
class ItemDetails {
String itemname;
double weight;
String way;
List<String> imagepath;
ItemDetails(
{@required this.itemname,
@required this.weight,
this.way,
this.imagepath});
}

@ -1,32 +0,0 @@
// Flutter imports:
import 'package:flutter/material.dart';
// Project imports:
import 'package:aku_community_manager/mock_models/outdoor_models/outdoor_model.dart';
class OutdoorProvider extends ChangeNotifier {
List<ItemsOutdoorModel> _itemOutdoorModel = ItemsOutdoorModel.initList();
List<ItemsOutdoorModel> get itemOutdoorModels => _itemOutdoorModel;
addOutdoormodel(ItemsOutdoorModel model) {
_itemOutdoorModel.insert(0, model);
notifyListeners();
}
List<ItemsOutdoorModel> getOutdoorModels(int index) {
return [
_itemOutdoorModel
.where((element) => element.status == OUTDOORSTATUS.NOT_OUT)
.toList(),
_itemOutdoorModel
.where((element) => element.status == OUTDOORSTATUS.OUT_DONE)
.toList(),
_itemOutdoorModel
.where((element) => element.status == OUTDOORSTATUS.REJECTED)
.toList(),
_itemOutdoorModel
.where((element) => element.status == OUTDOORSTATUS.CANCELLATION)
.toList(),
_itemOutdoorModel,
][index];
}
}

@ -17,12 +17,9 @@ import 'package:provider/provider.dart';
// Project imports:
import 'package:aku_community_manager/const/resource.dart';
import 'package:aku_community_manager/mock_models/outdoor_models/outdoor_model.dart';
import 'package:aku_community_manager/mock_models/users/user_info_model.dart';
import 'package:aku_community_manager/provider/user_provider.dart';
import 'package:aku_community_manager/style/app_style.dart';
import 'package:aku_community_manager/tools/widget_tool.dart';
import 'package:aku_community_manager/ui/sub_pages/items_outdoor/items_outdoor_card.dart';
import 'package:aku_community_manager/ui/sub_pages/items_outdoor/outdoor_notpass_page.dart';
import 'package:aku_community_manager/ui/sub_pages/items_outdoor/outdoor_pass_page.dart';
import 'package:aku_community_manager/ui/widgets/common/aku_scaffold.dart';

@ -1,19 +1,12 @@
// Flutter imports:
import 'package:aku_community_manager/const/api.dart';
import 'package:aku_community_manager/models/manager/goods_out/goods_out_item_model.dart';
import 'package:aku_community_manager/ui/sub_pages/items_outdoor/items_outdoor_view.dart';
import 'package:aku_community_manager/ui/widgets/common/bee_list_view.dart';
import 'package:flutter/material.dart';
import 'package:flutter_easyrefresh/easy_refresh.dart';
// Package imports:
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:provider/provider.dart';
// Project imports:
import 'package:aku_community_manager/mock_models/outdoor_models/outdoor_model.dart';
import 'package:aku_community_manager/provider/outdoor_provider.dart';
import 'package:aku_community_manager/ui/sub_pages/items_outdoor/items_outdoor_card.dart';
import 'package:aku_community_manager/ui/widgets/common/aku_scaffold.dart';
import 'package:aku_community_manager/ui/widgets/inner/aku_tab_bar.dart';

@ -10,7 +10,6 @@ import 'package:common_utils/common_utils.dart';
import 'package:get/get.dart';
// Project imports:
import 'package:aku_community_manager/mock_models/outdoor_models/outdoor_model.dart';
import 'package:aku_community_manager/style/app_style.dart';
import 'package:aku_community_manager/tools/widget_tool.dart';
import 'package:aku_community_manager/ui/widgets/common/aku_radio.dart';

@ -11,7 +11,6 @@ import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
// Project imports:
import 'package:aku_community_manager/mock_models/outdoor_models/outdoor_model.dart';
import 'package:aku_community_manager/style/app_style.dart';
import 'package:aku_community_manager/tools/widget_tool.dart';
import 'package:aku_community_manager/ui/widgets/common/aku_scaffold.dart';

@ -3,6 +3,7 @@ import 'dart:io';
// Package imports:
import 'package:aku_community_manager/provider/user_provider.dart';
import 'package:aku_community_manager/ui/home/home_page.dart';
import 'package:aku_community_manager/ui/login/login_page.dart';
import 'package:bot_toast/bot_toast.dart';
import 'package:dio/dio.dart';
@ -140,6 +141,7 @@ class NetUtil {
}
_parseErr(DioError err) {
final userProvider = Provider.of<UserProvider>(Get.context, listen: false);
LoggerData.addData(err);
_makeToast(String message) {
BotToast.showText(text: '$message\_${err?.response?.statusCode ?? ''}');

Loading…
Cancel
Save