education-list.js 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. Vue.component('education-list', {
  2. template: '<ul class="consultation-list">\
  3. <li v-for="(list,index) in eduList" class="consultation-list-item" @click="viewDetail(list.articleId)">\
  4. <div class="edu-posi-re">\
  5. <div class="edu-title">{{list.attachedTitle}}</div>\
  6. <div class="edu-time">发送时间:{{list.createTime}}</div>\
  7. </div>\
  8. <div class="follow-user-info leave-word-container">\
  9. <span class="edu-status" :data-status="list.isread" desc="0未读1已读"></span>\
  10. <p class="leave-word">医生留言:{{list.leaveWords?list.leaveWords:"无"}}</p>\
  11. </div>\
  12. </li>\
  13. </ul>',
  14. data: function() {
  15. return {
  16. eduList: "",
  17. curPage:1
  18. }
  19. },
  20. props:["eduData"],
  21. methods: {
  22. viewDetail: function(id) {
  23. top.layer.open({
  24. type: 2,
  25. maxmin: true,
  26. title: '文章详情',
  27. area: ['1000px', '600px'],
  28. shadeClose: false,
  29. content: '../html/lay_edu_article_detail.html?articleId='+id
  30. });
  31. }
  32. },
  33. watch:{
  34. eduData:function(val){
  35. this.eduList=this.eduData;
  36. }
  37. },
  38. mounted: function() {
  39. var divH = $("#tab-iframe",parent.document).height() - 75;
  40. $(".consultation-list").slimScroll({ height: divH,color: '#666'});
  41. }
  42. })