小伙看你根骨奇佳,潛力無(wú)限,來(lái)學(xué)PHP伐。
I intercepted part of the code I originally developed. You can refer to the action and service (compatible with new excel export) layers
The problem is solved. Reason: I used AJAX get to submit, which would not open the save path interface
$.get("http://localhost:8080/StaffOS/export_excel",function(data,status){
if(data == "success"){
$.messager.alert('My Title','導(dǎo)出成功','info');
}
});
改成:window.location="/StaffOS/export_excel";
還有一點(diǎn),不同的瀏覽器也會(huì)有差別,之前使用谷歌,就直接下載了,沒(méi)有出現(xiàn)選擇路徑的框(可能在哪里需要設(shè)置吧),后來(lái)在使用火狐的就能出現(xiàn)選擇下載保存路徑的框。