"use strict";const t=require("../../common/vendor.js"),e={__name:"record",setup(e){const a=[{label:"全部",value:"all"},{label:"待支付",value:"unpaid"},{label:"待就诊",value:"paid"},{label:"已完成",value:"completed"},{label:"已取消",value:"cancelled"}],o=t.ref("all"),l=t.ref([{id:1,hospital:"青岛镜湖医院",department:"心内科",doctorName:"张医生",doctorTitle:"主任医师",doctorAvatar:"/static/doctor/doctor1.png",date:"2024-03-21",time:"09:00",patientName:"张三",patientRelation:"本人",fee:100,status:"unpaid",statusText:"待支付"},{id:2,hospital:"青岛科大医院",department:"儿科",doctorName:"李医生",doctorTitle:"副主任医师",doctorAvatar:"/static/doctor/doctor2.png",date:"2024-03-20",time:"10:30",patientName:"张小明",patientRelation:"子女",fee:80,status:"paid",statusText:"待就诊"}]),d=t.computed(()=>"all"===o.value?l.value:l.value.filter(t=>t.status===o.value));return(e,l)=>({a:t.f(a,(e,a,l)=>({a:t.t(e.label),b:a,c:o.value===e.value?1:"",d:t.o(t=>(t=>{o.value=t})(e.value),a)})),b:t.f(d.value,(e,a,o)=>t.e({a:t.t(e.hospital),b:t.t(e.statusText),c:t.n(e.status),d:t.t(e.department),e:t.t(e.doctorName),f:t.t(e.doctorTitle),g:t.t(e.date),h:t.t(e.time),i:e.doctorAvatar,j:t.t(e.patientName),k:t.t(e.patientRelation),l:t.t(e.fee),m:"unpaid"===e.status},"unpaid"===e.status?{n:t.o(a=>(e=>{t.index.navigateTo({url:`/pages/payment/index?orderId=${e.id}`})})(e),a)}:{},{o:"paid"===e.status},"paid"===e.status?{p:t.o(e=>{t.index.showModal({title:"取消预约",content:"确定要取消该预约吗?",success:e=>{e.confirm&&t.index.showToast({title:"取消成功",icon:"success"})}})},a)}:{},{q:"completed"===e.status},"completed"===e.status?{r:t.o(a=>(e=>{t.index.navigateTo({url:`/pages/report/detail?id=${e.id}`})})(e),a)}:{},{s:a})),c:t.gei(e,"")})}};wx.createPage(e);