Skip to content

Commit 8e89658

Browse files
committed
refactor: user manage
1 parent e85aee4 commit 8e89658

File tree

1 file changed

+20
-19
lines changed

1 file changed

+20
-19
lines changed

ui/src/views/system/user-manage/index.vue

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<el-card>
55
<div class="flex-between mb-16">
66
<el-button type="primary" @click="createUser"
7-
v-hasPermission="[
7+
v-hasPermission="[
88
RoleConst.ADMIN,
99
PermissionConst.USER_CREATE
1010
]"
@@ -135,7 +135,7 @@
135135
<el-divider direction="vertical"/>
136136
<span class="mr-8">
137137
<el-button type="primary" text @click.stop="editUser(row)" :title="$t('common.edit')"
138-
v-if="hasPermission([RoleConst.ADMIN,PermissionConst.USER_EDIT],'OR')" >
138+
v-if="hasPermission([RoleConst.ADMIN,PermissionConst.USER_EDIT],'OR')">
139139
<el-icon><EditPen/></el-icon>
140140
</el-button>
141141
</span>
@@ -182,7 +182,7 @@ import {MsgSuccess, MsgConfirm} from '@/utils/message'
182182
import {t} from '@/locales'
183183
import {ValidCount, ValidType} from "@/enums/common.ts";
184184
import useStore from "@/stores";
185-
import { PermissionConst, RoleConst } from '@/utils/permission/data'
185+
import {PermissionConst, RoleConst} from '@/utils/permission/data'
186186
import {hasPermission} from '@/utils/permission/index'
187187
188188
const {user, common} = useStore()
@@ -255,22 +255,23 @@ function editUser(row: any) {
255255
}
256256
257257
function createUser() {
258-
common.asyncGetValid(ValidType.User, ValidCount.User, loading).then(async (res: any) => {
259-
if (res?.data) {
260-
title.value = t('views.userManage.createUser')
261-
UserDrawerRef.value.open()
262-
} else if (res?.code === 400) {
263-
MsgConfirm(t('common.tip'), t('views.userManage.tip.professionalMessage'), {
264-
cancelButtonText: t('common.confirm'),
265-
confirmButtonText: t('common.professional'),
266-
})
267-
.then(() => {
268-
window.open('https://maxkb.cn/pricing.html', '_blank')
269-
})
270-
.catch(() => {
271-
})
272-
}
273-
})
258+
title.value = t('views.userManage.createUser')
259+
UserDrawerRef.value.open()
260+
// common.asyncGetValid(ValidType.User, ValidCount.User, loading).then(async (res: any) => {
261+
// if (res?.data) {
262+
// title.value = t('views.userManage.createUser')
263+
// UserDrawerRef.value.open()
264+
// } else if (res?.code === 400) {
265+
// MsgConfirm(t('common.tip'), t('views.userManage.tip.professionalMessage'), {
266+
// cancelButtonText: t('common.confirm'),
267+
// confirmButtonText: t('common.professional'),
268+
// })
269+
// .then(() => {
270+
// window.open('https://maxkb.cn/pricing.html', '_blank')
271+
// })
272+
// .catch(() => {})
273+
// }
274+
// })
274275
}
275276
276277
function deleteUserManage(row: any) {

0 commit comments

Comments
 (0)