This commit is contained in:
parent
99f0ee7f7b
commit
08d344c2b5
|
@ -119,13 +119,17 @@ def api(req):
|
||||||
elif a == 'del':
|
elif a == 'del':
|
||||||
id =req.GET.get('id')
|
id =req.GET.get('id')
|
||||||
userid = req.session['userid']
|
userid = req.session['userid']
|
||||||
|
companyid = getcompany(userid)#公司ID
|
||||||
a = Edulesson.objects.get(id=id)
|
a = Edulesson.objects.get(id=id)
|
||||||
if User.objects.get(userid = userid).issuper == 1:
|
if a.usecomp==Partment.objects.get(partid=companyid):
|
||||||
a.deletemark=0
|
a.deletemark=0
|
||||||
a.save()
|
a.save()
|
||||||
return JsonResponse({"code":1})
|
return JsonResponse({"code":1})
|
||||||
|
|
||||||
else:
|
else:
|
||||||
|
|
||||||
return JsonResponse({"code":0})
|
return JsonResponse({"code":0})
|
||||||
|
|
||||||
#点击阅读
|
#点击阅读
|
||||||
elif a=='readnumber':
|
elif a=='readnumber':
|
||||||
id =req.GET.get('id')
|
id =req.GET.get('id')
|
||||||
|
|
|
@ -120,7 +120,7 @@
|
||||||
<tr>
|
<tr>
|
||||||
<td>所属类别:</td>
|
<td>所属类别:</td>
|
||||||
<td>
|
<td>
|
||||||
<input id="cate" class="easyui-combotree" name="cate" style="width:480px" data-options="url:'api/questioncat?a=tree2',loadFilter: function (rows) {
|
<input id="cate" class="easyui-combotree" name="cate" style="width:480px" data-options="url:'api/questioncat?a=tree',loadFilter: function (rows) {
|
||||||
return convert(rows);
|
return convert(rows);
|
||||||
},">
|
},">
|
||||||
</td>
|
</td>
|
||||||
|
|
|
@ -135,7 +135,7 @@
|
||||||
<tr>
|
<tr>
|
||||||
<td>所属类别:</td>
|
<td>所属类别:</td>
|
||||||
<td>
|
<td>
|
||||||
<input id="cate" class="easyui-combotree" name="cate" style="width:480px" data-options="url:'api/questioncat?a=tree2',loadFilter: function (rows) {
|
<input id="cate" class="easyui-combotree" name="cate" style="width:480px" data-options="url:'api/questioncat?a=tree',loadFilter: function (rows) {
|
||||||
return convert(rows);
|
return convert(rows);
|
||||||
},">
|
},">
|
||||||
</td>
|
</td>
|
||||||
|
|
Loading…
Reference in New Issue