From 04ccfe77a339ddaf604bd185aa08fa70f673ae1c Mon Sep 17 00:00:00 2001 From: MMXX Date: Wed, 29 Dec 2021 16:06:40 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81=EF=BC=8C?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E8=8B=B9=E6=9E=9C=E8=B4=A6=E6=88=B7=E5=A4=87?= =?UTF-8?q?=E6=B3=A8=E6=9F=A5=E8=AF=A2=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/user/FirSuperSignBase.vue | 40 +++++++++++++++---- fir_ser/api/utils/crontab/ctasks.py | 2 +- fir_ser/api/views/supersign.py | 8 ++++ 3 files changed, 41 insertions(+), 9 deletions(-) diff --git a/fir_client/src/components/user/FirSuperSignBase.vue b/fir_client/src/components/user/FirSuperSignBase.vue index 62c96f6..945a4be 100644 --- a/fir_client/src/components/user/FirSuperSignBase.vue +++ b/fir_client/src/components/user/FirSuperSignBase.vue @@ -208,11 +208,11 @@ + placeholder="输入开发者ID或者备注或应用BundleID" + style="width: 30%;margin-right: 10px;margin-bottom: 10px"/> + style="width: 18%;margin-right: 10px;margin-bottom: 10px"> - - 搜索 - -
+ +
总设备量:{{ developer_used_info.all_usable_number }} 已使用:【平台:{{ developer_used_info.all_use_number }} 】【其他:{{ developer_used_info.other_used_sum }}】 @@ -238,6 +236,26 @@ type="line"/>
+ +
+ + + + + + 搜索 + +
+
+
+ + + 0 ? row.usable_number - row.developer_used_number : 0 }, @@ -1354,6 +1377,7 @@ export default { // this.dialogaddDeveloperVisible=true; } else if (tabname === "iosdeveloper") { data.developer_choice = this.developer_choice; + data.developer_status_choice = JSON.stringify(this.developer_status_choice); this.iosdeveloperFun({"methods": "GET", "data": data}) } else if (tabname === "devicesbill") { this.iosdevicebillFun({"methods": "GET", "data": data}) diff --git a/fir_ser/api/utils/crontab/ctasks.py b/fir_ser/api/utils/crontab/ctasks.py index eb98fb6..f00d213 100644 --- a/fir_ser/api/utils/crontab/ctasks.py +++ b/fir_ser/api/utils/crontab/ctasks.py @@ -65,7 +65,7 @@ def auto_delete_ios_mobile_tmp_file(): def auto_check_ios_developer_active(): - all_ios_developer = AppIOSDeveloperInfo.objects.filter(status=1) + all_ios_developer = AppIOSDeveloperInfo.objects.filter(status__in=[1, 2]) error_issuer_id = {} for ios_developer in all_ios_developer: userinfo = ios_developer.user_id diff --git a/fir_ser/api/views/supersign.py b/fir_ser/api/views/supersign.py index 5679cb0..bf58a09 100644 --- a/fir_ser/api/views/supersign.py +++ b/fir_ser/api/views/supersign.py @@ -4,6 +4,7 @@ # author: liuyu # date: 2020/3/4 import datetime +import json import logging from django.db.models import Count, Q, Sum @@ -43,12 +44,19 @@ class DeveloperView(APIView): res = BaseResponse() issuer_id = request.query_params.get("issuer_id", '') developer_choice = request.query_params.get("developer_choice", None) + developer_status_choice = request.query_params.get("developer_status_choice", None) developer_obj = AppIOSDeveloperInfo.objects.filter(user_id=request.user) if developer_choice and developer_choice in ['private', 'public']: if developer_choice == 'public': developer_obj = developer_obj.exclude(appledevelopertoappuse__developerid__isnull=False) else: developer_obj = developer_obj.filter(appledevelopertoappuse__developerid__isnull=False) + try: + status_choice = json.loads(developer_status_choice) + except Exception as e: + status_choice = None + if status_choice is not None and isinstance(status_choice, list) and status_choice: + developer_obj = developer_obj.filter(status__in=status_choice) developer_obj = developer_obj.distinct() res.use_num = get_developer_devices(developer_obj) if issuer_id: