toBeReserved-list.js 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. Vue.component('reserved-list', {
  2. template: '<ul class="consultation-list">\
  3. <li v-for="(list,index) in toBeReservedList" class="consultation-list-item" @click="viewDetail(list.id)">\
  4. <p class="follow-up-doctor"><span class="start-time pull-right">预约时间:{{list.czrq.substr(0,19)}}</span>预约医生:{{list.doctorName}}</p>\
  5. <div class="follow-user-info">\
  6. <p>科室/医院:{{list.deptName}}/{{list.orgName}}</p>\
  7. <p class="completion-time">就诊时间:{{list.startTime?list.startTime.substr(0,16):""}}</p>\
  8. </div>\
  9. </li>\
  10. </ul>',
  11. data: function() {
  12. return {
  13. toBeReservedList: "",
  14. curPage:1
  15. }
  16. },
  17. props:["reserveData"],
  18. methods: {
  19. viewDetail:function(id){
  20. top.layer.open({
  21. type: 2,
  22. maxmin: true,
  23. area: ['1000px', '600px'],
  24. shadeClose: false,
  25. title:'代预约详情',
  26. content: '../html/lay_detail_reserved.html?orderId='+id
  27. });
  28. }
  29. },
  30. watch:{
  31. reserveData:function(){
  32. this.toBeReservedList = this.reserveData;
  33. }
  34. },
  35. mounted: function() {
  36. var divH = $("#tab-iframe",parent.document).height() - 75;
  37. $(".consultation-list").slimScroll({ height: divH,color: '#666'});
  38. }
  39. })