diff --git a/sub-government-affairs-service/src/apis/system/dept.js b/sub-government-affairs-service/src/apis/system/dept.js new file mode 100644 index 0000000..e109ac7 --- /dev/null +++ b/sub-government-affairs-service/src/apis/system/dept.js @@ -0,0 +1,58 @@ +import request from '@/utils/axios'; + +/** + * @Title: 列表 + */ +export function GetEntityList(params = {}) { + return request('/system/dept/list', { + method: 'GET', + params, + }); +} + +/** + * @Title: 信息 + */ +export function GetEntity(id) { + return request(`/system/dept/list/exclude/${id}`, { + method: 'GET', + }); +} + +/** + * @Title: 新增 + */ +export function AddEntity(data = {}) { + return request('/system/dept', { + method: 'POST', + data, + }); +} + +/** + * @Title: 修改 + */ +export function UpdateEntity(data = {}) { + return request('/system/dept', { + method: 'PUT', + data, + }); +} + +/** + * @Title: 删除 + */ +export function DeleteEntity(params = {}) { + return request(`/system/dict/type/${params.id}`, { + method: 'DELETE', + }); +} + +/** + * @Title: 查询部门列表(排除节点) + */ +export function GetDeptExcludeChild(id) { + return request(`/system/dept/list/exclude/${id}`, { + method: 'GET', + }); +} diff --git a/sub-government-affairs-service/src/apis/system/dict.js b/sub-government-affairs-service/src/apis/system/dict.js new file mode 100644 index 0000000..ab163c6 --- /dev/null +++ b/sub-government-affairs-service/src/apis/system/dict.js @@ -0,0 +1,49 @@ +import request from '@/utils/axios'; + +/** + * @Title: 列表 + */ +export function GetEntityList(params = {}) { + return request('/system/dict/data/list', { + method: 'GET', + params, + }); +} + +/** + * @Title: 根据字典类型查询字典数据信息 + */ +export function GetDict(dictType) { + return request(`/system/dict/data/list/${dictType}`, { + method: 'GET', + }); +} + +/** + * @Title: 新增 + */ +export function AddEntity(data = {}) { + return request('/system/dict/data', { + method: 'POST', + data, + }); +} + +/** + * @Title: 修改 + */ +export function UpdateEntity(data = {}) { + return request('/system/dict/data', { + method: 'PUT', + data, + }); +} + +/** + * @Title: 删除 + */ +export function DeleteEntity(params = {}) { + return request(`/system/dict/data/${params.id}`, { + method: 'DELETE', + }); +} diff --git a/sub-government-affairs-service/src/apis/system/dictType.js b/sub-government-affairs-service/src/apis/system/dictType.js new file mode 100644 index 0000000..b43b9db --- /dev/null +++ b/sub-government-affairs-service/src/apis/system/dictType.js @@ -0,0 +1,58 @@ +import request from '@/utils/axios'; + +/** + * @Title: 列表 + */ +export function GetEntityList(params = {}) { + return request('/system/dict/type/list', { + method: 'GET', + params, + }); +} + +/** + * @Title: 信息 + */ +export function GetEntity(dictId) { + return request(`/system/dict/type/list/${dictId}`, { + method: 'GET', + }); +} + +/** + * @Title: 新增 + */ +export function AddEntity(data = {}) { + return request('/system/dict/type', { + method: 'POST', + data, + }); +} + +/** + * @Title: 修改 + */ +export function UpdateEntity(data = {}) { + return request('/system/dict/type', { + method: 'PUT', + data, + }); +} + +/** + * @Title: 删除 + */ +export function DeleteEntity(params = {}) { + return request(`/system/dict/type/${params.id}`, { + method: 'DELETE', + }); +} + +/** + * @Title: 获取字典选择框列表 + */ +export function GetEntityOption() { + return request('system/dict/type/optionselect', { + method: 'GET', + }); +}