WXL
21 小时以前 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
"use strict";
const common_vendor = require("../../common/vendor.js");
const _sfc_main = {
  __name: "report-detail",
  setup(__props) {
    const report = common_vendor.ref({
      id: 1,
      name: "心电图检查报告",
      status: "normal",
      // normal-正常 abnormal-异常
      statusText: "正常",
      checkTime: "2024-03-25 09:30",
      reportTime: "2024-03-25 10:30",
      department: "心内科",
      doctor: "张医生",
      result: "窦性心律,心率75次/分,各导联ST-T未见明显异常。",
      images: [
        "/static/report/ecg1.jpg",
        "/static/report/ecg2.jpg"
      ],
      advice: "建议定期复查,保持良好的生活习惯,适量运动。"
    });
    const previewImage = (index) => {
      common_vendor.index.previewImage({
        urls: report.value.images,
        current: index
      });
    };
    const downloadReport = () => {
      common_vendor.index.showLoading({
        title: "下载中..."
      });
      setTimeout(() => {
        common_vendor.index.hideLoading();
        common_vendor.index.showToast({
          title: "下载成功",
          icon: "success"
        });
      }, 1500);
    };
    const shareReport = () => {
      common_vendor.index.share({
        provider: "weixin",
        scene: "WXSceneSession",
        type: 1,
        summary: `${report.value.name} - ${report.value.statusText}`,
        success: (res) => {
          common_vendor.index.__f__("log", "at pages/records/report-detail.vue:120", "分享成功:", res);
        },
        fail: (err) => {
          common_vendor.index.__f__("error", "at pages/records/report-detail.vue:123", "分享失败:", err);
        }
      });
    };
    common_vendor.onMounted(() => {
      var _a, _b;
      const pages = getCurrentPages();
      const page = pages[pages.length - 1];
      const id = (_b = (_a = page.$page) == null ? void 0 : _a.options) == null ? void 0 : _b.id;
      loadReport(id);
    });
    const loadReport = (id) => {
      common_vendor.index.__f__("log", "at pages/records/report-detail.vue:140", "加载报告:", id);
    };
    return (_ctx, _cache) => {
      var _a, _b;
      return common_vendor.e({
        a: common_vendor.t(report.value.name),
        b: common_vendor.t(report.value.statusText),
        c: common_vendor.n(report.value.status),
        d: common_vendor.t(report.value.checkTime),
        e: common_vendor.t(report.value.reportTime),
        f: common_vendor.t(report.value.department),
        g: common_vendor.t(report.value.doctor),
        h: common_vendor.t(report.value.result),
        i: (_a = report.value.images) == null ? void 0 : _a.length
      }, ((_b = report.value.images) == null ? void 0 : _b.length) ? {
        j: common_vendor.f(report.value.images, (image, index, i0) => {
          return {
            a: index,
            b: image,
            c: common_vendor.o(($event) => previewImage(index), index)
          };
        })
      } : {}, {
        k: common_vendor.t(report.value.advice),
        l: common_vendor.o(downloadReport),
        m: common_vendor.o(shareReport),
        n: common_vendor.gei(_ctx, "")
      });
    };
  }
};
wx.createPage(_sfc_main);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/records/report-detail.js.map