diff --git a/src/api/category/category.js b/src/api/category/category.js new file mode 100644 index 0000000..fb3e009 --- /dev/null +++ b/src/api/category/category.js @@ -0,0 +1,45 @@ +import request from '@/utils/request' + +export function getCategoryTree() { + return request({ + url: 'api/archives-type/menu', + method: 'get' + }) +} + +export function getCategoryType() { + return request({ + url: 'api/archives-type/dropdown-list', + method: 'get' + }) +} + +export function add(data) { + data = Object.assign({ isTypeMetic: data.isType === '6' }, data) + return request({ + url: 'api/archives-type/create', + method: 'post', + data + }) +} + +export function del(ids) { + const data = { + id: ids[0] + } + return request({ + url: 'api/dictrionary/delete', + method: 'post', + data + }) +} + +export function edit(data) { + return request({ + url: 'api/dictrionary/edit', + method: 'post', + data + }) +} + +export default { add, edit, del, getCategoryTree } diff --git a/src/views/archivesManage/archivesList/index.vue b/src/views/archivesManage/archivesList/index.vue index a4c0cbe..40fd228 100644 --- a/src/views/archivesManage/archivesList/index.vue +++ b/src/views/archivesManage/archivesList/index.vue @@ -20,7 +20,7 @@