From c5b54a8ce0de4ae8bb360b2b9bc227e328b5b2c0 Mon Sep 17 00:00:00 2001 From: yiwenZhou <67539158+ywywZhou@users.noreply.github.com> Date: Mon, 18 Sep 2023 11:25:05 +0800 Subject: [PATCH] =?UTF-8?q?Horse=E7=89=88=E6=9C=AC=E6=8F=90=E6=B5=8B?= =?UTF-8?q?=E9=97=AE=E9=A2=98=E4=BF=AE=E5=A4=8D=20(#7082)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/desktop/package.json | 2 +- .../common/RenderForm/IpSelector/StaticIp.vue | 18 ++-- .../common/RenderForm/tags/TagDatatable.vue | 3 + .../common/RenderForm/tags/TagInput.vue | 11 ++ .../common/RenderForm/tags/TagSelect.vue | 5 +- .../common/RenderForm/tags/TagTextarea.vue | 1 - frontend/desktop/src/config/i18n/cn.js | 6 +- frontend/desktop/src/config/i18n/en.js | 6 +- .../pages/task/TaskExecute/ExecuteInfo.vue | 10 +- .../pages/task/TaskExecute/TaskOperation.vue | 20 ++-- .../TemplateEdit/NodeConfig/NodeConfig.vue | 11 +- .../TabGlobalVariables/index.vue | 100 +++++++++++++++++- .../desktop/src/store/modules/taskList.js | 2 +- 13 files changed, 162 insertions(+), 33 deletions(-) diff --git a/frontend/desktop/package.json b/frontend/desktop/package.json index 7059bbabf8..b9cfec0a97 100644 --- a/frontend/desktop/package.json +++ b/frontend/desktop/package.json @@ -19,7 +19,7 @@ "ajv": "^6.10.2", "art-template": "^4.13.0", "axios": "^0.18.0", - "bk-magic-vue": "2.5.7", + "bk-magic-vue": "2.5.8-beta.10", "cron-parser-custom": "^2.13.0", "dom-to-image": "^2.6.0", "element-ui": "^2.4.1", diff --git a/frontend/desktop/src/components/common/RenderForm/IpSelector/StaticIp.vue b/frontend/desktop/src/components/common/RenderForm/IpSelector/StaticIp.vue index b821b6e476..4601d5ebf3 100644 --- a/frontend/desktop/src/components/common/RenderForm/IpSelector/StaticIp.vue +++ b/frontend/desktop/src/components/common/RenderForm/IpSelector/StaticIp.vue @@ -62,7 +62,7 @@ {{staticIps.length}} {{$t('个静态IP,')}} {{$t('其中')}} - {{failedAgentLength}} + {{abnormalLength}} {{$t('个')}}{{$t('异常')}}
@@ -138,27 +138,27 @@ operations: [ { type: 'copyIp', - name: this.$t('复制IP') + name: this.$t('复制所有IP') }, { type: 'copyAgentIp', - name: this.$t('复制Agent异常IP') + name: this.$t('复制异常IP') }, { type: 'clearIp', - name: this.$t('清空IP') + name: this.$t('清除所有IP') }, { type: 'clearFailedAgentIp', - name: this.$t('清空Agent异常IP') + name: this.$t('清除异常IP') } ], isUnfold: false } }, computed: { - failedAgentLength () { - return this.staticIps.filter(item => item.agent !== 1).length + abnormalLength () { + return this.staticIps.filter(item => item.agent !== 1 || item.diff).length }, isShowQuantity () { return this.staticIps.length @@ -224,14 +224,14 @@ this.handleIpCopy(ipStr) }, copyAgentIp () { - const ipStr = this.staticIps.filter(item => item.agent !== 1).map(d => d.bk_host_innerip).join(',') + const ipStr = this.staticIps.filter(item => item.agent !== 1 || item.diff).map(d => d.bk_host_innerip).join(',') this.handleIpCopy(ipStr) }, clearIp () { this.$emit('change', []) }, clearFailedAgentIp () { - const staticIps = this.staticIps.filter(item => item.agent === 1) + const staticIps = this.staticIps.filter(item => item.agent === 1 && !item.diff) this.$emit('change', staticIps) }, onDropdownShow () { diff --git a/frontend/desktop/src/components/common/RenderForm/tags/TagDatatable.vue b/frontend/desktop/src/components/common/RenderForm/tags/TagDatatable.vue index 0ea003e782..1696ec01fb 100644 --- a/frontend/desktop/src/components/common/RenderForm/tags/TagDatatable.vue +++ b/frontend/desktop/src/components/common/RenderForm/tags/TagDatatable.vue @@ -693,4 +693,7 @@ white-space: nowrap; cursor: pointer; } + /deep/.rf-tag-form { + margin-left: 0 !important; + } diff --git a/frontend/desktop/src/components/common/RenderForm/tags/TagInput.vue b/frontend/desktop/src/components/common/RenderForm/tags/TagInput.vue index c11fb6e7cd..b70ea3411e 100644 --- a/frontend/desktop/src/components/common/RenderForm/tags/TagInput.vue +++ b/frontend/desktop/src/components/common/RenderForm/tags/TagInput.vue @@ -183,6 +183,17 @@ } else { this.handleInputBlur() } + }, + formMode (val) { + if (val) { + this.$nextTick(() => { + const divInputDom = this.$el.querySelector('.div-input') + divInputDom.innerHTML = this.value + this.handleInputBlur() + }) + } else { + this.validate() + } } }, created () { diff --git a/frontend/desktop/src/components/common/RenderForm/tags/TagSelect.vue b/frontend/desktop/src/components/common/RenderForm/tags/TagSelect.vue index ce743986c0..0728550f46 100644 --- a/frontend/desktop/src/components/common/RenderForm/tags/TagSelect.vue +++ b/frontend/desktop/src/components/common/RenderForm/tags/TagSelect.vue @@ -72,7 +72,7 @@

{{validateInfo.message}}
- {{ value || '--' }} + {{ viewValue || '--' }}