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
"use strict";
const common_vendor = require("../../common/vendor.js");
const _sfc_main = {
  __name: "patient",
  setup(__props) {
    const patients = common_vendor.ref([
      {
        id: 1,
        name: "张三",
        gender: "男",
        age: 45,
        idType: "身份证",
        idNo: "440***********1234",
        cardNo: "1234567890",
        isDefault: true
      },
      {
        id: 2,
        name: "张小明",
        gender: "男",
        age: 12,
        idType: "身份证",
        idNo: "440***********5678",
        cardNo: "0987654321",
        isDefault: false
      }
    ]);
    const selectPatient = (patient) => {
      var _a;
      const pages = getCurrentPages();
      const prevPage = pages[pages.length - 2];
      const { departmentId, hospitalId, doctorId, scheduleId } = ((_a = prevPage.$page) == null ? void 0 : _a.options) || {};
      common_vendor.index.navigateTo({
        url: `/pages/appointment/confirm?patientId=${patient.id}&departmentId=${departmentId}&hospitalId=${hospitalId}&doctorId=${doctorId}&scheduleId=${scheduleId}`
      });
    };
    const addPatient = () => {
      common_vendor.index.navigateTo({
        url: "/pages/my/patient-edit"
      });
    };
    return (_ctx, _cache) => {
      return {
        a: common_vendor.f(patients.value, (patient, index, i0) => {
          return common_vendor.e({
            a: common_vendor.t(patient.name),
            b: patient.isDefault
          }, patient.isDefault ? {} : {}, {
            c: common_vendor.t(patient.gender),
            d: common_vendor.t(patient.age),
            e: common_vendor.t(patient.idType),
            f: common_vendor.t(patient.idNo),
            g: patient.cardNo
          }, patient.cardNo ? {
            h: common_vendor.t(patient.cardNo)
          } : {}, {
            i: index,
            j: common_vendor.o(($event) => selectPatient(patient), index)
          });
        }),
        b: common_vendor.o(addPatient),
        c: common_vendor.gei(_ctx, "")
      };
    };
  }
};
wx.createPage(_sfc_main);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/appointment/patient.js.map