From 5d482a1337bf8cdf2c58ed374b3e3183e86bb869 Mon Sep 17 00:00:00 2001 From: Vinjor Date: Wed, 7 Aug 2024 15:55:07 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=86=E7=B1=BB=E5=AD=97=E5=85=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/system/category.js | 60 +++++++ src/views/system/category/index.vue | 244 ++++++++++++++++++++++++++++ 2 files changed, 304 insertions(+) create mode 100644 src/api/system/category.js create mode 100644 src/views/system/category/index.vue diff --git a/src/api/system/category.js b/src/api/system/category.js new file mode 100644 index 0000000..872ec16 --- /dev/null +++ b/src/api/system/category.js @@ -0,0 +1,60 @@ +import request from '@/utils/request' + +// 查询部门列表 +export function listCategory(query) { + return request({ + url: '/system/category/list', + method: 'get', + params: query + }) +} + +// 查询部门列表(排除节点) +export function listCategoryExcludeChild(categoryId) { + return request({ + url: '/system/category/list/exclude/' + categoryId, + method: 'get' + }) +} + +// 查询部门详细 +export function getCategory(categoryId) { + return request({ + url: '/system/category/get?id=' + categoryId, + method: 'get' + }) +} + +// 获取部门精简信息列表 +export function listSimpleCategorys() { + return request({ + url: '/system/category/list-all-simple', + method: 'get' + }) +} + +// 新增部门 +export function addCategory(data) { + return request({ + url: '/system/category/create', + method: 'post', + data: data + }) +} + +// 修改部门 +export function updateCategory(data) { + return request({ + url: '/system/category/update', + method: 'put', + data: data + }) +} + +// 删除部门 +export function delCategory(id) { + return request({ + url: '/system/category/delete?id=' + id, + method: 'delete' + }) +} diff --git a/src/views/system/category/index.vue b/src/views/system/category/index.vue new file mode 100644 index 0000000..cd12ec0 --- /dev/null +++ b/src/views/system/category/index.vue @@ -0,0 +1,244 @@ + + +