diff --git a/safesite/templates/examfigure.html b/safesite/templates/examfigure.html
new file mode 100644
index 00000000..ab227e46
--- /dev/null
+++ b/safesite/templates/examfigure.html
@@ -0,0 +1,268 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/safesite/templates/trainfigure.html b/safesite/templates/trainfigure.html
index ab227e46..68ec9739 100644
--- a/safesite/templates/trainfigure.html
+++ b/safesite/templates/trainfigure.html
@@ -229,19 +229,19 @@
-
+
-
+
-
-
+
+
+
+
-
-
diff --git a/safesite/urls.py b/safesite/urls.py
index 311468bf..24d3ac00 100644
--- a/safesite/urls.py
+++ b/safesite/urls.py
@@ -89,6 +89,7 @@ urlpatterns = [
path('riskas',views.riskas),
path('html/examhistory/
/',views.examhistory),
path('html/trainfig',views.trainfigure),
+ path('html/examfig',views.examfigure),
#html页面
diff --git a/safesite/views.py b/safesite/views.py
index 13f93d1c..0ff1e90d 100644
--- a/safesite/views.py
+++ b/safesite/views.py
@@ -243,6 +243,10 @@ def bhrhtml(req):
return render(req,'behavior.html')
def trainfigure(req):
return render(req,'trainfigure.html')
+def examfigure(req):
+ return render(req,'examfigure.html')
+
+
def check_login(func):
def warpper(request,*args,**kwargs):
is_login = request.session.get('userid', None)
@@ -6079,6 +6083,8 @@ def trainfg(req):
related.append(a.filter(traintype__dickeyid=108).count())
jobuser.append(a.filter(traintype__dickeyid=107).count())
return JsonResponse({'code':1,'daily':daily,'related':related,'jobuser':jobuser})
-
-
-
\ No newline at end of file
+ elif a=='trainuser':
+ a = Trainuser.objects.filter(participant__userid=userid)
+ total = a.count()
+ objs = a.annotate(count=Count('participant')).values('participant__username','count')
+ return HttpResponse(transjson(total,objs),content_type="application/json")
\ No newline at end of file