follow-up.js 962 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. new Vue({
  2. el: '#app',
  3. data: {
  4. total:3,//总页数
  5. currentPage:1,//当前页数
  6. list:[],//列表集合
  7. patient:null,
  8. teamCode:null
  9. },
  10. methods:{
  11. msgListView: function(page){
  12. var vm=this;
  13. if(page){
  14. vm.currentPage=page;
  15. var data = {
  16. patient:vm.patient,
  17. teamCode:vm.teamCode,
  18. page:page,
  19. pagesize:10}
  20. recordAPI.followUpList(data).then(function(res){
  21. if(res.status==200){
  22. if(res.data.length>0){
  23. vm.list=res.data;
  24. $(".followup-list").animate({scrollTop:0},0);//滚回顶部
  25. $(".slimScrollBar").css('top',0);
  26. }else{
  27. top.toastr.info("没有更多内容了");
  28. }
  29. }else{
  30. top.toastr.error(res.msg);
  31. }
  32. })
  33. }
  34. }
  35. },
  36. mounted(){
  37. this.patient = localStorage.getItem("severPatientCode");
  38. this.teamCode = JSON.parse(localStorage.getItem("severPatientTeam")).id;
  39. this.msgListView(this.currentPage);
  40. },
  41. })