diff --git a/fir_client/src/components/user/FirSuperSignBase.vue b/fir_client/src/components/user/FirSuperSignBase.vue index 5b18e77..ab0c434 100644 --- a/fir_client/src/components/user/FirSuperSignBase.vue +++ b/fir_client/src/components/user/FirSuperSignBase.vue @@ -485,6 +485,7 @@ style="width: 30%;margin-right: 10px;margin-bottom: 10px"/>
@@ -877,6 +880,7 @@ placeholder="输入开发者用户ID" style="width: 30%;margin-right: 30px;margin-bottom: 10px"/> @@ -2498,7 +2502,7 @@ export default { data.appnamesearch = this.appnamesearch.replace(/^\s+|\s+$/g, ""); this.iosdevicerankFun({"methods": "GET", "data": data}) } else if (tabname === "iosudevices") { - data.devicestatus = this.devicestatus; + data.devicestatus = JSON.stringify(this.devicestatus); this.iosudevicesFun("GET", data) } else if (tabname === 'operatemsg') { data.operate_status = this.operatestatus; diff --git a/fir_ser/xsign/views/supersign.py b/fir_ser/xsign/views/supersign.py index 2f9f3d9..9f859d0 100644 --- a/fir_ser/xsign/views/supersign.py +++ b/fir_ser/xsign/views/supersign.py @@ -84,10 +84,10 @@ class DeveloperView(APIView): res.count = developer_obj.count() res.status_choices = get_choices_dict(AppIOSDeveloperInfo.status_choices, Config.DEVELOPER_DISABLED_STATUS) res.status_choices.extend([ - {'id': 'open_auto_check', 'name': '开启自动检测', 'disabled': False}, - {'id': 'close_auto_check', 'name': '关闭自动检测', 'disabled': False}, - {'id': 'open_abnormal_register', 'name': '开启设备异常状态注册', 'disabled': False}, - {'id': 'close_abnormal_register', 'name': '关闭设备异常状态注册', 'disabled': False}, + {'id': 'open_auto_check', 'name': '开启自动检测', 'disabled': False, 'ext': True}, + {'id': 'close_auto_check', 'name': '关闭自动检测', 'disabled': False, 'ext': True}, + {'id': 'open_abnormal_register', 'name': '开启设备异常状态注册', 'disabled': False, 'ext': True}, + {'id': 'close_abnormal_register', 'name': '关闭设备异常状态注册', 'disabled': False, 'ext': True}, ]) res.apple_auth_list = get_choices_dict(AppIOSDeveloperInfo.auth_type_choices) return Response(res.dict) @@ -113,12 +113,12 @@ class DeveloperView(APIView): run_queryset = AppIOSDeveloperInfo.objects.filter(user_id=request.user, status__in=Config.DEVELOPER_USE_STATUS).all() - devicestatus = data.get("devicestatus", '').strip() + devicestatus = data.get("devicestatus") udidsearch = data.get("udidsearch", '').strip() if udidsearch: run_queryset = run_queryset.filter(udidsyncdeveloper__udid=udidsearch) - if devicestatus: - run_queryset = run_queryset.filter(udidsyncdeveloper__status=devicestatus) + if devicestatus and isinstance(devicestatus, list): + run_queryset = run_queryset.filter(udidsyncdeveloper__status__in=devicestatus) for developer_s_obj in run_queryset.distinct(): pools.submit(run_task, developer_s_obj) @@ -509,7 +509,12 @@ class DeveloperDeviceView(APIView): device_status = request.query_params.get("devicestatus", None) super_sign_used_objs = UDIDsyncDeveloper.objects.filter(developerid__user_id=request.user, ) if device_status: - super_sign_used_objs = super_sign_used_objs.filter(status=device_status) + try: + device_status = json.loads(device_status) + if device_status is not None and isinstance(device_status, list) and device_status: + super_sign_used_objs = super_sign_used_objs.filter(status__in=device_status) + except Exception as e: + logger.warning(f'device status json load failed. Exception:{e} .{device_status}') if issuer_id: super_sign_used_objs = super_sign_used_objs.filter(developerid__issuer_id=issuer_id) if udid: