|
4 | 4 | <el-card> |
5 | 5 | <div class="flex-between mb-16"> |
6 | 6 | <el-button type="primary" @click="createUser" |
7 | | - v-hasPermission="[ |
| 7 | + v-hasPermission="[ |
8 | 8 | RoleConst.ADMIN, |
9 | 9 | PermissionConst.USER_CREATE |
10 | 10 | ]" |
|
135 | 135 | <el-divider direction="vertical"/> |
136 | 136 | <span class="mr-8"> |
137 | 137 | <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')"> |
139 | 139 | <el-icon><EditPen/></el-icon> |
140 | 140 | </el-button> |
141 | 141 | </span> |
@@ -182,7 +182,7 @@ import {MsgSuccess, MsgConfirm} from '@/utils/message' |
182 | 182 | import {t} from '@/locales' |
183 | 183 | import {ValidCount, ValidType} from "@/enums/common.ts"; |
184 | 184 | import useStore from "@/stores"; |
185 | | -import { PermissionConst, RoleConst } from '@/utils/permission/data' |
| 185 | +import {PermissionConst, RoleConst} from '@/utils/permission/data' |
186 | 186 | import {hasPermission} from '@/utils/permission/index' |
187 | 187 |
|
188 | 188 | const {user, common} = useStore() |
@@ -255,22 +255,23 @@ function editUser(row: any) { |
255 | 255 | } |
256 | 256 |
|
257 | 257 | 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 | + // }) |
274 | 275 | } |
275 | 276 |
|
276 | 277 | function deleteUserManage(row: any) { |
|
0 commit comments