@@ -74,7 +74,8 @@
<a-menu-item>
<a @click="handleEdit(record)">编辑</a>
</a-menu-item>
- <a-menu-item>
+ <a-menu-item v-if="notDelRoles.indexOf(record.roleCode) === -1">
+ <!-- <a-button type="link" disabled style="color: #ccc;">删除</a-button> -->
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete1(record.id)">
<a>删除</a>
</a-popconfirm>
@@ -199,6 +200,8 @@
},
data() {
return {
+ // 修改--某些角色不可删除
+ notDelRoles: ['staff', 'departLeader', 'boss', 'admin'],
model1: {},
model2: {},
currentRoleId: '',