<template>
	<div>
		<common @asynCallBack="asynCallBack"></common>
		<top-header :pageTitle="pageTitle"></top-header>

		<div class="mui-content margin60">
			<div class="mui-content-padded vongi-qingjiadt">
				<form class="mui-input-group">
					<div class="mui-input-row">
						<label>上报人</label>
						<span v-text="detail.name"></span>
					</div>
					<div class="mui-input-row">
						<label>联系方式</label>
						<span v-text="detail.phone"></span>
					</div>
				</form>
			</div>
			<div class="mui-content-padded  vongi-qingjiadt vongi-hdsq">
				<form class="mui-input-group vongi-wybx">
					<div class="mui-input-row padd10">
						<label>上报内容</label>
						<span class="vongi-span vongi-meform-pho" v-text="detail.content"></span>
						<span class="vongi-span vongi-wordcard vongi-meform-pho">
							<div class="fyy-upphoto flew">
								<div v-for="(item,index) in detail.img.split(',')" class="mui-col-xs-3">
									<img :src="item" />
								</div>
							</div>
						</span>
					</div>

				</form>
			</div>
			<div class="mui-content-padded vongi-qingjiadt">
				<form class="mui-input-group">
					<div class="mui-input-row">
						<label>上报时间</label>
						<span v-text="detail.createTime"></span>
					</div>
					<div class="mui-input-row">
						<label>上报状态</label>
						<span class="color55f868" v-text="detail.statusN"></span>
					</div>
				</form>
			</div>
		</div>
		<div class="fyy-footer">
			<div class="bindfyy-btn" @click="goBack"><button type="submit" class="mui-btn mui-btn-primary ">返 回</button></div>
		</div>

		<loading :visible="isLoading"></loading>
	</div>
</template>

<script>
	import * as API_Health from '@/apis/Master/health'
	import Common from '$project/components/Common.vue'
	import Loading from '$project/components/Loading.vue'
	import TopHeader from '$project/components/TopHeader.vue'
	import {
		mapGetters,
		mapMutations
	} from 'vuex'
	export default {
		name: 'MasterHealthReportInfo',
		components: {
			Common,
			Loading,
			TopHeader
		},
		data() {
			return {
				pageTitle: '疫情上报详情',

				isLoading: false,

				id: '',
				detail: {
					img: ''
				},
			}
		},
		created() {
			this.id = this.$route.query.id ? this.$route.query.id : '';
		},
		methods: {
			//获取详情
			getDetail(id) {
				this.id = id || this.id;
				this.isLoading = true;
				API_Health.getReportInfo(this.id).then(response => {

					this.detail = response;

					this.isLoading = false;
				}).catch(error => {
					this.isLoading = false;
					mui.toast(error);
				})
			},
			//返回
			goBack() {
				this.$router.go(-1);
			},
			asynCallBack() {

			},
		},
		mounted() {
			//获取详情
			this.getDetail();
		},
		destroyed() {},
		computed: {
			...mapGetters({
				openId: 'wx_openid',
				token: 'token',
			})
		},
	}
</script>

<style scoped src="$project/assets/css/xpwyfyy.css"></style>
<style src="$project/assets/css/iconfont.css"></style>
<style>
</style>
