import { request } from '@umijs/max';
|
|
// 列表
|
export const getList = async (params) => {
|
return request(`/api/huacheng-sangeshenbian/systemUser/list`, {
|
method: 'GET',
|
params
|
});
|
}
|
|
|
// 单位列表
|
export const getUnitList = async (params) => {
|
return request(`/api/huacheng-sangeshenbian/department/list`, {
|
method: 'GET',
|
params
|
});
|
}
|
|
// 编辑获取角色权限树
|
export const getTree = async (id) => {
|
return request(`/api/huacheng-sangeshenbian/systemRole/getSystemRoleInfo/${id}`, {
|
method: 'GET',
|
});
|
}
|
|
// 新增获取权限树
|
export const getAddTree = async (id) => {
|
return request(`/api/huacheng-sangeshenbian/systemMenu/getSystemMenuList`, {
|
method: 'GET',
|
});
|
}
|
|
// 新增
|
export const add = async (data) => {
|
return request('/api/huacheng-sangeshenbian/systemRole/add', {
|
method: 'POST',
|
data,
|
});
|
}
|
|
// 新增单位
|
export const addUnit = async (data) => {
|
return request('/api/huacheng-sangeshenbian/department/add', {
|
method: 'POST',
|
data,
|
});
|
}
|
|
// 编辑单位
|
export const editUnit = async (data) => {
|
return request('/api/huacheng-sangeshenbian/department/edit', {
|
method: 'POST',
|
data,
|
});
|
}
|
|
// 编辑
|
export const edit = async (data) => {
|
return request('/api/huacheng-sangeshenbian/systemRole/edit', {
|
method: 'POST',
|
data,
|
});
|
}
|
|
// 删除
|
export const del = async (id) => {
|
return request(`/api/huacheng-sangeshenbian/systemUser/delete/${id}`, {
|
method: 'DELETE',
|
});
|
}
|
|
// 删除单位
|
export const delUnit = async (id) => {
|
return request(`/api/huacheng-sangeshenbian/department/delete/${id}`, {
|
method: 'DELETE',
|
});
|
}
|
|
// 根据单位层级查询单位数据
|
export const getDepartmentList = async (tier) => {
|
return request(`/api/huacheng-sangeshenbian/department/getDepartmentList/${tier}`, {
|
method: 'GET',
|
});
|
}
|
// 获取职位列表数据
|
export const systemPostList = async (params) => {
|
return request(`/api/huacheng-sangeshenbian/systemPost/list`, {
|
method: 'GET',params
|
});
|
}
|
|
// 获取角色列表数据
|
export const systemRoleList = async (params) => {
|
return request(`/api/huacheng-sangeshenbian/systemRole/list`, {
|
method: 'GET',params
|
});
|
}
|
// 获取人员详情数据
|
export const getSystemUserInfo = async (id) => {
|
return request(`/api/huacheng-sangeshenbian/systemUser/getSystemUserInfo/${id}`, {
|
method: 'GET',
|
});
|
}// 添加人员数据
|
export const addSystemUserInfo = async (data) => {
|
return request(`/api/huacheng-sangeshenbian/systemUser/add`, {
|
method: 'POST',
|
data
|
});
|
}
|
|
// 编辑人员数据
|
export const editSystemUserInfo = async (data) => {
|
return request(`/api/huacheng-sangeshenbian/systemUser/edit`, {
|
method: 'POST',
|
data
|
});
|
}
|
// 获取省市区
|
export const getCityList = async (data) => {
|
return request(`/api/huacheng-sangeshenbian/systemUser/getAdministrativeDivision/${data.id}/${data.tier}`, {
|
method: 'GET',
|
});
|
}
|
|
// 冻结
|
export const freezeApi = async (id) => {
|
return request(`/api/huacheng-sangeshenbian/systemUser/freeze/${id}`, {
|
method: 'PUT',
|
});
|
}
|
// 解冻
|
export const unfreezeApi = async (id) => {
|
return request(`/api/huacheng-sangeshenbian/systemUser/unfreeze/${id}`, {
|
method: 'PUT',
|
});
|
}
|
|
|
//获取级联数据
|
export const getCascaderData = async (data) => {
|
return request(`/api/huacheng-sangeshenbian/systemUser/getAdministrativeDivisionTwo`, {
|
method: 'GET',
|
});
|
}
|