|
76 | 76 | </el-table-column> |
77 | 77 | <el-table-column prop="email" show-overflow-tooltip :label="$t('user.email')" /> |
78 | 78 | <!-- <el-table-column prop="phone" :label="$t('user.phone_number')" width="280" /> --> |
79 | | - <!-- <el-table-column prop="user_source" :label="$t('user.user_source')" width="280" /> --> |
| 79 | + <el-table-column prop="origin" :label="$t('user.user_source')" width="120"> |
| 80 | + <template #default="scope"> |
| 81 | + <span>{{ formatUserOrigin(scope.row.origin) }}</span> |
| 82 | + </template> |
| 83 | + </el-table-column> |
80 | 84 | <el-table-column |
81 | 85 | show-overflow-tooltip |
82 | 86 | prop="oid_list" |
@@ -425,13 +429,11 @@ const filterOption = ref<any[]>([ |
425 | 429 | type: 'enum', |
426 | 430 | option: [ |
427 | 431 | { id: '0', name: t('user.local_creation') }, |
428 | | - // { id: 1, name: 'LDAP' }, |
429 | | - // { id: 2, name: 'OIDC' }, |
430 | | - // { id: 3, name: 'CAS' }, |
431 | | - // { id: 9, name: 'OAuth2' }, |
432 | | - // { id: 4, name: t('user.feishu') }, |
433 | | - // { id: 5, name: t('user.dingtalk') }, |
434 | | - // { id: 6, name: t('user.wechat_for_business') }, |
| 432 | + { id: '1', name: 'CAS' }, |
| 433 | + { id: '2', name: 'OIDC' }, |
| 434 | + { id: '3', name: 'LDAP' }, |
| 435 | + { id: '4', name: 'OAuth2' }, |
| 436 | + { id: '5', name: 'SAML2' }, |
435 | 437 | ], |
436 | 438 | field: 'origins', |
437 | 439 | title: t('user.user_source'), |
@@ -824,6 +826,13 @@ const loadDefaultPwd = () => { |
824 | 826 | } |
825 | 827 | }) |
826 | 828 | } |
| 829 | +const formatUserOrigin = (origin?: number) => { |
| 830 | + if (!origin) { |
| 831 | + return t('user.local_creation') |
| 832 | + } |
| 833 | + const originArray = ['CAS', 'OIDC', 'LDAP', 'OAuth2', 'SAML2'] |
| 834 | + return originArray[origin - 1] |
| 835 | +} |
827 | 836 | onMounted(() => { |
828 | 837 | workspaceList().then((res) => { |
829 | 838 | options.value = res || [] |
|
0 commit comments