Browse Source

企业类型统计导出

v4
zouyx 2 years ago
parent
commit
3596e1cf3f
  1. 46
      lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/statisticsEnterprise/statisticsEnterprise.html

46
lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/statisticsEnterprise/statisticsEnterprise.html

@ -61,7 +61,7 @@
<li>
<a class="btn btn-success btn-sm" onclick="searchE()"><i class="fa fa-search"></i>&nbsp;搜索</a>
<a class="btn btn-reset btn-sm" onclick="restE()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
<a class="btn btn-warning btn-sm" onclick="complaintDownload1()"><i class="fa fa-share-square-o"></i> 导出</a>
<a class="btn btn-warning btn-sm" onclick="downloadI1()"><i class="fa fa-share-square-o"></i> 导出</a>
<a class="btn btn-info btn-sm" id="closeButton" onclick="closeE()"><i class="fa fa-reply"></i> 返回</a>
</li>
</ul>
@ -142,7 +142,7 @@
<p><label th:text="企业数量"></label><b th:text="${number2}"></b></p>
<p></i><label th:text="占比总计"></label><b th:text="${number3}"></b></p>
</li>
<li><a class="btn btn-warning btn-sm" onclick="complaintDownload(2)"><i class="fa fa-share-square-o"></i> 导出</a></li>
<li><a class="btn btn-warning btn-sm" onclick="downloadI2()"><i class="fa fa-share-square-o"></i> 导出</a></li>
</ul>
</div>
</div>
@ -506,7 +506,47 @@
eSearch2();
timeType2();
}
function downloadI1(){
var currentId=$('form').eq(0).attr('id');
var params = $.common.formToJSON(currentId);
$.ajax({
type: "POST",
data: JSON.stringify(params),
contentType: 'application/json',
//设置响应类型
xhrFields: {responseType: "blob"},
url: prefix+"/export1",
success: function (result) {
const link = document.createElement('a');
let blob = new Blob([result], {type: 'application/vnd.ms-excel'});
link.style.display = 'none';
link.href = URL.createObjectURL(blob);
link.setAttribute('download', "执法检查统计.xls");
document.body.appendChild(link);
link.click();
document.body.removeChild(link)
}
})
}
function downloadI2(){
$.ajax({
type: "POST",
contentType: 'application/json',
//设置响应类型
xhrFields: {responseType: "blob"},
url: prefix+"/export2",
success: function (result) {
const link = document.createElement('a');
let blob = new Blob([result], {type: 'application/vnd.ms-excel'});
link.style.display = 'none';
link.href = URL.createObjectURL(blob);
link.setAttribute('download', "企业类型统计.xls");
document.body.appendChild(link);
link.click();
document.body.removeChild(link)
}
})
}
/*******echarts:企业类型/占比*********/
/* const ecsh = echarts.init(document.getElementById("echartEnterprise"));

Loading…
Cancel
Save