(function() { Vue.component('record', { template: '
\
\ \
\
\ \
\
\ \
\ \
暂无预约就诊记录
\
\
\
\
\ \
\ \
暂无预约就诊记录
\
\
\
\
\
\
\ \
', props: [], data: function() { return { code: "record", records: [], historyrecords: [], recodestype: '2', historytype: '', recordinfo: {}, defaultImg: "../../../images/moren_touxiang_img.png", ishomeNull: false, ishistoryNull: false, } }, mounted: function() { var vm = this vm.getlist(1, vm.recodestype) vm.getlist(1, vm.historytype) }, methods: { getlist: function(pageNo, types) { var vm = this var oauthInfo = JSON.parse(sessionStorage.getItem("oauthInfo")); var filters = "userId=" + oauthInfo.id if(types == '2') { filters += ";state=" + types } var param = { fields: '', filters: filters, sort: '+registerDate', page: pageNo, size: 5 } jiuzhenAPI.queryRegOrderInfos(param).then(function(res) { if(types == '2') { vm.records = res.detailModelList if(res.totalCount == 0) { vm.ishomeNull = true } else { vm.inithomePage(pageNo, res.totalPage, res.totalCount) } } else if(types == '') { vm.historyrecords = res.detailModelList vm.inithistoryPage(pageNo, res.totalPage, res.totalCount) if(res.totalCount == 0) { vm.ishistoryNull = true } else { vm.inithistoryPage(pageNo, res.totalPage, res.totalCount) } } }) }, cancelbtn: function(orderid, thirdorderid) { mineJiuZhenDialogForm.cancelAppointment(orderid, thirdorderid) }, inithomePage: function(pageNo, total, size) { var vm = this //分页初始化 $("#homepage").paging({ pageNo: pageNo, totalPage: total, totalSize: size, callback: function(num) { //回调的页数 vm.getlist(num, vm.recodestype) } }) }, inithistoryPage: function(pageNo, total, size) { var vm = this //分页初始化 $("#historypage").paging({ pageNo: pageNo, totalPage: total, totalSize: size, callback: function(num) { //回调的页数 vm.getlist(num, vm.historytype) } }) }, getinfo: function(orderid) { var vm = this jiuzhenAPI.getRegOrderInfo(orderid).then(function(res) { vm.recordinfo = res.obj vm.openmodel() }) }, openmodel: function() { $('#appointmentinfo').modal('show') }, hideModel: function() { $('#appointmentinfo').modal('hide') } }, }) })()