1.医生选择api优化

image.pngimage.png

接口api定义:

  1. {
  2. type: "flex",
  3. config: {
  4. mod: "h5/pages/SCWJYY/doctorSelect/index",
  5. title: "选择医生",
  6. wxcall: {
  7. // 顶部日期选择点击事件
  8. onDateClick: (item, index) => {
  9. console.log("datebar", item, index);
  10. },
  11. //医生卡片点击事件
  12. onSelectDoctor: (item, index) => {
  13. console.log("SelectDoctor", item, index);
  14. },
  15. // 预约时间选择点击事件
  16. onAppTime: (item, index) => {
  17. console.log(item, index);
  18. }
  19. },
  20. data: {
  21. // 日期选择数据
  22. datebar: {
  23. // 日期卡片内容列表
  24. listData: [
  25. {
  26. //[*] 星期
  27. week: "周二",
  28. //[*] 显示日期
  29. date: "12-21",
  30. //[*] 是否被选中
  31. active: true
  32. },
  33. { week: "周三", date: "12-22" },
  34. { week: "周四", date: "12-23" },
  35. { week: "周五", date: "12-24" },
  36. { week: "周6", date: "12-24" },
  37. { week: "周7", date: "12-24" },
  38. { week: "周1", date: "12-24" },
  39. { week: "周2", date: "12-24" },
  40. ]
  41. },
  42. // 医生卡片信息数组
  43. doctorInfo_Area: {
  44. // (选填)是否列表数据为空,空=Y 则显示未查询对应信息;其他为非空,显示列表
  45. isEmpty: "Y",
  46. // (选填)空列表时显示的信息,不填显示 未找到数据
  47. emptyTips: "暂未查询到医生信息",
  48. // 数据列表
  49. listData:[
  50. {
  51. // icon url地址
  52. image: "xxx.svg",
  53. // 医生姓名
  54. name: "张医生",
  55. // 标签
  56. tag: "专家",
  57. // 次级内容
  58. subtitle: "消化内科|主任医师",
  59. // 详情
  60. desc: "特长:暂无定义特长信息",
  61. // 按钮名称
  62. btn: "预约"
  63. },
  64. {icon: "xxx.svg", name: "张医生", tag: "专家", subtitle: "消化内科|主任医师", desc: "特长:暂无定义特长信息", btn: "预约" },
  65. ]
  66. },
  67. // 预约时间区域
  68. appointTime_Area:{
  69. // 是否显示 Y-显示, N-隐藏
  70. isShow: "Y",
  71. // (选填)是否列表数据为空,空=Y 则显示未查询对应信息;其他为非空,显示列表
  72. isEmpty: "Y",
  73. // (选填)空列表时显示的信息,不填显示 未找到数据
  74. emptyTips: "暂未查询到预约时间详情",
  75. time: "2022-06-07",
  76. dept : "消化内科",
  77. head:[
  78. {
  79. title: "时间段",
  80. ratio: 0.4,
  81. align: "center"
  82. },
  83. {
  84. title: "余号",
  85. ratio: 0.3,
  86. align: "center"
  87. },
  88. {
  89. title: "",
  90. ratio: 0.3,
  91. align: "right"
  92. }
  93. ],
  94. // 数据列表
  95. listData:[
  96. {
  97. // 时间
  98. time: "08:00~08:30",
  99. // 剩余号码
  100. leftNo: "余10号",
  101. // 按钮名称
  102. btn: "预约"
  103. },
  104. {time: "08:00~08:30", leftNo: "余10号", btn: "预约"},
  105. ]
  106. }
  107. }
  108. }
  109. }
{
  type: "flex",
    config: {
      mod: "h5/pages/SCWJYY/doctorSelect/index",
        title: "选择医生",
          wxcall: {
            // 顶部日期选择点击事件
            onDateClick: (item, index) => {
              console.log("datebar", item, index);
            },
              //医生卡片点击事件
              onSelectDoctor: (item, index) => {
                console.log("SelectDoctor", item, index);
              },
                // 预约时间选择点击事件
                onAppTime: (item, index) => {
                  console.log(item, index);
                }
          },
            data: {
              // 日期选择数据
              datebar: {
                listData: [
                  {
                    //[*] 星期
                    week: "周二",
                    //[*] 显示日期
                    date: "12-21",
                    //[*] 是否被选中
                    active: true
                  },
                  { week: "周三", date: "12-22" },
                  { week: "周四", date: "12-23" },
                  { week: "周五", date: "12-24" }
                ]
              },
                // 医生卡片信息数组
                doctorInfo_Area: {
                  // (选填)是否列表数据为空,空=Y 则显示未查询对应信息;其他为非空,显示列表
                  isEmpty: "N",
                    // (选填)空列表时显示的信息,不填显示 未找到数据
                    emptyTips: "暂未查询到医生信息",
                      //列表数组
                      listData: [
                        {
                          // 头像
                          icon: `${RES}/assets/icon/doctor.png`,
                          // 姓名
                          title: "张三",
                          // 职位
                          subtitle: "消化内科|主任医师",
                          // 等级
                          tag: ["专家"],
                          // 介绍
                          contents: [
                            {
                              label: "",
                              value:
                              "<span style='font-weight:600;font-size:13px'>专业特长:</span>医生简介医生简介医生简介医生简介医生简介医生简介医生简介医生简介医生简介医生简介医生简介"
                            }
                          ]
                        },
                        {
                          // 头像
                          icon: `${RES}/assets/icon/doctor.png`,
                          // 姓名
                          title: "张三",
                          // 职位
                          subtitle: "消化内科|主任医师",
                          // 等级
                          tag: ["专家"],
                          // 介绍
                          contents: [
                            {
                              label: "",
                              value:
                              "<span style='font-weight:600;font-size:13px'>专业特长:</span>医生简介医生简介医生简介医生简介医生简介医生简介医生简介医生简介医生简介医生简介医生简介"
                            }
                          ]
                        },
                        {
                          // 头像
                          icon: `${RES}/assets/icon/doctor.png`,
                          // 姓名
                          title: "张三",
                          // 职位
                          subtitle: "消化内科|主任医师",
                          // 等级
                          tag: ["专家"],
                          // 介绍
                          contents: [
                            {
                              label: "",
                              value:
                              "<span style='font-weight:600;font-size:13px'>专业特长:</span>医生简介医生简介医生简介医生简介医生简介医生简介医生简介医生简介医生简介医生简介医生简介"
                            }
                          ]
                        }
                      ],
                        // 卡片右侧按钮(选填)最多显示2个按钮,注释则不显示按钮
                        btns: [{ id: "app", btnName: "预约" }]
                },
                  appointTime_Area:{
                    // 是否显示 Y-显示, N-隐藏
                    isShow: "N",
                      // (选填)是否列表数据为空,空=Y 则显示未查询对应信息;其他为非空,显示列表
                      isEmpty: "N",
                        // (选填)空列表时显示的信息,不填显示 未找到数据
                        emptyTips: "暂未查询到预约时间详情",
                          floatList: [
                            {
                              // 当前日期
                              time: "2022-04-26",
                              // 当前科室
                              dept: "消化内科",
                              // 预约挂号时间表表头
                              head: [
                                {
                                  // 表头文字
                                  title: "时间段",
                                  // 该列在表格中的占比
                                  ratio: 0.4,
                                  // 表格内容对齐方式
                                  align: "center"
                                },
                                {
                                  title: "余号",
                                  ratio: 0.3,
                                  align: "center"
                                },
                                {
                                  title: "",
                                  ratio: 0.3,
                                  align: "right"
                                }
                              ],
                              // 预约挂号时间表内容,为[{}]则没有内容
                              body: [
                                {
                                  // 时间段
                                  testItem: "13:00-14:00",
                                  // 余号
                                  res: "余2",
                                },
                                { testItem: "13:00-14:00", res: "余2" },
                                { testItem: "13:00-14:00", res: "余2" }
                              ],
                              // 预约按钮区域,不填则没有按钮
                              optBtns: [
                                {
                                  text: "预约"
                                },
                              ]
                            },
                            {
                              time: "2022-04-26",
                              dept: "消化内科",
                              head: [
                                {
                                  title: "时间段",
                                  ratio: 0.4,
                                  align: "center"
                                },
                                {
                                  title: "余号",
                                  ratio: 0.3,
                                  align: "center"
                                },
                                {
                                  title: "",
                                  ratio: 0.3,
                                  align: "right"
                                }
                              ],
                              body: [{}]
                            },
                            {
                              time: "2022-04-26",
                              dept: "消化内科",
                              head: [
                                {
                                  title: "时间段",
                                  ratio: 0.4,
                                  align: "center"
                                },
                                {
                                  title: "余号",
                                  ratio: 0.3,
                                  align: "center"
                                },
                                {
                                  title: "",
                                  ratio: 0.3,
                                  align: "right"
                                }
                              ],
                              body: [{}]
                            },

                          ]
                  },
                    floatList: [
                      {
                        // 当前日期
                        time: "2022-04-26",
                        // 当前科室
                        dept: "消化内科",
                        // 预约挂号时间表表头
                        head: [
                          {
                            // 表头文字
                            title: "时间段",
                            // 该列在表格中的占比
                            ratio: 0.4,
                            // 表格内容对齐方式
                            align: "center"
                          },
                          {
                            title: "余号",
                            ratio: 0.3,
                            align: "center"
                          },
                          {
                            title: "",
                            ratio: 0.3,
                            align: "right"
                          }
                        ],
                        // 预约挂号时间表内容,为[{}]则没有内容
                        body: [
                          {
                            // 时间段
                            testItem: "13:00-14:00",
                            // 余号
                            res: "余2",
                          },
                          { testItem: "13:00-14:00", res: "余2" },
                          { testItem: "13:00-14:00", res: "余2" }
                        ],
                        // 预约按钮区域,不填则没有按钮
                        optBtns: [
                          {
                            text: "预约"
                          },
                        ]
                      },
                      {
                        time: "2022-04-26",
                        dept: "消化内科",
                        head: [
                          {
                            title: "时间段",
                            ratio: 0.4,
                            align: "center"
                          },
                          {
                            title: "余号",
                            ratio: 0.3,
                            align: "center"
                          },
                          {
                            title: "",
                            ratio: 0.3,
                            align: "right"
                          }
                        ],
                        body: [{}]
                      },
                      {
                        time: "2022-04-26",
                        dept: "消化内科",
                        head: [
                          {
                            title: "时间段",
                            ratio: 0.4,
                            align: "center"
                          },
                          {
                            title: "余号",
                            ratio: 0.3,
                            align: "center"
                          },
                          {
                            title: "",
                            ratio: 0.3,
                            align: "right"
                          }
                        ],
                        body: [{}]
                      },

                    ]
            }
    }
    };

2.就诊人列表

image.png

{
      type: "flex",
      config: {
        mod: "h5/pages/SCWJYY/patientSelect/index",
        title: "选择就诊人",
        wxcall: {
          onItemClick: (item, index) => {
            console.log("点击卡片");
            console.log("==onItemClick==");
            console.log(item, index);
          },
          onDefaultClick: (item, index) => {
            console.log("设为默认");
            console.log("==onDefaultClick==");
            console.log(item, index);
          },
          onAddClick: () => {
            console.log("新增");
            console.log("==onAddClick==");
          }
        },
        data: {
          userEcardData: {
            addBtn: {
              icon: "",
              text: "添加就诊人",
              enable: true
            },
            cards: [
              {
                // 是否选中
                isChoosed: true,
                // 卡面内容 
                showList:[
                  {
                    key: "姓名",
                    value: "蒋**"
                  },
                  {
                    key: "卡号",
                    value: "320303030303***0010"
                  }
                ],
              },
              {
                // 是否选中 
                isChoosed: false,
                // 卡面内容
                showList:[
                  {
                    key: "姓名",
                    value: "蒋**"
                  },
                  {
                    key: "卡号",
                    value: "320303030303***0010"
                  }
                ],
              }
            ],
            card: {
              defaultIndex:1,
              active: true,
              activeCardBg: `${RES}/assets/img/ecard-01.png`,
              inactiveCardBg: `${RES}/assets/img/ecard-01.png`,
              activeText: "选中"
            }
          }
        }
      }
    };