优化代码展示

dependabot/npm_and_yarn/fir_admin/async-2.6.4
nineven 2 years ago
parent dfcf213bed
commit 25c2ea4c7a
  1. 6
      fir_client/src/components/user/FirSuperSignBase.vue
  2. 21
      fir_ser/xsign/views/supersign.py

@ -485,6 +485,7 @@
style="width: 30%;margin-right: 10px;margin-bottom: 10px"/>
<el-select v-model="developer_choice" clearable placeholder="账户类型"
@change="handleCurrentChange(1)"
style="width: 18%;margin-right: 10px;margin-bottom: 10px">
<el-option
v-for="item in developer_options"
@ -536,9 +537,11 @@
<el-col :span="24">
<div>
<el-select v-model="developer_status_choice" clearable multiple
@change="handleCurrentChange(1)"
placeholder="账户状态" style="width: 49%;margin-right: 45px;margin-bottom: 10px">
<el-option
v-for="item in status_choices"
:hidden="item.ext"
:key="item.id"
:label="item.name"
:value="item.id">
@ -877,6 +880,7 @@
placeholder="输入开发者用户ID"
style="width: 30%;margin-right: 30px;margin-bottom: 10px"/>
<el-select v-if="status_choices" v-model="devicestatus" clearable placeholder="设备状态"
multiple
style="width: 120px;margin-right: 30px" @change="handleCurrentChange(1)">
<el-option v-for="item in device_status_choices" :key="item.id" :label="item.name" :value="item.id"/>
</el-select>
@ -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;

@ -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:

Loading…
Cancel
Save