Commit 793f4710 by jack

设备关系明细列表增加导出功能

1 parent 96824ea2
...@@ -525,3 +525,6 @@ export const LOGOUT = params => { ...@@ -525,3 +525,6 @@ export const LOGOUT = params => {
data: params data: params
}) })
} }
//设备管理-设备关系明细-导出excel
export const EXPORTDEVICEFILE = BASEURL + 'JXCDevice/exportDeviceFile';
\ No newline at end of file \ No newline at end of file
...@@ -45,6 +45,9 @@ ...@@ -45,6 +45,9 @@
<el-form-item> <el-form-item>
<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-button type="primary" icon="el-icon-download" :loading="downloadLoading" @click="download()">导出excel</el-button>
</el-form-item>
</el-form> </el-form>
</el-card> </el-card>
...@@ -233,8 +236,10 @@ import { ...@@ -233,8 +236,10 @@ import {
GETMAXDEVICESTATISREPORT, GETMAXDEVICESTATISREPORT,
GETDEVICERELATIONDETAIL, GETDEVICERELATIONDETAIL,
INITDEVICERELATION, INITDEVICERELATION,
EXPORTDEVICEFILE
} from '@/http/interface' } from '@/http/interface'
import GlsxDialog from '@/components/dialog/index' import GlsxDialog from '@/components/dialog/index'
import { exportExcel } from '@/common/common'
export default { export default {
components: { components: {
'glsx-dialog': GlsxDialog, 'glsx-dialog': GlsxDialog,
...@@ -282,6 +287,7 @@ export default { ...@@ -282,6 +287,7 @@ export default {
], ],
}, },
currentSn: '', currentSn: '',
downloadLoading:false
} }
}, },
created() {}, created() {},
...@@ -470,6 +476,25 @@ export default { ...@@ -470,6 +476,25 @@ export default {
}) })
}) })
}, },
/** 导出excel */
download(){
let _this = this
let oParams = _this.getParams()
let options = {}
let url = EXPORTDEVICEFILE;
options.fileName = '设备关系明细列表.xlsx'
options.method = 'POST'
options.url = url
options.data = oParams
options.success = function () {
_this.downloadLoading = false
}
_this.downloadLoading = true
exportExcel(options)
}
}, },
} }
</script> </script>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!