follow-up-list.js 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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. top.layer.open({
  24. type: 2,
  25. maxmin: true,
  26. title:"随访详情",
  27. area: ['800px', '600px'],
  28. shadeClose: false,
  29. content: '../../followup/html/lay_followUp_detail.html?id='+list.id
  30. });
  31. }else{
  32. top.toastr.warning("请在手机上完成随访才能查看详情")
  33. }
  34. }
  35. },
  36. watch:{
  37. followUpData:function(val){
  38. this.followUpList=this.followUpData;
  39. }
  40. },
  41. mounted: function() {
  42. var divH = $("#tab-iframe",parent.document).height() - 75;
  43. $(".followup-list").slimScroll({ height: divH,color: '#666'});
  44. }
  45. })