fix: 导入后重新获取数据

This commit is contained in:
zyn
2023-11-23 09:32:49 +08:00
parent 739b67cf9b
commit d0a1198be2
4 changed files with 5 additions and 6 deletions
+2 -3
View File
@@ -86,12 +86,11 @@ export default {
importFileSuccess(response, file) {
if (response.ok) {
this.$emit('update:visible', false)
// this.visible = false
this.$emit('onSuccess')
this.$message({
message: response.message,
message: response.message || response.data,
type: 'success'
})
this.getData()
} else {
this.importFailed = true
this.importForm.content = response.message
+1 -1
View File
@@ -176,7 +176,7 @@
<!-- 新增编辑 -->
<editDrawer ref="editDrawerRef" :dict="dict" :showDrawer.sync="showDrawer" :title="titleDrawer" :editForm="editForm" @load="getData"></editDrawer>
<!-- 导入 -->
<ImportZip :visible.sync="importModalShowFlag" :action="importExcelUrl"></ImportZip>
<ImportZip :visible.sync="importModalShowFlag" :action="importExcelUrl" @onSuccess="getData"></ImportZip>
<!-- 导出 -->
<ExportDialog ref="exportDialogRef" @exportName="handleExport"></ExportDialog>
</div>
@@ -181,7 +181,7 @@
<!-- 新增编辑 -->
<editDrawer ref="editDrawerRef" :showDrawer.sync="showDrawer" :title="titleDrawer" :editForm="editForm" @load="getData"></editDrawer>
<!-- 导入 -->
<ImportZip :visible.sync="importModalShowFlag" :action="importExcelUrl"></ImportZip>
<ImportZip :visible.sync="importModalShowFlag" :action="importExcelUrl" @onSuccess="getData"></ImportZip>
<!-- 导出 -->
<ExportDialog ref="exportDialogRef" @exportName="handleExport"></ExportDialog>
</div>
@@ -199,7 +199,7 @@
<!-- 新增编辑 -->
<editDrawer ref="editDrawerRef" :dict="dict" @load="getData"></editDrawer>
<!-- 导入 -->
<ImportZip :visible.sync="importModalShowFlag" :action="importExcelUrl"></ImportZip>
<ImportZip :visible.sync="importModalShowFlag" :action="importExcelUrl" @onSuccess="getData"></ImportZip>
<!-- 导出 -->
<ExportDialog ref="exportDialogRef" @exportName="handleExport"></ExportDialog>
</div>