修复已知问题
This commit is contained in:
@@ -23,17 +23,49 @@
|
||||
</div>
|
||||
<div class="user-info-list">
|
||||
<div class="ele-cell">
|
||||
<HomeOutlined />
|
||||
<ShopOutlined />
|
||||
<div class="ele-cell-content">
|
||||
<span>{{ loginUser.tenantName || tenantName }}</span>
|
||||
<a-tooltip
|
||||
class="ele-cell"
|
||||
title="门店名称"
|
||||
placement="topLeft"
|
||||
>
|
||||
{{ loginUser.merchantName || tenantName }}
|
||||
</a-tooltip>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ele-cell">
|
||||
<user-outlined title="角色" />
|
||||
<IdcardOutlined />
|
||||
<div class="ele-cell-content">
|
||||
<a-tag v-for="(d, i) in loginUser.roles" :key="i" color="blue">
|
||||
{{ d.roleName }}
|
||||
</a-tag>
|
||||
<div v-for="(d, i) in loginUser.roles" :key="i">
|
||||
<a-tooltip class="ele-cell" title="角色" placement="topLeft">
|
||||
<div class="tag">
|
||||
<a-tag color="blue">
|
||||
{{ d.roleName }}
|
||||
</a-tag>
|
||||
</div>
|
||||
</a-tooltip>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ele-cell">
|
||||
<SolutionOutlined />
|
||||
<div class="ele-cell-content">
|
||||
<a-tooltip
|
||||
class="ele-cell"
|
||||
title="所属部门"
|
||||
placement="topLeft"
|
||||
>
|
||||
{{ loginUser.organizationName }}
|
||||
</a-tooltip>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ele-cell">
|
||||
<VerifiedOutlined />
|
||||
<div class="ele-cell-content">
|
||||
<div class="ele-cell">
|
||||
{{ loginUser.gradeName }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ele-cell">
|
||||
@@ -176,27 +208,20 @@
|
||||
ShopOutlined,
|
||||
UploadOutlined,
|
||||
UserOutlined,
|
||||
HomeOutlined,
|
||||
CloudOutlined,
|
||||
IdcardOutlined,
|
||||
EnvironmentOutlined,
|
||||
TagOutlined,
|
||||
QqOutlined,
|
||||
SolutionOutlined,
|
||||
MailOutlined,
|
||||
WechatOutlined,
|
||||
AlipayOutlined,
|
||||
BankOutlined
|
||||
VerifiedOutlined
|
||||
} from '@ant-design/icons-vue';
|
||||
import { Form, message } from 'ant-design-vue';
|
||||
import { useUserStore } from '@/store/modules/user';
|
||||
import { storeToRefs } from 'pinia';
|
||||
import { useThemeStore } from '@/store/modules/theme';
|
||||
import type { User } from '@/api/system/user/model';
|
||||
import { updateUser } from '@/api/system/user';
|
||||
import SexSelect from './components/sex-select.vue';
|
||||
import { getMobile } from '@/utils/common';
|
||||
import request from '@/utils/request';
|
||||
import { FILE_SERVER } from '@/config/setting';
|
||||
import { CenterPoint } from 'ele-admin-pro/es/ele-map-picker/types';
|
||||
import { uploadOssAvatar } from '@/api/system/file';
|
||||
import { authUser } from '@/api/user';
|
||||
|
||||
const useForm = Form.useForm;
|
||||
|
||||
@@ -235,6 +260,8 @@
|
||||
province: '',
|
||||
city: '',
|
||||
region: '',
|
||||
gradeId: loginUser.value.gradeId,
|
||||
gradeName: loginUser.value.gradeName,
|
||||
// 街道地址
|
||||
address: loginUser.value.address,
|
||||
// 邮箱
|
||||
@@ -306,9 +333,17 @@
|
||||
form.province = city.value[0];
|
||||
form.city = city.value[1];
|
||||
form.region = city.value[2];
|
||||
updateUser(form).then((res) => {
|
||||
if (form.sex === '男') {
|
||||
form.sex = `1`;
|
||||
}
|
||||
if (form.sex === '女') {
|
||||
form.sex = `2`;
|
||||
}
|
||||
authUser(form).then(() => {
|
||||
loading.value = false;
|
||||
message.success('保存成功');
|
||||
setTimeout(() => {
|
||||
message.success('保存成功');
|
||||
}, 500);
|
||||
});
|
||||
})
|
||||
.catch(() => {});
|
||||
@@ -316,32 +351,15 @@
|
||||
|
||||
const onDone = (blob: Blob | null) => {
|
||||
// 裁剪完成的回调
|
||||
const formData = new FormData();
|
||||
formData.append('file', blob, 'avatar.jpg'); // 参数三可以设定文件名称
|
||||
// 使用 axios 上传
|
||||
request
|
||||
.post(FILE_SERVER + '/api/file/upload', formData)
|
||||
.then((res) => {
|
||||
form.avatar = res.data.data.thumbnail;
|
||||
visible.value = false;
|
||||
updateUser(form).then(() => {
|
||||
loading.value = false;
|
||||
uploadOssAvatar(blob, 'avatar.png').then((res) => {
|
||||
form.avatar = res.path;
|
||||
visible.value = false;
|
||||
authUser(form).then(() => {
|
||||
loading.value = false;
|
||||
setTimeout(() => {
|
||||
message.success('保存成功');
|
||||
});
|
||||
})
|
||||
.catch((e) => {
|
||||
console.error(e);
|
||||
}, 500);
|
||||
});
|
||||
};
|
||||
|
||||
/* 头像裁剪完成回调 */
|
||||
const onCrop = (result: string) => {
|
||||
console.log(result);
|
||||
form.avatar = result;
|
||||
visible.value = false;
|
||||
updateUser(form).then((res) => {
|
||||
loading.value = false;
|
||||
message.success('保存成功');
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user