diff --git a/src/api/content/article.ts b/src/api/content/article.ts new file mode 100644 index 0000000..bd78b16 --- /dev/null +++ b/src/api/content/article.ts @@ -0,0 +1,60 @@ +import { http } from '@/utils/http/axios'; + +/** + * @description: 列表 + */ +export function getArticleList(params?) { + return http.request({ + url: '/article/page', + method: 'GET', + params, + }); +} +/** + * @description: 根据ID获取详情 + */ +export function getArticleDetail(articleId) { + return http.request({ + url: '/article/detail/'+articleId, + method: 'get', + }); +} +/** + * @description: 添加 + */ +export function articleAdd(data:any) { + return http.request({ + url: '/article/add', + method: 'POST', + data, + }); +} +/** + * @description: 更新 + */ +export function articleUpdate(data:any) { + return http.request({ + url: '/article/update', + method: 'PUT', + data + }); +} +/** + * @description: 删除 + */ +export function articleDelete(articleId) { + return http.request({ + url: '/article/delete/'+articleId, + method: 'DELETE', + }); +} +/** + * @description: 批量删除 + */ +export function articleBatchDelete(data:any) { + return http.request({ + url: '/article/batchDelete', + method: 'DELETE', + data + }); +} \ No newline at end of file diff --git a/src/api/content/category.ts b/src/api/content/category.ts new file mode 100644 index 0000000..b6f2595 --- /dev/null +++ b/src/api/content/category.ts @@ -0,0 +1,50 @@ +import { http } from '@/utils/http/axios'; + +/** + * @description: 列表 + */ +export function getCategoryList(params?) { + return http.request({ + url: '/category/list', + method: 'GET', + params, + }); +} +/** + * @description: 根据ID获取详情 + */ +export function getCategoryDetail(categoryId) { + return http.request({ + url: '/category/detail/'+categoryId, + method: 'get', + }); +} +/** + * @description: 添加 + */ +export function categoryAdd(data:any) { + return http.request({ + url: '/category/add', + method: 'POST', + data, + }); +} +/** + * @description: 更新 + */ +export function categoryUpdate(data:any) { + return http.request({ + url: '/category/update', + method: 'PUT', + data + }); +} +/** + * @description: 删除部门 + */ +export function categoryDelete(categoryId) { + return http.request({ + url: '/category/delete/'+categoryId, + method: 'DELETE', + }); +} \ No newline at end of file diff --git a/src/api/content/tag.ts b/src/api/content/tag.ts new file mode 100644 index 0000000..cd7d41f --- /dev/null +++ b/src/api/content/tag.ts @@ -0,0 +1,60 @@ +import { http } from '@/utils/http/axios'; + +/** + * @description: 列表 + */ +export function getTagList(params?) { + return http.request({ + url: '/tag/page', + method: 'GET', + params, + }); +} +/** + * @description: 根据ID获取详情 + */ +export function getTagDetail(tagId) { + return http.request({ + url: '/tag/detail/'+tagId, + method: 'get', + }); +} +/** + * @description: 添加 + */ +export function tagAdd(data:any) { + return http.request({ + url: '/tag/add', + method: 'POST', + data, + }); +} +/** + * @description: 更新 + */ +export function tagUpdate(data:any) { + return http.request({ + url: '/tag/update', + method: 'PUT', + data + }); +} +/** + * @description: 删除 + */ +export function tagDelete(tagId) { + return http.request({ + url: '/tag/delete/'+tagId, + method: 'DELETE', + }); +} +/** + * @description: 批量删除 + */ +export function tagBatchDelete(data:any) { + return http.request({ + url: '/tag/batchDelete', + method: 'DELETE', + data + }); +} \ No newline at end of file diff --git a/src/views/content/category/edit.vue b/src/views/content/category/edit.vue new file mode 100644 index 0000000..39fd7af --- /dev/null +++ b/src/views/content/category/edit.vue @@ -0,0 +1,171 @@ + + diff --git a/src/views/content/category/index.vue b/src/views/content/category/index.vue new file mode 100644 index 0000000..44a7744 --- /dev/null +++ b/src/views/content/category/index.vue @@ -0,0 +1,137 @@ + + + + + \ No newline at end of file diff --git a/src/views/content/tag/columns.ts b/src/views/content/tag/columns.ts new file mode 100644 index 0000000..009704c --- /dev/null +++ b/src/views/content/tag/columns.ts @@ -0,0 +1,24 @@ +import { h } from 'vue'; +import { ElTag } from 'element-plus'; + +export const columns = [ + { + type: 'selection', + }, + { + label: '标签名称', + prop: 'name', + }, + { + label: '排序', + prop: 'sort', + }, + { + label: '创建人', + prop: 'createUser', + }, + { + label: '创建时间', + prop: 'createTime', + }, +]; diff --git a/src/views/content/tag/edit.vue b/src/views/content/tag/edit.vue new file mode 100644 index 0000000..8de136c --- /dev/null +++ b/src/views/content/tag/edit.vue @@ -0,0 +1,104 @@ + + diff --git a/src/views/content/tag/index.vue b/src/views/content/tag/index.vue new file mode 100644 index 0000000..c022a83 --- /dev/null +++ b/src/views/content/tag/index.vue @@ -0,0 +1,160 @@ + + + + + diff --git a/src/views/content/tag/querySchemas.ts b/src/views/content/tag/querySchemas.ts new file mode 100644 index 0000000..2a83569 --- /dev/null +++ b/src/views/content/tag/querySchemas.ts @@ -0,0 +1,11 @@ +import { FormSchema } from '@/components/Form/index'; +export const schemas: FormSchema[] = [ + { + field: 'name', + component: 'Input', + label: '标签名称', + componentProps: { + placeholder: '请输入标签名称', + }, + } +];