|
|
@@ -78,7 +78,7 @@
|
|
|
<el-space v-if="scope.row.roleType !== RoleTypeEnum.SUPER_ADMIN">
|
|
|
<el-button type="primary" :icon="Edit" text @click="handleEdit(scope.row)" />
|
|
|
<el-button type="primary" :icon="Delete" text @click="handleDelete(scope.row.id)" />
|
|
|
- <el-button type="primary" v-if="(!isSysTenant) || (isSysTenant && scope.row.roleType !== RoleTypeEnum.TENANT_ADMIN) " text @click="handleResetCode(scope.row)">重置密码</el-button>
|
|
|
+ <el-button type="primary" v-if="visibleRestPassBtn(scope.row.roleType) " text @click="handleResetCode(scope.row)">重置密码</el-button>
|
|
|
</el-space>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
@@ -228,6 +228,14 @@
|
|
|
});
|
|
|
}
|
|
|
|
|
|
+ /* 是否能重置密码 */
|
|
|
+ const visibleRestPassBtn = (type: RoleTypeEnum): boolean => {
|
|
|
+ if (isSysTenant || (!isSysTenant && type !== RoleTypeEnum.TENANT_ADMIN)) {
|
|
|
+ return true
|
|
|
+ }
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
onMounted(async () => {
|
|
|
loadPageData();
|
|
|
getAllDepartments().then((res) => {
|