This commit is contained in:
张成
2026-03-26 10:55:13 +08:00
parent 7f3e6eb943
commit 656ecb6bc9
10 changed files with 23560 additions and 60 deletions

View File

@@ -125,15 +125,25 @@ export default {
},
'详情'
),
h(
'Button',
{
props: { type: 'warning', size: 'small' },
class: { ml8: true },
on: { click: () => this.doDisable(p.row) },
},
'禁用'
),
p.row.status === 'disabled'
? h(
'Button',
{
props: { type: 'success', size: 'small' },
class: { ml8: true },
on: { click: () => this.doEnable(p.row) },
},
'启用'
)
: h(
'Button',
{
props: { type: 'warning', size: 'small' },
class: { ml8: true },
on: { click: () => this.doDisable(p.row) },
},
'禁用'
),
h(
'Button',
{
@@ -235,6 +245,21 @@ export default {
},
})
},
doEnable(row) {
this.$Modal.confirm({
title: '启用用户',
content: '确认重新启用该用户?',
onOk: async () => {
const res = await userServer.enable({ id: row.id })
if (res && res.code === 0) {
this.$Message.success('已启用')
this.load(1)
} else {
this.$Message.error((res && res.message) || '操作失败')
}
},
})
},
doDel(row) {
this.$Modal.confirm({
title: '删除用户',