From 566a56ca54fa289a092bca14c708d075b80bf966 Mon Sep 17 00:00:00 2001 From: zhaoyiran Date: Fri, 12 Apr 2024 16:20:21 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/qms/basicDataManage/dynamicRule/index.vue | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/views/qms/basicDataManage/dynamicRule/index.vue b/src/views/qms/basicDataManage/dynamicRule/index.vue index a13f755a1..bdce56369 100644 --- a/src/views/qms/basicDataManage/dynamicRule/index.vue +++ b/src/views/qms/basicDataManage/dynamicRule/index.vue @@ -341,7 +341,10 @@ const detailOpenForm = (type, row, masterParmas) => { const validateIfRepeat = (type,data) => { let mergedArray: any[] = []; - if(type == 'create' || type == 'update'){ + if(type == 'create'){ + mergedArray = [data, ...detailList.value]; + }if(type == 'update'){ + detailList.value = detailList.value.filter(item => item.id !== data.id); mergedArray = [data, ...detailList.value]; } const stageSet = new Set(mergedArray.map(item => item.stage));