follow-up-list.js 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. Vue.component('follow-list', {
  2. template: '<ul class="followup-list">\
  3. <li v-for="(list,index) in followUpList" class="consultation-list-item" @click="viewDetail(list)">\
  4. <p class="follow-up-doctor"><span class="start-time pull-right">开始时间:{{list.createTime}}</span>随访医生:{{list.doctorName}}<span v-if="list.prescriptionCode" class="fu-tag">长处方</span></p>\
  5. <div class="follow-user-info">\
  6. <span class="follow-status" :data-status="list.status" desc="3进行2计划中1完成"></span>\
  7. <p class="act-type">方式/类型:{{list.followupTypeName}}{{list.followupClassName?"/"+list.followupClassName:""}}</p>\
  8. <p v-if="list.status==1" class="completion-time">完成时间:{{list.followupDate.substr(0,16)}}</p>\
  9. <p v-else class="completion-time">计划时间:{{list.followupPlanDate.substr(0,16)}}</p>\
  10. </div>\
  11. </li>\
  12. </ul>',
  13. data: function() {
  14. return {
  15. followUpList:[],
  16. curPage:1
  17. }
  18. },
  19. props:["followUpData"],
  20. methods: {
  21. viewDetail: function(list) {
  22. // if(list.status == 1){
  23. if(list.followupClass =="5" || list.followupClass =="6" ||list.followupClass =="7" ||list.followupClass =="8" ||list.followupClass =="9"){
  24. window.location.href = "../index.html?id="+list.id+"&type="+list.followupClass+"&isEdit=0"
  25. }else{
  26. top.layer.open({
  27. type: 2,
  28. maxmin: true,
  29. title:"随访详情",
  30. area: ['800px', '650px'],
  31. shadeClose: false,
  32. content: '../../followup/html/lay_followUp_detail.html?id='+list.id,
  33. end: function () {
  34. location.reload();
  35. }
  36. });
  37. }
  38. // }else{
  39. // top.toastr.warning("请在手机上完成随访才能查看详情")
  40. // }
  41. }
  42. },
  43. watch:{
  44. followUpData:function(val){
  45. this.followUpList=this.followUpData;
  46. }
  47. },
  48. mounted: function() {
  49. var divH = $("#tab-iframe",parent.document).height() - 75;
  50. $(".followup-list").slimScroll({ height: divH,color: '#666'});
  51. }
  52. })