Xiao_yanpeng 7 years ago
parent
commit
e1db70b5c4
2 changed files with 20 additions and 14 deletions
  1. 1 1
      app/record/html/census.html
  2. 19 13
      app/record/js/census.js

+ 1 - 1
app/record/html/census.html

@ -9,7 +9,7 @@
	</head>
	<body>
		<div id="app" class="table-responsive">
			<p class="text-center">医生为""提供的健康服务统计如下</p>
			<p class="text-center"><span v-text="teamName"></span>为<span v-text="patientName"></span>提供的健康服务统计如下</p>
			<div class="table-responsive text-center">
				<table class="table table-bordered table-hover">
					<tr class="grayish-bg">

+ 19 - 13
app/record/js/census.js

@ -3,26 +3,32 @@ new Vue({
  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}
  	}
	
			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 data = {patientCode:'fca8c658ffda42afa5be91e54e0268c8',
				patient:'fca8c658ffda42afa5be91e54e0268c8',
				teamCode:646,
				page:1,
				pagesize:10}
		recordAPI.getStatistics(data).then(function(res){
		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
			}
		})
  }
})