plan.ts 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. import { http } from '@/utils/http'
  2. const homeUrl = ''
  3. const getSacleUrl = '/scale/findScaleByFlag'
  4. const saveSacleUrl = '/record/saveScaleRecord'
  5. //保存gonogo路径
  6. const saveGoNoGoUrl = '/record/saveSuppressionRecord'
  7. const saveFaceDotUrl = '/record/saveEmotionRecord'
  8. const getDataUrl = '/plan/findCompletePlanByUser'
  9. //获取报告内容
  10. const queryReportUrl = '/userBriefing/findByPlanIdAndUserNo'
  11. //新增留言API
  12. const pubMsgUrl = '/comment/addComment'
  13. //分页查询留言
  14. const queryMsgUrl = '/comment/findAllByPage'
  15. //首页API
  16. export const homeApi = (val: any) => {
  17. return http<any>(
  18. {
  19. method: 'post',
  20. url: homeUrl,
  21. data: { val }
  22. })
  23. }
  24. //获取量表信息
  25. export const getScaleApi = (val: string) => {
  26. return http<any>(
  27. {
  28. method: 'get',
  29. url: `${getSacleUrl}?flag=${val}`
  30. })
  31. }
  32. //保存量表信息
  33. //获取量表信息
  34. export const saveScaleApi = (val: any) => {
  35. return http<any>(
  36. {
  37. method: 'post',
  38. url: saveSacleUrl,
  39. data: { ...val }
  40. })
  41. }
  42. //使用gonogoApi
  43. export const saveGoNoGoApi = (val: any) => {
  44. return http<any>(
  45. {
  46. method: 'post',
  47. url: saveGoNoGoUrl,
  48. data: { ...val }
  49. })
  50. }
  51. //使用点探测Api
  52. export const saveFaceDotApi = (val: any) => {
  53. return http<any>(
  54. {
  55. method: 'post',
  56. url: saveFaceDotUrl,
  57. data: { ...val }
  58. })
  59. }
  60. //查询已完成的测试计划
  61. export const getDataApi = (val: any) => {
  62. return http<any>(
  63. {
  64. method: 'get',
  65. url: `${getDataUrl}?pageNum=${val.pageNum}&pageSize=${val.pageSize}&userNo=${val.userNo}`,
  66. })
  67. }
  68. //查询报告信息
  69. export const queryReportApi = (val: any) => {
  70. return http<any>(
  71. {
  72. method: 'get',
  73. url: `${queryReportUrl}?planId=${val.planId}&userNo=${val.userNo}`,
  74. })
  75. }
  76. //发布留言
  77. export const pubMsgApi = (val: any) => {
  78. return http<any>(
  79. {
  80. method: 'post',
  81. url: pubMsgUrl,
  82. data: { ...val }
  83. })
  84. }
  85. //发布子留言
  86. export const subPubMsgApi = (val: any) => {
  87. return http<any>(
  88. {
  89. method: 'post',
  90. url: pubMsgUrl,
  91. data: { ...val }
  92. })
  93. }
  94. //分页查询留言
  95. export const queryMsgApi = (val: any) => {
  96. return http<any>(
  97. {
  98. method: 'get',
  99. url: `${queryMsgUrl}?pageNum=${val.pageNum}&pageSize=${val.pageSize}`,
  100. })
  101. }
  102. //分页查询留言--zliyan
  103. export const queryMsgApi1 = (val: any) => {
  104. return http<any>(
  105. {
  106. method: 'get',
  107. url: `${queryMsgUrl}?pageNum=${val.pageNum}&pageSize=${val.pageSize}&parentUserNo=${val.parentUserNo}`,
  108. })
  109. }