From 2d69633660710fe966f26338e4f4baf7599a0151 Mon Sep 17 00:00:00 2001 From: lxy <10179281+lxy0722@user.noreply.gitee.com> Date: Mon, 6 Jan 2025 20:06:24 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=94=A8=E6=88=B7=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E6=97=A0=E6=B3=95=E6=98=BE=E7=A4=BA=E5=A4=B4=E5=83=8F?= =?UTF-8?q?=E9=97=AE=E9=A2=98=20=EF=BC=88cherry=20picked=20commit=20from?= =?UTF-8?q?=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/stores/userInfo.ts | 3 ++- web/src/views/system/personal/index.vue | 2 +- web/src/views/system/user/crud.tsx | 13 +++++++------ web/src/views/system/user/index.vue | 11 +++++++++++ 4 files changed, 21 insertions(+), 8 deletions(-) diff --git a/web/src/stores/userInfo.ts b/web/src/stores/userInfo.ts index 04d296a..13dbf2e 100644 --- a/web/src/stores/userInfo.ts +++ b/web/src/stores/userInfo.ts @@ -2,6 +2,7 @@ import { defineStore } from 'pinia'; import { UserInfosStates } from './interface'; import { Session } from '/@/utils/storage'; import { request } from '../utils/service'; +import { getBaseURL } from '../utils/baseUrl'; /** * 用户信息 * @methods setUserInfos 设置用户信息 @@ -72,7 +73,7 @@ export const useUserInfo = defineStore('userInfo', { method: 'get', }).then((res:any)=>{ this.userInfos.username = res.data.name; - this.userInfos.avatar = res.data.avatar; + this.userInfos.avatar = getBaseURL(res.data.avatar); this.userInfos.name = res.data.name; this.userInfos.email = res.data.email; this.userInfos.mobile = res.data.mobile; diff --git a/web/src/views/system/personal/index.vue b/web/src/views/system/personal/index.vue index 79f29d3..216ae77 100644 --- a/web/src/views/system/personal/index.vue +++ b/web/src/views/system/personal/index.vue @@ -32,7 +32,7 @@
角色:
- {{ item.name }} + {{ item.name }}
diff --git a/web/src/views/system/user/crud.tsx b/web/src/views/system/user/crud.tsx index dd24c40..4e8b41c 100644 --- a/web/src/views/system/user/crud.tsx +++ b/web/src/views/system/user/crud.tsx @@ -257,10 +257,10 @@ export const createCrudOptions = function ({crudExpose}: CreateCrudOptionsProps) }), column: { minWidth: 200, //最小列宽 - formatter({value,row,index}){ - const values = row.role_info.map((item:any) => item.name); - return values.join(',') - } + // formatter({value,row,index}){ + // const values = row.role_info.map((item:any) => item.name); + // return values.join(',') + // } }, form: { rules: [ @@ -382,12 +382,13 @@ export const createCrudOptions = function ({crudExpose}: CreateCrudOptionsProps) }, avatar: { title: '头像', - type: 'avatar-cropper', + type: 'avatar-uploader', + align: 'center', form: { show: false, }, column: { - minWidth: 400, //最小列宽 + minWidth: 100, //最小列宽 }, }, ...commonCrudConfig({ diff --git a/web/src/views/system/user/index.vue b/web/src/views/system/user/index.vue index 71085d1..117a559 100644 --- a/web/src/views/system/user/index.vue +++ b/web/src/views/system/user/index.vue @@ -33,6 +33,15 @@ + @@ -50,6 +59,8 @@ import {ref, onMounted, watch, toRaw, h} from 'vue'; import XEUtils from 'xe-utils'; import {getElementLabelLine} from 'element-tree-line'; import importExcel from '/@/components/importExcel/index.vue' +import {getBaseURL} from '/@/utils/baseUrl'; + const ElementTreeLine = getElementLabelLine(h);