2023-3-27
This commit is contained in:
@@ -70,6 +70,7 @@ export function orderData(params) {
|
||||
|
||||
export function exportExcel(params) {
|
||||
return request({
|
||||
baseURL: '/api',
|
||||
url: '/oms/OmsOrder/exportExcel',
|
||||
method: 'post',
|
||||
responseType: 'blob', // 表明返回服务器返回的数据类型
|
||||
|
||||
@@ -10,6 +10,13 @@ import VCharts from 'v-charts'
|
||||
import '@/styles/index.scss' // global css
|
||||
|
||||
import App from './App'
|
||||
import Axios from 'axios'
|
||||
|
||||
Vue.prototype.$axios = Axios
|
||||
Axios.defaults.baseURL = '/api'
|
||||
Axios.defaults.headers.post['Content-Type'] = 'application/json';
|
||||
|
||||
|
||||
import router from './router'
|
||||
import store from './store'
|
||||
// 全局自定义组件
|
||||
|
||||
@@ -798,7 +798,7 @@
|
||||
exportExcel(this.listQuery).then((resp) => {
|
||||
// loading.close()
|
||||
const blob = new Blob([resp], {
|
||||
type: 'application/vnd.ms-excel'
|
||||
type: 'application/vnd.ms-excel;charset=utf-8'
|
||||
})
|
||||
const fileName = '订单列表' + '.xls'
|
||||
const elink = document.createElement('a')
|
||||
|
||||
Reference in New Issue
Block a user