fix: 导入后重新获取数据
This commit is contained in:
@@ -86,12 +86,11 @@ export default {
|
|||||||
importFileSuccess(response, file) {
|
importFileSuccess(response, file) {
|
||||||
if (response.ok) {
|
if (response.ok) {
|
||||||
this.$emit('update:visible', false)
|
this.$emit('update:visible', false)
|
||||||
// this.visible = false
|
this.$emit('onSuccess')
|
||||||
this.$message({
|
this.$message({
|
||||||
message: response.message,
|
message: response.message || response.data,
|
||||||
type: 'success'
|
type: 'success'
|
||||||
})
|
})
|
||||||
this.getData()
|
|
||||||
} else {
|
} else {
|
||||||
this.importFailed = true
|
this.importFailed = true
|
||||||
this.importForm.content = response.message
|
this.importForm.content = response.message
|
||||||
|
|||||||
@@ -176,7 +176,7 @@
|
|||||||
<!-- 新增编辑 -->
|
<!-- 新增编辑 -->
|
||||||
<editDrawer ref="editDrawerRef" :dict="dict" :showDrawer.sync="showDrawer" :title="titleDrawer" :editForm="editForm" @load="getData"></editDrawer>
|
<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>
|
<ExportDialog ref="exportDialogRef" @exportName="handleExport"></ExportDialog>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -181,7 +181,7 @@
|
|||||||
<!-- 新增编辑 -->
|
<!-- 新增编辑 -->
|
||||||
<editDrawer ref="editDrawerRef" :showDrawer.sync="showDrawer" :title="titleDrawer" :editForm="editForm" @load="getData"></editDrawer>
|
<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>
|
<ExportDialog ref="exportDialogRef" @exportName="handleExport"></ExportDialog>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
+1
-1
@@ -199,7 +199,7 @@
|
|||||||
<!-- 新增编辑 -->
|
<!-- 新增编辑 -->
|
||||||
<editDrawer ref="editDrawerRef" :dict="dict" @load="getData"></editDrawer>
|
<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>
|
<ExportDialog ref="exportDialogRef" @exportName="handleExport"></ExportDialog>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user