toBeReserved-list.js 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. Vue.component('follow-list', {
  2. template: `<ul class="consultation-list">
  3. <li class="consultation-list-item" @click="viewDetail(1)" v-for="(list,index) in toBeReservedList">
  4. <p class="follow-up-doctor"><span class="start-time pull-right">开始时间:{{list.czrq}}</span>随访医生:{{list.doctorName}}</p>
  5. <div class="follow-user-info">
  6. <p>科室/医院:{{list.deptName}}/{{list.orgName}}</p>
  7. <p class="completion-time">预约时间:{{list.startTime}}</p>
  8. </div>
  9. </li>
  10. </ul>`,
  11. data: function() {
  12. return {
  13. toBeReservedList: [{id:1,photo:'#',dname:'山东省地方',czrq:'2018-12-12 12:12:12',orgName:'xx医院',doctorName:'陈医生',deptName:'心理科室',startTime:'2018-12-12 12:12:12'}],
  14. // toBeReservedList: "",
  15. curPage:1
  16. }
  17. },
  18. props:["toBeReservedData"],
  19. methods: {
  20. viewDetail:function(){
  21. top.layer.open({
  22. type: 2,
  23. maxmin: true,
  24. area: ['1000px', '650px'],
  25. shadeClose: true,
  26. moveOut:true,
  27. btn:'返回',
  28. success: function(layero){
  29. layero.find('.layui-layer-btn').css({'text-align': 'center','border-top': '1px solid #ececec','padding-top': '7.5px'});
  30. layero.find('.layui-layer-btn').find('a').addClass("layui-btn").css({background: '#f96565',color: '#fff',width: '100px',border: 'none', height: '34px','line-height':'22px',padding: '6px 12px','font-size': '14px'});
  31. },
  32. content: '../html/lay_detail_reserved.html'
  33. });
  34. // top.layer.full(layerTop);
  35. }
  36. },
  37. watch:{
  38. followUpData:function(val){
  39. this.toBeReservedList=this.toBeReservedData;
  40. }
  41. },
  42. mounted: function() {
  43. this.$emit('init-data', this.curPage);
  44. }
  45. })