Vue.component('follow-list', {
	template: `<ul class="followup-list">
				<li v-for="(list,index) in followUpList" class="consultation-list-item" @click="viewDetail(list)">
					<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>
					<div class="follow-user-info">
						<span class="follow-status" :data-status="list.status" desc="3进行2计划中1完成"></span>
						<p class="act-type">方式/类型：{{list.followupTypeName}}{{list.followupClassName?"/"+list.followupClassName:""}}</p>
						<p v-if="list.status==1" class="completion-time">完成时间：{{list.followupDate.substr(0,16)}}</p>
						<p v-else class="completion-time">计划时间：{{list.followupPlanDate.substr(0,16)}}</p>
					</div>
				</li>
			</ul>`,
	data: function() {
		return {
			followUpList:[],
			curPage:1
		}
	},
	props:["followUpData"],
	methods: {
		viewDetail: function(id) {
			top.layer.open({
		      type: 2,
		      maxmin: true,
		      area: ['1000px', '600px'],
		      shadeClose: false,
		      content: 'ddd'
		    });
		}
	},
	watch:{
		followUpData:function(val){
			this.followUpList=this.followUpData;
		}
	},
	mounted: function() {
		var divH = $("#tab-iframe",parent.document).height() - 75;
		$(".followup-list").slimScroll({ height: divH,color: '#666'});
	}
})