diff --git a/api/system/departments.js b/api/system/departments.js new file mode 100644 index 0000000..1974ced --- /dev/null +++ b/api/system/departments.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 查询部门列表 +export function listDepartments(query) { + return request({ + url: '/system/departments/list', + method: 'get', + params: query + }) +} + +// 查询部门详细 +export function getDepartments(id) { + return request({ + url: '/system/departments/' + id, + method: 'get' + }) +} + +// 新增部门 +export function addDepartments(data) { + return request({ + url: '/system/departments', + method: 'post', + data: data + }) +} + +// 修改部门 +export function updateDepartments(data) { + return request({ + url: '/system/departments', + method: 'put', + data: data + }) +} + +// 删除部门 +export function delDepartments(id) { + return request({ + url: '/system/departments/' + id, + method: 'delete' + }) +} diff --git a/views/system/departments/index.vue b/views/system/departments/index.vue new file mode 100644 index 0000000..f9c9fd6 --- /dev/null +++ b/views/system/departments/index.vue @@ -0,0 +1,255 @@ + + +