From 07062c446e301f7a2c0a76693090ed3a0e32db8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E9=9C=84?= Date: Wed, 17 Jan 2024 10:41:01 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E5=89=8D=E7=AB=AF=E8=A1=A8=E6=A0=BC?= =?UTF-8?q?=E5=A2=9E=E5=88=A0=E9=80=BB=E8=BE=91=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../standardizationActivity/tables/MeetingTable.vue | 4 ++-- .../components/StandardList.vue | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/views/businessSupport/standardizationActivity/tables/MeetingTable.vue b/src/views/businessSupport/standardizationActivity/tables/MeetingTable.vue index 79e9d79f..cd640212 100644 --- a/src/views/businessSupport/standardizationActivity/tables/MeetingTable.vue +++ b/src/views/businessSupport/standardizationActivity/tables/MeetingTable.vue @@ -158,7 +158,7 @@ export default { this.selectedRowKeys = selectedRowKeys }, formModalOk (lineData) { - lineData.tableRowKey = this.realDataSource.length + lineData.tableRowKey = this.realDataSource && this.realDataSource.length > 0 ? this.realDataSource[this.realDataSource.length - 1].tableRowKey + 1 : 0 this.realDataSource.push(lineData) this.$emit('ok', this.realDataSource) }, @@ -190,7 +190,7 @@ export default { * 校验文件是否上传 * @returns {boolean} */ - validateTableData() { + validateTableData () { if (this.realDataSource.some(tt => !tt.meetingData)) { this.$message.warning(this.$t('businessSupport.standardizationActivity.pleaseUploadMeeting')) return false diff --git a/src/views/workCenter/projectComplianceEvaluationProcess/components/StandardList.vue b/src/views/workCenter/projectComplianceEvaluationProcess/components/StandardList.vue index ee153c06..f426927c 100644 --- a/src/views/workCenter/projectComplianceEvaluationProcess/components/StandardList.vue +++ b/src/views/workCenter/projectComplianceEvaluationProcess/components/StandardList.vue @@ -191,7 +191,7 @@ export default { return dictItem }) } - item.tableRowKey = this.dataSource.length + item.tableRowKey = this.dataSource && this.dataSource.length > 0 ? this.dataSource[this.dataSource.length - 1].tableRowKey + 1 : 0 this.dataSource.push(item) }) console.log(this.dataSource)