mirror of
https://github.com/jumpserver/lina.git
synced 2026-01-25 14:34:46 +00:00
perf: 授权添加账号模版
This commit is contained in:
@@ -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",
|
||||
|
||||
@@ -502,6 +502,7 @@
|
||||
"TableColSettingInfo": "表示したいリストの詳細を選択してください。",
|
||||
"Add": "追加",
|
||||
"TemplateAdd": "テンプレートの追加",
|
||||
"TemplateHelpText": "テンプレートを選択してアカウントを追加すると、資産の下では発生しないアカウントが自動的に作成され、プッシュされます",
|
||||
"UpdateAssetDetail": "詳細情報の設定",
|
||||
"AddSuccessMsg": "追加に成功しました",
|
||||
"AddFailMsg": "追加に失敗しました",
|
||||
|
||||
@@ -516,6 +516,7 @@
|
||||
"TableColSettingInfo": "请选择您想显示的列表详细信息。",
|
||||
"Add": "添加",
|
||||
"TemplateAdd": "模版添加",
|
||||
"TemplateHelpText": "选择模版添加时,会自动创建资产下不存在的账号并推送",
|
||||
"Task": "任务",
|
||||
"UpdateAssetDetail": "配置更多信息",
|
||||
"AddSuccessMsg": "添加成功",
|
||||
|
||||
@@ -24,9 +24,10 @@
|
||||
:value="specAccountsInput"
|
||||
@change="handleTagChange"
|
||||
/>
|
||||
<el-button size="small" type="primary" @click="showAccountTemplateDialog=true">
|
||||
通过账号模版选择
|
||||
<el-button size="small" type="primary" style="margin-left: 10px" @click="showAccountTemplateDialog=true">
|
||||
{{ $t('common.TemplateAdd') }}
|
||||
</el-button>
|
||||
{{ $t('common.TemplateHelpText') }}
|
||||
</el-form-item>
|
||||
</div>
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user