广丰卷烟厂数采质量分析系统
zhuguifei
2026-03-04 63b4909ac5d0b7355be211cc7080673b41cdb3cc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
import { request } from '@/service/request';
 
/** 获取用户信息列表 */
export function fetchGetUserList(params?: Api.System.UserSearchParams) {
  return request<Api.System.UserList>({
    url: '/system/user/list',
    method: 'get',
    params
  });
}
/** 获取部门用户信息列表 */
export function fetchGetDeptUserList(deptId: CommonType.IdType) {
  return request<Api.System.User[]>({
    url: `/system/user/list/dept/${deptId}`,
    method: 'get'
  });
}
 
/** 新增用户信息 */
export function fetchCreateUser(data: Api.System.UserOperateParams) {
  return request<boolean>({
    url: '/system/user',
    method: 'post',
    data
  });
}
 
/** 修改用户信息 */
export function fetchUpdateUser(data: Api.System.UserOperateParams) {
  return request<boolean>({
    url: '/system/user',
    method: 'put',
    data
  });
}
 
/** 获取用户选择框列表 */
export function fetchGetUserSelect() {
  return request<Api.System.User[]>({
    url: '/system/user/optionselect',
    method: 'get'
  });
}
 
/** 修改用户状态 */
export function fetchUpdateUserStatus(data: Api.System.UserOperateParams) {
  return request<boolean>({
    url: '/system/user/changeStatus',
    method: 'put',
    data
  });
}
 
/** 批量删除用户信息 */
export function fetchBatchDeleteUser(userIds: CommonType.IdType[]) {
  return request<boolean>({
    url: `/system/user/${userIds.join(',')}`,
    method: 'delete'
  });
}
 
/** 根据用户编号获取详细信息 */
export function fetchGetUserInfo(userId?: CommonType.IdType) {
  return request<Api.System.UserInfo>({
    url: `/system/user/${userId}`,
    method: 'get'
  });
}
 
/** 获取部门树列表 */
export function fetchGetDeptTree() {
  return request<Api.Common.CommonTreeRecord>({
    url: '/system/user/deptTree',
    method: 'get'
  });
}
 
/** 重置用户密码 */
export function fetchResetUserPassword(userId: CommonType.IdType, password: string) {
  return request<boolean>({
    url: '/system/user/resetPwd',
    method: 'put',
    headers: {
      isEncrypt: true,
      repeatSubmit: false
    },
    data: { userId, password }
  });
}
 
/** 根据用户编号获取授权角色 */
export function fetchGetAuthRole(userId: CommonType.IdType) {
  return request<Api.System.AuthRole>({
    url: `/system/user/authRole/${userId}`,
    method: 'get'
  });
}
 
/** 用户授权角色 */
export function fetchAuthUserRole(userId: CommonType.IdType, roleIds: CommonType.IdType[]) {
  return request<boolean>({
    url: '/system/user/authRole',
    method: 'put',
    data: { userId, roleIds }
  });
}
 
/** 修改用户基本信息 */
export function fetchUpdateUserProfile(data: Api.System.UserProfileOperateParams) {
  return request<boolean>({
    url: '/system/user/profile',
    method: 'put',
    data
  });
}
 
/** 修改用户密码 */
export function fetchUpdateUserPassword(data: Api.System.UserPasswordOperateParams) {
  return request<boolean>({
    url: '/system/user/profile/updatePwd',
    method: 'put',
    headers: {
      isEncrypt: true
    },
    data
  });
}
 
/** 修改用户头像 */
export function fetchUpdateUserAvatar(formData: FormData) {
  return request<boolean>({
    url: '/system/user/profile/avatar',
    method: 'post',
    data: formData
  });
}