index.ts 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455
  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. getIotMeasureCertStatistics: async (id) => {
  45. return await request.get({ url: `/rq/iot-measure-cert/stat?deptId=${id}` })
  46. }
  47. }
  48. // 计量器具台账 VO
  49. export const IotInstrumentApi = {
  50. // 获得计量器具台账分页
  51. getInstrumentList: async (params) => {
  52. return await request.get({ url: `rq/iot-measure-book/page`, params })
  53. },
  54. // 删除计量器具台账
  55. deleteInstrument: async (id) => {
  56. return await request.delete({ url: `/rq/iot-measure-book/delete?id=` + id })
  57. },
  58. // 更新计量器具台账
  59. updateInstrument: async (data) => {
  60. return await request.put({ url: `/rq/iot-measure-book/update`, data })
  61. },
  62. // 新增计量器具台账
  63. createInstrument: async (data) => {
  64. return await request.post({ url: `/rq/iot-measure-book/create`, data })
  65. },
  66. // 导出计量器具台账 Excel
  67. exportInstrument: async (params) => {
  68. return await request.download({ url: `/rq/iot-measure-book/export-excel`, params })
  69. },
  70. //统计
  71. getInstrumentStatistics: async (id) => {
  72. return await request.get({ url: `/rq/iot-measure-book/stat?deptId=${id}` })
  73. }
  74. }
  75. // 计量器具-检测校准明细 VO
  76. export interface IotMeasureDetectVO {
  77. id: number // 主键id
  78. measureId: number // 计量器具id
  79. detectDate: string // 检测/校准日期
  80. detectOrg: string // 检测/校准机构
  81. detectContent: string // 检测/校准内容
  82. validityPeriod: Date // 检测/校准有效期
  83. detectAmount: number // 校准金额
  84. deptId: number // 部门id
  85. }
  86. // 计量器具-检测校准明细 API
  87. export const IotMeasureDetectApi = {
  88. // 查询计量器具-检测校准明细分页
  89. getIotMeasureDetectPage: async (params: any) => {
  90. return await request.get({ url: `/rq/iot-measure-detect/page`, params })
  91. },
  92. // 查询计量器具-检测校准明细详情
  93. getIotMeasureDetect: async (id: number) => {
  94. return await request.get({ url: `/rq/iot-measure-detect/get?id=` + id })
  95. },
  96. // 新增计量器具-检测校准明细
  97. createIotMeasureDetect: async (data: IotMeasureDetectVO) => {
  98. return await request.post({ url: `/rq/iot-measure-detect/create`, data })
  99. },
  100. // 修改计量器具-检测校准明细
  101. updateIotMeasureDetect: async (data: IotMeasureDetectVO) => {
  102. return await request.put({ url: `/rq/iot-measure-detect/update`, data })
  103. },
  104. // 删除计量器具-检测校准明细
  105. deleteIotMeasureDetect: async (id: number) => {
  106. return await request.delete({ url: `/rq/iot-measure-detect/delete?id=` + id })
  107. },
  108. // 导出计量器具-检测校准明细 Excel
  109. exportIotMeasureDetect: async (params) => {
  110. return await request.download({ url: `/rq/iot-measure-detect/export-excel`, params })
  111. }
  112. }
  113. // 计量器具-使用记录 VO
  114. export interface IotMeasureRecordVO {
  115. id: number // 主键id
  116. measureId: number // 计量器具id
  117. useDate: string // 使用日期
  118. useReason: string // 使用原因
  119. measureProject: string // 计量项目
  120. usePerson: string // 使用人
  121. userId: number // 使用人id
  122. deptId: number // 部门id
  123. }
  124. // 计量器具-使用记录 API
  125. export const IotMeasureRecordApi = {
  126. // 查询计量器具-使用记录分页
  127. getIotMeasureRecordPage: async (params: any) => {
  128. return await request.get({ url: `/rq/iot-measure-record/page`, params })
  129. },
  130. // 查询计量器具-使用记录详情
  131. getIotMeasureRecord: async (id: number) => {
  132. return await request.get({ url: `/rq/iot-measure-record/get?id=` + id })
  133. },
  134. // 新增计量器具-使用记录
  135. createIotMeasureRecord: async (data: IotMeasureRecordVO) => {
  136. return await request.post({ url: `/rq/iot-measure-record/create`, data })
  137. },
  138. // 修改计量器具-使用记录
  139. updateIotMeasureRecord: async (data: IotMeasureRecordVO) => {
  140. return await request.put({ url: `/rq/iot-measure-record/update`, data })
  141. },
  142. // 删除计量器具-使用记录
  143. deleteIotMeasureRecord: async (id: number) => {
  144. return await request.delete({ url: `/rq/iot-measure-record/delete?id=` + id })
  145. },
  146. // 导出计量器具-使用记录 Excel
  147. exportIotMeasureRecord: async (params) => {
  148. return await request.download({ url: `/rq/iot-measure-record/export-excel`, params })
  149. }
  150. }
  151. // 危险源管理
  152. export const IotDangerApi = {
  153. // 获得危险源分页
  154. getDangerList: async (params) => {
  155. return await request.get({ url: `/rq/iot-danger-source/page`, params })
  156. },
  157. // 删除危险源
  158. deleteDanger: async (id) => {
  159. return await request.delete({ url: `/rq/iot-danger-source/delete?id=` + id })
  160. },
  161. // 添加危险源
  162. createDanger: async (data) => {
  163. return await request.post({ url: `/rq/iot-danger-source/create`, data })
  164. },
  165. // 修改危险源
  166. updateDanger: async (data) => {
  167. return await request.put({ url: `/rq/iot-danger-source/update`, data })
  168. },
  169. // 导出危险源 Excel
  170. exportDanger: async (params) => {
  171. return await request.download({ url: `/rq/iot-danger-source/export-excel`, params })
  172. }
  173. }
  174. // 环境因素识别
  175. export const IotEnvironmentApi = {
  176. // 获得环境因素分页
  177. getEnvironmentList: async (params) => {
  178. return await request.get({ url: `/rq/iot-environment-recognize/page`, params })
  179. },
  180. // 删除环境因素
  181. deleteEnvironment: async (id) => {
  182. return await request.delete({ url: `/rq/iot-environment-recognize/delete?id=` + id })
  183. },
  184. // 添加环境因素
  185. createEnvironment: async (data) => {
  186. return await request.post({ url: `/rq/iot-environment-recognize/create`, data })
  187. },
  188. // 修改环境因素
  189. updateEnvironment: async (data) => {
  190. return await request.put({ url: `/rq/iot-environment-recognize/update`, data })
  191. },
  192. // 导出环境因素 Excel
  193. exportEnvironment: async (params) => {
  194. return await request.download({ url: `/rq/iot-environment-recognize/export-excel`, params })
  195. }
  196. }
  197. // 故障上报
  198. export const IotFailureApi = {
  199. // 获得故障上报分页
  200. getFailureList: async (params) => {
  201. return await request.get({ url: `/rq/iot-accident-report/page`, params })
  202. },
  203. // 删除故障上报
  204. deleteFailure: async (id) => {
  205. return await request.delete({ url: `/rq/iot-accident-report/delete?id=` + id })
  206. },
  207. // 添加故障上报
  208. createFailure: async (data) => {
  209. return await request.post({ url: `/rq/iot-accident-report/create`, data })
  210. },
  211. // 导出
  212. exportFailure: async (params) => {
  213. return await request.download({ url: `/rq/iot-accident-report/export-excel`, params })
  214. },
  215. // 修改故障上报
  216. updateFailure: async (data) => {
  217. return await request.put({ url: `/rq/iot-accident-report/update`, data })
  218. },
  219. // 获取详情
  220. getFailure: async (id) => {
  221. return await request.get({ url: `/rq/iot-accident-report/get?id=` + id })
  222. }
  223. }
  224. // 上报审批
  225. export const IotApprovalApi = {
  226. // 获得上报审批分页
  227. getApprovalList: async (params) => {
  228. return await request.get({ url: `/rq/iot-accident-report/approval/page`, params })
  229. },
  230. // 流转信息
  231. getApprovalProcess: async (id) => {
  232. return await request.get({ url: `/rq/iot-accident-report-process/page?accidentId=` + id })
  233. },
  234. // 添加上报审批
  235. createApproval: async (params) => {
  236. return await request.get({ url: `/rq/iot-accident-report/approval`, params })
  237. }
  238. }
  239. // 隐患排查
  240. export const IotHiddenApi = {
  241. // 获得隐患排查分页
  242. getHiddenList: async (params) => {
  243. return await request.get({ url: `/rq/iot-hazard/page`, params })
  244. },
  245. // 删除隐患排查
  246. deleteHidden: async (id) => {
  247. return await request.delete({ url: `/rq/iot-hazard/delete?id=` + id })
  248. },
  249. // 添加隐患排查
  250. createHidden: async (data) => {
  251. return await request.post({ url: `/rq/iot-hazard/create`, data })
  252. },
  253. // 修改隐患排查
  254. updateHidden: async (data) => {
  255. return await request.put({ url: `/rq/iot-hazard/update`, data })
  256. },
  257. // 导出隐患排查 Excel
  258. exportHidden: async (params) => {
  259. return await request.download({ url: `/rq/iot-hazard/export-excel`, params })
  260. },
  261. // 整改
  262. rectifyHidden: async (data) => {
  263. return await request.put({ url: `/rq/iot-hazard/rectify`, data })
  264. },
  265. // 统计
  266. getHiddenStatistics: async (id) => {
  267. return await request.get({ url: `/rq/iot-hazard-type?deptId=${id}` })
  268. }
  269. }
  270. // 隐患排查分类
  271. export const IotHiddenTypeApi = {
  272. // 创建隐患排查分类
  273. createHiddenType: async (data) => {
  274. return await request.post({ url: `/rq/iot-hazard-type/create`, data })
  275. },
  276. // 删除隐患排查分类
  277. deleteHiddenType: async (id) => {
  278. return await request.delete({ url: `/rq/iot-hazard-type/delete?id=${id}` })
  279. },
  280. // 修改隐患排查分类
  281. updateHiddenType: async (data) => {
  282. return await request.put({ url: `/rq/iot-hazard-type/update`, data })
  283. },
  284. // 获取隐患排查分类
  285. getHiddenType: async (params) => {
  286. return await request.get({ url: `/rq/iot-hazard-type/list`, params })
  287. },
  288. // 获取上级分类
  289. getParentCategory: async () => {
  290. return await request.get({ url: `/rq/iot-hazard-type/simple-list` })
  291. },
  292. // 查询分类详情
  293. getHiddenClassify: async (id: number) => {
  294. return await request.get({ url: `/rq/iot-hazard-type/get?id=` + id })
  295. }
  296. }
  297. // SOC数据源分析
  298. export const IotSocApi = {
  299. // 获得SOC数据源分析分页
  300. getSocList: async (params) => {
  301. return await request.get({ url: `/rq/iot-soc-source/page`, params })
  302. },
  303. // 删除SOC数据源分析
  304. deleteSoc: async (id) => {
  305. return await request.delete({ url: `/rq/iot-soc-source/delete?id=` + id })
  306. },
  307. // 获取上级分类
  308. getParentCategory: async () => {
  309. return await request.get({ url: `/rq/iot-soc-source/simple-list` })
  310. },
  311. // 查询SOC分类详情
  312. getSocClassify: async (id: number) => {
  313. return await request.get({ url: `/rq/iot-soc-source/get?id=` + id })
  314. },
  315. // 添加SOC数据源分析
  316. createSoc: async (data) => {
  317. return await request.post({ url: `/rq/iot-soc-source/create`, data })
  318. },
  319. // 修改SOC数据源分析
  320. updateSoc: async (data) => {
  321. return await request.put({ url: `/rq/iot-soc-source/update`, data })
  322. }
  323. }
  324. // SOC卡汇总
  325. export const IotSocSummaryApi = {
  326. // 获得SOC卡汇总分页
  327. getIotSocSummaryPage: async (params) => {
  328. return await request.get({ url: `/rq/iot-soc-summary/page`, params })
  329. },
  330. // 删除SOC卡汇总
  331. deleteIotSocSummary: async (id) => {
  332. return await request.delete({ url: `/rq/iot-soc-summary/delete?id=` + id })
  333. },
  334. // 添加SOC卡汇总
  335. createIotSocSummary: async (data) => {
  336. return await request.post({ url: `/rq/iot-soc-summary/create`, data })
  337. },
  338. // 修改SOC卡汇总
  339. updateIotSocSummary: async (data) => {
  340. return await request.put({ url: `/rq/iot-soc-summary/update`, data })
  341. },
  342. // 导出SOC卡汇总 Excel
  343. exportIotSocSummary: async (params) => {
  344. return await request.download({ url: `/rq/iot-soc-summary/export-excel`, params })
  345. },
  346. // 获取详情
  347. getIotSocSummary: async (id) => {
  348. return await request.get({ url: `/rq/iot-soc-summary/get?id=` + id })
  349. },
  350. // SOC卡预览
  351. previewIotSocSummary: async (id) => {
  352. return await request.download({ url: `/rq/iot-soc-summary/safety-card/preview?id=${id}` })
  353. },
  354. // 下载SOC卡
  355. downloadIotSocSummary: async (id) => {
  356. return await request.download({ url: `/rq/iot-soc-summary/safety-card/download/${id}` })
  357. }
  358. }
  359. // JSA 分析
  360. export const QHSEJsaApi = {
  361. // 获得JSA分析分页
  362. getJsaList: async (params) => {
  363. return await request.get({ url: `/rq/qhse-jsa/page`, params })
  364. },
  365. // 删除JSA分析
  366. deleteJsa: async (id) => {
  367. return await request.delete({ url: `/rq/qhse-jsa/delete?id=` + id })
  368. },
  369. // 添加JSA分析
  370. createJsa: async (data) => {
  371. return await request.post({ url: `/rq/qhse-jsa/create`, data })
  372. },
  373. // 修改JSA分析
  374. updateJsa: async (data) => {
  375. return await request.put({ url: `/rq/qhse-jsa/update`, data })
  376. },
  377. // 导出JSA分析 Excel
  378. exportJsa: async (params) => {
  379. return await request.download({ url: `/rq/qhse-jsa/export-excel`, params })
  380. },
  381. // 获取详情
  382. getJsa: async (id) => {
  383. return await request.get({ url: `/rq/qhse-jsa/get?id=` + id })
  384. }
  385. }
  386. // PTW 管理
  387. export const QHSEPtwApi = {
  388. // 获得PTW管理分页
  389. getPtwList: async (params) => {
  390. return await request.get({ url: `/rq/qhse-ptw/page`, params })
  391. },
  392. // 删除PTW管理
  393. deletePtw: async (id) => {
  394. return await request.delete({ url: `/rq/qhse-ptw/delete?id=` + id })
  395. },
  396. // 添加PTW管理
  397. createPtw: async (data) => {
  398. return await request.post({ url: `/rq/qhse-ptw/create`, data })
  399. },
  400. // 获取详情
  401. getPtw: async (id) => {
  402. return await request.get({ url: `/rq/qhse-ptw/get?id=` + id })
  403. },
  404. // 修改PTW管理
  405. updatePtw: async (data) => {
  406. return await request.put({ url: `/rq/qhse-ptw/update`, data })
  407. },
  408. // 导出PTW管理 Excel
  409. exportPtw: async (params) => {
  410. return await request.download({ url: `/rq/qhse-ptw/export-excel`, params })
  411. }
  412. }
  413. export const kanbanApi = {
  414. getKanban: async (params) => {
  415. return await request.get({ url: `/rq/qhse-kanban/get`, params })
  416. }
  417. }