follow-evaluation.ts 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. // module/health/components/field-ruler/field-ruler.ts
  2. import { getFollowEvaluationListMethod } from "../../request";
  3. Component({
  4. behaviors: ["wx://form-field-group"],
  5. lifetimes: {
  6. attached() {
  7. this.getFollowEvaluationList();
  8. },
  9. },
  10. properties: {},
  11. /**
  12. * 组件的初始数据
  13. */
  14. data: {
  15. loading: false,
  16. followEvaluationList: [
  17. {
  18. id: 1,
  19. time: "2025-05-19",
  20. name: "计划",
  21. status: "纳入健康管理",
  22. statusId: 1,
  23. },
  24. {
  25. id: 2,
  26. time: "2025-05-19",
  27. name: "计划",
  28. status: "纳入健康管理",
  29. statusId: 1,
  30. },
  31. ],
  32. },
  33. observers: {},
  34. methods: {
  35. async getFollowEvaluationList() {
  36. const res = await getFollowEvaluationListMethod();
  37. // console.log(res,"评估列表");
  38. if(res && res.data && res.data.length > 0){
  39. this.setData({
  40. followEvaluationList: res.data,
  41. });
  42. }else{
  43. this.setData({
  44. followEvaluationList: [],
  45. });
  46. }
  47. },
  48. goFollowEvaluation() {
  49. // wx.navigateTo({
  50. // url: `/module/follow/pages/evaluation/report`,
  51. // });
  52. },
  53. },
  54. });