zuoye shenpi ren

This commit is contained in:
caoqianming 2019-11-05 18:48:23 +08:00
parent 84e06bdc45
commit 37799315bd
2 changed files with 14 additions and 4 deletions

View File

@ -35,8 +35,8 @@
<table id="example1" class="table table-bordered table-striped">
<thead>
<tr role="row">
<th class="sorting_asc" tabindex="0" aria-controls="example1" rowspan="1" colspan="1" style="width: 164.933px;" aria-sort="ascending"
aria-label="Rendering engine: activate to sort column descending">员工ID</th>
<!-- <th class="sorting_asc" tabindex="0" aria-controls="example1" rowspan="1" colspan="1" style="width: 164.933px;" aria-sort="ascending"
aria-label="Rendering engine: activate to sort column descending">员工ID</th> -->
<th class="sorting" tabindex="0" aria-controls="example1" rowspan="1" colspan="1" style="width: 204.15px;"
aria-label="Browser: activate to sort column ascending">员工名称</th>
<th class="sorting" tabindex="0" aria-controls="example1" rowspan="1" colspan="1" style="width: 179.933px;"

View File

@ -518,11 +518,11 @@ def getspr(ubp):
def getsprs(userid,ubp):
currentpart=ubp
a=getsprs_ubp(userid,currentpart)
a=getsprs_ubp2(userid,currentpart)
while a==False:
currentpart=currentpart.parentid #已找不到上级部门
if currentpart:
a=getsprs_ubp(userid,currentpart)
a=getsprs_ubp2(userid,currentpart)
else:
return User.objects.get(ubelongpart=currentpart,issuper=1)
return a
@ -551,6 +551,16 @@ def getsprs_ubp(userid,ubp):
else:
return False
def getsprs_ubp2(userid,ubp):
a=ubp
if a.aqy !=',' or a.bmzg !=',':
allstr = a.aqy + a.bmzg
alllist = allstr.split(',')
alist = list(map(int, list(filter(None, alllist))))
return alist
else:
return False
@check_login
def menutree(req):
userid = req.session['userid']