修改卡、指纹、人脸、密码修改完锁详情内容之后,再修改日期,第一次修改内容重置的问题

This commit is contained in:
魏少阳 2024-06-05 16:38:43 +08:00
parent 9c8f722710
commit 25f4159706
4 changed files with 13 additions and 3 deletions

View File

@ -181,6 +181,9 @@ class CardDetailLogic extends BaseGetXController {
cardRight: state.isAdministrator.value ? 1 : 0, cardRight: state.isAdministrator.value ? 1 : 0,
); );
if (entity.errorCode!.codeIsSuccessful) { if (entity.errorCode!.codeIsSuccessful) {
state.fingerprintItemData.value.cardName = state.changeNameController.text;
state.fingerprintItemData.value.isCoerced = state.isStressCard.value ? 1 : 2;
state.fingerprintItemData.value.cardRight = state.isAdministrator.value ? 1 : 0;
showToast('修改成功'.tr, something: () { showToast('修改成功'.tr, something: () {
eventBus.fire(OtherTypeRefreshListEvent()); eventBus.fire(OtherTypeRefreshListEvent());
}); });

View File

@ -170,7 +170,7 @@ class FaceDetailLogic extends BaseGetXController {
faceName: state.changeNameController.text, faceName: state.changeNameController.text,
); );
if (entity.errorCode!.codeIsSuccessful) { if (entity.errorCode!.codeIsSuccessful) {
state.typeName.value = state.changeNameController.text; state.faceItemData.value.fingerprintName = state.changeNameController.text;
showToast('修改成功', something: () { showToast('修改成功', something: () {
Get.back(result: 'addScuess'); Get.back(result: 'addScuess');
}); });
@ -194,7 +194,9 @@ class FaceDetailLogic extends BaseGetXController {
faceRight: state.isAdministrator.value ? 1 : 0, faceRight: state.isAdministrator.value ? 1 : 0,
); );
if (entity.errorCode!.codeIsSuccessful) { if (entity.errorCode!.codeIsSuccessful) {
showToast('修改成功', something: () { state.faceItemData.value.isCoerced = state.isStressFace.value ? 1 : 2;
state.faceItemData.value.faceRight = state.isAdministrator.value ? 1 : 0;
showToast('修改成功'.tr, something: () {
Get.back(result: 'addScuess'); Get.back(result: 'addScuess');
}); });
} }
@ -203,7 +205,7 @@ class FaceDetailLogic extends BaseGetXController {
String getKeyTypeShowDateTime() { String getKeyTypeShowDateTime() {
String useDateStr = ''; String useDateStr = '';
if (state.keyType.value == 1) { if (state.keyType.value == 1) {
useDateStr = '永久'; useDateStr = '永久'.tr;
} else if (state.keyType.value == 2) { } else if (state.keyType.value == 2) {
useDateStr = useDateStr =
'${DateTool().dateToYMDHNString(state.startDate.value)}\n${DateTool().dateToYMDHNString(state.endDate.value)}'; '${DateTool().dateToYMDHNString(state.startDate.value)}\n${DateTool().dateToYMDHNString(state.endDate.value)}';

View File

@ -176,6 +176,9 @@ class FingerprintDetailLogic extends BaseGetXController{
fingerRight: state.isAdministrator.value ? 1 : 0, fingerRight: state.isAdministrator.value ? 1 : 0,
); );
if(entity.errorCode!.codeIsSuccessful){ if(entity.errorCode!.codeIsSuccessful){
state.fingerprintItemData.value.fingerprintName = state.changeNameController.text;
state.fingerprintItemData.value.isCoerced = state.isStressFingerprint.value ? 1 : 2;
state.fingerprintItemData.value.fingerRight = state.isAdministrator.value ? 1 : 0;
showToast('修改成功'.tr, something: (){ showToast('修改成功'.tr, something: (){
eventBus.fire(OtherTypeRefreshListEvent()); eventBus.fire(OtherTypeRefreshListEvent());
}); });

View File

@ -111,9 +111,11 @@ class PasswordKeyDetailLogic extends BaseGetXController {
if(changType == 1){ if(changType == 1){
// //
state.keyboardPwdName.value = state.inputNameController.text; state.keyboardPwdName.value = state.inputNameController.text;
state.itemData.value.keyboardPwdName = state.keyboardPwdName.value;
}else if(changType == 2){ }else if(changType == 2){
// //
state.keyboardPwd.value = state.inputPwdController.text; state.keyboardPwd.value = state.inputPwdController.text;
state.itemData.value.keyboardPwd = state.keyboardPwd.value;
} }
eventBus.fire(GetPasswordListRefreshUI()); eventBus.fire(GetPasswordListRefreshUI());
}); });