| | |
| | | }, |
| | | /** 导出按钮操作 */ |
| | | handleExport() { |
| | | this.download('/zfEconomy/export', { |
| | | this.download('/zfEconomy/model', { |
| | | ...this.queryParams |
| | | }, `zfEconomy_${new Date().getTime()}.xlsx`) |
| | | } |
| | | }, |
| | | /** 导入操作*/ |
| | | handleEnport(params){ |
| | | var file = params.file; |
| | | var formData = new FormData(); |
| | | formData.append('excelImport', file); |
| | | let _this = this |
| | | |
| | | enload(formData).then(response => { |
| | | _this.getList(); |
| | | Message({ message: "导入成功", type: 'warning' }) |
| | | }).catch(err) |
| | | { |
| | | Message({ message: "导入失败", type: 'error' }) |
| | | } |
| | | }, |
| | | }, |
| | | /** 导入操作*/ |
| | | handleEnport(params){ |
| | | var file = params.file; |
| | | var formData = new FormData(); |
| | | formData.append('excelImport', file); |
| | | let _this = this |
| | | alert(file) |
| | | enload(formData).then(response => { |
| | | _this.getList(); |
| | | Message({ message: "导入成功", type: 'warning' }) |
| | | |
| | | }).catch(err) |
| | | { |
| | | Message({ message: "导入失败", type: 'error' }) |
| | | } |
| | | |
| | | } |
| | | |
| | | }; |
| | | </script> |