json文件导入以及页面跳转功能处理

This commit is contained in:
李志强 2024-01-03 14:44:35 +08:00
parent 17eee73f37
commit 9b2abb7847

View File

@ -1422,6 +1422,7 @@ const Index = React.memo(
}; };
const handleExportDataBase = (e, dataSource) => { const handleExportDataBase = (e, dataSource) => {
e.stopPropagation() e.stopPropagation()
e.preventDefault()
const { entities, domains } = dataSource const { entities, domains } = dataSource
const workBook = window.XLSX.utils.book_new(); const workBook = window.XLSX.utils.book_new();
for (let index = 0; index < entities.length; index++) { for (let index = 0; index < entities.length; index++) {
@ -1488,9 +1489,9 @@ const Index = React.memo(
...currentDataSource, ...currentDataSource,
entities: [...entities, ...mockData] entities: [...entities, ...mockData]
}) })
setTimeout(()=>{ setTimeout(() => {
restProps.closeLoading(); restProps.closeLoading();
},2000) }, 2000)
// 进行相关操作... // 进行相关操作...
}; };
@ -1590,11 +1591,11 @@ const Index = React.memo(
break; break;
case 'standardDataExport': case 'standardDataExport':
handleExportDataBase(e, dataSource); handleExportDataBase(e, dataSource);
break;
case 'standardDataImport': case 'standardDataImport':
handleImportDataBase(e, dataSource); handleImportDataBase(e, dataSource);
break;
default: default:
break; break;
} }
}; };