40 lines
1.1 KiB
TypeScript
40 lines
1.1 KiB
TypeScript
|
|
import request from '@/config/axios'
|
||
|
|
|
||
|
|
export interface SblxVO {
|
||
|
|
id?: number
|
||
|
|
industryName: string
|
||
|
|
industryCode: string
|
||
|
|
parentId: number
|
||
|
|
sort: number
|
||
|
|
createTime: Date
|
||
|
|
}
|
||
|
|
|
||
|
|
// 查询设备类型(精简)列表
|
||
|
|
export const getSimpleSblxList = async (): Promise<SblxVO[]> => {
|
||
|
|
return await request.get({ url: '/system/sblx/simple-list' })
|
||
|
|
}
|
||
|
|
|
||
|
|
// 查询设备类型列表
|
||
|
|
export const getSblxPage = async (params: PageParam) => {
|
||
|
|
return await request.get({ url: '/system/sblx/list', params })
|
||
|
|
}
|
||
|
|
|
||
|
|
// 查询设备类型详情
|
||
|
|
export const getSblx = async (id: number) => {
|
||
|
|
return await request.get({ url: '/system/sblx/get?id=' + id })
|
||
|
|
}
|
||
|
|
|
||
|
|
// 新增设备类型
|
||
|
|
export const createSblx = async (data: SblxVO) => {
|
||
|
|
return await request.post({ url: '/system/sblx/create', data: data })
|
||
|
|
}
|
||
|
|
|
||
|
|
// 修改设备类型
|
||
|
|
export const updateSblx = async (params: SblxVO) => {
|
||
|
|
return await request.put({ url: '/system/sblx/update', data: params })
|
||
|
|
}
|
||
|
|
|
||
|
|
// 删除设备类型
|
||
|
|
export const deleteSblx = async (id: number) => {
|
||
|
|
return await request.delete({ url: '/system/sblx/delete?id=' + id })
|
||
|
|
}
|