(self["webpackChunkuniapp"]=self["webpackChunkuniapp"]||[]).push([[492],{6890:function(t,e,n){var i=n(4610);i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[t.id,i,""]]),i.locals&&(t.exports=i.locals);var r=n(5472).Z;r("bbce7d14",i,!0,{sourceMap:!1,shadowMode:!1})},2333:function(t,e,n){var i=n(8783);i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[t.id,i,""]]),i.locals&&(t.exports=i.locals);var r=n(5472).Z;r("511a4259",i,!0,{sourceMap:!1,shadowMode:!1})},8570:function(t,e,n){"use strict";var i;n.d(e,{Z:function(){return p}});var r,o=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-uni-view",{ref:"u-subsection",staticClass:"u-subsection",class:["u-subsection--"+t.mode],style:[t.$u.addStyle(t.customStyle),t.wrapperStyle]},[n("v-uni-view",{ref:"u-subsection__bar",staticClass:"u-subsection__bar",class:["button"===t.mode&&"u-subsection--button__bar",0===t.current&&"subsection"===t.mode&&"u-subsection__bar--first",t.current>0&&t.current{const e={};return"subsection"===this.mode&&(e.borderColor=this.activeColor,e.borderWidth="1px",e.borderStyle="solid"),e}},textStyle(t){return t=>{const e={};return e.fontWeight=this.bold&&this.current===t?"bold":"normal",e.fontSize=uni.$u.addUnit(this.fontSize),"subsection"===this.mode?e.color=this.current===t?"#fff":this.inactiveColor:e.color=this.current===t?this.activeColor:this.inactiveColor,e}}},mounted(){this.init()},methods:{init(){uni.$u.sleep().then((()=>this.getRect()))},getText(t){return"object"===typeof t?t[this.keyName]:t},getRect(){this.$uGetRect(".u-subsection__item--0").then((t=>{this.itemRect=t}))},clickHandler(t){this.$emit("change",t)}}},c=u,l=(n(2333),n(1503)),d=(0,l.Z)(c,o,a,!1,null,"9665f2ea",null,!1,i,r),p=d.exports},9688:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return h}});var i,r={uSubsection:n(8570).Z,uButton:n(7344).Z,uList:n(4307).Z,uSwipeAction:n(3309).Z,uListItem:n(8556).Z,uSwipeActionItem:n(8268).Z,uCell:n(7981).Z,uIcon:n(5862).Z,uActionSheet:n(7030).Z},o=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-uni-view",{staticClass:"page"},[n("u-subsection",{attrs:{list:t.typeList,current:t.typeIndex,fontSize:"16"},on:{change:function(e){arguments[0]=e=t.$handleEvent(e),t.changeType.apply(void 0,arguments)}}}),n("v-uni-view",{staticClass:"add-button"},[n("u-button",{attrs:{type:"primary",icon:"plus",shape:"circle",size:"large"},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.add.apply(void 0,arguments)}}})],1),n("u-list",{staticClass:"list",on:{scrolltolower:function(e){arguments[0]=e=t.$handleEvent(e),t.reachBottom.apply(void 0,arguments)}}},[n("u-swipe-action",t._l(t.list,(function(e){return n("u-list-item",{key:e.id},[n("u-swipe-action-item",{attrs:{options:t.swipeOption,name:e.id},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.swipeClick.apply(void 0,arguments)}}},[n("u-cell",{attrs:{size:"large",url:"/pages/record/detail?id="+e.id}},[n("v-uni-view",{staticClass:"title",attrs:{slot:"title"},slot:"title"},[n("v-uni-view",{staticClass:"list-item-title"},[t._v(t._s(e.doctor?e.doctor.name:""))]),n("v-uni-view",{staticClass:"list-item-price"},[n("v-uni-text",{staticStyle:{color:"#dd524d","font-size":"19px"}},[n("u-icon",{attrs:{name:"rmb",color:"#dd524d",size:"19px"}}),t._v(t._s(e.sell_price))],1),n("v-uni-text",{staticStyle:{color:"#c0c0c0","text-decoration":"line-through"}},[t._v(t._s(e.origin_price))])],1)],1),n("v-uni-view",{staticClass:"label",attrs:{slot:"label"},slot:"label"},[n("v-uni-view",[t._v("就诊时间: "+t._s(e.treat_at))])],1)],1)],1)],1)})),1)],1),n("u-action-sheet",{attrs:{actions:t.option.list,title:t.option.title,show:t.option.show,closeOnClickOverlay:!0},on:{close:function(e){arguments[0]=e=t.$handleEvent(e),t.closeOption.apply(void 0,arguments)},select:function(e){arguments[0]=e=t.$handleEvent(e),t.chooseOption.apply(void 0,arguments)}}})],1)},a=[],s=n(3762),u=n(3062),c=(n(6228),{data:function(){return{patient_id:"",patient:{},typeIndex:0,perPage:20,typeList:[],list:[],option:{id:"",show:!1,list:[{name:"详细",color:"#4cd964",action:"detail"},{name:"修改",color:"#007aff",action:"edit"},{name:"删除",color:"#dd524d",action:"delete"}],title:""},swipeOption:[{text:"删除",style:{backgroundColor:"#dd524d"}}]}},onLoad:function(t){this.patient_id=t.patient,this.init()},onShow:function(){this.loadData(!0)},onPullDownRefresh:function(){this.loadData(!0)},methods:{init:function(){var t=this;return(0,u.Z)((0,s.Z)().mark((function e(){var n;return(0,s.Z)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,t.$ajax.get("/admin-api/patient/".concat(t.patient_id),{params:{_action:"getData"}});case 2:return n=e.sent,0==n.status&&(t.patient=n.data,uni.setNavigationBarTitle({title:"".concat(t.patient.name,"-病历记录")})),e.next=6,t.$ajax.get("/admin-api/category",{params:{_action:"getData"}});case 6:n=e.sent,0==n.status&&(t.typeList=n.data.items),t.loadData(!0);case 9:case"end":return e.stop()}}),e)})))()},changeType:function(t){this.typeIndex=t,this.loadData(!0)},loadData:function(t){var e=this;if(t&&(this.list=[],this.page=1),0!=this.typeList.length){uni.showLoading();var n=this.typeList[this.typeIndex],i={_action:"getData",page:this.page,perPage:this.perPage,type_id:n.id,patient_id:this.patient_id};this.$ajax.get("/admin-api/record?",{params:i}).then((function(t){uni.stopPullDownRefresh(),0==t.status&&(e.list=e.list.concat(t.data.items),e.total=t.data.total)})).catch((function(t){uni.stopPullDownRefresh()}))}},reachBottom:function(){this.list.length=0;--r){var a=this.tryEntries[r],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var u=o.call(a,"catchLoc"),c=o.call(a,"finallyLoc");if(u&&c){if(this.prev=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&o.call(i,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),j(n),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var i=n.completion;if("throw"===i.type){var r=i.arg;j(n)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,i){return this.delegate={iterator:D(e),resultName:n,nextLoc:i},"next"===this.method&&(this.arg=t),y}},e}}}]);