From 8e89658b04dbcf55776eec9c8a54bc3c23a1dc5a Mon Sep 17 00:00:00 2001 From: wxg0103 <727495428@qq.com> Date: Mon, 30 Jun 2025 10:12:45 +0800 Subject: [PATCH] refactor: user manage --- ui/src/views/system/user-manage/index.vue | 39 ++++++++++++----------- 1 file changed, 20 insertions(+), 19 deletions(-) diff --git a/ui/src/views/system/user-manage/index.vue b/ui/src/views/system/user-manage/index.vue index 98eeba135..df7b3d9a0 100644 --- a/ui/src/views/system/user-manage/index.vue +++ b/ui/src/views/system/user-manage/index.vue @@ -4,7 +4,7 @@
+ v-if="hasPermission([RoleConst.ADMIN,PermissionConst.USER_EDIT],'OR')"> @@ -182,7 +182,7 @@ import {MsgSuccess, MsgConfirm} from '@/utils/message' import {t} from '@/locales' import {ValidCount, ValidType} from "@/enums/common.ts"; import useStore from "@/stores"; -import { PermissionConst, RoleConst } from '@/utils/permission/data' +import {PermissionConst, RoleConst} from '@/utils/permission/data' import {hasPermission} from '@/utils/permission/index' const {user, common} = useStore() @@ -255,22 +255,23 @@ function editUser(row: any) { } function createUser() { - common.asyncGetValid(ValidType.User, ValidCount.User, loading).then(async (res: any) => { - if (res?.data) { - title.value = t('views.userManage.createUser') - UserDrawerRef.value.open() - } else if (res?.code === 400) { - MsgConfirm(t('common.tip'), t('views.userManage.tip.professionalMessage'), { - cancelButtonText: t('common.confirm'), - confirmButtonText: t('common.professional'), - }) - .then(() => { - window.open('https://maxkb.cn/pricing.html', '_blank') - }) - .catch(() => { - }) - } - }) + title.value = t('views.userManage.createUser') + UserDrawerRef.value.open() + // common.asyncGetValid(ValidType.User, ValidCount.User, loading).then(async (res: any) => { + // if (res?.data) { + // title.value = t('views.userManage.createUser') + // UserDrawerRef.value.open() + // } else if (res?.code === 400) { + // MsgConfirm(t('common.tip'), t('views.userManage.tip.professionalMessage'), { + // cancelButtonText: t('common.confirm'), + // confirmButtonText: t('common.professional'), + // }) + // .then(() => { + // window.open('https://maxkb.cn/pricing.html', '_blank') + // }) + // .catch(() => {}) + // } + // }) } function deleteUserManage(row: any) {