import { Get } from "../../../../lib/request/method";

Page({
  onLoad(options: { id: number }) {
    if (options.id) {
      this.getReport(options.id);
    }
  },
  data: {
    id: "",
    tasks: [
      // {
      //   idisHaveNewSyndrome: "Y",
      //   otherDesc: "其他情况备注其他情况备注",
      //   improve: "好转、心慌",
      //   worse: "尿频、口渴",
      //   noChange: "头晕",
      //   upImg:
      //     "https://ts1.tc.mm.bing.net/th/id/R-C.2fc875e6db412ea3001859644782e86c?rik=OXSZZhqD4QszEg&riu=http%3a%2f%2fpic30.photophoto.cn%2f20140324%2f0034034401728510_b.jpg&ehk=Q46dXLrEabrJDvvcvRaoVNz036jAfl4H0B2d0g%2fQZmA%3d&risl=&pid=ImgRaw&r=0",
      //   downImg:
      //     "https://ts1.tc.mm.bing.net/th/id/R-C.2fc875e6db412ea3001859644782e86c?rik=OXSZZhqD4QszEg&riu=http%3a%2f%2fpic30.photophoto.cn%2f20140324%2f0034034401728510_b.jpg&ehk=Q46dXLrEabrJDvvcvRaoVNz036jAfl4H0B2d0g%2fQZmA%3d&risl=&pid=ImgRaw&r=0",
      //   faceImg:
      //     "https://ts1.tc.mm.bing.net/th/id/R-C.2fc875e6db412ea3001859644782e86c?rik=OXSZZhqD4QszEg&riu=http%3a%2f%2fpic30.photophoto.cn%2f20140324%2f0034034401728510_b.jpg&ehk=Q46dXLrEabrJDvvcvRaoVNz036jAfl4H0B2d0g%2fQZmA%3d&risl=&pid=ImgRaw&r=0",
      // },
      // {
      //   idisHaveNewSyndrome: "Y",
      //   otherDesc: "其他情况备注其他情况备注",
      //   improve: "好转、心慌",
      //   worse: "尿频、口渴",
      //   noChange: "头晕",
      //   upImg:
      //     "https://ts1.tc.mm.bing.net/th/id/R-C.2fc875e6db412ea3001859644782e86c?rik=OXSZZhqD4QszEg&riu=http%3a%2f%2fpic30.photophoto.cn%2f20140324%2f0034034401728510_b.jpg&ehk=Q46dXLrEabrJDvvcvRaoVNz036jAfl4H0B2d0g%2fQZmA%3d&risl=&pid=ImgRaw&r=0",
      //   downImg:
      //     "https://ts1.tc.mm.bing.net/th/id/R-C.2fc875e6db412ea3001859644782e86c?rik=OXSZZhqD4QszEg&riu=http%3a%2f%2fpic30.photophoto.cn%2f20140324%2f0034034401728510_b.jpg&ehk=Q46dXLrEabrJDvvcvRaoVNz036jAfl4H0B2d0g%2fQZmA%3d&risl=&pid=ImgRaw&r=0",
      //   faceImg:
      //     "https://ts1.tc.mm.bing.net/th/id/R-C.2fc875e6db412ea3001859644782e86c?rik=OXSZZhqD4QszEg&riu=http%3a%2f%2fpic30.photophoto.cn%2f20140324%2f0034034401728510_b.jpg&ehk=Q46dXLrEabrJDvvcvRaoVNz036jAfl4H0B2d0g%2fQZmA%3d&risl=&pid=ImgRaw&r=0",
      // },
    ],
    followDetail: {
      // followupPlanName: "随访计划名字",
      // evaluateTime: "2024-10-06",
      // evaluateBy: "张医生",
      // evaluate: {
      //   evaluateSituation: "好转",
      //   evaluateDesc: "评估备注评估备注评估备注评估备注评估备注评估备注",
      //   evaluateDeal: "复诊",
      // },
    },
  },
  async getReport(id: number) {
    let list = await Get("/followupTaskManage/getFollowupTaskGroupDetailById", {
      params: {
        id,
      },
      transform({ data }: AnyObject) {
        return data;
      },
    });
    // console.log("list", list);
    this.setData({
      tasks: list.tasks,
      followDetail: list,
    });
    // console.log("this.data", this.data);
  },
  goSeeFaceReport(e: any) {
    // const id = 1819;
    const id = e.currentTarget.dataset.id;
    console.log("查看舌面像报告", id);
    wx.navigateTo({ url: "/module/health/pages/analysis/analysis?id=" + id });
  },
});
