[参数项列表] 导出

This commit is contained in:
zhaomeijing
2022-04-29 13:45:48 +08:00
parent 5bf848e32f
commit 952adbd818
@@ -72,6 +72,7 @@
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }" :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
:columns="columns" :columns="columns"
> >
<!-- @change="tableOnChange"-->
<span slot="projectName" slot-scope="text,record"> <span slot="projectName" slot-scope="text,record">
<a @click="entryNameClick(record)">{{text}}</a> <a @click="entryNameClick(record)">{{text}}</a>
</span> </span>
@@ -111,6 +112,7 @@ export default {
}, },
data() { data() {
return { return {
orderBy: '1',
selectedRowKeysArray: '', selectedRowKeysArray: '',
token:Vue.ls.get(ACCESS_TOKEN), token:Vue.ls.get(ACCESS_TOKEN),
loading: false, loading: false,
@@ -140,6 +142,7 @@ export default {
align: 'center', align: 'center',
width: '10%', width: '10%',
dataIndex: 'nioNumber', dataIndex: 'nioNumber',
sorter: (a, b) => a.nioNumber - b.nioNumber,
}, },
{ {
title: this.$t('ParameterName'), title: this.$t('ParameterName'),
@@ -177,6 +180,14 @@ export default {
this.getList() this.getList()
}, },
methods: { methods: {
// tableOnChange(pagination, filters, sorter) {
// console.log(pagination,'pagination')
// console.log(filters,'filters')
// console.log(sorter,'sorter')
// // this.orderBy = sorter.order == 'ascend' ? '1' : '2'
// // this.orderByField = sorter.columnKey
// this.getList()
// },
//导出 //导出
handleExport() { handleExport() {
let query = { let query = {
@@ -184,9 +195,9 @@ export default {
pageSize: this.pageSize, pageSize: this.pageSize,
paramsTemplateId: this.$route.query.id, paramsTemplateId: this.$route.query.id,
...this.queryParam, ...this.queryParam,
id: this.selectedRowKeys.join(',') ids: this.selectedRowKeys.join(',')
} }
postAction('params/paramsInfo/exportParamsInfoZip', {exportName: '参数项列表.xls'}, query, this.Deselect) postAction('params/paramsInfo/exportParamsInfoZip', {exportName: '参数项列表.xlsx',...query}, this.Deselect)
}, },
//下载模板 //下载模板
handleModule() { handleModule() {