perf: 列表移除按钮新增 confirm 对话框

This commit is contained in:
zhaojisen
2024-05-21 18:18:51 +08:00
committed by 老广
parent 771c3f5516
commit 73f75e6515

View File

@@ -284,11 +284,15 @@ export default {
} }
}, },
removeUserFromOrg({ row, reload }) { removeUserFromOrg({ row, reload }) {
const url = `/api/v1/users/users/${row.id}/remove/` this.$confirm(this.$t('RemoveWarningMsg') + ' ' + row.name + ' ?', this.$tc('Info'), {
this.$axios.post(url).then(() => { type: 'warning'
reload() }).then(() => {
this.$message.success(this.$tc('RemoveSuccessMsg')) const url = `/api/v1/users/users/${row.id}/remove/`
}) this.$axios.post(url).then(() => {
reload()
this.$message.success(this.$tc('RemoveSuccessMsg'))
})
}).catch(() => {})
}, },
async bulkRemoveCallback({ selectedRows, reloadTable }) { async bulkRemoveCallback({ selectedRows, reloadTable }) {
const ids = selectedRows.map(v => { const ids = selectedRows.map(v => {