zuoye shenpi ren
This commit is contained in:
parent
84e06bdc45
commit
37799315bd
|
@ -35,8 +35,8 @@
|
||||||
<table id="example1" class="table table-bordered table-striped">
|
<table id="example1" class="table table-bordered table-striped">
|
||||||
<thead>
|
<thead>
|
||||||
<tr role="row">
|
<tr role="row">
|
||||||
<th class="sorting_asc" tabindex="0" aria-controls="example1" rowspan="1" colspan="1" style="width: 164.933px;" aria-sort="ascending"
|
<!-- <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>
|
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;"
|
<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>
|
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;"
|
<th class="sorting" tabindex="0" aria-controls="example1" rowspan="1" colspan="1" style="width: 179.933px;"
|
||||||
|
|
|
@ -518,11 +518,11 @@ def getspr(ubp):
|
||||||
|
|
||||||
def getsprs(userid,ubp):
|
def getsprs(userid,ubp):
|
||||||
currentpart=ubp
|
currentpart=ubp
|
||||||
a=getsprs_ubp(userid,currentpart)
|
a=getsprs_ubp2(userid,currentpart)
|
||||||
while a==False:
|
while a==False:
|
||||||
currentpart=currentpart.parentid #已找不到上级部门
|
currentpart=currentpart.parentid #已找不到上级部门
|
||||||
if currentpart:
|
if currentpart:
|
||||||
a=getsprs_ubp(userid,currentpart)
|
a=getsprs_ubp2(userid,currentpart)
|
||||||
else:
|
else:
|
||||||
return User.objects.get(ubelongpart=currentpart,issuper=1)
|
return User.objects.get(ubelongpart=currentpart,issuper=1)
|
||||||
return a
|
return a
|
||||||
|
@ -551,6 +551,16 @@ def getsprs_ubp(userid,ubp):
|
||||||
else:
|
else:
|
||||||
return False
|
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
|
@check_login
|
||||||
def menutree(req):
|
def menutree(req):
|
||||||
userid = req.session['userid']
|
userid = req.session['userid']
|
||||||
|
|
Loading…
Reference in New Issue