|
|
@@ -18,7 +18,7 @@
|
|
|
</template>
|
|
|
添加用户
|
|
|
</el-button>
|
|
|
- <el-button @click="openAddAdminDrawer" v-if="isSysTenant">
|
|
|
+ <el-button @click="openAddAdminDrawer" v-if="!isSysTenant">
|
|
|
<template #icon>
|
|
|
<el-icon>
|
|
|
<Plus />
|
|
|
@@ -74,11 +74,17 @@
|
|
|
<el-table-column label="认证方式" prop="certify" />
|
|
|
<el-table-column label="创建时间" prop="createdAt" />
|
|
|
<el-table-column label="操作" width="200">
|
|
|
- <template #default="scope ">
|
|
|
+ <template #default="scope">
|
|
|
<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="visibleRestPassBtn(scope.row.roleType) " text @click="handleResetCode(scope.row)">重置密码</el-button>
|
|
|
+ <el-button type="primary" :icon="Delete" text @click="handleDelete(scope.row.id)" />
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ v-if="visibleRestPassBtn(scope.row.roleType)"
|
|
|
+ text
|
|
|
+ @click="handleResetCode(scope.row)"
|
|
|
+ >重置密码</el-button
|
|
|
+ >
|
|
|
</el-space>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
@@ -137,7 +143,7 @@
|
|
|
import { ResultEnum } from '@/enums/httpEnum';
|
|
|
import { useTargetTenantIdSetting } from '@/utils/useTargetTenantIdSetting';
|
|
|
import type { RoleListItem } from '@/api/system/user-operate';
|
|
|
- import type {DeptTreeItem } from '@/api/system/user-query'
|
|
|
+ import type { DeptTreeItem } from '@/api/system/user-query';
|
|
|
import SearchForm from './component/SearchForm.vue';
|
|
|
import AddUser from './component/AddUser.vue';
|
|
|
import CreateDrawer from './CreateDrawer.vue';
|
|
|
@@ -164,7 +170,6 @@
|
|
|
|
|
|
const openAddSingleDrawer = () => {
|
|
|
drawerTitle.value = '添加用户';
|
|
|
-
|
|
|
if (!isSysTenant) {
|
|
|
createAdminType.value = EditType.create;
|
|
|
createAdminDrawerRef.value?.openDrawer();
|
|
|
@@ -231,10 +236,10 @@
|
|
|
/* 是否能重置密码 */
|
|
|
const visibleRestPassBtn = (type: RoleTypeEnum): boolean => {
|
|
|
if (isSysTenant || (!isSysTenant && type !== RoleTypeEnum.TENANT_ADMIN)) {
|
|
|
- return true
|
|
|
+ return true;
|
|
|
}
|
|
|
return false;
|
|
|
- }
|
|
|
+ };
|
|
|
|
|
|
onMounted(async () => {
|
|
|
loadPageData();
|