广丰卷烟厂数采质量分析系统
zhuguifei
2026-03-09 25415898ce4e709b22425526b6f30076c663d832
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
import { request } from '@/service/request';
 
/** 获取角色信息列表 */
export function fetchGetRoleList(params?: Api.System.RoleSearchParams) {
  return request<Api.System.RoleList>({
    url: '/system/role/list',
    method: 'get',
    params
  });
}
 
/** 新增角色信息 */
export function fetchCreateRole(data: Api.System.RoleOperateParams) {
  return request<boolean>({
    url: '/system/role',
    method: 'post',
    data
  });
}
 
/** 修改角色信息 */
export function fetchUpdateRole(data: Api.System.RoleOperateParams) {
  return request<boolean>({
    url: '/system/role',
    method: 'put',
    data
  });
}
 
/** 修改角色状态 */
export function fetchUpdateRoleStatus(data: Api.System.RoleOperateParams) {
  return request<boolean>({
    url: '/system/role/changeStatus',
    method: 'put',
    data
  });
}
 
/** 修改角色数据权限 */
export function fetchUpdateRoleDataScope(data: Api.System.RoleOperateParams) {
  return request<boolean>({
    url: '/system/role/dataScope',
    method: 'put',
    data
  });
}
 
/** 批量删除角色信息 */
export function fetchBatchDeleteRole(roleIds: CommonType.IdType[]) {
  return request<boolean>({
    url: `/system/role/${roleIds.join(',')}`,
    method: 'delete'
  });
}
 
/** 获取角色选择框列表 */
export function fetchGetRoleSelect(roleIds?: CommonType.IdType[]) {
  return request<Api.System.Role[]>({
    url: '/system/role/optionselect',
    method: 'get',
    params: { roleIds }
  });
}
 
/** 获取对应角色部门树列表 */
export function fetchGetRoleDeptTreeSelect(roleId: CommonType.IdType) {
  return request<Api.System.RoleDeptTreeSelect>({
    url: `/system/role/deptTree/${roleId}`,
    method: 'get'
  });
}
 
/** 获取对应角色用户列表 */
export function fetchGetRoleUserList(params: Api.System.UserSearchParams) {
  return request<Api.System.UserList>({
    url: `/system/role/authUser/allocatedList`,
    method: 'get',
    params
  });
}
 
/** 批量选择用户授权 */
export function fetchUpdateRoleAuthUser(roleId: CommonType.IdType, userIds: CommonType.IdType[]) {
  return request<boolean>({
    url: '/system/role/authUser/selectAll',
    method: 'put',
    params: { roleId, userIds: userIds.join(',') }
  });
}
 
/** 批量取消用户授权 */
export function fetchUpdateRoleAuthUserCancel(roleId: CommonType.IdType, userIds: CommonType.IdType[]) {
  return request<boolean>({
    url: '/system/role/authUser/cancelAll',
    method: 'put',
    params: { roleId, userIds: userIds.join(',') }
  });
}