修改为符合项导出的参数
This commit is contained in:
@@ -50,8 +50,10 @@
|
||||
ref="table"
|
||||
size="middle"
|
||||
:loading="loading"
|
||||
rowKey="uuid"
|
||||
:pagination="false"
|
||||
:scroll="{x: true}"
|
||||
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
|
||||
:data-source="dataSource"
|
||||
:columns="columns"
|
||||
>
|
||||
@@ -81,6 +83,7 @@
|
||||
queryParam: {},
|
||||
loading: false,
|
||||
dataSource: [],
|
||||
selectedRowKeys:[],
|
||||
columns: [
|
||||
{
|
||||
title: this.$t('standard'),
|
||||
@@ -149,10 +152,27 @@
|
||||
this.pageSize = pageSize
|
||||
this.getList()
|
||||
},
|
||||
onSelectChange(value) {
|
||||
this.content = []
|
||||
this.selectedRowKeys = value
|
||||
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
|
||||
this.dataSource.forEach(res => {
|
||||
this.selectedRowKeys.forEach(val => {
|
||||
if (res.uuid == val) {
|
||||
this.content.push({
|
||||
id: res.id,
|
||||
flowType: res.flowType
|
||||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
handleExport() {
|
||||
let query = {
|
||||
...this.queryParam,
|
||||
projectLibraryId: this.$route.query.id
|
||||
projectLibraryId: this.$route.query.id,
|
||||
ncrTrackVOList: JSON.stringify(this.content)
|
||||
}
|
||||
downloadFile(this.url.exportData, this.$t('NonConformance') + '.xls', query, this.Deselect)
|
||||
},
|
||||
|
||||
@@ -149,7 +149,7 @@
|
||||
<a-table
|
||||
ref="table"
|
||||
size="middle"
|
||||
rowKey="id"
|
||||
rowKey="uuid"
|
||||
:loading="loading"
|
||||
:pagination="false"
|
||||
:scroll="{x: true}"
|
||||
@@ -275,7 +275,7 @@
|
||||
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
|
||||
this.dataSource.forEach(res => {
|
||||
this.selectedRowKeys.forEach(val => {
|
||||
if (res.id == val) {
|
||||
if (res.uuid == val) {
|
||||
this.content.push({
|
||||
id: res.id,
|
||||
flowType: res.flowType
|
||||
@@ -320,7 +320,7 @@
|
||||
handleExport() {
|
||||
let query = {
|
||||
...this.queryParam,
|
||||
ncrTrackVOList: this.content
|
||||
ncrTrackVOList: JSON.stringify(this.content)
|
||||
}
|
||||
downloadFile(this.url.exportData, this.$t('NonConformance') + '.xls', query, this.Deselect)
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user