frontend/.env.development

This commit is contained in:
sjl
2024-11-01 15:29:16 +08:00
25 changed files with 752 additions and 853 deletions

View File

@@ -18,29 +18,21 @@ export namespace Login {
// 用户管理模块
export namespace User {
// 用户列表
export interface ResUserList {
id: string; //用户ID作为唯一标识
username: string; //用户名
// 用户接口
export interface UserBO {
id?: string; //用户ID作为唯一标识
name: string; //用户名(别名)
loginName: string;//登录名
password: string; //密码
realname: string; //真实姓名
status: number; //用户状态
rolename: string; //角色名称
}
export interface ReqUserParams extends ReqPage {
id: string; //用户ID作为唯一标识
username: string; //用户名
password: string; //密码
realname: string; //真实姓名
status: number; //用户状态
rolename: string; //角色名称
}
export interface ResStatus {
userLabel: string;
userValue: number;
phone?: string; //手机号
email?: string; //邮箱
loginTime?: string;//最后一次登录时间
loginErrorTimes: number;//登录错误次数
lockTime?: string; //用户密码错误锁定时间
}
// 用户+分页
export interface ReqUserParams extends ReqPage,UserBO {
}
}

View File

@@ -8,7 +8,7 @@ import http from '@/api'
*/
// 获取用户列表
export const getUserList = (params: User.ReqUserParams) => {
return http.post<ResPage<User.ResUserList>>(`${rePrefix}/user/list`, params)
return http.post<ResPage<User.UserBO>>(`/user/list`, params)
}
// 获取树形用户列表
@@ -17,8 +17,8 @@ export const getUserList = (params: User.ReqUserParams) => {
// }
// 新增用户
export const addUser = (params: { id: string }) => {
return http.post(`${rePrefix}/user/add`, params)
export const addUser = (params: User.UserBO) => {
return http.post(`/user/add`, params)
}
// 批量添加用户
@@ -27,24 +27,24 @@ export const BatchAddUser = (params: FormData) => {
}
// 编辑用户
export const editUser = (params: { id: string }) => {
return http.post(`${rePrefix}/user/edit`, params)
export const editUser = (params: User.UserBO) => {
return http.post(`/user/edit`, params)
}
// 删除用户
export const deleteUser = (params: { id: string[] }) => {
return http.post(`${rePrefix}/user/delete`, params)
return http.post(`/user/delete`, params)
}
// 切换用户状态
export const changeUserStatus = (params: { id: string; status: number }) => {
return http.post(`${rePrefix}/user/change`, params)
}
// export const changeUserStatus = (params: { id: string; status: number }) => {
// return http.post(`${rePrefix}/user/change`, params)
// }
// 重置用户密码
export const resetUserPassWord = (params: { id: string }) => {
return http.post(`${rePrefix}/user/rest_password`, params)
}
// export const resetUserPassWord = (params: { id: string }) => {
// return http.post(`${rePrefix}/user/rest_password`, params)
// }
// 导出用户数据
export const exportUserInfo = (params: User.ReqUserParams) => {
@@ -52,6 +52,6 @@ export const exportUserInfo = (params: User.ReqUserParams) => {
}
// 获取用户状态字典
export const getUserStatus = () => {
return http.get<User.ResStatus[]>(`${rePrefix}/user/status`)
}
// export const getUserStatus = () => {
// return http.get<User.ResStatus[]>(`${rePrefix}/user/status`)
// }

View File

@@ -15,118 +15,118 @@ const data = [
'status': 1,
'rolename': '管理员',
},
{
'id': '652286556713195552',
'username': 'operator_A',
'password': '12345678',
'realname': '潘霞',
'status': 1,
'rolename': '操作员',
},
{
'id': '373930342176416776',
'username': 'operator_B',
'password': '12345678',
'realname': '郝秀英',
'status': 0,
'rolename': '操作员',
},
{
'id': '429621442453555775',
'username': 'operator_C',
'password': '12345678',
'realname': '吕洋',
'status': 1,
'rolename': '操作员',
},
{
'id': '387231964476618937',
'username': 'operator_D',
'password': '12345678',
'realname': '江磊',
'status': 0,
'rolename': '操作员',
},
{
'id': '604013348875476647',
'username': 'operator_E',
'password': '12345678',
'realname': '姚静',
'status': 0,
'rolename': '操作员',
},
{
'id': '028222596330483467',
'username': 'operator_F',
'password': '12345678',
'realname': '龙艳',
'status': 1,
'rolename': '操作员',
},
{
'id': '739427478368274267',
'username': 'operator_G',
'password': '12345678',
'realname': '武涛',
'status': 1,
'rolename': '操作员',
},
{
'id': '448686878612127243',
'username': 'operator_H',
'password': '12345678',
'realname': '孙芳',
'status': 0,
'rolename': '操作员',
},
{
'id': '448686878612127244',
'username': 'operator_I',
'password': '12345678',
'realname': '孙芳1',
'status': 0,
'rolename': '操作员',
},
{
'id': '448686878612127245',
'username': 'operator_J',
'password': '12345678',
'realname': '孙芳2',
'status': 1,
'rolename': '操作员',
},
{
'id': '448686878612127245',
'username': 'operator_J',
'password': '12345678',
'realname': '孙芳2',
'status': 1,
'rolename': '操作员',
},
{
'id': '448686878612127245',
'username': 'operator_J',
'password': '12345678',
'realname': '孙芳2',
'status': 1,
'rolename': '操作员',
},
{
'id': '448686878612127245',
'username': 'operator_J',
'password': '12345678',
'realname': '孙芳2',
'status': 1,
'rolename': '操作员',
},
{
'id': '448686878612127245',
'username': 'operator_J',
'password': '12345678',
'realname': '孙芳2',
'status': 1,
'rolename': '操作员',
}
// {
// 'id': '652286556713195552',
// 'username': 'operator_A',
// 'password': '12345678',
// 'realname': '潘霞',
// 'status': 1,
// 'rolename': '操作员',
// },
// {
// 'id': '373930342176416776',
// 'username': 'operator_B',
// 'password': '12345678',
// 'realname': '郝秀英',
// 'status': 0,
// 'rolename': '操作员',
// },
// {
// 'id': '429621442453555775',
// 'username': 'operator_C',
// 'password': '12345678',
// 'realname': '吕洋',
// 'status': 1,
// 'rolename': '操作员',
// },
// {
// 'id': '387231964476618937',
// 'username': 'operator_D',
// 'password': '12345678',
// 'realname': '江磊',
// 'status': 0,
// 'rolename': '操作员',
// },
// {
// 'id': '604013348875476647',
// 'username': 'operator_E',
// 'password': '12345678',
// 'realname': '姚静',
// 'status': 0,
// 'rolename': '操作员',
// },
// {
// 'id': '028222596330483467',
// 'username': 'operator_F',
// 'password': '12345678',
// 'realname': '龙艳',
// 'status': 1,
// 'rolename': '操作员',
// },
// {
// 'id': '739427478368274267',
// 'username': 'operator_G',
// 'password': '12345678',
// 'realname': '武涛',
// 'status': 1,
// 'rolename': '操作员',
// },
// {
// 'id': '448686878612127243',
// 'username': 'operator_H',
// 'password': '12345678',
// 'realname': '孙芳',
// 'status': 0,
// 'rolename': '操作员',
// },
// {
// 'id': '448686878612127244',
// 'username': 'operator_I',
// 'password': '12345678',
// 'realname': '孙芳1',
// 'status': 0,
// 'rolename': '操作员',
// },
// {
// 'id': '448686878612127245',
// 'username': 'operator_J',
// 'password': '12345678',
// 'realname': '孙芳2',
// 'status': 1,
// 'rolename': '操作员',
// },
// {
// 'id': '448686878612127245',
// 'username': 'operator_J',
// 'password': '12345678',
// 'realname': '孙芳2',
// 'status': 1,
// 'rolename': '操作员',
// },
// {
// 'id': '448686878612127245',
// 'username': 'operator_J',
// 'password': '12345678',
// 'realname': '孙芳2',
// 'status': 1,
// 'rolename': '操作员',
// },
// {
// 'id': '448686878612127245',
// 'username': 'operator_J',
// 'password': '12345678',
// 'realname': '孙芳2',
// 'status': 1,
// 'rolename': '操作员',
// },
// {
// 'id': '448686878612127245',
// 'username': 'operator_J',
// 'password': '12345678',
// 'realname': '孙芳2',
// 'status': 1,
// 'rolename': '操作员',
// }
]