Commit 344dc5ae by jack

修改设备明细导出

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