导出excel进行数量限制,可能是导致系统崩溃的原因
This commit is contained in:
parent
08cfffa8c0
commit
dc204a95f3
|
|
@ -439,6 +439,10 @@ def exportxlsx(a,objs):
|
|||
wb.save(filepath)
|
||||
return url
|
||||
elif a=='ws':
|
||||
if objs.count()>100:
|
||||
res = HttpResponse()
|
||||
res.write('数量超过100,请查询后导出!')
|
||||
return res
|
||||
#查询数据
|
||||
wslist = objs.values('missnum','missplace','misstime','misser__name','description','prevent','misspart__partname','submittime','missimg','lesson')
|
||||
#写入数据
|
||||
|
|
@ -517,6 +521,10 @@ def exportxlsx(a,objs):
|
|||
res.write(output.getvalue())
|
||||
return res
|
||||
elif a=='jy':
|
||||
if objs.count()>100:
|
||||
res = HttpResponse()
|
||||
res.write('数量超过100,请查询后导出!')
|
||||
return res
|
||||
#查询数据
|
||||
jylist = objs.values('jynum','jylb__dickeyname','jyr__name','jybm__partname','dqxz','jynr','qwxg','submittime','jyimg','jyimg2','pgr__name','clr__name','jyfk','clcs','clms')
|
||||
#写入数据
|
||||
|
|
@ -568,6 +576,10 @@ def exportxlsx(a,objs):
|
|||
res.write(output.getvalue())
|
||||
return res
|
||||
elif a=='gc':
|
||||
if objs.count()>100:
|
||||
res = HttpResponse()
|
||||
res.write('数量超过100,请查询后导出!')
|
||||
return res
|
||||
#查询数据
|
||||
gclist = objs.values('looknum','lookplace','actname','looktime','looktime2','looker__name','lookeder','otherunsafe','safecontent','lookpart__partname','submittime','lookimg')
|
||||
#写入数据
|
||||
|
|
@ -612,6 +624,10 @@ def exportxlsx(a,objs):
|
|||
res.write(output.getvalue())
|
||||
return res
|
||||
elif a=='zy':
|
||||
if objs.count()>100:
|
||||
res = HttpResponse()
|
||||
res.write('数量超过100,请查询后导出!')
|
||||
return res
|
||||
#查询数据
|
||||
zylist = objs.values('zyid','zylx__dickeyname','zynum','zybm__partname','zyfzr__name','zynr','zyzt','submittime','kssj','jssj','zyimg','zyimg2')
|
||||
wb = load_workbook(dirname + 'safesite/exportemp/zy.xlsx')
|
||||
|
|
|
|||
|
|
@ -153,8 +153,7 @@
|
|||
}
|
||||
function exportwsexcel() {
|
||||
var querydata = $('#searchwsff').serializeJSON();
|
||||
console.log(querydata)
|
||||
let url = 'api/miss?a=exportexcel&'+parseParams(querydata)
|
||||
$('<form method="post" action="' + url + '"></form>').appendTo('body').submit().remove();
|
||||
window.open(url);
|
||||
}
|
||||
</script>
|
||||
|
|
@ -168,6 +168,6 @@
|
|||
function exportgcexcel() {
|
||||
var querydata = $('#searchgcff').serializeJSON();
|
||||
let url = 'gchandle?a=exportexcel&'+parseParams(querydata)
|
||||
$('<form method="post" action="' + url + '"></form>').appendTo('body').submit().remove();
|
||||
window.open(url);
|
||||
}
|
||||
</script>
|
||||
|
|
@ -165,8 +165,9 @@
|
|||
else { $.messager.alert('提示', '请选择一行数据!'); }
|
||||
}
|
||||
function exportzyexcel() {
|
||||
let url = 'api/operation?a=exportexcel'
|
||||
$('<form method="post" action="' + url + '"></form>').appendTo('body').submit().remove();
|
||||
var querydata = $('#searchzyff').serializeJSON();
|
||||
let url = 'api/operation?a=exportexcel'+parseParams(querydata)
|
||||
window.open(url);
|
||||
}
|
||||
function gbzy(){
|
||||
var row = $('#zytable').datagrid('getSelected');
|
||||
|
|
|
|||
|
|
@ -174,7 +174,7 @@
|
|||
function exportjyexcel() {
|
||||
var querydata = $('#searchjyff').serializeJSON();
|
||||
let url = 'api/suggest?a=exportexcel&'+parseParams(querydata)
|
||||
$('<form method="post" action="' + url + '"></form>').appendTo('body').submit().remove();
|
||||
window.open(url);
|
||||
|
||||
}
|
||||
function updatejy(){
|
||||
|
|
|
|||
Binary file not shown.
BIN
需求/惠东需求.docx
BIN
需求/惠东需求.docx
Binary file not shown.
BIN
需求/改进需求初步清单.docx
BIN
需求/改进需求初步清单.docx
Binary file not shown.
BIN
需求/需求整理.xlsx
BIN
需求/需求整理.xlsx
Binary file not shown.
Loading…
Reference in New Issue