[update] 用户管理增加来源,并且判断来源是IAM不能操作

This commit is contained in:
lideqin
2024-08-02 11:32:34 +08:00
parent f98a242d9a
commit 1f7fce5ddd
2 changed files with 24 additions and 6 deletions
+6
View File
@@ -253,6 +253,12 @@ export const OcrConvertStateEnums = {
CONVERTED: { text: '转换完成', value: '2' }
}
// 用户管理来源
export const UserSource = {
IAM: { text: 'IAM', value: '1' },
SYSTEMADD: { text: '系统新增', value: '2' }
}
/**
* 展示区域管理
* TODO 标签管理要改了,这里也要同步一下
+18 -6
View File
@@ -172,6 +172,7 @@ import JTable from '@/components/jero/JTable'
import JSearchSelectTag from '@/components/dict/JSearchSelectTag'
import UploadHandStampModal from './modules/UploadHandStampModal'
import { isHasPermission } from '../../utils/hasPermission'
import { UserSource } from '../../enums/commonEnums'
export default {
name: 'UserList',
@@ -302,7 +303,11 @@ export default {
{
text: this.$t('edit'),
clickEvent: 'handleEdit',
has: 'user:edit'
has: 'user:edit',
show: (record) => {
// IAM同步过来的不能编辑
return record.source !== UserSource.IAM.value
}
},
// 详情
{
@@ -316,14 +321,19 @@ export default {
clickEvent: 'handleChangePassword',
has: '',
show: (record) => {
return this.isDev
// IAM同步过来的不能编辑
return record.source !== UserSource.IAM.value
}
},
// 删除
{
text: this.$t('delete'),
clickEvent: 'handleDelete',
has: 'sys:user:sel'
has: 'sys:user:sel',
show: (record) => {
// IAM同步过来的不能删除
return record.source !== UserSource.IAM.value
}
},
// 冻结
{
@@ -331,7 +341,8 @@ export default {
clickEvent: 'handleFrozen',
has: 'user:edit',
show: (record) => {
return this.isDev && (record.status + '') === '1'
// IAM同步过来的不能编辑
return (record.status + '') === '1' && record.source !== UserSource.IAM.value
}
},
// 解冻
@@ -340,9 +351,10 @@ export default {
clickEvent: 'handleFrozen',
has: 'user:edit',
show: (record) => {
return this.isDev && (record.status + '') === '2'
// IAM同步过来的不能编辑
return (record.status + '') === '2' && record.source !== UserSource.IAM.value
}
},
}
// 上传手写章
// {
// text: this.$t('user.uploadHandStamp'),