diff --git a/src/components/Apps/AccountListTable/AccountList.vue b/src/components/Apps/AccountListTable/AccountList.vue index 23019526f9..324b40a537 100644 --- a/src/components/Apps/AccountListTable/AccountList.vue +++ b/src/components/Apps/AccountListTable/AccountList.vue @@ -392,9 +392,19 @@ export default { can: this.$hasPerm('accounts.delete_account'), type: 'primary', callback: ({ row }) => { - this.$axios.delete(`/api/v1/accounts/accounts/${row.id}/`).then(() => { - this.$message.success(this.$tc('common.deleteSuccessMsg')) - this.$refs.ListTable.reloadTable() + console.log(row) + const msg = this.$t('accounts.AccountDeleteConfirmMsg') + this.$confirm(msg, this.$tc('common.Info'), { + type: 'warning', + confirmButtonClass: 'el-button--danger', + beforeClose: async(action, instance, done) => { + if (action !== 'confirm') return done() + this.$axios.delete(`/api/v1/accounts/accounts/${row.id}/`).then(() => { + done() + this.$refs.ListTable.reloadTable() + this.$message.success(this.$tc('common.deleteSuccessMsg')) + }) + } }) } } diff --git a/src/i18n/langs/en.json b/src/i18n/langs/en.json index 800d446f7d..507ba31d8a 100644 --- a/src/i18n/langs/en.json +++ b/src/i18n/langs/en.json @@ -124,7 +124,8 @@ "AddAccountResult": "Add account result", "AutoPush": "Auto Push", "GeneralAccounts": "General Accounts", - "VirtualAccounts": "Virtual Accounts" + "VirtualAccounts": "Virtual Accounts", + "AccountDeleteConfirmMsg": "Delete account, do you want to continue?" }, "acl": { "CommandFilterACLHelpMsg": "You can control whether commands can be executed on assets. Based on the rules, certain commands can be allowed while others are prohibited.", @@ -2111,7 +2112,7 @@ "passwordWillExpiredPrefixMsg": "The password will expire in ", "passwordWillExpiredSuffixMsg": " days.Please change your password as soon as possible.", "dateLastLogin": "Date last login", - "AddAllMembersWarningMsg": "Are you sure you want to add all members" + "AddAllMembersWarningMsg": "Are you sure you want to add all members?" }, "notifications": { "MessageType": "Message Type", diff --git a/src/i18n/langs/ja.json b/src/i18n/langs/ja.json index ebc1333ffd..ec640a8131 100644 --- a/src/i18n/langs/ja.json +++ b/src/i18n/langs/ja.json @@ -124,7 +124,8 @@ "AddAccountResult": "账号批量添加结果", "AutoPush": "自動プッシュ", "GeneralAccounts": "一般アカウント", - "VirtualAccounts": "仮想アカウント" + "VirtualAccounts": "仮想アカウント", + "AccountDeleteConfirmMsg": "アカウントを削除します,続行しますか?" }, "acl": { "CommandFilterACLHelpMsg": "コマンドフィルタリングを使用すると、コマンドがアセット上で実行されるかどうかを制御できます。ルールに基づいて、特定のコマンドは許可され、他のコマンドは禁止されることがあります。", @@ -2100,7 +2101,7 @@ "passwordExpired": "パスワードが期限切れです", "passwordWillExpiredPrefixMsg": "パスワードはまもなく", "passwordWillExpiredSuffixMsg": "期限が切れた後、できるだけ早くパスワードを変更してください。", - "AddAllMembersWarningMsg": "すべてのメンバーを追加してもよろしいですか" + "AddAllMembersWarningMsg": "すべてのメンバーを追加してもよろしいですか?" }, "notifications": { "MessageType": "メッセージタイプ", diff --git a/src/i18n/langs/zh.json b/src/i18n/langs/zh.json index 957d0fadfa..8e40dd9c71 100644 --- a/src/i18n/langs/zh.json +++ b/src/i18n/langs/zh.json @@ -30,6 +30,7 @@ "PleaseClickLeftAssetToViewGatheredUser": "收集用户列表,点击左侧资产进行查看", "AutoCreate": "自动创建", "AccountExportTips": "导出信息中包含账号密文涉及敏感信息,导出的格式为一个加密的zip文件(若没有设置加密密码,请前往个人信息中设置文件加密密码)。", + "AccountDeleteConfirmMsg": "删除账号,是否继续?", "AccountPush": { "WindowsPushHelpText": "windows 资产暂不支持推送密钥", "AccountPushList": "账号推送", @@ -1966,7 +1967,7 @@ "KokoSettingUpdate": "Koko 配置设置", "UserSetting": "偏好设置", "AllMembers": "全部成员", - "AddAllMembersWarningMsg": "你确定要添加全部成员", + "AddAllMembersWarningMsg": "你确定要添加全部成员?", "UnbindHelpText": "本地用户为此认证来源用户,无法解绑", "SetStatus": "设置状态", "Set": "已设置", diff --git a/src/views/users/Group/UserGroupDetail/GroupUser.vue b/src/views/users/Group/UserGroupDetail/GroupUser.vue index 72be9c4c3c..34aa430fde 100644 --- a/src/views/users/Group/UserGroupDetail/GroupUser.vue +++ b/src/views/users/Group/UserGroupDetail/GroupUser.vue @@ -46,7 +46,7 @@ export default { }, callbacks: Object.freeze({ click: () => { - const msg = `${this.$t('users.AddAllMembersWarningMsg')} ?` + const msg = this.$t('users.AddAllMembersWarningMsg') this.$confirm(msg, this.$tc('common.Info'), { type: 'warning', confirmButtonClass: 'el-button--danger', @@ -60,7 +60,8 @@ export default { window.location.reload() }) } - }).catch(() => {}) + }).catch(() => { + }) } }) }