mirror of
https://github.com/mindoc-org/mindoc.git
synced 2025-10-26 11:29:02 +08:00
1、实现管理员编辑用户信息
2、禁止管理员更改自己的权限和状态
This commit is contained in:
@@ -56,6 +56,7 @@
|
||||
<th width="80">头像</th>
|
||||
<th>账号</th>
|
||||
<th>角色</th>
|
||||
<th>类型</th>
|
||||
<th>状态</th>
|
||||
<th>操作</th>
|
||||
</tr>
|
||||
@@ -69,6 +70,9 @@
|
||||
<template v-if="item.role == 0">
|
||||
超级管理员
|
||||
</template>
|
||||
<template v-else-if="item.member_id == {{.Member.MemberId}}">
|
||||
${item.role_name}
|
||||
</template>
|
||||
<template v-else>
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-default btn-sm" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
@@ -81,6 +85,9 @@
|
||||
</div>
|
||||
</template>
|
||||
</td>
|
||||
<td>
|
||||
${item.auth_method}
|
||||
</td>
|
||||
<td>
|
||||
<template v-if="item.status == 0">
|
||||
<span class="label label-success">正常</span>
|
||||
@@ -89,8 +96,15 @@
|
||||
<span class="label label-danger">禁用</span>
|
||||
</template>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<template v-if="item.role != 0">
|
||||
<template v-if="item.member_id == {{.Member.MemberId}}">
|
||||
|
||||
</template>
|
||||
<template v-else-if="item.role != 0">
|
||||
<a :href="'{{urlfor "ManagerController.EditMember" ":id" ""}}' + item.member_id" class="btn btn-sm btn-default" @click="editMember(item.member_id)">
|
||||
编辑
|
||||
</a>
|
||||
<template v-if="item.status == 0">
|
||||
<button type="button" class="btn btn-danger btn-sm" @click="setMemberStatus(item.member_id,1,$event)" data-loading-text="启用中...">禁用</button>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user