report.js 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. import axios from 'axios';
  2. //获取报告中用户的个人信息,paperResultId为报告结果Id
  3. export function getReportUserInfo(pid,uid) {
  4. return axios.get('/report/userInfo',{
  5. params: {
  6. pid: pid,
  7. uid: uid
  8. }
  9. })
  10. .then(res => res.data);
  11. }
  12. //诊断结果
  13. export function getGlobalResult(paperResultId) {
  14. return axios.get('/report/globalResult',{
  15. params: {
  16. paperResultId: paperResultId,
  17. }
  18. })
  19. .then(res => res.data);
  20. }
  21. //获取作答时间及平均作答时间
  22. export function getReportUserTime(pid,uid) {
  23. return axios.get('/report/useTime',{
  24. params: {
  25. pid: pid,
  26. uid: uid
  27. }
  28. })
  29. .then(res => res.data);
  30. }
  31. export function getSpecialReport(pid,uid,resultId) {
  32. if(resultId){
  33. return axios.get('/specialReport/generate1',{
  34. params: {
  35. resultId: resultId,
  36. }
  37. })
  38. .then(res => res.data);
  39. }
  40. else{
  41. return axios.get('/specialReport/generate',{
  42. params: {
  43. pid: pid,
  44. uid: uid
  45. }
  46. })
  47. .then(res => res.data);
  48. }
  49. }
  50. export function generateMind(pid,uid,resultId) {
  51. if(resultId){
  52. return axios.get('/specialReport/generateMind1',{
  53. params: {
  54. resultId: resultId,
  55. }
  56. })
  57. .then(res => res.data);
  58. }
  59. else{
  60. return axios.get('/specialReport/generateMind',{
  61. params: {
  62. pid: pid,
  63. uid: uid
  64. }
  65. })
  66. .then(res => res.data);
  67. }
  68. }