代码生成:增加 tree 树形的示例

This commit is contained in:
YunaiV
2023-11-16 20:39:12 +08:00
parent 3d0c4f4422
commit bbc37613b6
7 changed files with 159 additions and 478 deletions

View File

@ -0,0 +1,37 @@
import request from '@/config/axios'
export interface Demo02CategoryVO {
id: number
name: string
parentId: number
}
// 查询示例分类列表
export const getDemo02CategoryList = async (params) => {
return await request.get({ url: `/infra/demo02-category/list`, params })
}
// 查询示例分类详情
export const getDemo02Category = async (id: number) => {
return await request.get({ url: `/infra/demo02-category/get?id=` + id })
}
// 新增示例分类
export const createDemo02Category = async (data: Demo02CategoryVO) => {
return await request.post({ url: `/infra/demo02-category/create`, data })
}
// 修改示例分类
export const updateDemo02Category = async (data: Demo02CategoryVO) => {
return await request.put({ url: `/infra/demo02-category/update`, data })
}
// 删除示例分类
export const deleteDemo02Category = async (id: number) => {
return await request.delete({ url: `/infra/demo02-category/delete?id=` + id })
}
// 导出示例分类 Excel
export const exportDemo02Category = async (params) => {
return await request.download({ url: `/infra/demo02-category/export-excel`, params })
}

View File

@ -1,49 +0,0 @@
import request from '@/config/axios'
export interface DemoStudentVO {
id: number
}
// 查询学生列表
export const getDemoStudentPage = async (params) => {
return await request.get({ url: `/infra/demo-student/page`, params })
}
// 查询学生详情
export const getDemoStudent = async (id: number) => {
return await request.get({ url: `/infra/demo-student/get?id=` + id })
}
// 新增学生
export const createDemoStudent = async (data: DemoStudentVO) => {
return await request.post({ url: `/infra/demo-student/create`, data })
}
// 修改学生
export const updateDemoStudent = async (data: DemoStudentVO) => {
return await request.put({ url: `/infra/demo-student/update`, data })
}
// 删除学生
export const deleteDemoStudent = async (id: number) => {
return await request.delete({ url: `/infra/demo-student/delete?id=` + id })
}
// 导出学生 Excel
export const exportDemoStudent = async (params) => {
return await request.download({ url: `/infra/demo-student/export-excel`, params })
}
// 获得学生联系人列表
export const getDemoStudentContactListByStudentId = async (studentId) => {
return await request.get({
url: `/infra/demo-student/demo-student/list-by-student-id?studentId=` + studentId
})
}
// 获得学生地址
export const getDemoStudentAddressByStudentId = async (studentId) => {
return await request.get({
url: `/infra/demo-student/demo-student/get-by-student-id?studentId=` + studentId
})
}