mirror of
https://gitee.com/hhyykk/ipms-sjy.git
synced 2025-07-25 08:25:07 +08:00
v3.8.0 新增通用方法简化下载使用
This commit is contained in:
@ -192,7 +192,7 @@ export default {
|
||||
/** 生成代码操作 */
|
||||
handleGenTable(row) {
|
||||
downloadCodegen(row.id).then(response => {
|
||||
this.downloadZip(response, 'codegen-' + row.tableName + '.zip');
|
||||
this.$download.zip(response, 'codegen-' + row.tableName + '.zip');
|
||||
})
|
||||
},
|
||||
/** 同步数据库操作 */
|
||||
|
@ -48,19 +48,19 @@ export default {
|
||||
/** 处理导出 HTML */
|
||||
handleExportHtml() {
|
||||
exportHtml().then(response => {
|
||||
this.downloadHtml(response, '数据库文档.html');
|
||||
this.$download.html(response, '数据库文档.html');
|
||||
})
|
||||
},
|
||||
/** 处理导出 Word */
|
||||
handleExportWord() {
|
||||
exportWord().then(response => {
|
||||
this.downloadWord(response, '数据库文档.doc');
|
||||
this.$download.word(response, '数据库文档.doc');
|
||||
})
|
||||
},
|
||||
/** 处理导出 Markdown */
|
||||
handleExportMarkdown() {
|
||||
exportMarkdown().then(response => {
|
||||
this.downloadMarkdown(response, '数据库文档.md');
|
||||
this.$download.markdown(response, '数据库文档.md');
|
||||
})
|
||||
}
|
||||
}
|
||||
|
@ -253,7 +253,7 @@ export default {
|
||||
this.exportLoading = true;
|
||||
return exportTestDemoExcel(params);
|
||||
}).then(response => {
|
||||
this.downloadExcel(response, '字典类型.xls');
|
||||
this.$download.excel(response, '字典类型.xls');
|
||||
this.exportLoading = false;
|
||||
}).catch(() => {});
|
||||
}
|
||||
|
Reference in New Issue
Block a user