fix:修复 其他-授权管理员-电子钥匙里的授权管理员详情多了取消授权

This commit is contained in:
anfe 2024-05-21 17:11:56 +08:00
parent 408f2e46b7
commit af2ef694df
2 changed files with 14 additions and 3 deletions

View File

@ -70,4 +70,13 @@ class XSConstantMacro {
static int catEyeWorkModeStayCapture = 2; //
static int catEyeWorkModeRealTimeMonitoring = 3; //
static int catEyeWorkModeCustom = 4; //
//
static int userTypeSuperAdmin = 110301; //
static int userTypeAuthorizedAdmin = 110302; //
//
static int keyRightAdmin = 1; //
static int keyRightOrdinary = 2; //
}

View File

@ -255,16 +255,18 @@ class ElectronicKeyDetailLogic extends BaseGetXController {
Future<void> openModalBottomSheet(BuildContext context) async {
List<String> textList = <String>[];
if (state.itemData.value.keyRight == 1) {
final bool isAdminKey = state.itemData.value.keyRight == 1;
final bool isLockOwner = CommonDataManage().currentKeyInfo.isLockOwner == 1;
if (isAdminKey) {
//
textList = <String>[
if (state.itemData.value.keyStatus == XSConstantMacro.keyStatusFrozen)
'取消冻结'.tr
else
'冻结'.tr,
// '取消授权'.tr
if (isLockOwner) '取消授权'.tr
];
} else if (CommonDataManage().currentKeyInfo.isLockOwner == 1) {
} else if (isLockOwner) {
//
if (state.keyType.value == 1 || state.keyType.value == 2) {
textList = <String>[