|
|
@ -65,7 +65,7 @@ |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="创建时间" align="center" prop="createTime" :formatter="dateFormatter" width="180" /> |
|
|
|
<el-table-column label="操作" align="center" width="300" fixed="right"> |
|
|
|
<el-table-column label="操作" align="center" width="370" fixed="right"> |
|
|
|
<template #default="scope"> |
|
|
|
<div class="flex items-center justify-center"> |
|
|
|
<el-button type="primary" link @click="openForm('update', scope.row.id)" |
|
|
@ -80,6 +80,9 @@ |
|
|
|
v-hasPermi="['system:permission:assign-user-role']"> |
|
|
|
<Icon icon="ep:circle-check" />分配角色 |
|
|
|
</el-button> |
|
|
|
<el-button type="primary" link @click="handleFree(scope.row.id)"> |
|
|
|
<Icon icon="ep:edit" />解冻 |
|
|
|
</el-button> |
|
|
|
<el-button type="danger" link @click="handleDelete(scope.row.id)" v-hasPermi="['system:user:delete']"> |
|
|
|
<Icon icon="ep:delete" />删除 |
|
|
|
</el-button> |
|
|
@ -226,6 +229,9 @@ const handleCommand = (command: string, row: UserApi.UserVO) => { |
|
|
|
case 'handleRole': |
|
|
|
handleRole(row) |
|
|
|
break |
|
|
|
case 'handleFree': |
|
|
|
handleFree(row.id) |
|
|
|
break |
|
|
|
default: |
|
|
|
break |
|
|
|
} |
|
|
@ -243,7 +249,16 @@ const handleDelete = async (id: number) => { |
|
|
|
await getList() |
|
|
|
} catch { } |
|
|
|
} |
|
|
|
|
|
|
|
/** 解冻按钮操作 */ |
|
|
|
const handleFree = async (id: number) => { |
|
|
|
try { |
|
|
|
// 发起删除 |
|
|
|
await UserApi.unLockUser(id) |
|
|
|
message.success(t('common.unLockSuccess')) |
|
|
|
// 刷新列表 |
|
|
|
await getList() |
|
|
|
} catch { } |
|
|
|
} |
|
|
|
/** 重置密码 */ |
|
|
|
const handleResetPwd = async (row: UserApi.UserVO) => { |
|
|
|
try { |
|
|
|