diff --git a/src/views/acls/AssetLoginACL/AssetLoginAclCreateUpdate.vue b/src/views/acls/AssetLoginACL/AssetLoginAclCreateUpdate.vue index 825590290..500d48dba 100644 --- a/src/views/acls/AssetLoginACL/AssetLoginAclCreateUpdate.vue +++ b/src/views/acls/AssetLoginACL/AssetLoginAclCreateUpdate.vue @@ -55,7 +55,7 @@ export default { component: AccountFormatter, el: { showAddTemplate: false, - showVirtualAccount: false, + enableVirtualAccount: false, value: ['@ALL'], assets: [] }, diff --git a/src/views/acls/CommandFilterACL/CommandFilterAcl/CommandFilterAclCreateUpdate.vue b/src/views/acls/CommandFilterACL/CommandFilterAcl/CommandFilterAclCreateUpdate.vue index 95a0a4318..daa43209a 100644 --- a/src/views/acls/CommandFilterACL/CommandFilterAcl/CommandFilterAclCreateUpdate.vue +++ b/src/views/acls/CommandFilterACL/CommandFilterAcl/CommandFilterAclCreateUpdate.vue @@ -44,7 +44,7 @@ export default { component: AccountFormatter, el: { showAddTemplate: false, - showVirtualAccount: false + enableVirtualAccount: false } }, action: {}, diff --git a/src/views/perms/AssetPermission/components/AccountFormatter.vue b/src/views/perms/AssetPermission/components/AccountFormatter.vue index 16a930593..a0a5a2f77 100644 --- a/src/views/perms/AssetPermission/components/AccountFormatter.vue +++ b/src/views/perms/AssetPermission/components/AccountFormatter.vue @@ -15,7 +15,7 @@ -
+
{{ $t('SpecAccount') }}
-
-
{{ $t('ExcludeAccount') }}
- -
+ + + + -
- Virtual Account - +
+ + {{ virtualAccount.label }} + + { if (vm.specAccountsTemplate.filter(i => i.username === tag).length > 0) { return 'primary' @@ -149,7 +158,7 @@ export default { return 'info' } }, - showNotAccounts: false, + showExcludeZone: false, accountTemplateTable: accountTemplateTable, autocomplete: (query, cb) => { const data = { @@ -172,10 +181,15 @@ export default { } } }, + computed: { + virtualAccount() { + return virtualAccount + } + }, watch: { realRadioSelected(val) { - this.showSpecAccounts = val === this.SPEC - this.showNotAccounts = val === this.EXCLUDE + this.showSpecZone = val === this.SPEC + this.showExcludeZone = val === this.EXCLUDE } }, mounted() { @@ -236,6 +250,7 @@ export default { }, 100) }, handleVirtualChecked(evt, checked) { + console.log('Vhcek cch') this.outputValue() }, handleRadioChanged(value) { @@ -249,7 +264,7 @@ export default { let choicesSelected = [] if (this.realRadioSelected === this.ALL) { choicesSelected = [this.ALL] - } else if (this.realRadioSelected === this.SPEC && this.showSpecAccounts) { + } else if (this.realRadioSelected === this.SPEC && this.showSpecZone) { const templateIds = this.specAccountsTemplate.map(i => `%${i.id}`) choicesSelected = [this.realRadioSelected, ...this.specAccountsInput, ...templateIds] } @@ -261,6 +276,8 @@ export default { choicesSelected = [...choicesSelected, ...this.virtualSelected] } + this.$log.debug('choicesSelected', choicesSelected) + this.$emit('input', choicesSelected) this.$emit('change', choicesSelected) } diff --git a/src/views/perms/const.js b/src/views/perms/const.js index 183c99206..1bfd886b7 100644 --- a/src/views/perms/const.js +++ b/src/views/perms/const.js @@ -168,6 +168,12 @@ export const AccountLabelMapper = { [AnonymousAccount]: i18n.t('AnonymousAccount') } +export const virtualAccount = { + label: i18n.t('VirtualAccounts'), + value: '@VIRTUAL', + tip: i18n.t('VirtualAccountHelpMsg') +} + export const realChoices = [ { label: AccountLabelMapper[AllAccount],