diff --git a/src/resources/plugins/TsSheet/TsSheet.vue b/src/resources/plugins/TsSheet/TsSheet.vue index 0217f668d6a35e2e5b7fe2c6ba009e4a9e078125..198f84f29f2ab660b88775383e01a7f6414e759f 100644 --- a/src/resources/plugins/TsSheet/TsSheet.vue +++ b/src/resources/plugins/TsSheet/TsSheet.vue @@ -1072,6 +1072,15 @@ export default { }, clearReactionRow(reaction) { //清除行联动的废数据 if (!this.$utils.isEmpty(reaction)) { + let tableRowList = []; + (this.config?.tableList || []).forEach((v) => { + if (v && v.hasOwnProperty('row')) { + const currentRow = v.row + 1; + if (!tableRowList.includes(currentRow)) { + tableRowList.push(currentRow); + } + } + }); Object.keys(reaction).forEach(key => { if (!this.$utils.isEmpty(reaction[key])) { reaction[key].forEach(item => { @@ -1093,11 +1102,17 @@ export default { item.conditionGroupList = item.conditionGroupList.filter(c => !groupUuidList.includes(c.uuid)); } if (this.$utils.isEmpty(item.conditionGroupList)) { - item.rows = []; + if (!this.$utils.isEmpty(item.rows)) { + for (let j = item.rows.length - 1; j >= 0; j--) { + if (!tableRowList.includes(j)) { + item.rows.splice(j, 1); + } + } + } item.conditionGroupRelList = []; } }); - reaction[key] = reaction[key].filter(item => !this.$utils.isEmpty(item.conditionGroupList)); + reaction[key] = reaction[key].filter(item => !this.$utils.isEmpty(item.rows)); } }); //更新配置