mirror of
https://github.com/jumpserver/lina.git
synced 2025-08-02 07:27:01 +00:00
[Update] 修改quick actions组件
This commit is contained in:
parent
7bbcd03928
commit
55db5e926e
@ -12,6 +12,7 @@
|
||||
import { IBox } from '@/components'
|
||||
import ActionItem from './action'
|
||||
|
||||
// 查看 views/users/users/UserDetail/UserInfo.vue 使用样例
|
||||
export default {
|
||||
name: 'QuickActions',
|
||||
components: {
|
||||
|
@ -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: {
|
||||
|
Loading…
Reference in New Issue
Block a user