From c554986d1e41158034ae0d67a5d5e2eae745fe42 Mon Sep 17 00:00:00 2001 From: dengbf Date: Tue, 2 Sep 2025 18:15:23 +0800 Subject: [PATCH] =?UTF-8?q?-=20[=E4=BF=AE=E5=A4=8D]=20#[1501337999605760]?= =?UTF-8?q?=E8=B5=84=E4=BA=A7=E6=B8=85=E5=8D=95=E9=AB=98=E7=BA=A7=E6=90=9C?= =?UTF-8?q?=E7=B4=A2=E7=94=9F=E6=88=90=E6=95=B0=E6=8D=AE=E4=B8=AD=E5=AD=98?= =?UTF-8?q?=E5=9C=A8=E7=9B=B8=E5=90=8C=E7=9A=84uuid=20http://192.168.0.96:?= =?UTF-8?q?8090/demo/rdm.html#/bug-detail/939050947543040/939050947543057/?= =?UTF-8?q?1501337999605760?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/cmdb/asset/advanced-mode-search.vue | 40 +++++++++---------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/src/views/pages/cmdb/asset/advanced-mode-search.vue b/src/views/pages/cmdb/asset/advanced-mode-search.vue index baac5c18..1fc06cdc 100644 --- a/src/views/pages/cmdb/asset/advanced-mode-search.vue +++ b/src/views/pages/cmdb/asset/advanced-mode-search.vue @@ -555,26 +555,26 @@ export default { }); } }); - conditionList && !this.$utils.isEmpty(conditionList) && conditionList.forEach((item) => { - if (uuidList && this.$utils.isEmpty(uuidList) && item.name && item.expression) { - this.searchConditionList.push({conditionList: [item], uuid: item.uuid, childUuid: item.childUuid, joinType: item.joinType, childJoinType: item.childJoinType}); // 根据id相同,合并分组 - uuidList.push(item.uuid); - } else if (uuidList.includes(item.uuid)) { - this.searchConditionList.forEach((v) => { - if (v && v.conditionList && !this.$utils.isEmpty(v.conditionList) && v.uuid == item.uuid) { - v.conditionList.push(item); - } else if (v && !v.hasOwnProperty('conditionList')) { - this.$set(v, 'conditionList', [item]); - } - }); - } else if (!uuidList.includes(item.uuid) && item && item.name && item.expression) { - this.searchConditionList.push({ - conditionList: [item], - uuid: item.uuid, - joinType: item.joinType, - childUuid: item.childUuid, - childJoinType: item.childJoinType - }); + !this.$utils.isEmpty(conditionList) && conditionList.forEach((item) => { + if (item.name && item.expression) { + if (uuidList.includes(item.uuid)) { + this.searchConditionList.forEach((v) => { + if (v && !this.$utils.isEmpty(v.conditionList) && v.uuid == item.uuid) { + v.conditionList.push(item); + } else if (v && !v.hasOwnProperty('conditionList')) { + this.$set(v, 'conditionList', [item]); + } + }); + } else if (!uuidList.includes(item.uuid)) { + this.searchConditionList.push({ + conditionList: [item], + uuid: item.uuid, + joinType: item.joinType, + childUuid: item.childUuid, + childJoinType: item.childJoinType + }); + uuidList.push(item.uuid); + } } }); this.searchConditionList && this.searchConditionList.forEach((v, tIndex) => { -- Gitee