new Vue({
  el: '#app',
  data: {
  	statisticsList:{
  		article:{month: 0, year: 0, history: 0},
			consult:{month: 0, year: 0, history: 0},
			followup:{month: "0/0", year: "0/0", history: "0/0"},
			guidance:{month: 0, year: 0, history: 0},
			reservation:{month: 0, year: 0, history: 0}
  	},
  	teamName:null,
  	patientName:null
  },
  mounted: function() {
		var vm=this;
		var patient = window.localStorage.getItem("severPatientCode");
		var teamInfo = JSON.parse(window.localStorage.getItem("severPatientTeam"))
				vm.teamName = teamInfo.name;
		//获取数据
		recordAPI.getStatistics({patient:patient,teamCode:teamInfo.id}).then(function(res){
			if(res.status==200){ 				
				vm.statisticsList=res.data;
			}else{
				top.toastr.error(res.msg);
			}
		})
		//获取居民信息
		recordAPI.patientInfo({patient:patient}).then(function(res){
			if(res.status==200){ 				
				vm.patientName = res.data.name
			}
		})
  }
})