index.ts 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. import request from '@/config/axios'
  2. // 资料 VO
  3. export interface IotInfoVO {
  4. id: number // 主键id
  5. deviceId: number // 设备id
  6. deptId: number // 部门id
  7. filename: string // 文件名称
  8. fileType: string // 文件类型
  9. filePath: string // 文件路径
  10. remark: string // 备注
  11. classId: number
  12. }
  13. // 资料 API
  14. export const IotInfoApi = {
  15. // 查询资料分页
  16. getIotInfoPage: async (params: any) => {
  17. return await request.get({ url: `/rq/iot-info/page`, params })
  18. },
  19. getIotInfoFilePage: async (params: any) => {
  20. return await request.get({ url: `/rq/iot-info/file/page`, params })
  21. },
  22. // 查询资料详情
  23. getIotInfo: async (id: number) => {
  24. return await request.get({ url: `/rq/iot-info/get?id=` + id })
  25. },
  26. // 新增资料
  27. createIotInfo: async (data: IotInfoVO) => {
  28. return await request.post({ url: `/rq/iot-info/create`, data })
  29. },
  30. // 修改资料
  31. updateIotInfo: async (data: IotInfoVO) => {
  32. return await request.put({ url: `/rq/iot-info/update`, data })
  33. },
  34. // 删除资料
  35. deleteIotInfo: async (id: number) => {
  36. return await request.delete({ url: `/rq/iot-info/delete?id=` + id })
  37. },
  38. // 导出资料 Excel
  39. exportIotInfo: async (params) => {
  40. return await request.download({ url: `/rq/iot-info/export-excel`, params })
  41. },
  42. }