index.ts 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. import request from '@/config/axios'
  2. // 设备台账 VO
  3. export interface IotDeviceVO {
  4. id: number // 主键id
  5. deviceCode: string // 资产编码
  6. deviceName: string // 设备名称
  7. brand: number // 品牌
  8. model: number // 规格型号
  9. deptId: number // 所在部门id
  10. deptName: string // 所在部门名称
  11. deviceStatus: string // 设备状态
  12. assetProperty: string // 资产性质
  13. picUrl: string // 图片
  14. remark: string // 备注
  15. manufacturerId: number // 制造商id
  16. supplierId: number // 供应商id
  17. manDate: Date // 生产日期
  18. nameplate: string // 铭牌信息
  19. expires: number // 质保到期
  20. plPrice: number // 采购/租赁价格
  21. plDate: Date // 采购/租赁日期
  22. plYear: number // 折旧年限
  23. plStartDate: number // 折旧开始日期
  24. plMonthed: number // 已提折旧月数
  25. plAmounted: number // 已提折旧金额
  26. remainAmount: number // 剩余金额
  27. infoId: number // 资料分类id
  28. infoType: string // 资料类型
  29. infoName: string // 资料名称
  30. infoRemark: string // 资料备注
  31. infoUrl: string // 资料附件
  32. templateJson: string // 动态模板信息
  33. bomNodeId: number // bom节点id
  34. name: string // bom节点名称
  35. code: string // bom节点编码
  36. }
  37. // 设备台账 API
  38. export const IotDeviceApi = {
  39. // 查询设备台账分页
  40. getIotDevicePage: async (params: any) => {
  41. return await request.get({ url: `/rq/iot-device/page`, params })
  42. },
  43. // 查询 设备bom关联 列表分页
  44. deviceAssociateBomPage: async (params: any) => {
  45. return await request.get({ url: `/rq/iot-device/deviceAssociateBomPage`, params })
  46. },
  47. // 查询 设备 bom关联 列表
  48. deviceAssociateBomList: async (params: any) => {
  49. return await request.get({ url: `/rq/iot-device/deviceAssociateBomList`, params })
  50. },
  51. deviceAssociateBomListPage: async (params: any) => {
  52. return await request.get({ url: `/rq/iot-device/deviceAssociateBomListPage`, params })
  53. },
  54. // 查询设备台账详情
  55. getIotDevice: async (id: number) => {
  56. return await request.get({ url: `/rq/iot-device/get?id=` + id })
  57. },
  58. getIotDeviceTds: async (id: number) => {
  59. return await request.get({ url: `/rq/iot-device/get/td?id=` + id })
  60. },
  61. // 新增设备台账
  62. createIotDevice: async (data: IotDeviceVO) => {
  63. return await request.post({ url: `/rq/iot-device/create`, data })
  64. },
  65. // 修改设备台账
  66. updateIotDevice: async (data: IotDeviceVO) => {
  67. return await request.put({ url: `/rq/iot-device/update`, data })
  68. },
  69. // 删除设备台账
  70. deleteIotDevice: async (id: number) => {
  71. return await request.delete({ url: `/rq/iot-device/delete?id=` + id })
  72. },
  73. // 导出设备台账 Excel
  74. exportIotDevice: async (params) => {
  75. return await request.download({ url: `/rq/iot-device/export-excel`, params })
  76. },
  77. getIotDeviceTdPage: async (params: any) => {
  78. return await request.get({ url: `/rq/iot-device/td/page`, params })
  79. },
  80. }