From 8950d57ff802462556fc0f5d371162eb947fe22a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Chuailei000=E2=80=9D?= <2280131253@qq.com> Date: Mon, 24 Oct 2022 14:57:45 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E8=B5=84=E4=BA=A7=E8=B4=A6=E5=8F=B7?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=9F=A5=E7=9C=8B=E5=8E=86=E5=8F=B2=E5=AF=86?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../PasswordHistoryDialog.vue | 75 +++++++++++++++++++ .../AccountListTable/ShowSecretInfo.vue | 46 ++++++++++-- src/components/AccountListTable/index.vue | 21 +++++- .../TableFormatters/ShowKeyCopyFormatter.vue | 39 +++++++--- src/i18n/langs/en.json | 2 + src/i18n/langs/ja.json | 2 + src/i18n/langs/zh.json | 2 + 7 files changed, 168 insertions(+), 19 deletions(-) create mode 100644 src/components/AccountListTable/PasswordHistoryDialog.vue diff --git a/src/components/AccountListTable/PasswordHistoryDialog.vue b/src/components/AccountListTable/PasswordHistoryDialog.vue new file mode 100644 index 000000000..eb66af16e --- /dev/null +++ b/src/components/AccountListTable/PasswordHistoryDialog.vue @@ -0,0 +1,75 @@ + + + + + diff --git a/src/components/AccountListTable/ShowSecretInfo.vue b/src/components/AccountListTable/ShowSecretInfo.vue index 6cbab634d..08da85ec6 100644 --- a/src/components/AccountListTable/ShowSecretInfo.vue +++ b/src/components/AccountListTable/ShowSecretInfo.vue @@ -18,16 +18,25 @@
- + - - + + - - + + + + + {{ $moment(authInfo.date_created, 'YYYY-MM-DD HH:mm:ss').format('YYYY-MM-DD HH:mm:ss') }} + + + {{ $moment(authInfo.date_updated, 'YYYY-MM-DD HH:mm:ss').format('YYYY-MM-DD HH:mm:ss') }} + + + {{ authInfo.version }}
@@ -38,11 +47,14 @@ - diff --git a/src/components/AccountListTable/index.vue b/src/components/AccountListTable/index.vue index 6921712ab..5bb221193 100644 --- a/src/components/AccountListTable/index.vue +++ b/src/components/AccountListTable/index.vue @@ -15,6 +15,11 @@ :account="account" @add="addAccountSuccess" /> + @@ -27,6 +32,7 @@ import AddAccount from './AddAccount' import { connectivityMeta } from './const' import { openTaskPage } from '@/utils/jms' import { hasUUID } from '@/utils/common' +import PasswordHistoryDialog from './PasswordHistoryDialog' export default { name: 'AccountListTable', @@ -34,7 +40,8 @@ export default { ListTable, UpdateSecretInfo, ShowSecretInfo, - AddAccount + AddAccount, + PasswordHistoryDialog }, props: { url: { @@ -71,6 +78,7 @@ export default { data() { const vm = this return { + showPasswordHistoryDialog: false, showViewSecretDialog: false, showUpdateSecretDialog: false, showAddDialog: false, @@ -176,6 +184,17 @@ export default { vm.showAddDialog = true }) } + }, + { + title: this.$t('accounts.HistoryPassword'), + can: this.$hasPerm('assets.change_assetaccountsecret') && !this.$store.getters.currentOrgIsRoot, + callback: ({ row }) => { + vm.account = row + vm.showPasswordHistoryDialog = false + setTimeout(() => { + vm.showPasswordHistoryDialog = true + }) + } } ] } diff --git a/src/components/TableFormatters/ShowKeyCopyFormatter.vue b/src/components/TableFormatters/ShowKeyCopyFormatter.vue index 6ce047a24..9d533ea9f 100644 --- a/src/components/TableFormatters/ShowKeyCopyFormatter.vue +++ b/src/components/TableFormatters/ShowKeyCopyFormatter.vue @@ -3,6 +3,7 @@ {{ currentValue }}