2023-3-27

This commit is contained in:
2023-03-27 16:39:02 +08:00
parent 43acac9f28
commit 314f499dfd
4 changed files with 76 additions and 57 deletions

View File

@@ -70,6 +70,7 @@ export function orderData(params) {
export function exportExcel(params) {
return request({
baseURL: '/api',
url: '/oms/OmsOrder/exportExcel',
method: 'post',
responseType: 'blob', // 表明返回服务器返回的数据类型

View File

@@ -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'
// 全局自定义组件

View File

@@ -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')