[Update] 修改quick actions组件

This commit is contained in:
ibuler 2020-05-07 16:43:41 +08:00
parent 7bbcd03928
commit 55db5e926e
2 changed files with 4 additions and 11 deletions

View File

@ -12,6 +12,7 @@
import { IBox } from '@/components'
import ActionItem from './action'
// views/users/users/UserDetail/UserInfo.vue 使
export default {
name: 'QuickActions',
components: {

View File

@ -40,20 +40,12 @@ export default {
change: function(v, item) {
const url = `/api/v1/users/users/${vm.object.id}/`
const data = { is_active: v }
// vm.$axios.patch(url, data).then(() => {
// })
console.log('Current is: ', url, data)
console.log(item)
vm.$axios.patch(url, data).catch(() => {
item.attrs.model = !v
})
}
}
},
{
title: this.$t('users.Force enabled MFA'),
type: 'switcher',
attrs: {
model: this.object.mfa_level === 2
}
},
{
title: this.$t('users.Reset MFA'),
attrs: {