(function() { Vue.component('hospital-source', { template: '
\
\
按医院
\
\
\
\ \
\
\
{{data.hosName}}[{{data.levelName}}]
\
\ \ {{data.address}}\
\
\
\
\
\
\
', props: [], data: function() { return { isInit: true, hospitalData: [], currentPage: 1, pageSize: 10, totalPage: 0 } }, mounted: function() { var vm = this; vm.getHospitalList(); }, methods: { hostipalClick: function(data) { location.href = "../html/select-hospital.html?hospitalId=" + data.hospitalId + "&hosName=" + data.hosName; }, getHospitalList: function() { var vm = this; var params = { pageIndex: vm.currentPage, pageSize: vm.pageSize, provinceCode: "360000", cityCode: 361100 } appointmentAPI.querySimpleHospitalList(params).then(function(res) { if(res.successFlg && res.obj.Code == "10000") { var hospitalData = res.obj; vm.hospitalData = hospitalData.Result; if(vm.isInit) { vm.totalPage = Math.ceil(hospitalData.Total / vm.pageSize); //分页初始化 $("#page").paging({ pageNo: 1, totalPage: vm.totalPage, totalSize: hospitalData.Total, callback: function(num) { vm.currentPage = num; //回调的页数 getHospitalList(vm); } }) vm.isInit = false; } } }) } } }); })() //
\ // {{data.doctorNum}}\ // 个推荐医生\ //
\