This commit is contained in:
caoqianming 2023-12-07 13:25:10 +08:00
commit a37097e324
17 changed files with 254274 additions and 11 deletions

2
.gitignore vendored
View File

@ -12,6 +12,8 @@ npm-debug.log*
yarn-debug.log*
yarn-error.log*
**/*.log
test_server/media/*
test_server/quota.dat
tests/**/coverage/
tests/e2e/reports

1
docs/ISsi1uCIiP.txt Normal file
View File

@ -0,0 +1 @@
4f04a87f0f966902d03e402267e5c805

View File

@ -209,8 +209,12 @@
<el-table-column label="单位" sortable="custom" prop="company">
<template
slot-scope="scope"
v-if="scope.row.company_name != null"
>{{ scope.row.company_name }}</template>
>
<span v-if="scope.row.company_name">{{ scope.row.company_name }}</span>
<span v-else>
<span v-if="scope.row.companyname">{{ scope.row.companyname }}</span>
</span>
</template>
</el-table-column>
<el-table-column label="工作类别" sortable="custom" prop="workscope">
<template slot-scope="scope">
@ -297,6 +301,9 @@
<el-button slot="append" icon="el-icon-search" @click="choose()"></el-button>
</el-input>
</el-form-item>
<el-form-item label="单位(自填)" prop="companyname">
<el-input v-model="consumer.companyname" placeholder="单位" />
</el-form-item>
<el-form-item label="缴费学科" prop="subjects">
<el-select v-model="consumer.subjects" placeholder="缴费学科" style="width:100%" multiple>
<el-option

View File

@ -23,18 +23,22 @@ class BasicCount(APIView):
ret={}
q1 = Consumer.objects.filter(is_delete=False)
q1 = q1.filter(create_time__gte = request.query_params.get('datestart')) if request.query_params.get('datestart', None) else q1
q1 = q1.filter(create_time__lte = request.query_params.get('dateend')) if request.query_params.get('dateend', None) else q1
ret['consumer1_count'] = q1.count()
q2 = Consumer.objects.filter(is_delete=False).exclude(create_admin=None)
q2 = q2.filter(create_time__gte = request.query_params.get('datestart')) if request.query_params.get('datestart', None) else q2
q2 = q2.filter(create_time__lte = request.query_params.get('dateend')) if request.query_params.get('dateend', None) else q2
ret['consumer2_count'] = q2.count()
q3 = ExamTest.objects.filter(is_delete=False)
q3 = q3.filter(create_time__gte = request.query_params.get('datestart')) if request.query_params.get('datestart', None) else q3
q3 = q3.filter(create_time__lte = request.query_params.get('dateend')) if request.query_params.get('dateend', None) else q3
ret['test_count'] = q3.count()
q4 = Question.objects.filter(is_delete=False)
q4 = q4.filter(create_time__gte = request.query_params.get('datestart')) if request.query_params.get('datestart', None) else q4
# q4 = q4.filter(create_time__gte = request.query_params.get('datestart')) if request.query_params.get('datestart', None) else q4
# q4 = q4.filter(create_time__lte = request.query_params.get('dateend')) if request.query_params.get('dateend', None) else q4
ret['question_count'] = q4.count()
return Response(ret)

View File

@ -14,11 +14,11 @@ def export_consumer(users):
wb = Workbook()
ws1 = wb.active
ws1.title = '用户表'
ws1.append(['姓名','手机号', '单位', '身份证号', '微信昵称', '工作类别', '用户角色', '创建日期', '所属账户'])
ws1.append(['姓名','手机号', '单位', '单位自填', '身份证号', '微信昵称', '工作类别', '用户角色', '创建日期', '所属账户'])
row = ws1.row_dimensions[1]
row.font = Font(bold=True)
for i in users:
ws1.append([i['name'], i['username'], i['company_name'], i['ID_number1'], i['nickname'], i['workscope_name'], i['role_name'], i['create_time'], i['create_admin_name']])
ws1.append([i['name'], i['username'], i['company_name'], i['companyname'], i['ID_number1'], i['nickname'], i['workscope_name'], i['role_name'], i['create_time'], i['create_admin_name']])
filename = 'users' + datetime.now().strftime("%Y%m%d%H%M%S") +'.xlsx'
path = '/media/export/' + filename
wb.save((BASE_DIR + path).replace('\\', '/'))

View File

@ -625,7 +625,7 @@ class ConsumerRegister(APIView):
# 默认一个工作类别
if not consumer.workscope:
try:
consumer.workscope = WorkScope.objects.filter(sortnum=1).order_by('id').first()
consumer.workscope = WorkScope.objects.filter(sortnum=0).order_by('id').first()
except:
pass
consumer.save()
@ -641,7 +641,7 @@ class ConsumerRegister(APIView):
# 默认一个工作类别
if not consumer.workscope:
try:
consumer.workscope = WorkScope.objects.filter(sortnum=1).order_by('id').first()
consumer.workscope = WorkScope.objects.filter(sortnum=0).order_by('id').first()
except:
pass
consumer.save()
@ -675,7 +675,10 @@ class WxphoneRegister(APIView):
if request.user.role.name =='游客':
request.user.role = ConsumerRole.objects.get(name='注册用户')
if not request.user.workscope:
request.user.workscope = WorkScope.objects.filter(sortnum=1).order_by('id').first()
try:
request.user.workscope = WorkScope.objects.filter(sortnum=0).order_by('id').first()
except:
pass
request.user.save()
return Response(status=status.HTTP_200_OK, data=ConsumerDetailSerializer(instance=request.user).data)

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

Binary file not shown.

View File

@ -134,6 +134,7 @@ USE_L10N = True
USE_TZ = True
# Static files (CSS, JavaScript, Images)
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/3.0/howto/static-files/

View File

@ -24,6 +24,23 @@ from utils.file import UploadFileView
from utils.view import redirect
urlpatterns = [
path('rbac/', include('rbac.urls')),
path('vod/', include('vod.urls')),
path('develop/', include('develop.urls')),
path('crm/', include('crm.urls')),
path('question/', include('question.urls')),
path('examtest/', include('examtest.urls')),
path('cms/', include('cms.urls')),
path('analyse/', include('analyse.urls')),
path('qtest/', include('qtest.urls')),
path('token/', obtain_jwt_token),
path('token/refresh/', refresh_jwt_token),
path('token/verify/', verify_jwt_token),
path('token/remove/', UserLogoutView.as_view()),
path('uploadfile/', UploadFileView.as_view()),
path('redirect/',redirect),
path('api/rbac/', include('rbac.urls')),
path('api/vod/', include('vod.urls')),
path('api/develop/', include('develop.urls')),