mirror of
https://gitee.com/y_project/RuoYi-Cloud.git
synced 2026-01-26 19:51:56 +08:00
修复用户导出功能,已经选择了部门,但是还是导出全部用户(deptid 查询参数丢失)
This commit is contained in:
@@ -3,7 +3,7 @@ import { Notification, MessageBox, Message } from 'element-ui'
|
|||||||
import store from '@/store'
|
import store from '@/store'
|
||||||
import { getToken } from '@/utils/auth'
|
import { getToken } from '@/utils/auth'
|
||||||
import errorCode from '@/utils/errorCode'
|
import errorCode from '@/utils/errorCode'
|
||||||
import { tansParams } from "@/utils/ruoyi";
|
//import { tansParams } from "@/utils/ruoyi";
|
||||||
|
|
||||||
axios.defaults.headers['Content-Type'] = 'application/json;charset=utf-8'
|
axios.defaults.headers['Content-Type'] = 'application/json;charset=utf-8'
|
||||||
// 创建axios实例
|
// 创建axios实例
|
||||||
@@ -72,12 +72,19 @@ service.interceptors.response.use(res => {
|
|||||||
|
|
||||||
// 通用下载方法
|
// 通用下载方法
|
||||||
export function download(url, params, filename) {
|
export function download(url, params, filename) {
|
||||||
return service.post(url, params, {
|
// return service.post(url, params, {
|
||||||
transformRequest: [(params) => {
|
// transformRequest: [(params) => {
|
||||||
return tansParams(params)
|
// return tansParams(params)
|
||||||
}],
|
// }],
|
||||||
|
// responseType: 'blob'
|
||||||
|
// })
|
||||||
|
return service.request({
|
||||||
|
url: url,
|
||||||
|
method: 'post',
|
||||||
|
params: params,
|
||||||
responseType: 'blob'
|
responseType: 'blob'
|
||||||
}).then((data) => {
|
})
|
||||||
|
.then((data) => {
|
||||||
const content = data
|
const content = data
|
||||||
const blob = new Blob([content])
|
const blob = new Blob([content])
|
||||||
if ('download' in document.createElement('a')) {
|
if ('download' in document.createElement('a')) {
|
||||||
|
|||||||
Reference in New Issue
Block a user