Commit fca46b7d authored by Sixiang_Zzb's avatar Sixiang_Zzb

用户模块 批量上传适配safari 浏览器

parent c5f0d091
......@@ -191,7 +191,7 @@ export default defineConfig({
},
{
path: './OwnerComplaints',
// name: 'ownercomplaints',
name: 'ownercomplaints',
component: './CommercialService/PropertyServices',
},
{
......
......@@ -97,28 +97,21 @@ const Users = (props: any) => {
name: 'file',
action: '/tos/excel/upload?userId=' + id,
beforeUpload: (file: any) => {
console.log(file);
if (permissionArr.indexOf('4') < 0) {
message.error('No permissions');
return false;
}
if (
file.type !== 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' &&
file.type !== 'application/vnd.ms-excel'
) {
if (file.name.indexOf('.xlsx') === -1 && file.name.indexOf('.xls') === -1) {
message.error(`${file.name} file format is incorrect!`);
return false;
} else {
return true;
}
return (
file.type === 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' ||
file.type === 'application/vnd.ms-excel'
);
},
onChange(info: any) {
if (info.file.status == 'uploading') {
setFileUploading(true);
}
console.log(info);
if (info.file.status === 'done') {
if (info.file.response.error_code == '0000') {
history.push(location.pathname + '/Result');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment