From a9b1b357f257e6391b44c2cd0b8abe2200b470c8 Mon Sep 17 00:00:00 2001 From: lhzzforever Date: Fri, 8 Mar 2024 17:09:23 +0800 Subject: [PATCH 1/2] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=85=A8=E5=B9=B3?= =?UTF-8?q?=E5=8F=B0=E6=97=A0=E6=B3=95=E5=B1=95=E7=A4=BAip=E9=80=89?= =?UTF-8?q?=E6=8B=A9=E5=99=A8=E6=89=8B=E5=8A=A8=E8=BE=93=E5=85=A5=E9=80=89?= =?UTF-8?q?=E9=A1=B9=E5=8D=A1=E7=9A=84=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../group/components/render-resource.vue | 25 +++++++++++++------ .../components/render-resource.vue | 24 ++++++++++++------ .../components/render-resource.vue | 24 ++++++++++++------ .../components/render-resource.vue | 24 ++++++++++++------ 4 files changed, 69 insertions(+), 28 deletions(-) diff --git a/frontend/src/views/group/components/render-resource.vue b/frontend/src/views/group/components/render-resource.vue index 6846c12ea..a0032de58 100644 --- a/frontend/src/views/group/components/render-resource.vue +++ b/frontend/src/views/group/components/render-resource.vue @@ -46,6 +46,7 @@ :limit-value="getLimitInstance(conditionLimitData[index])" :select-list="curSelectList(index)" :select-value="curSelectValue(index)" + :selection-mode="curSelectionMode(index)" :system-params="params" :has-attribute="condition.hasOwnProperty('attribute')" :has-status-bar="conditionData.length > 1 && index !== conditionData.length - 1" @@ -559,14 +560,24 @@ const isHasInstance = item.instance && item.instance.length > 0; const isHasAttribute = item.attribute && item.attribute.length > 0; let curSelectMode = ''; - if (!isHasInstance && isHasAttribute) { - curSelectMode = 'attribute'; - this.$delete(this.conditionData[index], 'instance'); - } else if (isHasInstance && !isHasAttribute) { - curSelectMode = 'instance'; - this.$delete(this.conditionData[index], 'attribute'); + if (['instance:paste'].includes(this.selectionMode)) { + curSelectMode = this.selectionMode; + if (!isHasInstance) { + this.$delete(this.conditionData[index], 'instance'); + } + if (!isHasAttribute) { + this.$delete(this.conditionData[index], 'attribute'); + } } else { - curSelectMode = 'all'; + if (!isHasInstance && isHasAttribute) { + curSelectMode = 'attribute'; + this.$delete(this.conditionData[index], 'instance'); + } else if (isHasInstance && !isHasAttribute) { + curSelectMode = 'instance'; + this.$delete(this.conditionData[index], 'attribute'); + } else { + curSelectMode = 'all'; + } } this.$set(this.selectionModeMap, index, curSelectMode); }); diff --git a/frontend/src/views/manage-spaces/components/render-resource.vue b/frontend/src/views/manage-spaces/components/render-resource.vue index c44aac4b6..e0bb763cc 100644 --- a/frontend/src/views/manage-spaces/components/render-resource.vue +++ b/frontend/src/views/manage-spaces/components/render-resource.vue @@ -554,14 +554,24 @@ const isHasInstance = item.instance && item.instance.length > 0; const isHasAttribute = item.attribute && item.attribute.length > 0; let curSelectMode = ''; - if (!isHasInstance && isHasAttribute) { - curSelectMode = 'attribute'; - this.$delete(this.conditionData[index], 'instance'); - } else if (isHasInstance && !isHasAttribute) { - curSelectMode = 'instance'; - this.$delete(this.conditionData[index], 'attribute'); + if (['instance:paste'].includes(this.selectionMode)) { + curSelectMode = this.selectionMode; + if (!isHasInstance) { + this.$delete(this.conditionData[index], 'instance'); + } + if (!isHasAttribute) { + this.$delete(this.conditionData[index], 'attribute'); + } } else { - curSelectMode = 'all'; + if (!isHasInstance && isHasAttribute) { + curSelectMode = 'attribute'; + this.$delete(this.conditionData[index], 'instance'); + } else if (isHasInstance && !isHasAttribute) { + curSelectMode = 'instance'; + this.$delete(this.conditionData[index], 'attribute'); + } else { + curSelectMode = 'all'; + } } this.$set(this.selectionModeMap, index, curSelectMode); }); diff --git a/frontend/src/views/manage-spaces/secondary-manage-space/components/render-resource.vue b/frontend/src/views/manage-spaces/secondary-manage-space/components/render-resource.vue index 855da5bef..5c96ccd9b 100644 --- a/frontend/src/views/manage-spaces/secondary-manage-space/components/render-resource.vue +++ b/frontend/src/views/manage-spaces/secondary-manage-space/components/render-resource.vue @@ -554,14 +554,24 @@ const isHasInstance = item.instance && item.instance.length > 0; const isHasAttribute = item.attribute && item.attribute.length > 0; let curSelectMode = ''; - if (!isHasInstance && isHasAttribute) { - curSelectMode = 'attribute'; - this.$delete(this.conditionData[index], 'instance'); - } else if (isHasInstance && !isHasAttribute) { - curSelectMode = 'instance'; - this.$delete(this.conditionData[index], 'attribute'); + if (['instance:paste'].includes(this.selectionMode)) { + curSelectMode = this.selectionMode; + if (!isHasInstance) { + this.$delete(this.conditionData[index], 'instance'); + } + if (!isHasAttribute) { + this.$delete(this.conditionData[index], 'attribute'); + } } else { - curSelectMode = 'all'; + if (!isHasInstance && isHasAttribute) { + curSelectMode = 'attribute'; + this.$delete(this.conditionData[index], 'instance'); + } else if (isHasInstance && !isHasAttribute) { + curSelectMode = 'instance'; + this.$delete(this.conditionData[index], 'attribute'); + } else { + curSelectMode = 'all'; + } } this.$set(this.selectionModeMap, index, curSelectMode); }); diff --git a/frontend/src/views/perm-template/components/render-resource.vue b/frontend/src/views/perm-template/components/render-resource.vue index 9b0277e98..4cbd2c831 100644 --- a/frontend/src/views/perm-template/components/render-resource.vue +++ b/frontend/src/views/perm-template/components/render-resource.vue @@ -494,14 +494,24 @@ const isHasInstance = item.instance && item.instance.length > 0; const isHasAttribute = item.attribute && item.attribute.length > 0; let curSelectMode = ''; - if (!isHasInstance && isHasAttribute) { - curSelectMode = 'attribute'; - this.$delete(this.conditionData[index], 'instance'); - } else if (isHasInstance && !isHasAttribute) { - curSelectMode = 'instance'; - this.$delete(this.conditionData[index], 'attribute'); + if (['instance:paste'].includes(this.selectionMode)) { + curSelectMode = this.selectionMode; + if (!isHasInstance) { + this.$delete(this.conditionData[index], 'instance'); + } + if (!isHasAttribute) { + this.$delete(this.conditionData[index], 'attribute'); + } } else { - curSelectMode = 'all'; + if (!isHasInstance && isHasAttribute) { + curSelectMode = 'attribute'; + this.$delete(this.conditionData[index], 'instance'); + } else if (isHasInstance && !isHasAttribute) { + curSelectMode = 'instance'; + this.$delete(this.conditionData[index], 'attribute'); + } else { + curSelectMode = 'all'; + } } this.$set(this.selectionModeMap, index, curSelectMode); }); From 6980a0cc13f8bbae615d361d0afcace52738ded8 Mon Sep 17 00:00:00 2001 From: lhzzforever Date: Fri, 8 Mar 2024 17:27:37 +0800 Subject: [PATCH 2/2] =?UTF-8?q?fix:=20=E5=B1=95=E5=BC=80=E6=8C=89=E9=92=AE?= =?UTF-8?q?=E6=B6=88=E5=A4=B1=E5=90=8E=E4=BC=9A=E4=BD=8D=E7=A7=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/components/choose-ip/topology-tree.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/components/choose-ip/topology-tree.vue b/frontend/src/components/choose-ip/topology-tree.vue index afb2b3e6e..ded98ea7a 100644 --- a/frontend/src/components/choose-ip/topology-tree.vue +++ b/frontend/src/components/choose-ip/topology-tree.vue @@ -1271,7 +1271,7 @@ .filter((item) => item.level === node.level) .some((item) => item.type === 'node' && item.async); const flag = !node.async && isSameLevelExistSync; - const asyncIconWidth = 5; + // const asyncIconWidth = 5; if (!node.level) { // if (flag) { // return { @@ -1294,7 +1294,7 @@ } if (flag) { return { - marginLeft: (node.level + 1) * this.leftBaseIndent + asyncIconWidth + 'px' + marginLeft: (node.level + 1) * this.leftBaseIndent + 'px' }; } return {