view password
This commit is contained in:
parent
b15dc5443c
commit
79db239eee
|
@ -107,6 +107,18 @@
|
|||
}
|
||||
});
|
||||
},
|
||||
'click .viewpw': function (e, value, row, index) {
|
||||
$.ajax({
|
||||
type: "get",
|
||||
url: "/groups/api/admininfo/"+row.partid+'/',
|
||||
data: {},
|
||||
//async: false, // ajax同步使用false
|
||||
success: function (data) {
|
||||
layer.alert(data.username + '/'+data.password)
|
||||
|
||||
}
|
||||
});
|
||||
},
|
||||
}
|
||||
|
||||
function totalTextFormatter(data) {
|
||||
|
|
|
@ -31,6 +31,7 @@ urlpatterns = [
|
|||
path('api/riskChart',views.riskChart),
|
||||
path('api/trainChart',views.trainChart),
|
||||
path('api/examChart',views.examChart),
|
||||
path('api/admininfo/<int:id>/', views.admininfo),
|
||||
|
||||
|
||||
path('rbac/role/', views_rbac.RoleView.as_view(), name='rbac_role'),
|
||||
|
|
|
@ -240,6 +240,9 @@ def company_userdetail(request, uid):
|
|||
|
||||
return render(request, 'groups/company_userdetail.html', locals())
|
||||
|
||||
def admininfo(request, id):
|
||||
user = s_models.User.objects.get(ubelongpart__partid=id,issuper=1)
|
||||
return JsonResponse({'username':user.username,'password':user.password})
|
||||
|
||||
def groups_userupdate(request):
|
||||
if request.method == 'POST':
|
||||
|
|
Loading…
Reference in New Issue