From 9837eb5b9aceffb3e7524767940483c24820e1d2 Mon Sep 17 00:00:00 2001 From: dengbf Date: Tue, 19 Aug 2025 11:08:30 +0800 Subject: [PATCH] =?UTF-8?q?-[=E5=85=B3=E8=81=94]=20#[1487701302280192]?= =?UTF-8?q?=E8=A1=A8=E5=8D=95=E7=BC=96=E8=BE=91-=E8=A1=8C=E8=81=94?= =?UTF-8?q?=E5=8A=A8=E8=A7=84=E5=88=99=E7=9A=84=E7=BB=84=E4=BB=B6=E8=A2=AB?= =?UTF-8?q?=E5=88=A0=E6=8E=89=EF=BC=8C=E4=BD=86=E6=98=AF=E8=A1=A8=E5=8D=95?= =?UTF-8?q?=E4=BF=9D=E5=AD=98=E6=97=B6=EF=BC=8C=E6=B2=A1=E6=9C=89=E6=B8=85?= =?UTF-8?q?=E9=99=A4=E8=81=94=E5=8A=A8=20http://192.168.0.96:8090/demo/rdm?= =?UTF-8?q?.html#/bug-detail/939050947543040/939050947543057/1487701302280?= =?UTF-8?q?192?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/resources/plugins/TsSheet/TsSheet.vue | 36 +++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/src/resources/plugins/TsSheet/TsSheet.vue b/src/resources/plugins/TsSheet/TsSheet.vue index 462826c3..0217f668 100644 --- a/src/resources/plugins/TsSheet/TsSheet.vue +++ b/src/resources/plugins/TsSheet/TsSheet.vue @@ -1063,11 +1063,47 @@ export default { } } }); + this.$set(data, '_type', 'new'); //标识新表单 this.$set(data, 'lcu', this.$AuthUtils.getCurrentUser().uuid); this.$set(data, 'lcd', new Date().getTime()); + this.clearReactionRow(data.reaction); return data; }, + clearReactionRow(reaction) { //清除行联动的废数据 + if (!this.$utils.isEmpty(reaction)) { + Object.keys(reaction).forEach(key => { + if (!this.$utils.isEmpty(reaction[key])) { + reaction[key].forEach(item => { + if (!this.$utils.isEmpty(item.conditionGroupList)) { + let groupUuidList = []; + item.conditionGroupList.forEach(c => { + let uuidList = []; + c.conditionList.forEach(d => { + //清除不存在的条件 + if (!this.formItemList.find(f => d.formItemUuid.includes(f.uuid))) { + uuidList.push(d.uuid); + } + }); + c.conditionList = c.conditionList.filter(d => !uuidList.includes(d.uuid)); + if (this.$utils.isEmpty(c.conditionList)) { + groupUuidList.push(c.uuid); + } + }); + item.conditionGroupList = item.conditionGroupList.filter(c => !groupUuidList.includes(c.uuid)); + } + if (this.$utils.isEmpty(item.conditionGroupList)) { + item.rows = []; + item.conditionGroupRelList = []; + } + }); + reaction[key] = reaction[key].filter(item => !this.$utils.isEmpty(item.conditionGroupList)); + } + }); + //更新配置 + this.$set(this.config, 'reaction', reaction); + } + }, //提供外部使用,返回表单数据 getFormData() { const formItemList = []; -- Gitee