# Conflicts:
#	star_lock/ios/Runner.xcodeproj/project.pbxproj
#	star_lock/lib/tools/eventBusEventManage.dart
This commit is contained in:
魏少阳 2024-02-26 11:10:50 +08:00
commit 0f58f3c757
7 changed files with 71 additions and 73 deletions

View File

@ -1,25 +1 @@
{
// 使 IntelliSense
//
// 访: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "star_lock",
"request": "launch",
"type": "dart"
},
{
"name": "star_lock (profile mode)",
"request": "launch",
"type": "dart",
"flutterMode": "profile"
},
{
"name": "star_lock (release mode)",
"request": "launch",
"type": "dart",
"flutterMode": "release"
}
]
}
{"version":"0.2.0","configurations":[{"name":"dev Debug","request":"launch","type":"dart","flutterMode":"debug","args":["--flavor","dev"],"program":"lib/main_dev.dart"},{"name":"dev Profile","request":"launch","type":"dart","flutterMode":"profile","args":["--flavor","dev"],"program":"lib/main_dev.dart"},{"name":"dev Release","request":"launch","type":"dart","flutterMode":"release","args":["--flavor","dev"],"program":"lib/main_dev.dart"},{"name":"pre Debug","request":"launch","type":"dart","flutterMode":"debug","args":["--flavor","pre"],"program":"lib/main_pre.dart"},{"name":"pre Profile","request":"launch","type":"dart","flutterMode":"profile","args":["--flavor","pre"],"program":"lib/main_pre.dart"},{"name":"pre Release","request":"launch","type":"dart","flutterMode":"release","args":["--flavor","pre"],"program":"lib/main_pre.dart"},{"name":"sky Debug","request":"launch","type":"dart","flutterMode":"debug","args":["--flavor","sky"],"program":"lib/main_sky.dart"},{"name":"sky Profile","request":"launch","type":"dart","flutterMode":"profile","args":["--flavor","sky"],"program":"lib/main_sky.dart"},{"name":"sky Release","request":"launch","type":"dart","flutterMode":"release","args":["--flavor","sky"],"program":"lib/main_sky.dart"},{"name":"xhj Debug","request":"launch","type":"dart","flutterMode":"debug","args":["--flavor","xhj"],"program":"lib/main_xhj.dart"},{"name":"xhj Profile","request":"launch","type":"dart","flutterMode":"profile","args":["--flavor","xhj"],"program":"lib/main_xhj.dart"},{"name":"xhj Release","request":"launch","type":"dart","flutterMode":"release","args":["--flavor","xhj"],"program":"lib/main_xhj.dart"}]}

View File

@ -459,7 +459,7 @@
97C146E61CF9000F007C117D /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 1300;
LastUpgradeCheck = 1430;
ORGANIZATIONNAME = "";
TargetAttributes = {
97C146ED1CF9000F007C117D = {
@ -695,10 +695,11 @@
isa = XCBuildConfiguration;
baseConfigurationReference = D28DFC3BEA6D46B5F5B5E55F /* Pods-Runner.debug-dev.xcconfig */;
buildSettings = {
CODE_SIGN_IDENTITY = "Apple Development: Tian Sky (33RZ5UJ9WP)";
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = 7D53BZAN75;
PRODUCT_NAME = Runner;
PROVISIONING_PROFILE_SPECIFIER = "";
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
SUPPORTS_MACCATALYST = NO;
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;
@ -710,8 +711,6 @@
isa = XCBuildConfiguration;
baseConfigurationReference = 6285D102821F3D2FB7B09E43 /* Pods-Runner.profile-dev.xcconfig */;
buildSettings = {
CODE_SIGN_IDENTITY = "Apple Development: Tian Sky (33RZ5UJ9WP)";
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = 7D53BZAN75;
PRODUCT_NAME = Runner;
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
@ -725,8 +724,6 @@
isa = XCBuildConfiguration;
baseConfigurationReference = 295A8AFEEC4806105FAA13B5 /* Pods-Runner.release-dev.xcconfig */;
buildSettings = {
CODE_SIGN_IDENTITY = "Apple Development: Tian Sky (33RZ5UJ9WP)";
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = 7D53BZAN75;
PRODUCT_NAME = Runner;
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
@ -740,8 +737,6 @@
isa = XCBuildConfiguration;
baseConfigurationReference = 51086737647B9B5E510020C6 /* Pods-Runner.debug-pre.xcconfig */;
buildSettings = {
CODE_SIGN_IDENTITY = "Apple Development: Tian Sky (33RZ5UJ9WP)";
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = 7D53BZAN75;
PRODUCT_NAME = Runner;
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
@ -755,8 +750,6 @@
isa = XCBuildConfiguration;
baseConfigurationReference = D001CDA3D7BF065A0C6E3B64 /* Pods-Runner.profile-pre.xcconfig */;
buildSettings = {
CODE_SIGN_IDENTITY = "Apple Development: Tian Sky (33RZ5UJ9WP)";
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = 7D53BZAN75;
PRODUCT_NAME = Runner;
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
@ -770,8 +763,6 @@
isa = XCBuildConfiguration;
baseConfigurationReference = 68C41ACED6A779BAAA0A51A7 /* Pods-Runner.release-pre.xcconfig */;
buildSettings = {
CODE_SIGN_IDENTITY = "Apple Development: Tian Sky (33RZ5UJ9WP)";
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = 7D53BZAN75;
PRODUCT_NAME = Runner;
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
@ -785,8 +776,6 @@
isa = XCBuildConfiguration;
baseConfigurationReference = 4A63B2C308CB401731950EC8 /* Pods-Runner.debug-sky.xcconfig */;
buildSettings = {
CODE_SIGN_IDENTITY = "Apple Development: Tian Sky (33RZ5UJ9WP)";
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = 7D53BZAN75;
PRODUCT_NAME = Runner;
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
@ -800,8 +789,6 @@
isa = XCBuildConfiguration;
baseConfigurationReference = 8CD96970DEA44F6CC71DEECE /* Pods-Runner.profile-sky.xcconfig */;
buildSettings = {
CODE_SIGN_IDENTITY = "Apple Development: Tian Sky (33RZ5UJ9WP)";
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = 7D53BZAN75;
PRODUCT_NAME = Runner;
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
@ -815,8 +802,6 @@
isa = XCBuildConfiguration;
baseConfigurationReference = 16A83D21DFB231D8453DC681 /* Pods-Runner.release-sky.xcconfig */;
buildSettings = {
CODE_SIGN_IDENTITY = "Apple Development: Tian Sky (33RZ5UJ9WP)";
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = 7D53BZAN75;
PRODUCT_NAME = Runner;
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
@ -830,8 +815,6 @@
isa = XCBuildConfiguration;
baseConfigurationReference = 22D858E988707FF26E068457 /* Pods-Runner.debug-xhj.xcconfig */;
buildSettings = {
CODE_SIGN_IDENTITY = "Apple Development: Tian Sky (33RZ5UJ9WP)";
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = 7D53BZAN75;
PRODUCT_NAME = Runner;
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
@ -845,8 +828,6 @@
isa = XCBuildConfiguration;
baseConfigurationReference = D62237D2D011BDC27FB2BC28 /* Pods-Runner.profile-xhj.xcconfig */;
buildSettings = {
CODE_SIGN_IDENTITY = "Apple Development: Tian Sky (33RZ5UJ9WP)";
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = 7D53BZAN75;
PRODUCT_NAME = Runner;
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
@ -860,8 +841,6 @@
isa = XCBuildConfiguration;
baseConfigurationReference = CDC2B8ED804B514A774F187D /* Pods-Runner.release-xhj.xcconfig */;
buildSettings = {
CODE_SIGN_IDENTITY = "Apple Development: Tian Sky (33RZ5UJ9WP)";
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = 7D53BZAN75;
PRODUCT_NAME = Runner;
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
@ -999,7 +978,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CODE_SIGN_IDENTITY = "Apple Development: Tian Sky (33RZ5UJ9WP)";
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
DEVELOPMENT_TEAM = 7D53BZAN75;
@ -1674,7 +1653,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CODE_SIGN_IDENTITY = "Apple Development: Tian Sky (33RZ5UJ9WP)";
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
DEVELOPMENT_TEAM = 7D53BZAN75;
@ -1819,7 +1798,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CODE_SIGN_IDENTITY = "Apple Development: Tian Sky (33RZ5UJ9WP)";
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
DEVELOPMENT_TEAM = 7D53BZAN75;

View File

@ -4,6 +4,7 @@ import 'package:flutter_easyloading/flutter_easyloading.dart';
import 'package:flutter_reactive_ble/flutter_reactive_ble.dart';
import 'package:star_lock/main/lockDetail/doorLockLog/doorLockLog_state.dart';
import 'package:star_lock/main/lockDetail/lockOperatingRecord/lockOperatingRecordGetLastRecordTime_entity.dart';
import 'package:star_lock/tools/eventBusEventManage.dart';
import '../../../blue/blue_manage.dart';
import '../../../blue/io_protocol/io_referEventRecordTime.dart';
@ -100,7 +101,7 @@ class DoorLockLogLogic extends BaseGetXController {
uploadList.add(indexMap);
}
lockRecordUploadData(uploadList);
// print("reply.data:${reply.data} getList:$getList}");
print("reply.data:${reply.data} getList:$getList}");
}
break;
case 0x06:
@ -198,6 +199,28 @@ class DoorLockLogLogic extends BaseGetXController {
} else {}
}
///
StreamSubscription? _getDoorLockLogListRefreshUIEvent;
void _getDoorLockLogListRefreshUIAction() {
_getDoorLockLogListRefreshUIEvent =
eventBus.on<DoorLockLogListRefreshUI>().listen((event) {
// startDate为当天的0点
state.startDate.value = DateTime(event.getDoorLockLogTime.year,
event.getDoorLockLogTime.month, event.getDoorLockLogTime.day)
.millisecondsSinceEpoch;
// endDate为下一天的0点1
state.endDate.value = (DateTime(
event.getDoorLockLogTime.year,
event.getDoorLockLogTime.month,
event.getDoorLockLogTime.day + 1)
.subtract(const Duration(milliseconds: 1)))
.millisecondsSinceEpoch;
pageNo = 1;
mockNetworkDataRequest();
});
}
//
void getLockRecordLastUploadDataTime() async {
LockOperatingRecordGetLastRecordTimeEntity entity = await ApiRepository.to
@ -236,12 +259,11 @@ class DoorLockLogLogic extends BaseGetXController {
//
var isDemoMode = await Storage.getBool(ifIsDemoModeOrNot);
if (isDemoMode == false) {
// _initReplySubscription();
_initReplySubscription();
// mockNetworkDataRequest();
mockNetworkDataRequest();
_getDoorLockLogListRefreshUIAction();
}
mockNetworkDataRequest();
}
@override
@ -257,6 +279,15 @@ class DoorLockLogLogic extends BaseGetXController {
// senderReferEventRecordTime();
// senderReferEventRecordNumber();
}
DateTime now = DateTime.now();
// startDate为当天的0点
state.startDate.value =
DateTime(now.year, now.month, now.day).millisecondsSinceEpoch;
// endDate为下一天的0点1
state.endDate.value = (DateTime(now.year, now.month, now.day + 1)
.subtract(const Duration(milliseconds: 1)))
.millisecondsSinceEpoch;
}
@override
@ -264,10 +295,11 @@ class DoorLockLogLogic extends BaseGetXController {
// TODO: implement onClose
super.onClose();
//
// var isDemoMode = await Storage.getBool(ifIsDemoModeOrNot);
// if (isDemoMode == false) {
// _replySubscription.cancel();
// }
//
var isDemoMode = await Storage.getBool(ifIsDemoModeOrNot);
if (isDemoMode == false) {
_replySubscription.cancel();
_getDoorLockLogListRefreshUIEvent?.cancel();
}
}
}

View File

@ -66,17 +66,15 @@ class _DoorLockLogPageState extends State<DoorLockLogPage> {
endIndent: 30.w,
),
eventDropDownWidget(),
Expanded(child: timeLineView())
// Expanded(
// // Expanded ListView
// child: ListView.builder(
// itemBuilder: (context, index) {
// // ListView
// return timeLineView();
// },
// itemCount: 5, //
// ),
// ),
// Expanded(child: timeLineView())
Expanded(
child: ListView.builder(
itemBuilder: (context, index) {
return timeLineView();
},
itemCount: state.lockOperatingRecordListData.value.length,
),
),
],
),
);
@ -135,6 +133,7 @@ class _DoorLockLogPageState extends State<DoorLockLogPage> {
valueChanged: (value) {
print('dropdownValue选中了$value');
state.dropdownValue.value = int.parse(value);
logic.mockNetworkDataRequest();
})),
],
),

View File

@ -28,6 +28,9 @@ class WeekDays extends StatelessWidget {
children: List.generate(weekNames.length, (index) {
return DateBox(
child: Text(weekNames[index]),
onPressed: () {
print('****Week day $index pressed');
},
);
}),
),

View File

@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:intl/date_symbol_data_local.dart';
import 'package:intl/intl.dart';
import 'package:star_lock/tools/eventBusEventManage.dart';
import 'controller.dart';
import 'datetime_util.dart';
@ -231,6 +232,8 @@ class _AdvancedCalendarState extends State<AdvancedCalendar>
child: ValueListenableBuilder<DateTime>(
valueListenable: _controller,
builder: (_, selectedDate, __) {
print('****selectedDate: $selectedDate');
eventBus.fire(DoorLockLogListRefreshUI(selectedDate));
return Stack(
alignment: Alignment.center,
children: [

View File

@ -99,3 +99,9 @@ class ElectronicKeyListRefreshUI {
class AuthorizedAdminPageRefreshUI {
AuthorizedAdminPageRefreshUI();
}
///
class DoorLockLogListRefreshUI {
DateTime getDoorLockLogTime;
DoorLockLogListRefreshUI(this.getDoorLockLogTime);
}