mirror of
https://gitee.com/hhyykk/ipms-sjy.git
synced 2025-07-19 05:25:07 +08:00
v3.8.0 新增通用方法简化下载使用
This commit is contained in:
@ -206,7 +206,7 @@ export default {
|
||||
this.exportLoading = true;
|
||||
return exportApiAccessLogExcel(params);
|
||||
}).then(response => {
|
||||
this.downloadExcel(response, 'API 访问日志.xls');
|
||||
this.$download.excel(response, 'API 访问日志.xls');
|
||||
this.exportLoading = false;
|
||||
}).catch(() => {});
|
||||
}
|
||||
|
@ -224,7 +224,7 @@ export default {
|
||||
this.exportLoading = true;
|
||||
return exportApiErrorLogExcel(params);
|
||||
}).then(response => {
|
||||
this.downloadExcel(response, 'API 错误日志.xls');
|
||||
this.$download.excel(response, 'API 错误日志.xls');
|
||||
this.exportLoading = false;
|
||||
}).catch(() => {});
|
||||
}
|
||||
|
@ -268,7 +268,7 @@ export default {
|
||||
this.exportLoading = true;
|
||||
return exportConfig(queryParams);
|
||||
}).then(response => {
|
||||
this.downloadExcel(response, '参数配置.xls');
|
||||
this.$download.excel(response, '参数配置.xls');
|
||||
this.exportLoading = false;
|
||||
}).catch(() => {});
|
||||
},
|
||||
|
@ -367,7 +367,7 @@ export default {
|
||||
this.exportLoading = true;
|
||||
return exportJob(queryParams);
|
||||
}).then(response => {
|
||||
this.downloadExcel(response, '定时任务.xls');
|
||||
this.$download.excel(response, '定时任务.xls');
|
||||
this.exportLoading = false;
|
||||
}).catch(() => {});
|
||||
}
|
||||
|
@ -169,7 +169,7 @@ export default {
|
||||
this.exportLoading = true;
|
||||
return exportJobLogExcel(params);
|
||||
}).then(response => {
|
||||
this.downloadExcel(response, '定时任务日志.xls');
|
||||
this.$download.excel(response, '定时任务日志.xls');
|
||||
this.exportLoading = false;
|
||||
}).catch(() => {});
|
||||
}
|
||||
|
@ -417,7 +417,7 @@ export default {
|
||||
this.$modal.confirm('是否确认导出所有支付应用信息数据项?').then(function () {
|
||||
return exportAppExcel(params);
|
||||
}).then(response => {
|
||||
this.downloadExcel(response, '支付应用信息.xls');
|
||||
this.$download.excel(response, '支付应用信息.xls');
|
||||
}).catch(() => {});
|
||||
},
|
||||
/**
|
||||
|
@ -279,7 +279,7 @@ export default {
|
||||
this.exportLoading = true;
|
||||
return exportMerchantExcel(params);
|
||||
}).then(response => {
|
||||
this.downloadExcel(response, '支付商户信息.xls');
|
||||
this.$download.excel(response, '支付商户信息.xls');
|
||||
this.exportLoading = false;
|
||||
}).catch(() => {});
|
||||
}
|
||||
|
@ -423,7 +423,7 @@ export default {
|
||||
this.$modal.confirm('是否确认导出所有支付订单数据项?').then(function () {
|
||||
return exportOrderExcel(params);
|
||||
}).then(response => {
|
||||
this.downloadExcel(response, '支付订单.xls');
|
||||
this.$download.excel(response, '支付订单.xls');
|
||||
}).catch(() => {});
|
||||
},
|
||||
/**
|
||||
|
@ -427,7 +427,7 @@ export default {
|
||||
this.$modal.confirm('是否确认导出所有退款订单数据项?').then(function () {
|
||||
return exportRefundExcel(params);
|
||||
}).then(response => {
|
||||
this.downloadExcel(response, '退款订单.xls');
|
||||
this.$download.excel(response, '退款订单.xls');
|
||||
}).catch(() => {});
|
||||
},
|
||||
/**
|
||||
|
@ -297,7 +297,7 @@ export default {
|
||||
this.exportLoading = true;
|
||||
return exportData(queryParams);
|
||||
}).then(response => {
|
||||
this.downloadExcel(response, '字典数据.xls');
|
||||
this.$download.excel(response, '字典数据.xls');
|
||||
this.exportLoading = false;
|
||||
}).catch(() => {});
|
||||
}
|
||||
|
@ -250,7 +250,7 @@ export default {
|
||||
this.exportLoading = true;
|
||||
return exportType(params);
|
||||
}).then(response => {
|
||||
this.downloadExcel(response, '字典类型.xls');
|
||||
this.$download.excel(response, '字典类型.xls');
|
||||
this.exportLoading = false;
|
||||
}).catch(() => {});
|
||||
}
|
||||
|
@ -243,7 +243,7 @@ export default {
|
||||
this.exportLoading = true;
|
||||
return exportErrorCodeExcel(params);
|
||||
}).then(response => {
|
||||
this.downloadExcel(response, '错误码.xls');
|
||||
this.$download.excel(response, '错误码.xls');
|
||||
this.exportLoading = false;
|
||||
}).catch(() => {});
|
||||
}
|
||||
|
@ -126,7 +126,7 @@ export default {
|
||||
this.exportLoading = true;
|
||||
return exportLoginLog(queryParams);
|
||||
}).then(response => {
|
||||
this.downloadExcel(response, '登录日志.xls');
|
||||
this.$download.excel(response, '登录日志.xls');
|
||||
this.exportLoading = false;
|
||||
}).catch(() => {});
|
||||
}
|
||||
|
@ -206,7 +206,7 @@ export default {
|
||||
this.exportLoading = true;
|
||||
return exportOperateLog(queryParams);
|
||||
}).then(response => {
|
||||
this.downloadExcel(response, '操作日志.xls');
|
||||
this.$download.excel(response, '操作日志.xls');
|
||||
this.exportLoading = false;
|
||||
}).catch(() => {});
|
||||
}
|
||||
|
@ -236,7 +236,7 @@ export default {
|
||||
this.exportLoading = true;
|
||||
return exportPost(queryParams);
|
||||
}).then(response => {
|
||||
this.downloadExcel(response, '岗位数据.xls');
|
||||
this.$download.excel(response, '岗位数据.xls');
|
||||
this.exportLoading = false;
|
||||
}).catch(() => {});
|
||||
}
|
||||
|
@ -497,7 +497,7 @@ export default {
|
||||
this.exportLoading = true;
|
||||
return exportRole(queryParams);
|
||||
}).then(response => {
|
||||
this.downloadExcel(response, '角色数据.xls');
|
||||
this.$download.excel(response, '角色数据.xls');
|
||||
this.exportLoading = false;
|
||||
}).catch(() => {});
|
||||
}
|
||||
|
@ -282,7 +282,7 @@ export default {
|
||||
this.exportLoading = true;
|
||||
return exportSmsLogExcel(params);
|
||||
}).then(response => {
|
||||
this.downloadExcel(response, '短信日志.xls');
|
||||
this.$download.excel(response, '短信日志.xls');
|
||||
this.exportLoading = false;
|
||||
}).catch(() => {});
|
||||
},
|
||||
|
@ -334,7 +334,7 @@ export default {
|
||||
this.exportLoading = true;
|
||||
return exportSmsTemplateExcel(params);
|
||||
}).then(response => {
|
||||
this.downloadExcel(response, '短信模板.xls');
|
||||
this.$download.excel(response, '短信模板.xls');
|
||||
this.exportLoading = false;
|
||||
}).catch(() => {});
|
||||
},
|
||||
|
@ -246,7 +246,7 @@ export default {
|
||||
this.exportLoading = true;
|
||||
return exportTenantExcel(params);
|
||||
}).then(response => {
|
||||
this.downloadExcel(response, '租户.xls');
|
||||
this.$download.excel(response, '租户.xls');
|
||||
this.exportLoading = false;
|
||||
}).catch(() => {});
|
||||
}
|
||||
|
@ -585,7 +585,7 @@ export default {
|
||||
this.exportLoading = true;
|
||||
return exportUser(queryParams);
|
||||
}).then(response => {
|
||||
this.downloadExcel(response, '用户数据.xls');
|
||||
this.$download.excel(response, '用户数据.xls');
|
||||
this.exportLoading = false;
|
||||
}).catch(() => {});
|
||||
},
|
||||
@ -597,7 +597,7 @@ export default {
|
||||
/** 下载模板操作 */
|
||||
importTemplate() {
|
||||
importTemplate().then(response => {
|
||||
this.downloadExcel(response, '用户导入模板.xls');
|
||||
this.$download.excel(response, '用户导入模板.xls');
|
||||
});
|
||||
},
|
||||
// 文件上传中处理
|
||||
|
@ -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