1.医生选择api优化


接口api定义:
{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" },{ week: "周6", date: "12-24" },{ week: "周7", date: "12-24" },{ week: "周1", date: "12-24" },{ week: "周2", date: "12-24" },]},// 医生卡片信息数组doctorInfo_Area: {// (选填)是否列表数据为空,空=Y 则显示未查询对应信息;其他为非空,显示列表isEmpty: "Y",// (选填)空列表时显示的信息,不填显示 未找到数据emptyTips: "暂未查询到医生信息",// 数据列表listData:[{// icon url地址image: "xxx.svg",// 医生姓名name: "张医生",// 标签tag: "专家",// 次级内容subtitle: "消化内科|主任医师",// 详情desc: "特长:暂无定义特长信息",// 按钮名称btn: "预约"},{icon: "xxx.svg", name: "张医生", tag: "专家", subtitle: "消化内科|主任医师", desc: "特长:暂无定义特长信息", btn: "预约" },]},// 预约时间区域appointTime_Area:{// 是否显示 Y-显示, N-隐藏isShow: "Y",// (选填)是否列表数据为空,空=Y 则显示未查询对应信息;其他为非空,显示列表isEmpty: "Y",// (选填)空列表时显示的信息,不填显示 未找到数据emptyTips: "暂未查询到预约时间详情",time: "2022-06-07",dept : "消化内科",head:[{title: "时间段",ratio: 0.4,align: "center"},{title: "余号",ratio: 0.3,align: "center"},{title: "",ratio: 0.3,align: "right"}],// 数据列表listData:[{// 时间time: "08:00~08:30",// 剩余号码leftNo: "余10号",// 按钮名称btn: "预约"},{time: "08:00~08:30", leftNo: "余10号", btn: "预约"},]}}}}
{
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.就诊人列表

{
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: "选中"
}
}
}
}
};
