index.ts 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. import request from '@/config/axios/service2'
  2. // 计量器具台账 VO
  3. export interface IotMeasureBookVO {
  4. id: number // 主键id
  5. measureCode: string // 计量器具编码
  6. measureName: string // 计量器具名称
  7. classify: string // 分类
  8. dutyPerson: string // 责任人
  9. buyDate: string // 采购日期
  10. brand: string // 品牌
  11. modelName: string // 规格型号
  12. validity: Date // 有效期
  13. lastTime: string // 上次检验/校准日期
  14. measureUnit: string // 单位
  15. measurePrice: number // 价格
  16. measurePic: string // 图片
  17. remark: string // 备注
  18. deptId: number // 部门id
  19. }
  20. // 计量器具台账 API
  21. export const IotMeasureBookApi = {
  22. // 查询计量器具台账分页
  23. getIotMeasureBookPage: async (params: any) => {
  24. return await request.get({ url: `/rq/iot-measure-book/page`, params })
  25. },
  26. // 查询计量器具台账详情
  27. getIotMeasureBook: async (id: number) => {
  28. return await request.get({ url: `/rq/iot-measure-book/get?id=` + id })
  29. },
  30. // 新增计量器具台账
  31. createIotMeasureBook: async (data: IotMeasureBookVO) => {
  32. return await request.post({ url: `/rq/iot-measure-book/create`, data })
  33. },
  34. // 修改计量器具台账
  35. updateIotMeasureBook: async (data: IotMeasureBookVO) => {
  36. return await request.put({ url: `/rq/iot-measure-book/update`, data })
  37. },
  38. // 删除计量器具台账
  39. deleteIotMeasureBook: async (id: number) => {
  40. return await request.delete({ url: `/rq/iot-measure-book/delete?id=` + id })
  41. },
  42. // 导出计量器具台账 Excel
  43. exportIotMeasureBook: async (params) => {
  44. return await request.download({ url: `/rq/iot-measure-book/export-excel`, params })
  45. },
  46. }