feat: 用户页面部分接口&uploadFile接口返回调整&上传组件调整
This commit is contained in:
parent
3d82476c09
commit
bf3eb37148
|
@ -81,7 +81,7 @@ export class MSAxios {
|
||||||
/**
|
/**
|
||||||
* @description: 文件上传
|
* @description: 文件上传
|
||||||
*/
|
*/
|
||||||
uploadFile<T = any>(config: AxiosRequestConfig, params: UploadFileParams) {
|
uploadFile<T = any>(config: AxiosRequestConfig, params: UploadFileParams): Promise<T> {
|
||||||
const formData = new window.FormData();
|
const formData = new window.FormData();
|
||||||
const fileName = params.fileList.length === 1 ? 'file' : 'files';
|
const fileName = params.fileList.length === 1 ? 'file' : 'files';
|
||||||
|
|
||||||
|
@ -92,7 +92,9 @@ export class MSAxios {
|
||||||
const requestData = JSON.stringify(params.request);
|
const requestData = JSON.stringify(params.request);
|
||||||
formData.append('request', requestData);
|
formData.append('request', requestData);
|
||||||
}
|
}
|
||||||
return this.axiosInstance.request<T>({
|
return new Promise((resolve, reject) => {
|
||||||
|
this.axiosInstance
|
||||||
|
.request<any, AxiosResponse<Result>>({
|
||||||
...config,
|
...config,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
data: formData,
|
data: formData,
|
||||||
|
@ -101,6 +103,33 @@ export class MSAxios {
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
'ignoreCancelToken': true, // 文件上传请求不需要添加到pending中
|
'ignoreCancelToken': true, // 文件上传请求不需要添加到pending中
|
||||||
},
|
},
|
||||||
|
})
|
||||||
|
.then((res: AxiosResponse<Result>) => {
|
||||||
|
const transform = this.getTransform();
|
||||||
|
const { requestOptions } = this.options;
|
||||||
|
const opt = { ...requestOptions };
|
||||||
|
|
||||||
|
const { transformRequestHook } = transform || {};
|
||||||
|
// 请求成功后的处理
|
||||||
|
if (transformRequestHook && isFunction(transformRequestHook)) {
|
||||||
|
try {
|
||||||
|
const ret = transformRequestHook(res, opt);
|
||||||
|
resolve(ret);
|
||||||
|
} catch (err) {
|
||||||
|
reject(err || new Error('request error!'));
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
resolve(res as unknown as Promise<T>);
|
||||||
|
})
|
||||||
|
.catch((e: Error | AxiosError) => {
|
||||||
|
if (axios.isAxiosError(e)) {
|
||||||
|
// 在这可重写axios错误消息
|
||||||
|
// eslint-disable-next-line no-console
|
||||||
|
console.log(e);
|
||||||
|
}
|
||||||
|
reject(e);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,16 +1,56 @@
|
||||||
import MSR from '@/api/http/index';
|
import MSR from '@/api/http/index';
|
||||||
import { GetUserListUrl, CreateUserUrl, UpdateUserUrl } from '@/api/requrls/setting/user';
|
import {
|
||||||
import type { UserListItem, CreateUserParams } from '@/models/setting/user';
|
GetUserListUrl,
|
||||||
|
CreateUserUrl,
|
||||||
|
UpdateUserUrl,
|
||||||
|
DeleteUserUrl,
|
||||||
|
ImportUserUrl,
|
||||||
|
EnableUserUrl,
|
||||||
|
GetSystemRoleUrl,
|
||||||
|
} from '@/api/requrls/setting/user';
|
||||||
|
import type {
|
||||||
|
UserListItem,
|
||||||
|
CreateUserParams,
|
||||||
|
UpdateUserInfoParams,
|
||||||
|
UpdateUserStausParams,
|
||||||
|
DeleteUserParams,
|
||||||
|
ImportUserParams,
|
||||||
|
SystemRole,
|
||||||
|
ImportResult,
|
||||||
|
} from '@/models/setting/user';
|
||||||
import type { TableQueryParams } from '@/models/common';
|
import type { TableQueryParams } from '@/models/common';
|
||||||
|
|
||||||
|
// 获取用户列表
|
||||||
export function getUserList(data: TableQueryParams) {
|
export function getUserList(data: TableQueryParams) {
|
||||||
return MSR.post<UserListItem[]>({ url: GetUserListUrl, data });
|
return MSR.post<UserListItem[]>({ url: GetUserListUrl, data });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 批量创建用户
|
||||||
export function batchCreateUser(data: CreateUserParams) {
|
export function batchCreateUser(data: CreateUserParams) {
|
||||||
return MSR.post({ url: CreateUserUrl, data });
|
return MSR.post({ url: CreateUserUrl, data });
|
||||||
}
|
}
|
||||||
|
|
||||||
export function updateUserInfo(data: UserListItem) {
|
// 更新用户信息
|
||||||
|
export function updateUserInfo(data: UpdateUserInfoParams) {
|
||||||
return MSR.post({ url: UpdateUserUrl, data });
|
return MSR.post({ url: UpdateUserUrl, data });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 更新用户启用/禁用状态
|
||||||
|
export function toggleUserStatus(data: UpdateUserStausParams) {
|
||||||
|
return MSR.post({ url: EnableUserUrl, data });
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除用户
|
||||||
|
export function deleteUserInfo(data: DeleteUserParams) {
|
||||||
|
return MSR.post({ url: DeleteUserUrl, data });
|
||||||
|
}
|
||||||
|
|
||||||
|
// 导入用户
|
||||||
|
export function importUserInfo(data: ImportUserParams) {
|
||||||
|
return MSR.uploadFile<ImportResult>({ url: ImportUserUrl }, data);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取系统用户组
|
||||||
|
export function getSystemRoles() {
|
||||||
|
return MSR.get<SystemRole>({ url: GetSystemRoleUrl });
|
||||||
|
}
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
export const GetUserListUrl = '/user/page';
|
export const GetUserListUrl = '/system/user/page';
|
||||||
export const CreateUserUrl = '/user/add';
|
export const CreateUserUrl = '/system/user/add';
|
||||||
export const UpdateUserUrl = '/user/update';
|
export const UpdateUserUrl = '/system/user/update';
|
||||||
|
export const DeleteUserUrl = '/system/user/delete';
|
||||||
|
export const ImportUserUrl = '/system/user/import';
|
||||||
|
export const EnableUserUrl = '/system/user/update/enable';
|
||||||
|
export const GetSystemRoleUrl = '/system/user/get/global/system/role';
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
v-model:file-list="fileList"
|
v-model:file-list="fileList"
|
||||||
:accept="UploadAcceptEnum[props.accept]"
|
:accept="UploadAcceptEnum[props.accept]"
|
||||||
:multiple="props.multiple"
|
:multiple="props.multiple"
|
||||||
|
:disabled="props.disabled"
|
||||||
@before-upload="beforeUpload"
|
@before-upload="beforeUpload"
|
||||||
>
|
>
|
||||||
<template #upload-button>
|
<template #upload-button>
|
||||||
|
@ -56,6 +57,7 @@
|
||||||
multiple: boolean;
|
multiple: boolean;
|
||||||
imagePreview: boolean;
|
imagePreview: boolean;
|
||||||
showFileList: boolean;
|
showFileList: boolean;
|
||||||
|
disabled: boolean;
|
||||||
iconType: string;
|
iconType: string;
|
||||||
maxSize: number; // 文件大小限制,单位 MB
|
maxSize: number; // 文件大小限制,单位 MB
|
||||||
[key: string]: any;
|
[key: string]: any;
|
||||||
|
@ -71,6 +73,13 @@
|
||||||
|
|
||||||
const fileList = ref<FileItem[]>(props.fileList);
|
const fileList = ref<FileItem[]>(props.fileList);
|
||||||
|
|
||||||
|
watch(
|
||||||
|
() => props.fileList,
|
||||||
|
(val) => {
|
||||||
|
fileList.value = val;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
() => fileList.value,
|
() => fileList.value,
|
||||||
(val) => {
|
(val) => {
|
||||||
|
|
|
@ -1,253 +1,254 @@
|
||||||
import { mock } from '@/utils/setup-mock';
|
// import { mock } from '@/utils/setup-mock';
|
||||||
import { RequestEnum } from '@/enums/httpEnum';
|
// import { RequestEnum } from '@/enums/httpEnum';
|
||||||
|
|
||||||
const getUserList = () => {
|
// const getUserList = () => {
|
||||||
return [
|
// return [
|
||||||
{
|
// {
|
||||||
id: '103423',
|
// id: '103423',
|
||||||
name: '大家的',
|
// name: '大家的',
|
||||||
email: 'dehihu@kds.sd',
|
// email: 'dehihu@kds.sd',
|
||||||
enable: true,
|
// enable: true,
|
||||||
createTime: 1686905750716,
|
// createTime: 1686905750716,
|
||||||
updateTime: 0,
|
// updateTime: 0,
|
||||||
lastOrganizationId: 'string',
|
// lastOrganizationId: 'string',
|
||||||
phone: '18473647583',
|
// phone: '18473647583',
|
||||||
source: 'string',
|
// source: 'string',
|
||||||
lastProjectId: 'string',
|
// lastProjectId: 'string',
|
||||||
createUser: 'string',
|
// createUser: 'string',
|
||||||
updateUser: 'string',
|
// updateUser: 'string',
|
||||||
organizationList: [
|
// organizationList: [
|
||||||
{
|
// {
|
||||||
id: 'string',
|
// id: 'string',
|
||||||
num: 0,
|
// num: 0,
|
||||||
name: '组织 1',
|
// name: '组织 1',
|
||||||
description: 'blabla',
|
// description: 'blabla',
|
||||||
createTime: 0,
|
// createTime: 0,
|
||||||
updateTime: 0,
|
// updateTime: 0,
|
||||||
createUser: 'string',
|
// createUser: 'string',
|
||||||
updateUser: 'string',
|
// updateUser: 'string',
|
||||||
deleted: true,
|
// deleted: true,
|
||||||
deleteUser: 'string',
|
// deleteUser: 'string',
|
||||||
deleteTime: 0,
|
// deleteTime: 0,
|
||||||
enable: true,
|
// enable: true,
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
id: 'string',
|
// id: 'string',
|
||||||
num: 0,
|
// num: 0,
|
||||||
name: '组织 2',
|
// name: '组织 2',
|
||||||
description: 'blabla',
|
// description: 'blabla',
|
||||||
createTime: 0,
|
// createTime: 0,
|
||||||
updateTime: 0,
|
// updateTime: 0,
|
||||||
createUser: 'string',
|
// createUser: 'string',
|
||||||
updateUser: 'string',
|
// updateUser: 'string',
|
||||||
deleted: true,
|
// deleted: true,
|
||||||
deleteUser: 'string',
|
// deleteUser: 'string',
|
||||||
deleteTime: 0,
|
// deleteTime: 0,
|
||||||
enable: true,
|
// enable: true,
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
id: 'string',
|
// id: 'string',
|
||||||
num: 0,
|
// num: 0,
|
||||||
name: '组织 3',
|
// name: '组织 3',
|
||||||
description: 'blabla',
|
// description: 'blabla',
|
||||||
createTime: 0,
|
// createTime: 0,
|
||||||
updateTime: 0,
|
// updateTime: 0,
|
||||||
createUser: 'string',
|
// createUser: 'string',
|
||||||
updateUser: 'string',
|
// updateUser: 'string',
|
||||||
deleted: true,
|
// deleted: true,
|
||||||
deleteUser: 'string',
|
// deleteUser: 'string',
|
||||||
deleteTime: 0,
|
// deleteTime: 0,
|
||||||
enable: true,
|
// enable: true,
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
id: 'string',
|
// id: 'string',
|
||||||
num: 0,
|
// num: 0,
|
||||||
name: '组织 4',
|
// name: '组织 4',
|
||||||
description: 'blabla',
|
// description: 'blabla',
|
||||||
createTime: 0,
|
// createTime: 0,
|
||||||
updateTime: 0,
|
// updateTime: 0,
|
||||||
createUser: 'string',
|
// createUser: 'string',
|
||||||
updateUser: 'string',
|
// updateUser: 'string',
|
||||||
deleted: true,
|
// deleted: true,
|
||||||
deleteUser: 'string',
|
// deleteUser: 'string',
|
||||||
deleteTime: 0,
|
// deleteTime: 0,
|
||||||
enable: true,
|
// enable: true,
|
||||||
},
|
// },
|
||||||
],
|
// ],
|
||||||
userRoleList: [
|
// userRoleList: [
|
||||||
{
|
// {
|
||||||
id: 'string',
|
// id: 'string',
|
||||||
name: '角色 1',
|
// name: '角色 1',
|
||||||
description: 'sdadasd',
|
// description: 'sdadasd',
|
||||||
internal: true,
|
// internal: true,
|
||||||
type: 'string',
|
// type: 'string',
|
||||||
createTime: 0,
|
// createTime: 0,
|
||||||
updateTime: 0,
|
// updateTime: 0,
|
||||||
createUser: 'string',
|
// createUser: 'string',
|
||||||
scopeId: 'string',
|
// scopeId: 'string',
|
||||||
pos: 0,
|
// pos: 0,
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
id: 'string',
|
// id: 'string',
|
||||||
name: '角色 2',
|
// name: '角色 2',
|
||||||
description: 'sdadasd',
|
// description: 'sdadasd',
|
||||||
internal: true,
|
// internal: true,
|
||||||
type: 'string',
|
// type: 'string',
|
||||||
createTime: 0,
|
// createTime: 0,
|
||||||
updateTime: 0,
|
// updateTime: 0,
|
||||||
createUser: 'string',
|
// createUser: 'string',
|
||||||
scopeId: 'string',
|
// scopeId: 'string',
|
||||||
pos: 0,
|
// pos: 0,
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
id: 'string',
|
// id: 'string',
|
||||||
name: '角色 3',
|
// name: '角色 3',
|
||||||
description: 'sdadasd',
|
// description: 'sdadasd',
|
||||||
internal: true,
|
// internal: true,
|
||||||
type: 'string',
|
// type: 'string',
|
||||||
createTime: 0,
|
// createTime: 0,
|
||||||
updateTime: 0,
|
// updateTime: 0,
|
||||||
createUser: 'string',
|
// createUser: 'string',
|
||||||
scopeId: 'string',
|
// scopeId: 'string',
|
||||||
pos: 0,
|
// pos: 0,
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
id: 'string',
|
// id: 'string',
|
||||||
name: '角色 4',
|
// name: '角色 4',
|
||||||
description: 'sdadasd',
|
// description: 'sdadasd',
|
||||||
internal: true,
|
// internal: true,
|
||||||
type: 'string',
|
// type: 'string',
|
||||||
createTime: 0,
|
// createTime: 0,
|
||||||
updateTime: 0,
|
// updateTime: 0,
|
||||||
createUser: 'string',
|
// createUser: 'string',
|
||||||
scopeId: 'string',
|
// scopeId: 'string',
|
||||||
pos: 0,
|
// pos: 0,
|
||||||
},
|
// },
|
||||||
],
|
// ],
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
id: '103233',
|
// id: '103233',
|
||||||
name: '发热发热',
|
// name: '发热发热',
|
||||||
email: 'dehihu@kds.sd',
|
// email: 'dehihu@kds.sd',
|
||||||
enable: false,
|
// enable: false,
|
||||||
createTime: 1686905750716,
|
// createTime: 1686905750716,
|
||||||
updateTime: 0,
|
// updateTime: 0,
|
||||||
lastOrganizationId: 'string',
|
// lastOrganizationId: 'string',
|
||||||
phone: '18473647583',
|
// phone: '18473647583',
|
||||||
source: 'string',
|
// source: 'string',
|
||||||
lastProjectId: 'string',
|
// lastProjectId: 'string',
|
||||||
createUser: 'string',
|
// createUser: 'string',
|
||||||
updateUser: 'string',
|
// updateUser: 'string',
|
||||||
organizationList: [
|
// organizationList: [
|
||||||
{
|
// {
|
||||||
id: 'string',
|
// id: 'string',
|
||||||
num: 0,
|
// num: 0,
|
||||||
name: '组织 1',
|
// name: '组织 1',
|
||||||
description: 'blabla',
|
// description: 'blabla',
|
||||||
createTime: 0,
|
// createTime: 0,
|
||||||
updateTime: 0,
|
// updateTime: 0,
|
||||||
createUser: 'string',
|
// createUser: 'string',
|
||||||
updateUser: 'string',
|
// updateUser: 'string',
|
||||||
deleted: true,
|
// deleted: true,
|
||||||
deleteUser: 'string',
|
// deleteUser: 'string',
|
||||||
deleteTime: 0,
|
// deleteTime: 0,
|
||||||
enable: true,
|
// enable: true,
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
id: 'string',
|
// id: 'string',
|
||||||
num: 0,
|
// num: 0,
|
||||||
name: '组织 2',
|
// name: '组织 2',
|
||||||
description: 'blabla',
|
// description: 'blabla',
|
||||||
createTime: 0,
|
// createTime: 0,
|
||||||
updateTime: 0,
|
// updateTime: 0,
|
||||||
createUser: 'string',
|
// createUser: 'string',
|
||||||
updateUser: 'string',
|
// updateUser: 'string',
|
||||||
deleted: true,
|
// deleted: true,
|
||||||
deleteUser: 'string',
|
// deleteUser: 'string',
|
||||||
deleteTime: 0,
|
// deleteTime: 0,
|
||||||
enable: true,
|
// enable: true,
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
id: 'string',
|
// id: 'string',
|
||||||
num: 0,
|
// num: 0,
|
||||||
name: '组织 3',
|
// name: '组织 3',
|
||||||
description: 'blabla',
|
// description: 'blabla',
|
||||||
createTime: 0,
|
// createTime: 0,
|
||||||
updateTime: 0,
|
// updateTime: 0,
|
||||||
createUser: 'string',
|
// createUser: 'string',
|
||||||
updateUser: 'string',
|
// updateUser: 'string',
|
||||||
deleted: true,
|
// deleted: true,
|
||||||
deleteUser: 'string',
|
// deleteUser: 'string',
|
||||||
deleteTime: 0,
|
// deleteTime: 0,
|
||||||
enable: true,
|
// enable: true,
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
id: 'string',
|
// id: 'string',
|
||||||
num: 0,
|
// num: 0,
|
||||||
name: '组织 4',
|
// name: '组织 4',
|
||||||
description: 'blabla',
|
// description: 'blabla',
|
||||||
createTime: 0,
|
// createTime: 0,
|
||||||
updateTime: 0,
|
// updateTime: 0,
|
||||||
createUser: 'string',
|
// createUser: 'string',
|
||||||
updateUser: 'string',
|
// updateUser: 'string',
|
||||||
deleted: true,
|
// deleted: true,
|
||||||
deleteUser: 'string',
|
// deleteUser: 'string',
|
||||||
deleteTime: 0,
|
// deleteTime: 0,
|
||||||
enable: true,
|
// enable: true,
|
||||||
},
|
// },
|
||||||
],
|
// ],
|
||||||
userRoleList: [
|
// userRoleList: [
|
||||||
{
|
// {
|
||||||
id: 'string',
|
// id: 'string',
|
||||||
name: '角色 1',
|
// name: '角色 1',
|
||||||
description: 'sdadasd',
|
// description: 'sdadasd',
|
||||||
internal: true,
|
// internal: true,
|
||||||
type: 'string',
|
// type: 'string',
|
||||||
createTime: 0,
|
// createTime: 0,
|
||||||
updateTime: 0,
|
// updateTime: 0,
|
||||||
createUser: 'string',
|
// createUser: 'string',
|
||||||
scopeId: 'string',
|
// scopeId: 'string',
|
||||||
pos: 0,
|
// pos: 0,
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
id: 'string',
|
// id: 'string',
|
||||||
name: '角色 2',
|
// name: '角色 2',
|
||||||
description: 'sdadasd',
|
// description: 'sdadasd',
|
||||||
internal: true,
|
// internal: true,
|
||||||
type: 'string',
|
// type: 'string',
|
||||||
createTime: 0,
|
// createTime: 0,
|
||||||
updateTime: 0,
|
// updateTime: 0,
|
||||||
createUser: 'string',
|
// createUser: 'string',
|
||||||
scopeId: 'string',
|
// scopeId: 'string',
|
||||||
pos: 0,
|
// pos: 0,
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
id: 'string',
|
// id: 'string',
|
||||||
name: '角色 3',
|
// name: '角色 3',
|
||||||
description: 'sdadasd',
|
// description: 'sdadasd',
|
||||||
internal: true,
|
// internal: true,
|
||||||
type: 'string',
|
// type: 'string',
|
||||||
createTime: 0,
|
// createTime: 0,
|
||||||
updateTime: 0,
|
// updateTime: 0,
|
||||||
createUser: 'string',
|
// createUser: 'string',
|
||||||
scopeId: 'string',
|
// scopeId: 'string',
|
||||||
pos: 0,
|
// pos: 0,
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
id: 'string',
|
// id: 'string',
|
||||||
name: '角色 4',
|
// name: '角色 4',
|
||||||
description: 'sdadasd',
|
// description: 'sdadasd',
|
||||||
internal: true,
|
// internal: true,
|
||||||
type: 'string',
|
// type: 'string',
|
||||||
createTime: 0,
|
// createTime: 0,
|
||||||
updateTime: 0,
|
// updateTime: 0,
|
||||||
createUser: 'string',
|
// createUser: 'string',
|
||||||
scopeId: 'string',
|
// scopeId: 'string',
|
||||||
pos: 0,
|
// pos: 0,
|
||||||
},
|
// },
|
||||||
],
|
// ],
|
||||||
},
|
// },
|
||||||
];
|
// ];
|
||||||
};
|
// };
|
||||||
|
|
||||||
mock(RequestEnum.POST, '/user/page', getUserList(), 200, true);
|
// mock(RequestEnum.POST, '/user/page', getUserList(), 200, true);
|
||||||
|
export default {};
|
||||||
|
|
|
@ -1,16 +1,16 @@
|
||||||
|
// 用户所属用户组模型
|
||||||
export interface UserRoleListItem {
|
export interface UserRoleListItem {
|
||||||
id: string;
|
id: string;
|
||||||
name: string;
|
name: string;
|
||||||
description: string;
|
description: string;
|
||||||
internal: boolean;
|
internal: boolean; // 是否内置用户组
|
||||||
type: string;
|
type: string; // 所属类型 SYSTEM ORGANIZATION PROJECT
|
||||||
createTime: number;
|
createTime: number;
|
||||||
updateTime: number;
|
updateTime: number;
|
||||||
createUser: string;
|
createUser: string;
|
||||||
scopeId: string;
|
scopeId: string; // 应用范围
|
||||||
pos: number;
|
|
||||||
}
|
}
|
||||||
|
// 用户所属组织模型
|
||||||
export interface OrganizationListItem {
|
export interface OrganizationListItem {
|
||||||
id: string;
|
id: string;
|
||||||
num: number;
|
num: number;
|
||||||
|
@ -20,12 +20,13 @@ export interface OrganizationListItem {
|
||||||
updateTime: number;
|
updateTime: number;
|
||||||
createUser: string;
|
createUser: string;
|
||||||
updateUser: string;
|
updateUser: string;
|
||||||
deleted: boolean;
|
deleted: boolean; // 是否删除
|
||||||
deleteUser: string;
|
deleteUser: string;
|
||||||
deleteTime: number;
|
deleteTime: number;
|
||||||
enable: boolean;
|
enable: boolean; // 是否启用
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 用户模型
|
||||||
export interface UserListItem {
|
export interface UserListItem {
|
||||||
id: string;
|
id: string;
|
||||||
name: string;
|
name: string;
|
||||||
|
@ -34,15 +35,15 @@ export interface UserListItem {
|
||||||
enable: boolean;
|
enable: boolean;
|
||||||
createTime: number;
|
createTime: number;
|
||||||
updateTime: number;
|
updateTime: number;
|
||||||
language: string;
|
language: string; // 语言
|
||||||
lastOrganizationId: string;
|
lastOrganizationId: string; // 当前组织ID
|
||||||
phone: string;
|
phone: string;
|
||||||
source: string;
|
source: string; // 来源:LOCAL OIDC CAS OAUTH2
|
||||||
lastProjectId: string;
|
lastProjectId: string; // 当前项目ID
|
||||||
createUser: string;
|
createUser: string;
|
||||||
updateUser: string;
|
updateUser: string;
|
||||||
organizationList: OrganizationListItem[];
|
organizationList: OrganizationListItem[]; // 用户所属组织
|
||||||
userRoleList: UserRoleListItem[];
|
userRoleList: UserRoleListItem[]; // 用户所属用户组
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface Filter {
|
export interface Filter {
|
||||||
|
@ -54,13 +55,44 @@ export interface Sort {
|
||||||
}
|
}
|
||||||
|
|
||||||
// 创建用户模型
|
// 创建用户模型
|
||||||
export interface CreateUserInfo {
|
export interface SimpleUserInfo {
|
||||||
|
id?: string;
|
||||||
name: string;
|
name: string;
|
||||||
email: string;
|
email: string;
|
||||||
phone?: string;
|
phone?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface CreateUserParams {
|
export interface UpdateUserInfoParams extends SimpleUserInfo {
|
||||||
userInfoList: CreateUserInfo[];
|
id: string;
|
||||||
userRoleIdList: string[];
|
userRoleIdList: string[];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface CreateUserParams {
|
||||||
|
userInfoList: SimpleUserInfo[];
|
||||||
|
userRoleIdList: string[];
|
||||||
|
}
|
||||||
|
export interface UpdateUserStausParams {
|
||||||
|
userIdList: string[];
|
||||||
|
enable: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ImportUserParams {
|
||||||
|
fileList: (File | undefined)[];
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface DeleteUserParams {
|
||||||
|
userIdList: string[];
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface SystemRole {
|
||||||
|
id: string;
|
||||||
|
name: string;
|
||||||
|
selected: boolean;
|
||||||
|
closeable: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ImportResult {
|
||||||
|
importCount: number;
|
||||||
|
successCount: number;
|
||||||
|
errorMessages: Record<string, any>;
|
||||||
|
}
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -11,28 +11,34 @@ export default {
|
||||||
'system.user.tableEnable': 'Enabled',
|
'system.user.tableEnable': 'Enabled',
|
||||||
'system.user.tableDisable': 'Disabled',
|
'system.user.tableDisable': 'Disabled',
|
||||||
'system.user.deleteUserTip': 'Are you sure to delete the user `{name}` ?',
|
'system.user.deleteUserTip': 'Are you sure to delete the user `{name}` ?',
|
||||||
|
'system.user.batchDeleteUserTip': 'Are you sure you want to delete the {count} users selected?',
|
||||||
'system.user.deleteUserContent': "Only delete user information, does not handle the user's system data",
|
'system.user.deleteUserContent': "Only delete user information, does not handle the user's system data",
|
||||||
'system.user.deleteUserConfirm': 'Delete',
|
'system.user.deleteUserConfirm': 'Delete',
|
||||||
'system.user.deleteUserCancel': 'Cancel',
|
'system.user.deleteUserCancel': 'Cancel',
|
||||||
'system.user.deleteUserSuccess': 'Delete successful',
|
'system.user.deleteUserSuccess': 'Delete successfully',
|
||||||
'system.user.disableUserTip': 'Are you sure to disable the user `{name}` ?',
|
'system.user.disableUserTip': 'Are you sure to disable the user `{name}` ?',
|
||||||
|
'system.user.batchDisableUserTip': 'Are you sure to disable the {count} selected users?',
|
||||||
'system.user.disableUserContent': "Disabled users can't log in to the system",
|
'system.user.disableUserContent': "Disabled users can't log in to the system",
|
||||||
'system.user.disableUserConfirm': 'Disabled',
|
'system.user.disableUserConfirm': 'Disabled',
|
||||||
'system.user.disableUserCancel': 'Cancel',
|
'system.user.disableUserCancel': 'Cancel',
|
||||||
'system.user.disableUserSuccess': 'Disabled successful',
|
'system.user.disableUserSuccess': 'Disabled successfully',
|
||||||
'system.user.enableUserTip': 'Are you sure to enable the user `{name}` ?',
|
'system.user.enableUserTip': 'Are you sure to enable the user `{name}` ?',
|
||||||
|
'system.user.batchEnableUserTip': 'Are you sure to enable the {count} selected users?',
|
||||||
'system.user.enableUserContent': 'Enabled users can log in to the system',
|
'system.user.enableUserContent': 'Enabled users can log in to the system',
|
||||||
'system.user.enableUserConfirm': 'Enable',
|
'system.user.enableUserConfirm': 'Enable',
|
||||||
'system.user.enableUserCancel': 'Cancel',
|
'system.user.enableUserCancel': 'Cancel',
|
||||||
'system.user.enableUserSuccess': 'Enable successful',
|
'system.user.enableUserSuccess': 'Enable successfully',
|
||||||
'system.user.resetPswStart': 'Reset the password of',
|
'system.user.resetPswStart': 'Reset the password of',
|
||||||
'system.user.resetPswTip': 'Reset the password of `{name}` to its initial password?',
|
'system.user.resetPswTip': 'Reset the password of `{name}` to its initial password?',
|
||||||
|
'system.user.batchResetPswTip': 'Reset the passwords of the selected {count} users to their initial passwords?',
|
||||||
'system.user.resetPswContent': "The initial password is the user's mailbox, which will take effect at the next login",
|
'system.user.resetPswContent': "The initial password is the user's mailbox, which will take effect at the next login",
|
||||||
'system.user.resetPswConfirm': 'Reset',
|
'system.user.resetPswConfirm': 'Reset',
|
||||||
'system.user.resetPswCancel': 'Cancel',
|
'system.user.resetPswCancel': 'Cancel',
|
||||||
'system.user.resetPswSuccess': 'Reset successful',
|
'system.user.resetPswSuccess': 'Reset successfully',
|
||||||
'system.user.createUserModalTitle': 'Create a user',
|
'system.user.createUserModalTitle': 'Create a user',
|
||||||
'system.user.addUser': 'Add user',
|
'system.user.addUser': 'Add user',
|
||||||
|
'system.user.addUserSuccess': 'Added successfully',
|
||||||
|
'system.user.updateUserSuccess': 'Updated successfully',
|
||||||
'system.user.createUserName': 'Name',
|
'system.user.createUserName': 'Name',
|
||||||
'system.user.createUserNameNotNull': 'Name cannot be blank',
|
'system.user.createUserNameNotNull': 'Name cannot be blank',
|
||||||
'system.user.createUserNameOverLength': 'Name length cannot exceed 50',
|
'system.user.createUserNameOverLength': 'Name length cannot exceed 50',
|
||||||
|
@ -59,7 +65,7 @@ export default {
|
||||||
'system.user.inviteCancel': 'Cancel',
|
'system.user.inviteCancel': 'Cancel',
|
||||||
'system.user.inviteEmailPlaceholder': 'Enter multiple email addresses, separated by spaces or carriage returns',
|
'system.user.inviteEmailPlaceholder': 'Enter multiple email addresses, separated by spaces or carriage returns',
|
||||||
'system.user.inviteSendEmail': 'SendEmail',
|
'system.user.inviteSendEmail': 'SendEmail',
|
||||||
'system.user.inviteSuccess': 'Invitation successful',
|
'system.user.inviteSuccess': 'Invitation successfully',
|
||||||
'system.user.importModalTitle': 'Import user',
|
'system.user.importModalTitle': 'Import user',
|
||||||
'system.user.importDownload': 'Download the template',
|
'system.user.importDownload': 'Download the template',
|
||||||
'system.user.importModalTip': 'User groups only support adding user groups that exist in the system',
|
'system.user.importModalTip': 'User groups only support adding user groups that exist in the system',
|
||||||
|
|
|
@ -11,27 +11,33 @@ export default {
|
||||||
'system.user.tableEnable': '正常',
|
'system.user.tableEnable': '正常',
|
||||||
'system.user.tableDisable': '禁用',
|
'system.user.tableDisable': '禁用',
|
||||||
'system.user.deleteUserTip': '确认删除 `{name}` 这个用户吗?',
|
'system.user.deleteUserTip': '确认删除 `{name}` 这个用户吗?',
|
||||||
|
'system.user.batchDeleteUserTip': '确认删除已选中的 {count} 个用户吗?',
|
||||||
'system.user.deleteUserContent': '仅删除用户信息,不处理该用户的系统数据',
|
'system.user.deleteUserContent': '仅删除用户信息,不处理该用户的系统数据',
|
||||||
'system.user.deleteUserConfirm': '确认删除',
|
'system.user.deleteUserConfirm': '确认删除',
|
||||||
'system.user.deleteUserCancel': '取消',
|
'system.user.deleteUserCancel': '取消',
|
||||||
'system.user.deleteUserSuccess': '删除成功',
|
'system.user.deleteUserSuccess': '删除成功',
|
||||||
'system.user.disableUserTip': '确认禁用 `{name}` 这个用户吗?',
|
'system.user.disableUserTip': '确认禁用 `{name}` 这个用户吗?',
|
||||||
|
'system.user.batchDisableUserTip': '确认禁用已选中的 {count} 个用户吗?',
|
||||||
'system.user.disableUserContent': '禁用的用户无法登录系统',
|
'system.user.disableUserContent': '禁用的用户无法登录系统',
|
||||||
'system.user.disableUserConfirm': '确认禁用',
|
'system.user.disableUserConfirm': '确认禁用',
|
||||||
'system.user.disableUserCancel': '取消',
|
'system.user.disableUserCancel': '取消',
|
||||||
'system.user.disableUserSuccess': '禁用成功',
|
'system.user.disableUserSuccess': '禁用成功',
|
||||||
'system.user.enableUserTip': '确认启用 `{name}` 这个用户吗?',
|
'system.user.enableUserTip': '确认启用 `{name}` 这个用户吗?',
|
||||||
|
'system.user.batchEnableUserTip': '确认启用已选中的 {count} 个用户吗?',
|
||||||
'system.user.enableUserContent': '启用后用户可以登录系统',
|
'system.user.enableUserContent': '启用后用户可以登录系统',
|
||||||
'system.user.enableUserConfirm': '确认启用',
|
'system.user.enableUserConfirm': '确认启用',
|
||||||
'system.user.enableUserCancel': '取消',
|
'system.user.enableUserCancel': '取消',
|
||||||
'system.user.enableUserSuccess': '启用成功',
|
'system.user.enableUserSuccess': '启用成功',
|
||||||
'system.user.resetPswTip': '是否将 `{name}` 的密码重置为初始密码?',
|
'system.user.resetPswTip': '是否将 `{name}` 的密码重置为初始密码?',
|
||||||
|
'system.user.batchResetPswTip': '是否将选中的 {count} 个用户的密码重置为初始密码?',
|
||||||
'system.user.resetPswContent': '初始的密码为用户邮箱,下次登录时生效',
|
'system.user.resetPswContent': '初始的密码为用户邮箱,下次登录时生效',
|
||||||
'system.user.resetPswConfirm': '确认重置',
|
'system.user.resetPswConfirm': '确认重置',
|
||||||
'system.user.resetPswCancel': '取消',
|
'system.user.resetPswCancel': '取消',
|
||||||
'system.user.resetPswSuccess': '重置成功',
|
'system.user.resetPswSuccess': '重置成功',
|
||||||
'system.user.createUserModalTitle': '创建用户',
|
'system.user.createUserModalTitle': '创建用户',
|
||||||
'system.user.addUser': '添加用户',
|
'system.user.addUser': '添加用户',
|
||||||
|
'system.user.addUserSuccess': '添加成功',
|
||||||
|
'system.user.updateUserSuccess': '更新成功',
|
||||||
'system.user.createUserName': '姓名',
|
'system.user.createUserName': '姓名',
|
||||||
'system.user.createUserNameNotNull': '姓名不能为空',
|
'system.user.createUserNameNotNull': '姓名不能为空',
|
||||||
'system.user.createUserNameOverLength': '姓名长度不能超过50',
|
'system.user.createUserNameOverLength': '姓名长度不能超过50',
|
||||||
|
|
Loading…
Reference in New Issue