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 { 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); });