diff --git a/src/i18n/langs/en.json b/src/i18n/langs/en.json index 82ef69597..350d36b21 100644 --- a/src/i18n/langs/en.json +++ b/src/i18n/langs/en.json @@ -506,6 +506,7 @@ "TableColSettingInfo": "Please select the list details you want to display", "Add": "Add", "TemplateAdd": "Template add", + "TemplateHelpText": "When selecting a template to add, it will automatically create an account that does not exist under the asset and push it", "PleaseAgreeToTheTerms": "Please agree to the terms", "PushSelected": "Push selected", "PushSelectedSystemUsersToAsset": "Push selected system users to asset", diff --git a/src/i18n/langs/ja.json b/src/i18n/langs/ja.json index 04cbe9f2f..063b15254 100644 --- a/src/i18n/langs/ja.json +++ b/src/i18n/langs/ja.json @@ -502,6 +502,7 @@ "TableColSettingInfo": "表示したいリストの詳細を選択してください。", "Add": "追加", "TemplateAdd": "テンプレートの追加", + "TemplateHelpText": "テンプレートを選択してアカウントを追加すると、資産の下では発生しないアカウントが自動的に作成され、プッシュされます", "UpdateAssetDetail": "詳細情報の設定", "AddSuccessMsg": "追加に成功しました", "AddFailMsg": "追加に失敗しました", diff --git a/src/i18n/langs/zh.json b/src/i18n/langs/zh.json index 6c69d7058..597cf594f 100644 --- a/src/i18n/langs/zh.json +++ b/src/i18n/langs/zh.json @@ -516,6 +516,7 @@ "TableColSettingInfo": "请选择您想显示的列表详细信息。", "Add": "添加", "TemplateAdd": "模版添加", + "TemplateHelpText": "选择模版添加时,会自动创建资产下不存在的账号并推送", "Task": "任务", "UpdateAssetDetail": "配置更多信息", "AddSuccessMsg": "添加成功", diff --git a/src/views/perms/AssetPermission/components/AccountFormatter.vue b/src/views/perms/AssetPermission/components/AccountFormatter.vue index ce214c84b..066d6483d 100644 --- a/src/views/perms/AssetPermission/components/AccountFormatter.vue +++ b/src/views/perms/AssetPermission/components/AccountFormatter.vue @@ -24,9 +24,10 @@ :value="specAccountsInput" @change="handleTagChange" /> - - 通过账号模版选择 + + {{ $t('common.TemplateAdd') }} + {{ $t('common.TemplateHelpText') }} @@ -177,7 +178,6 @@ export default { this.specAccountsTemplate = this.$refs.templateTable.selectedRows const added = this.specAccountsTemplate.map(i => i.username) this.specAccountsInput = this.specAccountsInput.filter(i => !added.includes(i)).concat(added) - console.log('specAccountsInput', this.specAccountsInput) this.outputValue() setTimeout(() => { this.showAccountTemplateDialog = false @@ -205,7 +205,8 @@ export default { outputValue() { let choicesSelected = this.choicesSelected if (this.showSpecAccounts) { - choicesSelected = [...this.choicesSelected, ...this.specAccountsInput] + const templateIds = this.specAccountsTemplate.map(i => `%${i.id}`) + choicesSelected = [...this.choicesSelected, ...this.specAccountsInput, ...templateIds] } this.$emit('input', choicesSelected) this.$emit('change', choicesSelected) @@ -221,10 +222,18 @@ export default { .spec-accounts { border: solid 1px #f3f3f4; - padding: 10px; + padding: 10px 10px 0; - >>> .filter-field .el-form-item__content { - width: 90% !important; + &>>> .el-form-item { + display: flex; + } + &>>> .el-form-item__content { + width: 80% !important; + flex: 1; + } + &>>> .filter-field { + width: calc(100% - 94px); + display: inline-block; } }