|
@@ -9,7 +9,7 @@
|
|
|
<el-card>
|
|
<el-card>
|
|
|
<template #header>
|
|
<template #header>
|
|
|
<el-space align="center">
|
|
<el-space align="center">
|
|
|
- <el-button @click="openAddAdminDrawer" v-if="!isSysTenant && isCanAddTenant">
|
|
|
|
|
|
|
+ <el-button @click="openAddAdminDrawer" v-if="!isSysTenant && isCanAddTenant && hasAddPermission()">
|
|
|
<template #icon>
|
|
<template #icon>
|
|
|
<el-icon>
|
|
<el-icon>
|
|
|
<Plus />
|
|
<Plus />
|
|
@@ -17,7 +17,7 @@
|
|
|
</template>
|
|
</template>
|
|
|
添加租户管理员
|
|
添加租户管理员
|
|
|
</el-button>
|
|
</el-button>
|
|
|
- <el-button type="primary" @click="openAddSingleDrawer">
|
|
|
|
|
|
|
+ <el-button type="primary" @click="openAddSingleDrawer" v-permission="{ action: [PERM_USER.ACCOUNT_ADD] }">
|
|
|
<template #icon>
|
|
<template #icon>
|
|
|
<el-icon>
|
|
<el-icon>
|
|
|
<Plus />
|
|
<Plus />
|
|
@@ -95,13 +95,13 @@
|
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
|
<el-space v-if="scope.row.roleType !== RoleTypeEnum.SUPER_ADMIN">
|
|
<el-space v-if="scope.row.roleType !== RoleTypeEnum.SUPER_ADMIN">
|
|
|
<div class="el-space el-space--horizontal">
|
|
<div class="el-space el-space--horizontal">
|
|
|
- <div class="el-space__item" @click="handleEdit(scope.row)" >
|
|
|
|
|
|
|
+ <div class="el-space__item" @click="handleEdit(scope.row)" v-permission="{ action: [PERM_USER.ACCOUNT_EDIT] }">
|
|
|
<div><img :src="editIcon" class="el-tooltip__trigger" ></div>
|
|
<div><img :src="editIcon" class="el-tooltip__trigger" ></div>
|
|
|
</div>
|
|
</div>
|
|
|
- <div class="el-space__item" @click="handleDelete(scope.row)">
|
|
|
|
|
|
|
+ <div class="el-space__item" @click="handleDelete(scope.row)" v-permission="{ action: [PERM_USER.ACCOUNT_DELETE] }">
|
|
|
<div><img :src="deleteIcon" class="el-tooltip__trigger"></div>
|
|
<div><img :src="deleteIcon" class="el-tooltip__trigger"></div>
|
|
|
</div>
|
|
</div>
|
|
|
- <div class="el-space__item" v-if="visibleRestPassBtn(scope.row.roleType)" @click="handleResetCode(scope.row)">
|
|
|
|
|
|
|
+ <div class="el-space__item" v-if="visibleRestPassBtn(scope.row.roleType) && hasResetPasswordPermission()" @click="handleResetCode(scope.row)" >
|
|
|
<div class="tooltip__password">重置密码</div>
|
|
<div class="tooltip__password">重置密码</div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
@@ -149,6 +149,7 @@
|
|
|
import editIcon from '@/assets/images/reportmessage/edit.png';
|
|
import editIcon from '@/assets/images/reportmessage/edit.png';
|
|
|
import deleteIcon from '@/assets/images/reportmessage/delete.png';
|
|
import deleteIcon from '@/assets/images/reportmessage/delete.png';
|
|
|
import { SYS_TENANT_ID } from '@/utils/useTargetTenantIdSetting';
|
|
import { SYS_TENANT_ID } from '@/utils/useTargetTenantIdSetting';
|
|
|
|
|
+ import { PERM_USER } from '@/types/permission/constants';
|
|
|
|
|
|
|
|
const userStore = useUserStore();
|
|
const userStore = useUserStore();
|
|
|
const { getUserInfo } = storeToRefs(userStore);
|
|
const { getUserInfo } = storeToRefs(userStore);
|
|
@@ -170,6 +171,8 @@
|
|
|
loadPageData();
|
|
loadPageData();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ const hasResetPasswordPermission = () => userStore.checkPermission(PERM_USER.ACCOUNT_RESET_PASSWORD);
|
|
|
|
|
+ const hasAddPermission = () => userStore.checkPermission(PERM_USER.ACCOUNT_ADD);
|
|
|
// 当前用户类型
|
|
// 当前用户类型
|
|
|
const currrentRoleType = getUserInfo.value.roleType;
|
|
const currrentRoleType = getUserInfo.value.roleType;
|
|
|
const currrentTenantId = getUserInfo.value.tenantId;
|
|
const currrentTenantId = getUserInfo.value.tenantId;
|