census.js 936 B

12345678910111213141516171819202122232425262728293031323334
  1. new Vue({
  2. el: '#app',
  3. data: {
  4. statisticsList:{
  5. article:{month: 0, year: 0, history: 0},
  6. consult:{month: 0, year: 0, history: 0},
  7. followup:{month: "0/0", year: "0/0", history: "0/0"},
  8. guidance:{month: 0, year: 0, history: 0},
  9. reservation:{month: 0, year: 0, history: 0}
  10. },
  11. teamName:null,
  12. patientName:null
  13. },
  14. mounted: function() {
  15. var vm=this;
  16. var patient = window.localStorage.getItem("severPatientCode");
  17. var teamInfo = JSON.parse(window.localStorage.getItem("severPatientTeam"))
  18. vm.teamName = teamInfo.name;
  19. //获取数据
  20. recordAPI.getStatistics({patient:patient,teamCode:teamInfo.id}).then(function(res){
  21. if(res.status==200){
  22. vm.statisticsList=res.data;
  23. }else{
  24. top.toastr.error(res.msg);
  25. }
  26. })
  27. //获取居民信息
  28. recordAPI.patientInfo({patient:patient}).then(function(res){
  29. if(res.status==200){
  30. vm.patientName = res.data.name
  31. }
  32. })
  33. }
  34. })