WXL
11 小时以前 05c363fdd7ab04e3bd9a753e2c5d5bfff04d681c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
"use strict";
const common_vendor = require("../../common/vendor.js");
const common_assets = require("../../common/assets.js");
const _sfc_main = {
  __name: "index",
  setup(__props) {
    const userInfo = common_vendor.ref({
      avatar: "/static/avatar/default.jpg",
      name: "张三"
    });
    const records = common_vendor.ref([
      {
        date: "2024-03-20",
        hospital: "青岛镜湖医院",
        department: "内科",
        diagnosis: "上呼吸道感染"
      }
      // ...更多记录
    ]);
    const reports = common_vendor.ref([
      {
        icon: "/static/report/blood.png",
        name: "血常规检查",
        time: "2024-03-20",
        status: "normal",
        statusText: "正常"
      }
      // ...更多报告
    ]);
    const symptoms = common_vendor.ref([
      {
        icon: "/static/symptoms/fever.png",
        name: "发热"
      }
      // ...更多症状
    ]);
    const goAIConsult = () => {
      common_vendor.index.navigateTo({
        url: "/pages/consultation/ai"
      });
    };
    const goDoctorConsult = () => {
      common_vendor.index.navigateTo({
        url: "/pages/consultation/chat"
      });
    };
    const analyzeRecord = (record) => {
      common_vendor.index.navigateTo({
        url: "/pages/consultation/ai",
        success: (res) => {
          var _a;
          const message = `请分析以下病历:
医院: ${record.hospital}
科室: ${record.department}
诊断: ${record.diagnosis}`;
          if ((_a = res.eventChannel) == null ? void 0 : _a.emit) {
            res.eventChannel.emit("initMessage", { message });
          }
        }
      });
    };
    const analyzeReport = (report) => {
      common_vendor.index.navigateTo({
        url: "/pages/consultation/ai",
        success: (res) => {
          var _a;
          const message = `请分析以下检查报告:
检查项目: ${report.name}
检查时间: ${report.time}
检查结果: ${report.status}`;
          if ((_a = res.eventChannel) == null ? void 0 : _a.emit) {
            res.eventChannel.emit("initMessage", { message });
          }
        }
      });
    };
    return (_ctx, _cache) => {
      return {
        a: userInfo.value.avatar,
        b: common_vendor.t(userInfo.value.name),
        c: common_assets._imports_0$13,
        d: common_vendor.o(goAIConsult),
        e: common_assets._imports_1$2,
        f: common_vendor.o(goDoctorConsult),
        g: common_vendor.o((...args) => _ctx.viewAllRecords && _ctx.viewAllRecords(...args)),
        h: common_vendor.f(records.value, (record, index, i0) => {
          return {
            a: common_vendor.o(($event) => analyzeRecord(record), index),
            b: common_vendor.t(record.date),
            c: common_vendor.t(record.hospital),
            d: common_vendor.t(record.department),
            e: common_vendor.t(record.diagnosis),
            f: index,
            g: common_vendor.o(($event) => _ctx.selectRecord(record), index)
          };
        }),
        i: common_vendor.o((...args) => _ctx.viewAllReports && _ctx.viewAllReports(...args)),
        j: common_vendor.f(reports.value, (report, index, i0) => {
          return {
            a: common_vendor.o(($event) => analyzeReport(report), index),
            b: report.icon,
            c: common_vendor.t(report.name),
            d: common_vendor.t(report.time),
            e: common_vendor.t(report.statusText),
            f: common_vendor.n(report.status),
            g: index,
            h: common_vendor.o(($event) => _ctx.selectReport(report), index)
          };
        }),
        k: common_vendor.f(symptoms.value, (symptom, index, i0) => {
          return {
            a: symptom.icon,
            b: common_vendor.t(symptom.name),
            c: index,
            d: common_vendor.o(($event) => _ctx.consultSymptom(symptom), index)
          };
        }),
        l: common_vendor.gei(_ctx, "")
      };
    };
  }
};
wx.createPage(_sfc_main);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/consultation/index.js.map