From c4cc5d126ef19ca52195e8115adbd08602e7d41c Mon Sep 17 00:00:00 2001 From: danshihao Date: Mon, 22 Jul 2024 18:13:24 +0800 Subject: [PATCH] =?UTF-8?q?[fix=2087397]=20=E6=9C=80=E5=90=8E=E4=B8=80?= =?UTF-8?q?=E6=9D=A1=E6=95=B0=E6=8D=AE=E4=B8=8D=E5=BA=94=E8=AF=A5=E8=83=BD?= =?UTF-8?q?=E5=88=A0=E6=8E=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/InterpretationClauseTable.vue | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/views/workCenter/standardInterpretationProcess/modules/InterpretationClauseTable.vue b/src/views/workCenter/standardInterpretationProcess/modules/InterpretationClauseTable.vue index 7ef715c..4542c92 100644 --- a/src/views/workCenter/standardInterpretationProcess/modules/InterpretationClauseTable.vue +++ b/src/views/workCenter/standardInterpretationProcess/modules/InterpretationClauseTable.vue @@ -481,6 +481,10 @@ export default { isMainInterpreterDistribute () { return mainInterpreterDistributeNodes.includes(this.currentNodeId) }, + // 是否重新分发节点(列表数据可以删空代表不分发) + isReDistribute () { + return this.currentNodeId === StandardInterpretationNodes.standardInterpreterReDistribution.value + }, // 显示导出按钮 showExportBtn () { return [ @@ -762,6 +766,11 @@ export default { * @param id - 删除数据的id */ handleDelete (id) { + // 判断不能删除所有数据(重新分发节点可以删空) + if (!this.isReDistribute && (this.dataSource.length <= 1)) { + this.$message.warning(this.$t('tableDataDisabledClear')) + return + } const that = this this.$confirm({ title: this.$t('confirmDeletion'), @@ -781,6 +790,11 @@ export default { * 批量删除 */ handleBatchDelete () { + // 判断不能删除所有数据(重新分发节点可以删空) + if (!this.isReDistribute && (this.selectedRowKeys.length === this.dataSource.length)) { + this.$message.warning(this.$t('tableDataDisabledClear')) + return + } // 至少勾选一条数据 if (!this.selectedRowKeys.length) { this.$message.warning(this.$t('pleaseSelectDeleteData'))