新增: 数据导出,可根据前端Search进行过滤导出
parent
59efc04444
commit
7e91f07b49
|
@ -213,13 +213,14 @@ const refreshTken = function () {
|
|||
* 下载文件
|
||||
* @param url
|
||||
* @param params
|
||||
* @param method
|
||||
* @param filename
|
||||
*/
|
||||
export const downloadFile = function ({ url, data, method, filename }) {
|
||||
export const downloadFile = function ({ url, params, method, filename }) {
|
||||
request({
|
||||
url: url,
|
||||
method: method,
|
||||
data: data,
|
||||
params: params,
|
||||
responseType: 'blob'
|
||||
// headers: {Accept: 'application/vnd.openxmlformats-officedocument'}
|
||||
}).then(res => {
|
||||
|
|
|
@ -166,12 +166,14 @@ export default {
|
|||
return api.BatchDel(ids)
|
||||
},
|
||||
onExport () {
|
||||
const that = this
|
||||
this.$confirm('是否确认导出所有数据项?', '警告', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(function () {
|
||||
return api.exportData()
|
||||
const query = that.getSearch().getForm()
|
||||
return api.exportData({ ...query })
|
||||
})
|
||||
},
|
||||
// 重置密码弹框
|
||||
|
|
Loading…
Reference in New Issue