fix:修复添加员工密码后四位没有****号显示

This commit is contained in:
anfe 2024-05-18 15:58:50 +08:00
parent f60613a549
commit 0df385cba2
2 changed files with 174 additions and 114 deletions

View File

@ -11,7 +11,6 @@ import 'package:star_lock/main/lockMian/lockMain/lockMain_logic.dart';
import 'package:star_lock/tools/app_manager.dart'; import 'package:star_lock/tools/app_manager.dart';
import 'package:star_lock/tools/bindings/app_binding.dart'; import 'package:star_lock/tools/bindings/app_binding.dart';
import 'package:star_lock/tools/storage.dart'; import 'package:star_lock/tools/storage.dart';
import 'package:star_lock/tools/xs_jPhush.dart';
import 'package:star_lock/translations/app_dept.dart'; import 'package:star_lock/translations/app_dept.dart';
import 'package:star_lock/translations/trans_lib.dart'; import 'package:star_lock/translations/trans_lib.dart';
@ -19,7 +18,6 @@ import 'package:star_lock/translations/trans_lib.dart';
import 'appRouters.dart'; import 'appRouters.dart';
import 'baseWidget.dart'; import 'baseWidget.dart';
import 'tools/appRouteObserver.dart'; import 'tools/appRouteObserver.dart';
import 'dart:io';
import 'tools/store_service.dart'; import 'tools/store_service.dart';
@ -38,24 +36,25 @@ class _MyAppState extends State<MyApp> with WidgetsBindingObserver, BaseWidget {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return ScreenUtilInit( return ScreenUtilInit(
designSize: const Size(585, 1265), designSize: const Size(585, 1265),
builder: (w, a) => _initMaterialApp()); builder: (BuildContext w, Widget? a) => _initMaterialApp());
} }
GetMaterialApp _initMaterialApp() => GetMaterialApp( GetMaterialApp _initMaterialApp() => GetMaterialApp(
// enableLog: false, // enableLog: false,
title: F.navTitle, title: F.navTitle,
navigatorObservers: [AppRouteObserver().routeObserver], navigatorObservers: <NavigatorObserver>[AppRouteObserver().routeObserver],
translations: TranslationMessage(), translations: TranslationMessage(),
supportedLocales: appDept.deptSupportedLocales, supportedLocales: appDept.deptSupportedLocales,
localizationsDelegates: const [ localizationsDelegates: const <LocalizationsDelegate<dynamic>>[
GlobalMaterialLocalizations.delegate, GlobalMaterialLocalizations.delegate,
GlobalCupertinoLocalizations.delegate, GlobalCupertinoLocalizations.delegate,
GlobalWidgetsLocalizations.delegate, GlobalWidgetsLocalizations.delegate,
], ],
localeResolutionCallback: (locale, supportedLocales) { localeResolutionCallback:
(Locale? locale, Iterable<Locale> supportedLocales) {
if (!supportedLocales.contains(locale)) { if (!supportedLocales.contains(locale)) {
int idx = appSupportedLocales.indexWhere( final int idx = appSupportedLocales.indexWhere(
(element) => element.languageCode == locale!.languageCode); (Locale element) => element.languageCode == locale!.languageCode);
if (idx != -1) { if (idx != -1) {
locale = appSupportedLocales[idx]; locale = appSupportedLocales[idx];
} else { } else {
@ -68,7 +67,7 @@ class _MyAppState extends State<MyApp> with WidgetsBindingObserver, BaseWidget {
}, },
locale: StoreService.to.getLanguageCode()!.isNotEmpty locale: StoreService.to.getLanguageCode()!.isNotEmpty
? appDept.deptSupportedLocales ? appDept.deptSupportedLocales
.where((element) => .where((Locale element) =>
element.languageCode == StoreService.to.getLanguageCode()) element.languageCode == StoreService.to.getLanguageCode())
.first .first
: Get.deviceLocale, : Get.deviceLocale,
@ -148,7 +147,7 @@ class _MyAppState extends State<MyApp> with WidgetsBindingObserver, BaseWidget {
} }
Future<bool> getLoginStatus() async { Future<bool> getLoginStatus() async {
final data = await Storage.getString(saveUserLoginData); final String? data = await Storage.getString(saveUserLoginData);
if (data != null && data.isNotEmpty) { if (data != null && data.isNotEmpty) {
return true; return true;
} }

View File

@ -2,6 +2,8 @@ import 'package:flutter/material.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
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:star_lock/main/lockDetail/checkingIn/checkingInStaff/checkingInSetAddStaff/checkingInAddStaffSelectKey_entity.dart';
import 'package:star_lock/main/lockDetail/checkingIn/checkingInStaff/checkingInSetAddStaff/checkingInAddStaff_state.dart';
import '../../../../../appRouters.dart'; import '../../../../../appRouters.dart';
import '../../../../../app_settings/app_colors.dart'; import '../../../../../app_settings/app_colors.dart';
@ -20,8 +22,9 @@ class CheckingInAddStaffPage extends StatefulWidget {
} }
class _CheckingInAddStaffPageState extends State<CheckingInAddStaffPage> { class _CheckingInAddStaffPageState extends State<CheckingInAddStaffPage> {
final logic = Get.put(CheckingInAddStaffLogic()); final CheckingInAddStaffLogic logic = Get.put(CheckingInAddStaffLogic());
final state = Get.find<CheckingInAddStaffLogic>().state; final CheckingInAddStaffState state =
Get.find<CheckingInAddStaffLogic>().state;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -33,11 +36,11 @@ class _CheckingInAddStaffPageState extends State<CheckingInAddStaffPage> {
haveBack: true, haveBack: true,
backgroundColor: AppColors.mainColor), backgroundColor: AppColors.mainColor),
body: Column( body: Column(
children: [ children: <Widget>[
// //
CommonItem( CommonItem(
leftTitel: TranslationLoader.lanKeys!.name!.tr, leftTitel: TranslationLoader.lanKeys!.name!.tr,
rightTitle: "", rightTitle: '',
isHaveLine: true, isHaveLine: true,
isHaveRightWidget: true, isHaveRightWidget: true,
rightWidget: getTFWidget( rightWidget: getTFWidget(
@ -50,35 +53,42 @@ class _CheckingInAddStaffPageState extends State<CheckingInAddStaffPage> {
isHaveLine: false, isHaveLine: false,
isHaveDirection: true, isHaveDirection: true,
action: () { action: () {
var list = ["APP", "密码".tr, "".tr, "指纹".tr]; final List<String> list = <String>[
if(state.getKeyInfosData.value.lockName!.contains("T9A")){ 'APP',
list.add("人脸".tr); '密码'.tr,
''.tr,
'指纹'.tr
];
if (state.getKeyInfosData.value.lockName!.contains('T9A')) {
list.add('人脸'.tr);
} }
_showSelectClockInType(list, list, "1", "选择钥匙".tr); _showSelectClockInType(list, list, '1', '选择钥匙'.tr);
})), })),
SizedBox(height: 10.h), SizedBox(height: 10.h),
//App //App
Obx(() => CommonItem( Obx(() => CommonItem(
leftTitel: addStaffGetIfHaveKey(), leftTitel: addStaffGetIfHaveKey(),
rightTitle: "", rightTitle: '',
isHaveLine: true, isHaveLine: true,
isHaveRightWidget: true, isHaveRightWidget: true,
rightWidget: Row( rightWidget: Row(
children: [ children: <Widget>[
whetherTheEmployeeHasAKeyWidget("".tr, state.appUnHaveAccount.value, () { whetherTheEmployeeHasAKeyWidget(
''.tr, state.appUnHaveAccount.value, () {
setState(() { setState(() {
state.appUnHaveAccount.value = true; state.appUnHaveAccount.value = true;
state.attendanceWayNumber.value = ""; state.attendanceWayNumber.value = '';
logic.isCanClickAction(); logic.isCanClickAction();
}); });
}), }),
SizedBox( SizedBox(
width: 30.w, width: 30.w,
), ),
whetherTheEmployeeHasAKeyWidget("".tr, !state.appUnHaveAccount.value, () { whetherTheEmployeeHasAKeyWidget(
''.tr, !state.appUnHaveAccount.value, () {
setState(() { setState(() {
state.appUnHaveAccount.value = false; state.appUnHaveAccount.value = false;
state.attendanceWayNumber.value = ""; state.attendanceWayNumber.value = '';
logic.isCanClickAction(); logic.isCanClickAction();
}); });
}), }),
@ -86,12 +96,15 @@ class _CheckingInAddStaffPageState extends State<CheckingInAddStaffPage> {
))), ))),
// App时且没有钥匙的时候 // App时且没有钥匙的时候
Obx(() => Visibility( Obx(() => Visibility(
visible: (state.appUnHaveAccount.value && state.selectPrintingMethodType.value == "1") ? true : false, visible: (state.appUnHaveAccount.value &&
state.selectPrintingMethodType.value == '1')
? true
: false,
child: Column( child: Column(
children: [ children: <Widget>[
CommonItem( CommonItem(
leftTitel: TranslationLoader.lanKeys!.accountNumber!.tr, leftTitel: TranslationLoader.lanKeys!.accountNumber!.tr,
rightTitle: "", rightTitle: '',
isHaveLine: true, isHaveLine: true,
isHaveRightWidget: true, isHaveRightWidget: true,
rightWidget: getTFWidget( rightWidget: getTFWidget(
@ -100,7 +113,7 @@ class _CheckingInAddStaffPageState extends State<CheckingInAddStaffPage> {
CommonItem( CommonItem(
leftTitel: leftTitel:
TranslationLoader.lanKeys!.countryAndRegion!.tr, TranslationLoader.lanKeys!.countryAndRegion!.tr,
rightTitle: "", rightTitle: '',
isHaveLine: true, isHaveLine: true,
isHaveRightWidget: true, isHaveRightWidget: true,
isHaveDirection: true, isHaveDirection: true,
@ -112,7 +125,7 @@ class _CheckingInAddStaffPageState extends State<CheckingInAddStaffPage> {
color: AppColors.darkGrayTextColor), color: AppColors.darkGrayTextColor),
), ),
action: () async { action: () async {
var result = await Navigator.pushNamed( final Object? result = await Navigator.pushNamed(
context, Routers.selectCountryRegionPage); context, Routers.selectCountryRegionPage);
if (result != null) { if (result != null) {
result as Map<String, dynamic>; result as Map<String, dynamic>;
@ -127,103 +140,128 @@ class _CheckingInAddStaffPageState extends State<CheckingInAddStaffPage> {
)), )),
// //
Obx(() => Visibility( Obx(() => Visibility(
visible: (state.selectPrintingMethodType.value != "1" && state.appUnHaveAccount.value) ? true : false, visible: state.selectPrintingMethodType.value != '1' &&
state.appUnHaveAccount.value,
child: CommonItem( child: CommonItem(
leftTitel: addStaffGetKeyType(), leftTitel: addStaffGetKeyType(),
isHaveLine: false, isHaveLine: false,
isHaveRightWidget: true, isHaveRightWidget: true,
rightWidget: Row( rightWidget: Row(
children: [ children: <Widget>[
Obx(() => Text(state.attendanceWayNumber.value, style: TextStyle(fontSize: 24.sp))), Obx(() => Text(state.attendanceWayNumber.value,
style: TextStyle(fontSize: 24.sp))),
SizedBox(width: 30.w), SizedBox(width: 30.w),
GestureDetector( GestureDetector(
onTap: () async { onTap: () async {
switch (int.parse(state.selectPrintingMethodType.value)) { switch (int.parse(
state.selectPrintingMethodType.value)) {
case 2: case 2:
// //
logic.getKeyboardPwdRequest(); logic.getKeyboardPwdRequest();
break; break;
case 3: case 3:
// //
if (state.staffNameController.text.isEmpty) { if (state.staffNameController.text.isEmpty) {
logic.showToast("请输入姓名".tr); logic.showToast('请输入姓名'.tr);
return; return;
} }
var data = await Get.toNamed( final data = await Get.toNamed(
Routers.addCardPage, Routers.addCardPage,
arguments: { arguments: <String, Object?>{
"lockId": state.getKeyInfosData.value.lockId, 'lockId':
"fromType": 2, // 1 2 state.getKeyInfosData.value.lockId,
"fromTypeTwoStaffName": state.staffNameController.text 'fromType': 2, // 1 2
'fromTypeTwoStaffName':
state.staffNameController.text
}); });
if (data != null) { if (data != null) {}
}
break; break;
case 4: case 4:
// //
if (state.staffNameController.text.isEmpty) { if (state.staffNameController.text.isEmpty) {
logic.showToast("请输入姓名".tr); logic.showToast('请输入姓名'.tr);
return; return;
} }
var data = await Get.toNamed( final data = await Get.toNamed(
Routers.addFingerprintTypePage, Routers.addFingerprintTypePage,
arguments: { arguments: <String, Object?>{
"lockId": state.getKeyInfosData.value.lockId, 'lockId':
"fromType": 2, // 1 2 state.getKeyInfosData.value.lockId,
"fromTypeTwoStaffName": state.staffNameController.text 'fromType': 2, // 1 2
'fromTypeTwoStaffName':
state.staffNameController.text
}); });
if (data != null) { if (data != null) {}
}
break; break;
case 5: case 5:
Get.toNamed(Routers.addFaceTypePage, arguments: { Get.toNamed(Routers.addFaceTypePage,
"lockId": state.getKeyInfosData.value.lockId, arguments: <String, Object?>{
"fromType": 2, // 1 2 'lockId':
"fromTypeTwoStaffName": state.staffNameController.text state.getKeyInfosData.value.lockId,
}); 'fromType': 2, // 1 2
'fromTypeTwoStaffName':
state.staffNameController.text
});
break; break;
} }
}, },
child: Container( child: Container(
height: 40.h, height: 40.h,
padding: EdgeInsets.only(left: 25.w, right: 25.w, top: 2.h), padding: EdgeInsets.only(
left: 25.w, right: 25.w, top: 2.h),
decoration: BoxDecoration( decoration: BoxDecoration(
color: AppColors.mainColor, color: AppColors.mainColor,
borderRadius: BorderRadius.circular(20.h), borderRadius: BorderRadius.circular(20.h),
), ),
child: Text(addStaffSelectKeyType(), textAlign: TextAlign.center, child: Text(addStaffSelectKeyType(),
style: TextStyle(color: Colors.white, fontSize: 22.sp) textAlign: TextAlign.center,
), style: TextStyle(
color: Colors.white, fontSize: 22.sp)),
), ),
), ),
], ],
)), )),
)), )),
// //
Obx(() => Visibility( Obx(() {
visible: !state.appUnHaveAccount.value, final bool isPass = state.selectPrintingMethodType.value == '2';
child: CommonItem( String rightTitle = state.attendanceWayNumber.value;
leftTitel: addStaffGetKeyType(), if (isPass) {
rightTitle: state.attendanceWayNumber.value, rightTitle = showPass(rightTitle);
isHaveLine: false, }
isHaveDirection: true, return Visibility(
action: () { visible: !state.appUnHaveAccount.value,
logic.addStaffSelectKey((v) { child: CommonItem(
var showList = []; leftTitel: addStaffGetKeyType(),
List numberList = []; rightTitle: rightTitle,
for (var element in v) { isHaveLine: false,
showList.add("${element.staffName}-${element.attendanceWay}"); isHaveDirection: true,
numberList.add(element.attendanceWay); action: () {
logic.addStaffSelectKey(
(List<CheckingInAddStaffKeyEntity> v) {
final List<String> showList = <String>[];
final List<String> numberList = <String>[];
for (final CheckingInAddStaffKeyEntity element in v) {
final bool isPass =
state.selectPrintingMethodType.value == '2';
String attendanceWay = element.attendanceWay ?? '';
if (isPass) {
attendanceWay = showPass(attendanceWay);
} }
_showSelectClockInType(showList, numberList, "2", addStaffSelectKeySelectClockInType()); final String text =
}); '${element.staffName}-$attendanceWay';
}), showList.add(text);
)), numberList.add(element.attendanceWay ?? '');
}
_showSelectClockInType(showList, numberList, '2',
addStaffSelectKeySelectClockInType());
});
}),
);
}),
SizedBox(height: 50.w), SizedBox(height: 50.w),
Obx(() => SubmitBtn( Obx(() => SubmitBtn(
btnName: TranslationLoader.lanKeys!.sure!.tr, btnName: TranslationLoader.lanKeys!.sure!.tr,
@ -231,25 +269,38 @@ class _CheckingInAddStaffPageState extends State<CheckingInAddStaffPage> {
margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w), margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w),
padding: EdgeInsets.only(top: 25.w, bottom: 25.w), padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
isDisabled: state.isCanClick.value, isDisabled: state.isCanClick.value,
onClick: state.isCanClick.value ? (){ onClick: state.isCanClick.value
if (state.isAdd.value == "2") { ? () {
logic.editStaffLoadData(); if (state.isAdd.value == '2') {
} else { logic.editStaffLoadData();
logic.addStaffLoadData(); } else {
} logic.addStaffLoadData();
}: null)) }
}
: null))
], ],
), ),
); );
} }
//
String showPass(String text) {
final int length = text.length;
if (length > 4) {
return text.substring(0, length - 4) + '****';
} else if (length > 00) {
return '****';
}
return '';
}
Widget getTFWidget(String tfStr, TextEditingController tf) { Widget getTFWidget(String tfStr, TextEditingController tf) {
return SizedBox( return SizedBox(
// height: 50.h, // height: 50.h,
width: 300.w, width: 300.w,
// color: Colors.red, // color: Colors.red,
child: Row( child: Row(
children: [ children: <Widget>[
Expanded( Expanded(
child: TextField( child: TextField(
// //
@ -258,11 +309,12 @@ class _CheckingInAddStaffPageState extends State<CheckingInAddStaffPage> {
FilteringTextInputFormatter.deny('\n'), FilteringTextInputFormatter.deny('\n'),
// LengthLimitingTextInputFormatter(30), // LengthLimitingTextInputFormatter(30),
], ],
style: TextStyle(fontSize: 22.sp, color: AppColors.darkGrayTextColor), style: TextStyle(
fontSize: 22.sp, color: AppColors.darkGrayTextColor),
controller: tf, controller: tf,
autofocus: false, autofocus: false,
textAlign: TextAlign.end, textAlign: TextAlign.end,
onChanged: (v) { onChanged: (String v) {
logic.changeInput(tf); logic.changeInput(tf);
}, },
decoration: InputDecoration( decoration: InputDecoration(
@ -270,10 +322,18 @@ class _CheckingInAddStaffPageState extends State<CheckingInAddStaffPage> {
// contentPadding: const EdgeInsets.only(top: 12.0, bottom: 8.0), // contentPadding: const EdgeInsets.only(top: 12.0, bottom: 8.0),
hintText: tfStr, hintText: tfStr,
hintStyle: TextStyle(fontSize: 22.sp), hintStyle: TextStyle(fontSize: 22.sp),
focusedBorder: const OutlineInputBorder(borderSide: BorderSide(width: 0, color: Colors.transparent)), focusedBorder: const OutlineInputBorder(
disabledBorder: const OutlineInputBorder(borderSide: BorderSide(width: 0, color: Colors.transparent)), borderSide:
enabledBorder: const OutlineInputBorder(borderSide: BorderSide(width: 0, color: Colors.transparent)), BorderSide(width: 0, color: Colors.transparent)),
border: const OutlineInputBorder(borderSide: BorderSide(width: 0, color: Colors.transparent)), disabledBorder: const OutlineInputBorder(
borderSide:
BorderSide(width: 0, color: Colors.transparent)),
enabledBorder: const OutlineInputBorder(
borderSide:
BorderSide(width: 0, color: Colors.transparent)),
border: const OutlineInputBorder(
borderSide:
BorderSide(width: 0, color: Colors.transparent)),
contentPadding: const EdgeInsets.symmetric(vertical: 0), contentPadding: const EdgeInsets.symmetric(vertical: 0),
), ),
), ),
@ -284,7 +344,8 @@ class _CheckingInAddStaffPageState extends State<CheckingInAddStaffPage> {
} }
// type 1 2 // type 1 2
void _showSelectClockInType(List showList, List numberList, String showBottomSheetToolType, String title) { void _showSelectClockInType(List showList, List numberList,
String showBottomSheetToolType, String title) {
ShowBottomSheetTool().showSingleRowPicker( ShowBottomSheetTool().showSingleRowPicker(
// //
context, context,
@ -298,12 +359,12 @@ class _CheckingInAddStaffPageState extends State<CheckingInAddStaffPage> {
//adapter: PickerAdapter(), //adapter: PickerAdapter(),
data: showList, data: showList,
// //
clickCallBack: (int index, var str) { clickCallBack: (int index, Object str) {
setState(() { setState(() {
if (showBottomSheetToolType == "1") { if (showBottomSheetToolType == '1') {
state.selectPrintingMethodType.value = (index + 1).toString(); state.selectPrintingMethodType.value = (index + 1).toString();
state.selectPrintingMethodStr.value = str.toString(); state.selectPrintingMethodStr.value = str.toString();
state.attendanceWayNumber.value = ""; state.attendanceWayNumber.value = '';
} else { } else {
state.attendanceWayNumber.value = numberList[index].toString(); state.attendanceWayNumber.value = numberList[index].toString();
} }
@ -312,16 +373,17 @@ class _CheckingInAddStaffPageState extends State<CheckingInAddStaffPage> {
}); });
} }
Widget whetherTheEmployeeHasAKeyWidget(String title, bool appUnHaveAccount, Function() action) { Widget whetherTheEmployeeHasAKeyWidget(
String title, bool appUnHaveAccount, Function() action) {
return GestureDetector( return GestureDetector(
onTap: action, onTap: action,
child: Container( child: Container(
// width: 80.w, // width: 80.w,
height: 65.w, height: 65.w,
padding: EdgeInsets.only(left:10.w, right: 10.w), padding: EdgeInsets.only(left: 10.w, right: 10.w),
// color: Colors.red, // color: Colors.red,
child: Row( child: Row(
children: [ children: <Widget>[
Image.asset( Image.asset(
appUnHaveAccount appUnHaveAccount
? 'images/icon_round_select.png' ? 'images/icon_round_select.png'
@ -345,7 +407,7 @@ class _CheckingInAddStaffPageState extends State<CheckingInAddStaffPage> {
} }
String addStaffGetIfHaveKey() { String addStaffGetIfHaveKey() {
String title = ""; String title = '';
switch (int.parse(state.selectPrintingMethodType.value)) { switch (int.parse(state.selectPrintingMethodType.value)) {
case 1: case 1:
title = TranslationLoader.lanKeys!.whetherTheEmployeeHasAKey!.tr; title = TranslationLoader.lanKeys!.whetherTheEmployeeHasAKey!.tr;
@ -360,14 +422,14 @@ class _CheckingInAddStaffPageState extends State<CheckingInAddStaffPage> {
title = TranslationLoader.lanKeys!.whetherTheEmployeeHasFingerprint!.tr; title = TranslationLoader.lanKeys!.whetherTheEmployeeHasFingerprint!.tr;
break; break;
case 4: case 4:
title = "员工是否有人脸".tr; title = '员工是否有人脸'.tr;
break; break;
} }
return title; return title;
} }
String addStaffGetKeyType() { String addStaffGetKeyType() {
String title = ""; String title = '';
switch (int.parse(state.selectPrintingMethodType.value)) { switch (int.parse(state.selectPrintingMethodType.value)) {
case 1: case 1:
title = TranslationLoader.lanKeys!.accountNumber!.tr; title = TranslationLoader.lanKeys!.accountNumber!.tr;
@ -389,7 +451,7 @@ class _CheckingInAddStaffPageState extends State<CheckingInAddStaffPage> {
} }
String addStaffSelectKeyType() { String addStaffSelectKeyType() {
String title = ""; String title = '';
switch (int.parse(state.selectPrintingMethodType.value)) { switch (int.parse(state.selectPrintingMethodType.value)) {
case 1: case 1:
title = TranslationLoader.lanKeys!.getKey!.tr; title = TranslationLoader.lanKeys!.getKey!.tr;
@ -404,32 +466,31 @@ class _CheckingInAddStaffPageState extends State<CheckingInAddStaffPage> {
title = TranslationLoader.lanKeys!.getFingerprint!.tr; title = TranslationLoader.lanKeys!.getFingerprint!.tr;
break; break;
case 5: case 5:
title = "获取人脸".tr; title = '获取人脸'.tr;
break; break;
} }
return title; return title;
} }
String addStaffSelectKeySelectClockInType() { String addStaffSelectKeySelectClockInType() {
String title = ""; String title = '';
switch (int.parse(state.selectPrintingMethodType.value)) { switch (int.parse(state.selectPrintingMethodType.value)) {
case 1: case 1:
title = "选择钥匙".tr; title = '选择钥匙'.tr;
break; break;
case 2: case 2:
title = "选择密码".tr; title = '选择密码'.tr;
break; break;
case 3: case 3:
title = "选择卡".tr; title = '选择卡'.tr;
break; break;
case 4: case 4:
title = "选择指纹".tr; title = '选择指纹'.tr;
break; break;
case 5: case 5:
title = "选择人脸".tr; title = '选择人脸'.tr;
break; break;
} }
return title; return title;
} }
} }