This commit is contained in:
parent
1cbc78c764
commit
b73df8bd44
|
@ -801,6 +801,12 @@ export default class acclist extends React.Component{
|
||||||
|
|
||||||
if(my_file.name.indexOf(".xls")||my_file.name.indexOf(".xlsx")||my_file.name.indexOf(".csv"))
|
if(my_file.name.indexOf(".xls")||my_file.name.indexOf(".xlsx")||my_file.name.indexOf(".csv"))
|
||||||
{
|
{
|
||||||
|
|
||||||
|
if(my_file.size > 2048000)
|
||||||
|
{
|
||||||
|
Notify.error("文件大小不能大于2M")
|
||||||
|
return;
|
||||||
|
}
|
||||||
let formdata = new FormData()
|
let formdata = new FormData()
|
||||||
formdata.append("file",my_file)
|
formdata.append("file",my_file)
|
||||||
formdata.append("path","white_list_excel")
|
formdata.append("path","white_list_excel")
|
||||||
|
|
|
@ -659,6 +659,12 @@ export default class acclist extends React.Component{
|
||||||
|
|
||||||
if(my_file.name.indexOf(".xls")||my_file.name.indexOf(".xlsx")||my_file.name.indexOf(".csv"))
|
if(my_file.name.indexOf(".xls")||my_file.name.indexOf(".xlsx")||my_file.name.indexOf(".csv"))
|
||||||
{
|
{
|
||||||
|
if(my_file.size > 5120000)
|
||||||
|
{
|
||||||
|
Notify.error("文件大小不能大于2M")
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
let formdata = new FormData()
|
let formdata = new FormData()
|
||||||
formdata.append("file",my_file)
|
formdata.append("file",my_file)
|
||||||
formdata.append("path","white_list_excel")
|
formdata.append("path","white_list_excel")
|
||||||
|
@ -666,13 +672,10 @@ export default class acclist extends React.Component{
|
||||||
this.setState({file_loading:true})
|
this.setState({file_loading:true})
|
||||||
uploadImg(formdata).then((res)=>{
|
uploadImg(formdata).then((res)=>{
|
||||||
handelResponse(res,(req,msg)=>{
|
handelResponse(res,(req,msg)=>{
|
||||||
|
|
||||||
let data = {
|
let data = {
|
||||||
excel:req.path
|
excel:req.path
|
||||||
}
|
}
|
||||||
|
|
||||||
this.setState({mobile_excel:req.path})
|
this.setState({mobile_excel:req.path})
|
||||||
|
|
||||||
getAccessVerification(data).then((res)=>{
|
getAccessVerification(data).then((res)=>{
|
||||||
this.setState({file_loading:false})
|
this.setState({file_loading:false})
|
||||||
handelResponse(res,(req,msg)=>{
|
handelResponse(res,(req,msg)=>{
|
||||||
|
|
Loading…
Reference in New Issue