diff --git a/src/views/system/user/sso/index.vue b/src/views/system/user/sso/index.vue index 0605c0f..6eb7454 100644 --- a/src/views/system/user/sso/index.vue +++ b/src/views/system/user/sso/index.vue @@ -44,7 +44,7 @@ /> @@ -69,6 +69,8 @@ import SsoModal from './SsoModal.vue'; import { columns, searchFormSchema } from './sso.data'; import { useMessage } from '/@/hooks/web/useMessage'; + import { isUrl } from '/@/utils/is'; + import { useGlobSetting } from '/@/hooks/setting'; interface TableState { ids: string[]; @@ -94,6 +96,7 @@ // 非多个禁用 multiple: true, }); + const { apiUrl } = useGlobSetting(); const { createConfirm, createMessage } = useMessage(); const [registerModal, { openModal }] = useModal(); const [registerResetPwdModal, { openModal: openResetPwdModal }] = useModal(); @@ -124,6 +127,7 @@ }, handleSearchInfoFn: () => clearSelectedRowKeys() }); + const getOssImgUrl = (url: string) => isUrl(url) ? [url] : [apiUrl + url]; /** 处理多选框选中数据 */ function handleSelectionChange(selection?: Recordable) { @@ -181,6 +185,7 @@ handleSelectionChange, handleRefreshTable, handleResetPassword, + getOssImgUrl }; } }); diff --git a/src/views/system/user/sso/sso.data.ts b/src/views/system/user/sso/sso.data.ts index 449b1ad..54ac300 100644 --- a/src/views/system/user/sso/sso.data.ts +++ b/src/views/system/user/sso/sso.data.ts @@ -10,16 +10,16 @@ import { SystemUserType } from '/@/enums/permissionEnum'; /** 表格列配置 */ export const columns: BasicColumn[] = [ - { - title: '用户名', - dataIndex: 'userName', - width: 120 - }, { title: '头像', dataIndex: 'avatar', width: 120, }, + { + title: '用户名', + dataIndex: 'userName', + width: 120 + }, { title: '昵称', dataIndex: 'nickName',