Commit 344dc5ae by jack

修改设备明细导出

1 parent 793f4710
......@@ -74,6 +74,7 @@ export default function $axios(options) {
// Util.closeLoading();
// IE9时response.data是undefined,因此需要使用response.request.responseText(Stringify后的字符串)
console.log(response)
if (response) {
if (response.data == undefined) {
let str = response.request.responseText;
......
......@@ -527,4 +527,11 @@ export const LOGOUT = params => {
}
//设备管理-设备关系明细-导出excel
export const EXPORTDEVICEFILE = BASEURL + 'JXCDevice/exportDeviceFile';
\ No newline at end of file
export const EXPORTDEVICEFILE = BASEURL + 'JXCDevice/exportDeviceFile';
export const EXPORTDEVICEFILEMETHOD = params => {
return axios({
url: '/JXCDevice/exportDeviceFile',
method: 'POST',
data: params
})
}
\ No newline at end of file
......@@ -46,7 +46,7 @@
<el-button type="primary" icon="el-icon-search" :loading="tableLoading" @click="getList()">搜索</el-button>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-download" :loading="downloadLoading" @click="download()">导出excel</el-button>
<el-button type="primary" icon="el-icon-download" @click="downloadExcel()">导出excel</el-button>
</el-form-item>
</el-form>
</el-card>
......@@ -236,7 +236,8 @@ import {
GETMAXDEVICESTATISREPORT,
GETDEVICERELATIONDETAIL,
INITDEVICERELATION,
EXPORTDEVICEFILE
EXPORTDEVICEFILE,
EXPORTDEVICEFILEMETHOD
} from '@/http/interface'
import GlsxDialog from '@/components/dialog/index'
import { exportExcel } from '@/common/common'
......@@ -493,8 +494,15 @@ export default {
}
_this.downloadLoading = true
exportExcel(options)
},
/** 异步导出excel */
downloadExcel(){
let oParams = this.getParams()
EXPORTDEVICEFILEMETHOD(oParams);
}
},
}
</script>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!