index.ts 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665
  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. // 资质证书
  49. export const IotCertificateApi = {
  50. // 获得证书分页
  51. getCertificateList: async (params) => {
  52. return await request.get({ url: `/rq/qhse-org-cert/page`, params })
  53. },
  54. // 删除证书
  55. deleteCertificate: async (id) => {
  56. return await request.delete({ url: `/rq/qhse-org-cert/delete?id=` + id })
  57. },
  58. // 新增证书
  59. createCertificate: async (data) => {
  60. return await request.post({ url: `/rq/qhse-org-cert/create`, data })
  61. },
  62. // 修改证书
  63. updateCertificate: async (data) => {
  64. return await request.put({ url: `/rq/qhse-org-cert/update`, data })
  65. },
  66. // 导出证书 Excel
  67. exportCertificate: async (params) => {
  68. return await request.download({ url: `/rq/qhse-org-cert/export-excel`, params })
  69. },
  70. //统计
  71. getCertificateStatistics: async (id) => {
  72. return await request.get({ url: `/rq/qhse-org-cert/stat?deptId=${id}` })
  73. }
  74. }
  75. // 计量器具台账 VO
  76. export const IotInstrumentApi = {
  77. // 获得计量器具台账分页
  78. getInstrumentList: async (params) => {
  79. return await request.get({ url: `rq/iot-measure-book/page`, params })
  80. },
  81. // 删除计量器具台账
  82. deleteInstrument: async (id) => {
  83. return await request.delete({ url: `/rq/iot-measure-book/delete?id=` + id })
  84. },
  85. // 更新计量器具台账
  86. updateInstrument: async (data) => {
  87. return await request.put({ url: `/rq/iot-measure-book/update`, data })
  88. },
  89. // 新增计量器具台账
  90. createInstrument: async (data) => {
  91. return await request.post({ url: `/rq/iot-measure-book/create`, data })
  92. },
  93. // 导出计量器具台账 Excel
  94. exportInstrument: async (params) => {
  95. return await request.download({ url: `/rq/iot-measure-book/export-excel`, params })
  96. },
  97. //统计
  98. getInstrumentStatistics: async (id) => {
  99. return await request.get({ url: `/rq/iot-measure-book/stat?deptId=${id}` })
  100. }
  101. }
  102. // 计量器具-检测校准明细 VO
  103. export interface IotMeasureDetectVO {
  104. id: number // 主键id
  105. measureId: number // 计量器具id
  106. detectDate: string // 检测/校准日期
  107. detectOrg: string // 检测/校准机构
  108. detectContent: string // 检测/校准内容
  109. validityPeriod: Date // 检测/校准有效期
  110. detectAmount: number // 校准金额
  111. deptId: number // 部门id
  112. }
  113. // 计量器具-检测校准明细 API
  114. export const IotMeasureDetectApi = {
  115. // 查询计量器具-检测校准明细分页
  116. getIotMeasureDetectPage: async (params: any) => {
  117. return await request.get({ url: `/rq/iot-measure-detect/page`, params })
  118. },
  119. // 查询计量器具-检测校准明细详情
  120. getIotMeasureDetect: async (id: number) => {
  121. return await request.get({ url: `/rq/iot-measure-detect/get?id=` + id })
  122. },
  123. // 新增计量器具-检测校准明细
  124. createIotMeasureDetect: async (data: IotMeasureDetectVO) => {
  125. return await request.post({ url: `/rq/iot-measure-detect/create`, data })
  126. },
  127. // 修改计量器具-检测校准明细
  128. updateIotMeasureDetect: async (data: IotMeasureDetectVO) => {
  129. return await request.put({ url: `/rq/iot-measure-detect/update`, data })
  130. },
  131. // 删除计量器具-检测校准明细
  132. deleteIotMeasureDetect: async (id: number) => {
  133. return await request.delete({ url: `/rq/iot-measure-detect/delete?id=` + id })
  134. },
  135. // 导出计量器具-检测校准明细 Excel
  136. exportIotMeasureDetect: async (params) => {
  137. return await request.download({ url: `/rq/iot-measure-detect/export-excel`, params })
  138. }
  139. }
  140. // 计量器具-使用记录 VO
  141. export interface IotMeasureRecordVO {
  142. id: number // 主键id
  143. measureId: number // 计量器具id
  144. useDate: string // 使用日期
  145. useReason: string // 使用原因
  146. measureProject: string // 计量项目
  147. usePerson: string // 使用人
  148. userId: number // 使用人id
  149. deptId: number // 部门id
  150. }
  151. // 计量器具-使用记录 API
  152. export const IotMeasureRecordApi = {
  153. // 查询计量器具-使用记录分页
  154. getIotMeasureRecordPage: async (params: any) => {
  155. return await request.get({ url: `/rq/iot-measure-record/page`, params })
  156. },
  157. // 查询计量器具-使用记录详情
  158. getIotMeasureRecord: async (id: number) => {
  159. return await request.get({ url: `/rq/iot-measure-record/get?id=` + id })
  160. },
  161. // 新增计量器具-使用记录
  162. createIotMeasureRecord: async (data: IotMeasureRecordVO) => {
  163. return await request.post({ url: `/rq/iot-measure-record/create`, data })
  164. },
  165. // 修改计量器具-使用记录
  166. updateIotMeasureRecord: async (data: IotMeasureRecordVO) => {
  167. return await request.put({ url: `/rq/iot-measure-record/update`, data })
  168. },
  169. // 删除计量器具-使用记录
  170. deleteIotMeasureRecord: async (id: number) => {
  171. return await request.delete({ url: `/rq/iot-measure-record/delete?id=` + id })
  172. },
  173. // 导出计量器具-使用记录 Excel
  174. exportIotMeasureRecord: async (params) => {
  175. return await request.download({ url: `/rq/iot-measure-record/export-excel`, params })
  176. }
  177. }
  178. // 危险源管理
  179. export const IotDangerApi = {
  180. // 获得危险源分页
  181. getDangerList: async (params) => {
  182. return await request.get({ url: `/rq/iot-danger-source/page`, params })
  183. },
  184. // 删除危险源
  185. deleteDanger: async (id) => {
  186. return await request.delete({ url: `/rq/iot-danger-source/delete?id=` + id })
  187. },
  188. // 添加危险源
  189. createDanger: async (data) => {
  190. return await request.post({ url: `/rq/iot-danger-source/create`, data })
  191. },
  192. // 修改危险源
  193. updateDanger: async (data) => {
  194. return await request.put({ url: `/rq/iot-danger-source/update`, data })
  195. },
  196. // 导出危险源 Excel
  197. exportDanger: async (params) => {
  198. return await request.download({ url: `/rq/iot-danger-source/export-excel`, params })
  199. },
  200. // 统计
  201. getDangerStatistics: async (id) => {
  202. return await request.get({ url: `/rq/iot-danger-source/stat?deptId=${id}` })
  203. }
  204. }
  205. // 环境因素识别
  206. export const IotEnvironmentApi = {
  207. // 获得环境因素分页
  208. getEnvironmentList: async (params) => {
  209. return await request.get({ url: `/rq/iot-environment-recognize/page`, params })
  210. },
  211. // 删除环境因素
  212. deleteEnvironment: async (id) => {
  213. return await request.delete({ url: `/rq/iot-environment-recognize/delete?id=` + id })
  214. },
  215. // 添加环境因素
  216. createEnvironment: async (data) => {
  217. return await request.post({ url: `/rq/iot-environment-recognize/create`, data })
  218. },
  219. // 修改环境因素
  220. updateEnvironment: async (data) => {
  221. return await request.put({ url: `/rq/iot-environment-recognize/update`, data })
  222. },
  223. // 导出环境因素 Excel
  224. exportEnvironment: async (params) => {
  225. return await request.download({ url: `/rq/iot-environment-recognize/export-excel`, params })
  226. }
  227. }
  228. // 故障上报
  229. export const IotFailureApi = {
  230. // 获得故障上报分页
  231. getFailureList: async (params) => {
  232. return await request.get({ url: `/rq/iot-accident-report/page`, params })
  233. },
  234. // 删除故障上报
  235. deleteFailure: async (id) => {
  236. return await request.delete({ url: `/rq/iot-accident-report/delete?id=` + id })
  237. },
  238. // 添加故障上报
  239. createFailure: async (data) => {
  240. return await request.post({ url: `/rq/iot-accident-report/create`, data })
  241. },
  242. // 导出
  243. exportFailure: async (params) => {
  244. return await request.download({ url: `/rq/iot-accident-report/export-excel`, params })
  245. },
  246. // 修改故障上报
  247. updateFailure: async (data) => {
  248. return await request.put({ url: `/rq/iot-accident-report/update`, data })
  249. },
  250. // 获取详情
  251. getFailure: async (id) => {
  252. return await request.get({ url: `/rq/iot-accident-report/get?id=` + id })
  253. }
  254. }
  255. // 上报审批
  256. export const IotApprovalApi = {
  257. // 获得上报审批分页
  258. getApprovalList: async (params) => {
  259. return await request.get({ url: `/rq/iot-accident-report/approval/page`, params })
  260. },
  261. // 流转信息
  262. getApprovalProcess: async (id) => {
  263. return await request.get({ url: `/rq/iot-accident-report-process/page?accidentId=` + id })
  264. },
  265. // 添加上报审批
  266. createApproval: async (params) => {
  267. return await request.get({ url: `/rq/iot-accident-report/approval`, params })
  268. }
  269. }
  270. // 隐患排查
  271. export const IotHiddenApi = {
  272. // 获得隐患排查分页
  273. getHiddenList: async (params) => {
  274. return await request.get({ url: `/rq/iot-hazard/page`, params })
  275. },
  276. // 删除隐患排查
  277. deleteHidden: async (id) => {
  278. return await request.delete({ url: `/rq/iot-hazard/delete?id=` + id })
  279. },
  280. // 添加隐患排查
  281. createHidden: async (data) => {
  282. return await request.post({ url: `/rq/iot-hazard/create`, data })
  283. },
  284. // 修改隐患排查
  285. updateHidden: async (data) => {
  286. return await request.put({ url: `/rq/iot-hazard/update`, data })
  287. },
  288. // 导出隐患排查 Excel
  289. exportHidden: async (params) => {
  290. return await request.download({ url: `/rq/iot-hazard/export-excel`, params })
  291. },
  292. // 整改
  293. rectifyHidden: async (data) => {
  294. return await request.put({ url: `/rq/iot-hazard/rectify`, data })
  295. },
  296. // 统计
  297. getHiddenStatistics: async (id) => {
  298. return await request.get({ url: `/rq/iot-hazard/stat?deptId=${id}` })
  299. }
  300. }
  301. // 隐患排查分类
  302. export const IotHiddenTypeApi = {
  303. // 创建隐患排查分类
  304. createHiddenType: async (data) => {
  305. return await request.post({ url: `/rq/iot-hazard-type/create`, data })
  306. },
  307. // 删除隐患排查分类
  308. deleteHiddenType: async (id) => {
  309. return await request.delete({ url: `/rq/iot-hazard-type/delete?id=${id}` })
  310. },
  311. // 修改隐患排查分类
  312. updateHiddenType: async (data) => {
  313. return await request.put({ url: `/rq/iot-hazard-type/update`, data })
  314. },
  315. // 获取隐患排查分类
  316. getHiddenType: async (params) => {
  317. return await request.get({ url: `/rq/iot-hazard-type/list`, params })
  318. },
  319. // 获取上级分类
  320. getParentCategory: async () => {
  321. return await request.get({ url: `/rq/iot-hazard-type/simple-list` })
  322. },
  323. // 查询分类详情
  324. getHiddenClassify: async (id: number) => {
  325. return await request.get({ url: `/rq/iot-hazard-type/get?id=` + id })
  326. }
  327. }
  328. // SOC数据源分析
  329. export const IotSocApi = {
  330. // 获得SOC数据源分析分页
  331. getSocList: async (params) => {
  332. return await request.get({ url: `/rq/iot-soc-source/page`, params })
  333. },
  334. // 删除SOC数据源分析
  335. deleteSoc: async (id) => {
  336. return await request.delete({ url: `/rq/iot-soc-source/delete?id=` + id })
  337. },
  338. // 获取上级分类
  339. getParentCategory: async () => {
  340. return await request.get({ url: `/rq/iot-soc-source/simple-list` })
  341. },
  342. // 查询SOC分类详情
  343. getSocClassify: async (id: number) => {
  344. return await request.get({ url: `/rq/iot-soc-source/get?id=` + id })
  345. },
  346. // 添加SOC数据源分析
  347. createSoc: async (data) => {
  348. return await request.post({ url: `/rq/iot-soc-source/create`, data })
  349. },
  350. // 修改SOC数据源分析
  351. updateSoc: async (data) => {
  352. return await request.put({ url: `/rq/iot-soc-source/update`, data })
  353. }
  354. }
  355. // SOC卡汇总
  356. export const IotSocSummaryApi = {
  357. // 获得SOC卡汇总分页
  358. getIotSocSummaryPage: async (params) => {
  359. return await request.get({ url: `/rq/iot-soc-summary/page`, params })
  360. },
  361. // 删除SOC卡汇总
  362. deleteIotSocSummary: async (id) => {
  363. return await request.delete({ url: `/rq/iot-soc-summary/delete?id=` + id })
  364. },
  365. // 添加SOC卡汇总
  366. createIotSocSummary: async (data) => {
  367. return await request.post({ url: `/rq/iot-soc-summary/create`, data })
  368. },
  369. // 修改SOC卡汇总
  370. updateIotSocSummary: async (data) => {
  371. return await request.put({ url: `/rq/iot-soc-summary/update`, data })
  372. },
  373. // 导出SOC卡汇总 Excel
  374. exportIotSocSummary: async (params) => {
  375. return await request.download({ url: `/rq/iot-soc-summary/export-excel`, params })
  376. },
  377. // 获取详情
  378. getIotSocSummary: async (id) => {
  379. return await request.get({ url: `/rq/iot-soc-summary/get?id=` + id })
  380. },
  381. // SOC卡预览
  382. previewIotSocSummary: async (id) => {
  383. return await request.download({ url: `/rq/iot-soc-summary/safety-card/preview?id=${id}` })
  384. },
  385. // 下载SOC卡
  386. downloadIotSocSummary: async (id) => {
  387. return await request.download({ url: `/rq/iot-soc-summary/safety-card/download/${id}` })
  388. },
  389. // 统计
  390. // getSocSummaryStatistics: async (id) => {
  391. // return await request.get({ url: `/rq/iot-soc-summary/stat?deptId=${id}` })
  392. // }
  393. getSocSummaryStatistics: async (params) => {
  394. return await request.get({ url: `/rq/iot-soc-summary/stat`, params })
  395. },
  396. // 获取统计子类
  397. getSocSummaryStatisticsChild: async (params) => {
  398. return await request.get({ url: `/rq/iot-soc-summary/stat/child`, params })
  399. }
  400. }
  401. // JSA 分析
  402. export const QHSEJsaApi = {
  403. // 获得JSA分析分页
  404. getJsaList: async (params) => {
  405. return await request.get({ url: `/rq/qhse-jsa/page`, params })
  406. },
  407. // 删除JSA分析
  408. deleteJsa: async (id) => {
  409. return await request.delete({ url: `/rq/qhse-jsa/delete?id=` + id })
  410. },
  411. // 添加JSA分析
  412. createJsa: async (data) => {
  413. return await request.post({ url: `/rq/qhse-jsa/create`, data })
  414. },
  415. // 修改JSA分析
  416. updateJsa: async (data) => {
  417. return await request.put({ url: `/rq/qhse-jsa/update`, data })
  418. },
  419. // 导出JSA分析 Excel
  420. exportJsa: async (params) => {
  421. return await request.download({ url: `/rq/qhse-jsa/export-excel`, params })
  422. },
  423. // 获取详情
  424. getJsa: async (id) => {
  425. return await request.get({ url: `/rq/qhse-jsa/get?id=` + id })
  426. }
  427. }
  428. // PTW 管理
  429. export const QHSEPtwApi = {
  430. // 获得PTW管理分页
  431. getPtwList: async (params) => {
  432. return await request.get({ url: `/rq/qhse-ptw/page`, params })
  433. },
  434. // 删除PTW管理
  435. deletePtw: async (id) => {
  436. return await request.delete({ url: `/rq/qhse-ptw/delete?id=` + id })
  437. },
  438. // 添加PTW管理
  439. createPtw: async (data) => {
  440. return await request.post({ url: `/rq/qhse-ptw/create`, data })
  441. },
  442. // 获取详情
  443. getPtw: async (id) => {
  444. return await request.get({ url: `/rq/qhse-ptw/get?id=` + id })
  445. },
  446. // 修改PTW管理
  447. updatePtw: async (data) => {
  448. return await request.put({ url: `/rq/qhse-ptw/update`, data })
  449. },
  450. // 导出PTW管理 Excel
  451. exportPtw: async (params) => {
  452. return await request.download({ url: `/rq/qhse-ptw/export-excel`, params })
  453. }
  454. }
  455. export const kanbanApi = {
  456. getKanban: async () => {
  457. return await request.get({ url: `/rq/qhse/stat/number` })
  458. },
  459. // 安全生产天数
  460. getSafeDay: async (id) => {
  461. return await request.get({ url: `rq/qhse-safe-day/get/dept/company?deptId=${id}` })
  462. }
  463. }
  464. // 证书人员
  465. export const CertPersonApi = {
  466. // 获得证书人员分页
  467. getCertPersonList: async (params) => {
  468. return await request.get({ url: `/rq/qhse-cert-person/page`, params })
  469. }, // 删除证书人员
  470. deleteCertPerson: async (id) => {
  471. return await request.delete({ url: `/rq/qhse-cert-person/delete?id=` + id })
  472. },
  473. // 添加证书人员
  474. createCertPerson: async (data) => {
  475. return await request.post({ url: `/rq/qhse-cert-person/create`, data })
  476. },
  477. // 修改证书人员
  478. updateCertPerson: async (data) => {
  479. return await request.put({ url: `/rq/qhse-cert-person/update`, data })
  480. },
  481. // 导出证书人员 Excel
  482. exportCertPerson: async (params) => {
  483. return await request.download({ url: `/rq/qhse-cert-person/export-excel`, params })
  484. },
  485. // 获取详情
  486. getCertPerson: async (id) => {
  487. return await request.get({ url: `/rq/qhse-cert-person/get?id=` + id })
  488. }
  489. }
  490. // QHSE月报 API
  491. export const QhseMonthReportApi = {
  492. // 查询QHSE月报分页
  493. getQhseMonthReportPage: async (params: any) => {
  494. return await request.get({ url: `/rq/qhse-month-report/page`, params })
  495. },
  496. // 查询QHSE月报详情
  497. getQhseMonthReport: async (id) => {
  498. return await request.get({ url: `/rq/qhse-month-report/get?id=` + id })
  499. },
  500. // 新增QHSE月报
  501. createQhseMonthReport: async (data) => {
  502. return await request.post({ url: `/rq/qhse-month-report/create`, data })
  503. },
  504. // 修改QHSE月报
  505. updateQhseMonthReport: async (data) => {
  506. return await request.put({ url: `/rq/qhse-month-report/update`, data })
  507. },
  508. // 删除QHSE月报
  509. deleteQhseMonthReport: async (id) => {
  510. return await request.delete({ url: `/rq/qhse-month-report/delete?id=` + id })
  511. },
  512. // 导出QHSE月报 Excel
  513. exportQhseMonthReport: async (params) => {
  514. return await request.download({ url: `/rq/qhse-month-report/export-excel`, params })
  515. }
  516. }
  517. // 月报汇总
  518. export const QhseMonthReportSummaryApi = {
  519. // 获得QHSE月报汇总分页
  520. getQhseMonthReportSummaryList: async (params) => {
  521. return await request.get({ url: `/rq/qhse-month-report/page/year-month`, params })
  522. },
  523. // 获得QHSE月报汇总详情
  524. getQhseMonthReportSummary: async (params) => {
  525. return await request.get({ url: `/rq/qhse-month-report/page`, params })
  526. }
  527. }
  528. // 应检设备证书
  529. export const InspectDeviceCertApi = {
  530. // 获得设备证书分页 rq/qhse-device-cert/create
  531. getInspectDeviceCertList: async (params) => {
  532. return await request.get({ url: `/rq/qhse-device-cert/page`, params })
  533. },
  534. // 删除设备证书
  535. deleteInspectDeviceCert: async (id) => {
  536. return await request.delete({ url: `/rq/qhse-device-cert/delete?id=` + id })
  537. },
  538. // 添加设备证书
  539. createInspectDeviceCert: async (data) => {
  540. return await request.post({ url: `/rq/qhse-device-cert/create`, data })
  541. },
  542. // 获取详情
  543. getInspectDeviceCert: async (id) => {
  544. return await request.get({ url: `/rq/qhse-device-cert/get?id=` + id })
  545. },
  546. // 修改设备证书
  547. updateInspectDeviceCert: async (data) => {
  548. return await request.put({ url: `/rq/qhse-device-cert/update`, data })
  549. },
  550. // 导出设备证书 Excel
  551. exportInspectDeviceCert: async (params) => {
  552. return await request.download({ url: `/rq/qhse-device-cert/export-excel`, params })
  553. },
  554. // 统计
  555. getInspectDeviceCertStat: async (id) => {
  556. return await request.get({ url: `/rq/qhse-device-cert/stat?deptId=${id}` })
  557. }
  558. }
  559. // 应急演练
  560. export const EmergencyDrillApi = {
  561. // 获得应急演练分页
  562. getEmergencyDrillList: async (params) => {
  563. return await request.get({ url: `/rq/qhse-emergency-book/page`, params })
  564. },
  565. // 删除应急演练
  566. deleteEmergencyDrill: async (id) => {
  567. return await request.delete({ url: `/rq/qhse-emergency-book/delete?id=` + id })
  568. },
  569. // 添加应急演练
  570. createEmergencyDrill: async (data) => {
  571. return await request.post({ url: `/rq/qhse-emergency-book/create`, data })
  572. },
  573. // 获取详情
  574. getEmergencyDrill: async (id) => {
  575. return await request.get({ url: `/rq/qhse-emergency-book/get?id=` + id })
  576. },
  577. // 修改应急演练
  578. updateEmergencyDrill: async (data) => {
  579. return await request.put({ url: `/rq/qhse-emergency-book/update`, data })
  580. },
  581. // 导出应急演练 Excel
  582. exportEmergencyDrill: async (params) => {
  583. return await request.download({ url: `/rq/qhse-emergency-book/export-excel`, params })
  584. }
  585. }
  586. // 应急演练证书检测
  587. export const EmergencyDrillCertApi = {
  588. // 获得应急演练证书检测分页
  589. getEmergencyDrillCertList: async (params) => {
  590. return await request.get({ url: `/rq/qhse-emergency-cert/page`, params })
  591. },
  592. // 删除应急演练证书检测
  593. deleteEmergencyDrillCert: async (id) => {
  594. return await request.delete({ url: `/rq/qhse-emergency-cert/delete?id=` + id })
  595. },
  596. // 添加应急演练证书检测
  597. createEmergencyDrillCert: async (data) => {
  598. return await request.post({ url: `/rq/qhse-emergency-cert/create`, data })
  599. },
  600. // 获取详情
  601. getEmergencyDrillCert: async (id) => {
  602. return await request.get({ url: `/rq/qhse-emergency-cert/get?id=` + id })
  603. },
  604. // 修改应急演练证书检测
  605. updateEmergencyDrillCert: async (data) => {
  606. return await request.put({ url: `/rq/qhse-emergency-cert/update`, data })
  607. },
  608. // 导出应急演练证书检测 Excel
  609. exportEmergencyDrillCert: async (params) => {
  610. return await request.download({ url: `/rq/qhse-emergency-cert/export-excel`, params })
  611. }
  612. }