fix:修复 其他-授权管理员-电子钥匙里的授权管理员详情多了取消授权
This commit is contained in:
parent
408f2e46b7
commit
af2ef694df
@ -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; //普通钥匙
|
||||
}
|
||||
|
||||
@ -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>[
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user