From 01a7e5348f3db26d36096ca4116bc06ccfa8f854 Mon Sep 17 00:00:00 2001 From: qq787203167 <787203167@qq.com> Date: Fri, 13 May 2022 10:06:10 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=BA=E7=AC=A6=E5=90=88?= =?UTF-8?q?=E9=A1=B9=E5=AF=BC=E5=87=BA=E7=9A=84=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/nonConformance.vue | 22 ++++++++++++++++++- .../projectNonConformance/index.vue | 6 ++--- 2 files changed, 24 insertions(+), 4 deletions(-) diff --git a/jero-web/src/views/projectManagement/components/nonConformance.vue b/jero-web/src/views/projectManagement/components/nonConformance.vue index 78f89698c..540f23467 100644 --- a/jero-web/src/views/projectManagement/components/nonConformance.vue +++ b/jero-web/src/views/projectManagement/components/nonConformance.vue @@ -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) }, diff --git a/jero-web/src/views/projectManagement/projectNonConformance/index.vue b/jero-web/src/views/projectManagement/projectNonConformance/index.vue index 2959f12dd..a98310442 100644 --- a/jero-web/src/views/projectManagement/projectNonConformance/index.vue +++ b/jero-web/src/views/projectManagement/projectNonConformance/index.vue @@ -149,7 +149,7 @@ 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) },