diff --git a/src/api/iot/product/category/index.ts b/src/api/iot/product/category/index.ts new file mode 100644 index 00000000..f2e377d4 --- /dev/null +++ b/src/api/iot/product/category/index.ts @@ -0,0 +1,38 @@ +import request from '@/config/axios' + +// IoT 产品分类 VO +export interface ProductCategoryVO { + id: number // 分类 ID + name: string // 分类名字 + sort: number // 分类排序 + status: number // 分类状态 + description: string // 分类描述 +} + +// IoT 产品分类 API +export const ProductCategoryApi = { + // 查询产品分类分页 + getProductCategoryPage: async (params: any) => { + return await request.get({ url: `/iot/product-category/page`, params }) + }, + + // 查询产品分类详情 + getProductCategory: async (id: number) => { + return await request.get({ url: `/iot/product-category/get?id=` + id }) + }, + + // 新增产品分类 + createProductCategory: async (data: ProductCategoryVO) => { + return await request.post({ url: `/iot/product-category/create`, data }) + }, + + // 修改产品分类 + updateProductCategory: async (data: ProductCategoryVO) => { + return await request.put({ url: `/iot/product-category/update`, data }) + }, + + // 删除产品分类 + deleteProductCategory: async (id: number) => { + return await request.delete({ url: `/iot/product-category/delete?id=` + id }) + } +} diff --git a/src/views/iot/product/category/ProductCategoryForm.vue b/src/views/iot/product/category/ProductCategoryForm.vue new file mode 100644 index 00000000..ff721922 --- /dev/null +++ b/src/views/iot/product/category/ProductCategoryForm.vue @@ -0,0 +1,119 @@ + + diff --git a/src/views/iot/product/category/index.vue b/src/views/iot/product/category/index.vue new file mode 100644 index 00000000..e7826221 --- /dev/null +++ b/src/views/iot/product/category/index.vue @@ -0,0 +1,170 @@ + + +