dev_forum
杨树林 5 years ago
parent 153e0de4c9
commit febb200243

@ -2,7 +2,7 @@ import {Base64} from 'js-base64';
import axios from 'axios'; import axios from 'axios';
// 导出实习报告批量zip 类型 // 导出实习报告批量zip 、xlsx 类型
export function Internshipreportsy (url,struy,types,stingtype){ export function Internshipreportsy (url,struy,types,stingtype){
axios.get((url),{responseType: 'blob'}).then((response) => { axios.get((url),{responseType: 'blob'}).then((response) => {
const blob = new Blob([response.data], { type: stingtype }); const blob = new Blob([response.data], { type: stingtype });

@ -1349,7 +1349,7 @@ class Listofworks extends Component {
} }
axios.get(url).then((response) => { axios.get(url).then((response) => {
console.log(response); if(response !== undefined){
if(response.data.status&&response.data.status===-1){ if(response.data.status&&response.data.status===-1){
console.log("1352"); console.log("1352");
console.log(response); console.log(response);
@ -1364,6 +1364,7 @@ class Listofworks extends Component {
Internshipreportsy(url,struy,".xlsx",'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'); Internshipreportsy(url,struy,".xlsx",'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');
} }
} }
}
}).catch((error) => { }).catch((error) => {
console.log(error) console.log(error)
}); });

Loading…
Cancel
Save