mirror of
https://github.com/jumpserver/lina.git
synced 2025-08-21 16:24:13 +00:00
[Update] 修改quick actions组件
This commit is contained in:
parent
7bbcd03928
commit
55db5e926e
@ -12,6 +12,7 @@
|
|||||||
import { IBox } from '@/components'
|
import { IBox } from '@/components'
|
||||||
import ActionItem from './action'
|
import ActionItem from './action'
|
||||||
|
|
||||||
|
// 查看 views/users/users/UserDetail/UserInfo.vue 使用样例
|
||||||
export default {
|
export default {
|
||||||
name: 'QuickActions',
|
name: 'QuickActions',
|
||||||
components: {
|
components: {
|
||||||
|
@ -40,20 +40,12 @@ export default {
|
|||||||
change: function(v, item) {
|
change: function(v, item) {
|
||||||
const url = `/api/v1/users/users/${vm.object.id}/`
|
const url = `/api/v1/users/users/${vm.object.id}/`
|
||||||
const data = { is_active: v }
|
const data = { is_active: v }
|
||||||
// vm.$axios.patch(url, data).then(() => {
|
vm.$axios.patch(url, data).catch(() => {
|
||||||
// })
|
item.attrs.model = !v
|
||||||
console.log('Current is: ', url, data)
|
})
|
||||||
console.log(item)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
|
||||||
title: this.$t('users.Force enabled MFA'),
|
|
||||||
type: 'switcher',
|
|
||||||
attrs: {
|
|
||||||
model: this.object.mfa_level === 2
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
title: this.$t('users.Reset MFA'),
|
title: this.$t('users.Reset MFA'),
|
||||||
attrs: {
|
attrs: {
|
||||||
|
Loading…
Reference in New Issue
Block a user