A8000
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

54 lines
1.2 KiB

8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
  1. import apiClient from '../../utils/axios'
  2. interface paramsType {
  3. pageNum: number
  4. pageSize: number
  5. }
  6. //获取历史记录
  7. export const getHistoryInfo = async (params: paramsType) => {
  8. try {
  9. const res = await apiClient.post(
  10. `/api/v1/app/reactionResult/getRecords?pageNum=${params.pageNum}&pageSize=${params.pageSize}`,
  11. )
  12. return res.data
  13. } catch (error) {
  14. console.log(error)
  15. }
  16. }
  17. //删除历史记录
  18. export const deleteHistoryInfo = async (id: number) => {
  19. try {
  20. const res = await apiClient.post(
  21. `/api/v1/app/reactionResult/deleteRecord?id=${id}`,
  22. )
  23. return res.data
  24. } catch (error) {
  25. console.log(error)
  26. }
  27. }
  28. //搜索
  29. export const searchHistoryInfo = async (search: string) => {
  30. try {
  31. const res = await apiClient.post(
  32. '/api/v1/app/reactionResult/searchRecord',
  33. { search },
  34. )
  35. return res.data
  36. } catch (error) {
  37. console.log(error)
  38. }
  39. }
  40. //打印
  41. export const printHistoryInfo = async (id: number) => {
  42. try {
  43. const res = await apiClient.post(
  44. `/api/v1/app/reactionResult/printfRecord?id=${id}`,
  45. )
  46. return res.data
  47. } catch (error) {
  48. console.log('打印出错', error)
  49. }
  50. }