dev_ec
杨树林 5 years ago
parent 610536b100
commit 9efbc7ffa8

@ -131,15 +131,20 @@ class EcStudentList extends Component {
uploadfile=(file)=>{
console.log("导入的文件");
console.log(file);
this.setState({isSpin:true})
let {majorschoollist}=this.state;
let year_id=this.props.match.params.yearId;
let Url ='/ec_years/'+year_id+'/students/import.json';
const config = {
headers: { "Content-Type": "multipart/form-data" }
};
const form = new FormData();
form.append('file', file.file);
form.append('attachment_id', file.file.id);
form.append('attachment_id', file.file.lastModified);
axios.post(Url,form
).then((response) => {
,config).then((response) => {
if(response.data.status===0){
// message.success('已成功导入'+response.data.count+"条数据!");
this.setState({

Loading…
Cancel
Save