diff --git a/safesite/export.py b/safesite/export.py index 58ec0a7a..f4bd4e04 100644 --- a/safesite/export.py +++ b/safesite/export.py @@ -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') diff --git a/safesite/templates/miss.html b/safesite/templates/miss.html index 6f77ae0d..01609945 100644 --- a/safesite/templates/miss.html +++ b/safesite/templates/miss.html @@ -153,8 +153,7 @@ } function exportwsexcel() { var querydata = $('#searchwsff').serializeJSON(); - console.log(querydata) let url = 'api/miss?a=exportexcel&'+parseParams(querydata) - $('
').appendTo('body').submit().remove(); + window.open(url); } \ No newline at end of file diff --git a/safesite/templates/observe.html b/safesite/templates/observe.html index f2c0664a..70930dcf 100644 --- a/safesite/templates/observe.html +++ b/safesite/templates/observe.html @@ -168,6 +168,6 @@ function exportgcexcel() { var querydata = $('#searchgcff').serializeJSON(); let url = 'gchandle?a=exportexcel&'+parseParams(querydata) - $('').appendTo('body').submit().remove(); + window.open(url); } \ No newline at end of file diff --git a/safesite/templates/operation.html b/safesite/templates/operation.html index bb1e42d3..8fde6411 100644 --- a/safesite/templates/operation.html +++ b/safesite/templates/operation.html @@ -165,8 +165,9 @@ else { $.messager.alert('提示', '请选择一行数据!'); } } function exportzyexcel() { - let url = 'api/operation?a=exportexcel' - $('').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'); diff --git a/safesite/templates/suggest.html b/safesite/templates/suggest.html index 5a776bf3..208ccc48 100644 --- a/safesite/templates/suggest.html +++ b/safesite/templates/suggest.html @@ -174,7 +174,7 @@ function exportjyexcel() { var querydata = $('#searchjyff').serializeJSON(); let url = 'api/suggest?a=exportexcel&'+parseParams(querydata) - $('').appendTo('body').submit().remove(); + window.open(url); } function updatejy(){ diff --git a/需求/惠东嘉华安全生产管理系统二次开发需求分析.docx b/需求/惠东嘉华安全生产管理系统二次开发需求分析.docx new file mode 100644 index 00000000..030fb62c Binary files /dev/null and b/需求/惠东嘉华安全生产管理系统二次开发需求分析.docx differ diff --git a/需求/惠东需求.docx b/需求/惠东需求.docx deleted file mode 100644 index 28c65550..00000000 Binary files a/需求/惠东需求.docx and /dev/null differ diff --git a/需求/改进需求初步清单.docx b/需求/改进需求初步清单.docx deleted file mode 100644 index a609503f..00000000 Binary files a/需求/改进需求初步清单.docx and /dev/null differ diff --git a/需求/需求整理.xlsx b/需求/需求整理.xlsx index cdb32741..ca7f3903 100644 Binary files a/需求/需求整理.xlsx and b/需求/需求整理.xlsx differ