123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- Vue.component('consultation-list', {
- template: '<ul class="consultation-list">\
- <li v-for="(list,index) in chatList" class="consultation-list-item" @click="viewDetail(list)">\
- <img class="con-avatar" :src="httpRequest.getImgUrl(list.patientPhoto)" alt="" onerror="onerror=null;src=\'../../../images/p-female.png\'" />\
- <div class="con-user-info">\
- <span class="con-status" :data-status="list.status" desc="0进行1结束"></span>\
- <p><span class="con-user-name">{{list.patientName}}</span><span class="small con-time">{{list.czrq.substring(0,list.czrq.length-2)}}</span></p>\
- <p class="user-problem">咨询问题:{{list.symptoms}}</p>\
- </div>\
- </li>\
- </ul>',
- data: function() {
- return {
- chatList: "",
- curPage:1,
- httpRequest: httpRequest
- }
- },
- props:["consultaData"],
- methods: {
- viewDetail: function(list) {
- function subTime(d){
- return d.substr(5,2)+d.substr(8,2)
- }
- var title = list.patientName+subTime(list.czrq)+"咨询"
- top.layer.open({
- type: 2,
- title:title,
- maxmin: true,
- area: ['1000px', '600px'],
- shadeClose: false,
- content: 'consult-detail.html?consult='+list.code+'&type='+list.type
- });
- }
- },
- computed:{
-
- },
- watch:{
- consultaData:function(val){
- this.chatList=this.consultaData;
- }
- },
- mounted: function() {
- var divH = $("#tab-iframe",parent.document).height() - 75;
- $(".consultation-list").slimScroll({ height: divH,color: '#666'});
- }
- })
|