Commit 6075e5fe authored by zhuangxinwei's avatar zhuangxinwei

修改bug

parent d75d0914
...@@ -73,11 +73,11 @@ export function delData(dictCode) { ...@@ -73,11 +73,11 @@ export function delData(dictCode) {
} }
// 导出字典数据 // 导出字典数据
export function exportData(query) { export function exportData(params) {
return request({ return request({
url: '/system/dict/data/export/' + query.dictType, url: '/system/dict/data/export',
method: 'get', method: 'get',
params: query, params,
responseType: 'blob' responseType: 'blob'
}) })
} }
...@@ -424,13 +424,15 @@ export default { ...@@ -424,13 +424,15 @@ export default {
}, },
/** 导出按钮操作 */ /** 导出按钮操作 */
handleExport() { handleExport() {
const queryParams = this.queryParams const params = {
dictType: this.queryParams.dictType
}
this.$confirm('是否确认导出所有数据项?', '提示', { this.$confirm('是否确认导出所有数据项?', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}).then(function() { }).then(() => {
return exportData(queryParams).then(response => { exportData(params).then(response => {
const blob = new Blob([response]) const blob = new Blob([response])
const downloadElement = document.createElement('a') const downloadElement = document.createElement('a')
const href = window.URL.createObjectURL(blob)// 创建下载的链接 const href = window.URL.createObjectURL(blob)// 创建下载的链接
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment