plan.ts 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  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/findByFlag'
  11. //新增留言API
  12. const pubMsgUrl = '/comment/addComment'
  13. //分页查询留言
  14. const queryMsgUrl = '/comment/findAllByPage'
  15. //查询量表详情
  16. const queryScaleDetailUrl = '/subject/findByFlag'
  17. //查询认知任务详情
  18. const queryCognizeDetailUrl = '/cognitive/findByFlag'
  19. //首页API
  20. export const homeApi = (val: any) => {
  21. return http<any>(
  22. {
  23. method: 'post',
  24. url: homeUrl,
  25. data: { val }
  26. })
  27. }
  28. //获取量表信息
  29. export const getScaleApi = (val: string) => {
  30. return http<any>(
  31. {
  32. method: 'get',
  33. url: `${getSacleUrl}?flag=${val}`
  34. })
  35. }
  36. //保存量表信息
  37. //获取量表信息
  38. export const saveScaleApi = (val: any) => {
  39. return http<any>(
  40. {
  41. method: 'post',
  42. url: saveSacleUrl,
  43. data: { ...val }
  44. })
  45. }
  46. //使用gonogoApi
  47. export const saveGoNoGoApi = (val: any) => {
  48. return http<any>(
  49. {
  50. method: 'post',
  51. url: saveGoNoGoUrl,
  52. data: { ...val }
  53. })
  54. }
  55. //使用点探测Api
  56. export const saveFaceDotApi = (val: any) => {
  57. return http<any>(
  58. {
  59. method: 'post',
  60. url: saveFaceDotUrl,
  61. data: { ...val }
  62. })
  63. }
  64. //查询已完成的测试计划
  65. export const getDataApi = (val: any) => {
  66. return http<any>(
  67. {
  68. method: 'get',
  69. url: `${getDataUrl}?pageNum=${val.pageNum}&pageSize=${val.pageSize}&userNo=${val.userNo}`,
  70. })
  71. }
  72. //查询报告信息
  73. export const queryReportApi = (val: any) => {
  74. return http<any>(
  75. {
  76. method: 'get',
  77. url: `${queryReportUrl}?planId=${val.planId}&flag=${val.flag}`,
  78. })
  79. }
  80. //发布留言
  81. export const pubMsgApi = (val: any) => {
  82. return http<any>(
  83. {
  84. method: 'post',
  85. url: pubMsgUrl,
  86. data: { ...val }
  87. })
  88. }
  89. //发布子留言
  90. export const subPubMsgApi = (val: any) => {
  91. return http<any>(
  92. {
  93. method: 'post',
  94. url: pubMsgUrl,
  95. data: { ...val }
  96. })
  97. }
  98. //分页查询留言
  99. export const queryMsgApi = (val: any) => {
  100. return http<any>(
  101. {
  102. method: 'get',
  103. url: `${queryMsgUrl}?pageNum=${val.pageNum}&pageSize=${val.pageSize}`,
  104. })
  105. }
  106. //分页查询留言--zliyan
  107. export const queryMsgApi1 = (val: any) => {
  108. return http<any>(
  109. {
  110. method: 'get',
  111. url: `${queryMsgUrl}?pageNum=${val.pageNum}&pageSize=${val.pageSize}&parentId=${val.parentId}`,
  112. })
  113. }
  114. //根据flag查询 量表详细信息
  115. export const queryScaleDetailApi = (val: string) => {
  116. return http<any>({
  117. method: 'get',
  118. url: `${queryScaleDetailUrl}?flag=${val}`
  119. })
  120. }
  121. //根据flag查询 认知任务详细信息
  122. export const queryCognizeDetailApi = (val: string) => {
  123. return http<any>({
  124. method: 'get',
  125. url: `${queryCognizeDetailUrl}?flag=${val}`
  126. })
  127. }