index.ts 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  1. import request from '@/config/axios'
  2. // 计量器具-证书管理 VO
  3. export interface IotMeasureCertVO {
  4. id: number // 主键id
  5. type: string // 证书类型
  6. classify: string // 证书类别
  7. certBelong: string // 证书所属公司/个人
  8. certOrg: string // 证书颁发机构
  9. certStandard: string // 证书标准
  10. certIssue: Date // 证书颁发时间
  11. certExpire: Date // 证书有效期
  12. noticeBefore: number // 到期前提醒
  13. certPic: string // 证书图片上传
  14. remark: string // 备注
  15. deptId: number // 部门id
  16. }
  17. // 计量器具-证书管理 API
  18. export const IotMeasureCertApi = {
  19. // 查询计量器具-证书管理分页
  20. getIotMeasureCertPage: async (params: any) => {
  21. return await request.get({ url: `/rq/iot-measure-cert/page`, params })
  22. },
  23. // 查询计量器具-证书管理详情
  24. getIotMeasureCert: async (id: number) => {
  25. return await request.get({ url: `/rq/iot-measure-cert/get?id=` + id })
  26. },
  27. // 新增计量器具-证书管理
  28. createIotMeasureCert: async (data: IotMeasureCertVO) => {
  29. return await request.post({ url: `/rq/iot-measure-cert/create`, data })
  30. },
  31. // 修改计量器具-证书管理
  32. updateIotMeasureCert: async (data: IotMeasureCertVO) => {
  33. return await request.put({ url: `/rq/iot-measure-cert/update`, data })
  34. },
  35. // 删除计量器具-证书管理
  36. deleteIotMeasureCert: async (id: number) => {
  37. return await request.delete({ url: `/rq/iot-measure-cert/delete?id=` + id })
  38. },
  39. // 导出计量器具-证书管理 Excel
  40. exportIotMeasureCert: async (params) => {
  41. return await request.download({ url: `/rq/iot-measure-cert/export-excel`, params })
  42. }
  43. }
  44. // 计量器具台账 VO
  45. export const IotInstrumentApi = {
  46. // 获得计量器具台账分页
  47. getInstrumentList: async (params) => {
  48. return await request.get({ url: `rq/iot-measure-book/page`, params })
  49. },
  50. // 删除计量器具台账
  51. deleteInstrument: async (id) => {
  52. return await request.delete({ url: `/rq/iot-measure-book/delete?id=` + id })
  53. },
  54. // 更新计量器具台账
  55. updateInstrument: async (data) => {
  56. return await request.put({ url: `/rq/iot-measure-book/update`, data })
  57. },
  58. // 新增计量器具台账
  59. createInstrument: async (data) => {
  60. return await request.post({ url: `/rq/iot-measure-book/create`, data })
  61. },
  62. // 导出计量器具台账 Excel
  63. exportInstrument: async (params) => {
  64. return await request.download({ url: `/rq/iot-measure-book/export-excel`, params })
  65. }
  66. }
  67. // 计量器具-检测校准明细 VO
  68. export interface IotMeasureDetectVO {
  69. id: number // 主键id
  70. measureId: number // 计量器具id
  71. detectDate: string // 检测/校准日期
  72. detectOrg: string // 检测/校准机构
  73. detectContent: string // 检测/校准内容
  74. validityPeriod: Date // 检测/校准有效期
  75. detectAmount: number // 校准金额
  76. deptId: number // 部门id
  77. }
  78. // 计量器具-检测校准明细 API
  79. export const IotMeasureDetectApi = {
  80. // 查询计量器具-检测校准明细分页
  81. getIotMeasureDetectPage: async (params: any) => {
  82. return await request.get({ url: `/rq/iot-measure-detect/page`, params })
  83. },
  84. // 查询计量器具-检测校准明细详情
  85. getIotMeasureDetect: async (id: number) => {
  86. return await request.get({ url: `/rq/iot-measure-detect/get?id=` + id })
  87. },
  88. // 新增计量器具-检测校准明细
  89. createIotMeasureDetect: async (data: IotMeasureDetectVO) => {
  90. return await request.post({ url: `/rq/iot-measure-detect/create`, data })
  91. },
  92. // 修改计量器具-检测校准明细
  93. updateIotMeasureDetect: async (data: IotMeasureDetectVO) => {
  94. return await request.put({ url: `/rq/iot-measure-detect/update`, data })
  95. },
  96. // 删除计量器具-检测校准明细
  97. deleteIotMeasureDetect: async (id: number) => {
  98. return await request.delete({ url: `/rq/iot-measure-detect/delete?id=` + id })
  99. },
  100. // 导出计量器具-检测校准明细 Excel
  101. exportIotMeasureDetect: async (params) => {
  102. return await request.download({ url: `/rq/iot-measure-detect/export-excel`, params })
  103. }
  104. }
  105. // 计量器具-使用记录 VO
  106. export interface IotMeasureRecordVO {
  107. id: number // 主键id
  108. measureId: number // 计量器具id
  109. useDate: string // 使用日期
  110. useReason: string // 使用原因
  111. measureProject: string // 计量项目
  112. usePerson: string // 使用人
  113. userId: number // 使用人id
  114. deptId: number // 部门id
  115. }
  116. // 计量器具-使用记录 API
  117. export const IotMeasureRecordApi = {
  118. // 查询计量器具-使用记录分页
  119. getIotMeasureRecordPage: async (params: any) => {
  120. return await request.get({ url: `/rq/iot-measure-record/page`, params })
  121. },
  122. // 查询计量器具-使用记录详情
  123. getIotMeasureRecord: async (id: number) => {
  124. return await request.get({ url: `/rq/iot-measure-record/get?id=` + id })
  125. },
  126. // 新增计量器具-使用记录
  127. createIotMeasureRecord: async (data: IotMeasureRecordVO) => {
  128. return await request.post({ url: `/rq/iot-measure-record/create`, data })
  129. },
  130. // 修改计量器具-使用记录
  131. updateIotMeasureRecord: async (data: IotMeasureRecordVO) => {
  132. return await request.put({ url: `/rq/iot-measure-record/update`, data })
  133. },
  134. // 删除计量器具-使用记录
  135. deleteIotMeasureRecord: async (id: number) => {
  136. return await request.delete({ url: `/rq/iot-measure-record/delete?id=` + id })
  137. },
  138. // 导出计量器具-使用记录 Excel
  139. exportIotMeasureRecord: async (params) => {
  140. return await request.download({ url: `/rq/iot-measure-record/export-excel`, params })
  141. }
  142. }
  143. // 危险源管理
  144. export const IotDangerApi = {
  145. // 获得危险源分页
  146. getDangerList: async (params) => {
  147. return await request.get({ url: `/rq/iot-danger-source/page`, params })
  148. },
  149. // 删除危险源
  150. deleteDanger: async (id) => {
  151. return await request.delete({ url: `/rq/iot-danger-source/delete?id=` + id })
  152. },
  153. // 添加危险源
  154. createDanger: async (data) => {
  155. return await request.post({ url: `/rq/iot-danger-source/create`, data })
  156. },
  157. // 修改危险源
  158. updateDanger: async (data) => {
  159. return await request.put({ url: `/rq/iot-danger-source/update`, data })
  160. }
  161. }