fix(core): 统一用户昵称字段名称从 nickName 改为 nick
This commit is contained in:
@@ -19,7 +19,7 @@ export interface User {
|
||||
email: string;
|
||||
loginDate: string;
|
||||
loginIp: string;
|
||||
nickName: string;
|
||||
nick: string;
|
||||
phonenumber: string;
|
||||
remark: string;
|
||||
roles: Role[];
|
||||
|
||||
@@ -32,7 +32,7 @@ export interface User {
|
||||
tenantId: string;
|
||||
deptId: number;
|
||||
userName: string;
|
||||
nickName: string;
|
||||
nick: string;
|
||||
userType: string;
|
||||
email: string;
|
||||
phonenumber: string;
|
||||
|
||||
@@ -9,7 +9,7 @@ export interface SocialInfo {
|
||||
refreshToken: string;
|
||||
openId: string;
|
||||
userName: string;
|
||||
nickName: string;
|
||||
nick: string;
|
||||
email: string;
|
||||
avatar: string;
|
||||
accessCode?: any;
|
||||
|
||||
@@ -32,7 +32,7 @@ export interface Flow {
|
||||
flowCode?: any;
|
||||
version?: any;
|
||||
runDuration: string;
|
||||
nickName?: any;
|
||||
nick?: any;
|
||||
}
|
||||
|
||||
export interface FlowInfoResponse {
|
||||
|
||||
@@ -114,7 +114,7 @@ export const useAuthStore = defineStore('auth', () => {
|
||||
const userInfo: UserInfo = {
|
||||
avatar: user.avatar ?? '',
|
||||
permissions: permissionCodes,
|
||||
realName: user.nickName,
|
||||
realName: user.nick,
|
||||
roles: roleCodes,
|
||||
userId: user.userId,
|
||||
username: user.userName,
|
||||
|
||||
@@ -100,7 +100,7 @@ const simpleImage = Empty.PRESENTED_IMAGE_SIMPLE;
|
||||
</div>
|
||||
</template>
|
||||
<div class="cursor-pointer">
|
||||
已绑定: {{ item.info.nickName }}
|
||||
已绑定: {{ item.info.nick }}
|
||||
</div>
|
||||
</Tooltip>
|
||||
</template>
|
||||
|
||||
@@ -44,7 +44,7 @@ const [BasicForm, formApi] = useVbenForm({
|
||||
},
|
||||
{
|
||||
component: 'Input',
|
||||
fieldName: 'nickName',
|
||||
fieldName: 'nick',
|
||||
label: '昵称',
|
||||
rules: 'required',
|
||||
},
|
||||
@@ -104,7 +104,7 @@ async function handleSubmit(values: Recordable<any>) {
|
||||
onMounted(() => {
|
||||
const data = pick(props.profile.user, [
|
||||
'userId',
|
||||
'nickName',
|
||||
'nick',
|
||||
'email',
|
||||
'phonenumber',
|
||||
'sex',
|
||||
|
||||
@@ -49,7 +49,7 @@ const poetrySrc = computed(() => {
|
||||
</Tooltip>
|
||||
<div class="flex flex-col items-center gap-[8px]">
|
||||
<span class="text-foreground text-xl font-bold">
|
||||
{{ profile.user.nickName ?? '未知' }}
|
||||
{{ profile.user.nick ?? '未知' }}
|
||||
</span>
|
||||
<!-- https://www.jinrishici.com/doc/#image -->
|
||||
<img :src="poetrySrc" />
|
||||
|
||||
@@ -22,7 +22,7 @@ export const columns: VxeGridProps['columns'] = [
|
||||
},
|
||||
{
|
||||
title: '用户昵称',
|
||||
field: 'nickName',
|
||||
field: 'nick',
|
||||
},
|
||||
{
|
||||
title: '邮箱',
|
||||
|
||||
@@ -117,7 +117,7 @@ async function handleSubmit() {
|
||||
// 需要转换数据 抄送人员
|
||||
const flowCCList = (flowCopyList as Array<any>).map((item) => ({
|
||||
userId: item.userId,
|
||||
userName: item.nickName,
|
||||
userName: item.nick,
|
||||
}));
|
||||
const requestData = {
|
||||
fileId: attachment.join(','),
|
||||
|
||||
@@ -158,7 +158,7 @@ async function handleSubmit() {
|
||||
// 需要转换数据 抄送人员
|
||||
const flowCopyList = (data.flowCopyList as Array<any>).map((item) => ({
|
||||
userId: item.userId,
|
||||
userName: item.nickName,
|
||||
userName: item.nick,
|
||||
}));
|
||||
const requestData = {
|
||||
...omit(data, ['attachment']),
|
||||
|
||||
@@ -273,7 +273,7 @@ function handleDelegation(userList: User[]) {
|
||||
const current = userList[0];
|
||||
approveWithReasonModal({
|
||||
title: '委托',
|
||||
description: `确定委托给[${current?.nickName}]吗?`,
|
||||
description: `确定委托给[${current?.nick}]吗?`,
|
||||
onOk: async (reason) => {
|
||||
await taskOperation(
|
||||
{ taskId: props.task!.id, userId: current!.userId, message: reason },
|
||||
@@ -295,7 +295,7 @@ function handleTransfer(userList: User[]) {
|
||||
const current = userList[0];
|
||||
approveWithReasonModal({
|
||||
title: '转办',
|
||||
description: `确定转办给[${current?.nickName}]吗?`,
|
||||
description: `确定转办给[${current?.nick}]吗?`,
|
||||
onOk: async (reason) => {
|
||||
await taskOperation(
|
||||
{ taskId: props.task!.id, userId: current!.userId, message: reason },
|
||||
@@ -362,7 +362,7 @@ function handleUpdateAssignee(userList: User[]) {
|
||||
if (!current) return;
|
||||
Modal.confirm({
|
||||
title: '修改办理人',
|
||||
content: `确定修改办理人为${current?.nickName}吗?`,
|
||||
content: `确定修改办理人为${current?.nick}吗?`,
|
||||
centered: true,
|
||||
onOk: async () => {
|
||||
await updateAssignee([props.task!.id], current.userId);
|
||||
|
||||
@@ -65,12 +65,12 @@ const displayedList = computed(() => {
|
||||
<Tooltip
|
||||
v-for="user in displayedList"
|
||||
:key="user.userId"
|
||||
:title="user.nickName"
|
||||
:title="user.nick"
|
||||
placement="top"
|
||||
>
|
||||
<div>
|
||||
<VbenAvatar
|
||||
:alt="user.nickName"
|
||||
:alt="user.nick"
|
||||
class="bg-primary size-[36px] cursor-pointer rounded-full border text-white"
|
||||
src=""
|
||||
/>
|
||||
|
||||
@@ -57,7 +57,7 @@ function handleTransfer(userList: User[]) {
|
||||
const current = userList[0];
|
||||
Modal.confirm({
|
||||
title: '转办',
|
||||
content: `确定转办给${current?.nickName}吗?`,
|
||||
content: `确定转办给${current?.nick}吗?`,
|
||||
centered: true,
|
||||
onOk: async () => {
|
||||
await taskOperation(
|
||||
|
||||
@@ -205,7 +205,7 @@ const rightGridOptions: VxeGridProps = {
|
||||
checkboxConfig: {},
|
||||
columns: [
|
||||
{
|
||||
field: 'nickName',
|
||||
field: 'nick',
|
||||
title: '昵称',
|
||||
width: 200,
|
||||
resizable: false,
|
||||
@@ -300,13 +300,13 @@ function handleSubmit() {
|
||||
<template #user="{ row }">
|
||||
<div class="flex items-center gap-2">
|
||||
<VbenAvatar
|
||||
:alt="row.nickName"
|
||||
:alt="row.nick"
|
||||
:src="row.avatar ?? ''"
|
||||
:class="{ 'bg-primary': !row.avatar }"
|
||||
class="size-[32px] rounded-full text-white"
|
||||
/>
|
||||
<div class="flex flex-col items-baseline text-[12px]">
|
||||
<div>{{ row.nickName }}</div>
|
||||
<div>{{ row.nick }}</div>
|
||||
<div class="opacity-50">
|
||||
{{ row.phonenumber || '暂无手机号' }}
|
||||
</div>
|
||||
@@ -330,14 +330,14 @@ function handleSubmit() {
|
||||
<template #user="{ row }">
|
||||
<div class="flex items-center gap-2 overflow-hidden">
|
||||
<VbenAvatar
|
||||
:alt="row.nickName"
|
||||
:alt="row.nick"
|
||||
:src="row.avatar ?? ''"
|
||||
:class="{ 'bg-primary': !row.avatar }"
|
||||
class="size-[32px] rounded-full text-white"
|
||||
/>
|
||||
<div class="flex flex-col items-baseline text-[12px]">
|
||||
<div class="overflow-ellipsis whitespace-nowrap">
|
||||
{{ row.nickName }}
|
||||
{{ row.nick }}
|
||||
</div>
|
||||
<div class="opacity-50">
|
||||
{{ row.phonenumber || '暂无手机号' }}
|
||||
|
||||
@@ -12,7 +12,7 @@ interface RowType {
|
||||
age: number;
|
||||
id: number;
|
||||
name: string;
|
||||
nickname: string;
|
||||
nick: string;
|
||||
role: string;
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ const gridOptions: VxeGridProps<RowType> = {
|
||||
{ title: '序号', type: 'seq', width: 50 },
|
||||
{ field: 'name', title: 'Name' },
|
||||
{ field: 'age', sortable: true, title: 'Age' },
|
||||
{ field: 'nickname', title: 'Nickname' },
|
||||
{ field: 'nick', title: 'nick' },
|
||||
{ field: 'role', title: 'Role' },
|
||||
{ field: 'address', showOverflow: true, title: 'Address' },
|
||||
],
|
||||
|
||||
@@ -3,7 +3,7 @@ interface TableRowData {
|
||||
age: number;
|
||||
id: number;
|
||||
name: string;
|
||||
nickname: string;
|
||||
nick: string;
|
||||
role: string;
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ export const MOCK_TABLE_DATA: TableRowData[] = (() => {
|
||||
age: i + 1,
|
||||
id: i,
|
||||
name: `Test${i}`,
|
||||
nickname: `Test${i}`,
|
||||
nick: `Test${i}`,
|
||||
role: roles[Math.floor(Math.random() * roles.length)] as string,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ interface RowType {
|
||||
age: number;
|
||||
id: number;
|
||||
name: string;
|
||||
nickname: string;
|
||||
nick: string;
|
||||
role: string;
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ const gridOptions: VxeGridProps<RowType> = {
|
||||
{ title: '序号', type: 'seq', width: 50 },
|
||||
{ field: 'name', title: 'Name' },
|
||||
{ field: 'age', sortable: true, title: 'Age' },
|
||||
{ field: 'nickname', title: 'Nickname' },
|
||||
{ field: 'nick', title: 'nick' },
|
||||
{ field: 'role', title: 'Role' },
|
||||
{ field: 'address', showOverflow: true, title: 'Address' },
|
||||
],
|
||||
|
||||
@@ -3,7 +3,7 @@ interface TableRowData {
|
||||
age: number;
|
||||
id: number;
|
||||
name: string;
|
||||
nickname: string;
|
||||
nick: string;
|
||||
role: string;
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ export const MOCK_TABLE_DATA: TableRowData[] = (() => {
|
||||
age: i + 1,
|
||||
id: i,
|
||||
name: `Test${i}`,
|
||||
nickname: `Test${i}`,
|
||||
nick: `Test${i}`,
|
||||
role: roles[Math.floor(Math.random() * roles.length)] as string,
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user