Vue.component('follow-bottom', {
	template: '<div class="plr30 ptb10">\
		<p class="c-f16 c-37a6ed">签到信息&nbsp;(目前仅支持APP/pad签到)</p>\
		<div class="plr30">\
			<div class="ui-grid mt10">\
				<div v-if="followUpData.type==1" class="ui-col-1">签到方式:&emsp;定位签到</div>\
				<div v-if="followUpData.type==2" class="ui-col-1">签到方式:&emsp;拍照签到</div>\
				<div v-if="followUpData.type==3" class="ui-col-1">签到方式:&emsp;门牌签到</div>\
				<div class="ui-col-1">签到时间:&emsp;<span v-html="followUpData.createTime"></span></div>\
			</div>\
			<div class="mt10">签到位置:&emsp;<span v-html="followUpData.address"></span></div>\
			<div class="ui-grid mt10">\
				<div class="ui-col-0">签到拍照:&emsp;</div>\
				<div class="ui-col-0"><img v-for="item in imgSrc" :src="getImgUrl(item)"  @click="toImgUrl(getImgUrl(item))" width="50" height="50" style="margin:10px;"></div>\
			</div>\
		</div>\
	</div>',
	props: ['followupid'],
	data: function () {
		return {
			followUpList: [],
			curPage: 1,
			followUpData: {},
			imgSrc:[],
		}
	},
	watch: {
		followUpData: function (val) {
			this.followUpList = this.followUpData;
		}
	},
	mounted: function () {
		this.getData()
		
	},
	methods: {
		getData: function () {
			var vm = this
			fangshiAPI.findByFollowupId({ followupId: this.followupid || '1' }).then(function (res) {
				if (res.status == 200) {
					var data = res.data
					if (data != null) {
						vm.followUpData = data
						vm.imgSrc=data.img?data.img.split(','):''
					}
				} else {
					top.toastr.error(res.msg);
				}
			})

		},
		 getImgUrl:function(str) {
			return httpRequest.getImgUrl(str)
		},
		toImgUrl:function(str){
			return window.location.href=str
		},
	
	}

})