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